Importance of practice - Katas
So I have been listening to the maintainable podcast a lot lately. There is a lot of talk on there about doing coding katas. It also comes up a lot on twitter. I had never really done any. Then I took a udemy class on TDD in Python and it had you do some katas. I thought it was a very worthwhile exercise so I started doing them in LabVIEW.
So what are coding katas? Well, kata is a martial arts term. It is a Japanese word that means form. If you have ever studied a martial art you have probably done kata. It’s a pretty common activity. It can be best described as a ritualistic series of basic movements designed to mimic fighting an imaginary opponent. The goal is to practice the basic movements in a low-pressure environment so that they become muscle memory. Typically kata is something you would spend a few minutes practicing every day.
How can we apply this to coding? There are certain basic activities that we do all the time when writing code, such as writing tests and refactoring. We can define simple problems that allow us to practice and refine those skills. The goal is to refine your workflow and learn how to move efficiently around the IDE. We can regularly schedule some time to just sit down and play with these problems. Luckily we don’t have to make those problems up on our own. There are some existing repositories. Here is one of my favorites: http://codingdojo.org/kata/
The one issue I had with the existing katas is that it was hard to connect those abstract problems directly to something I would do during my normal LabVIEW development. So I came up with some katas of my own that were related to the existing ones, but were more LabVIEW centric.
Here are some other coding challenges that aren’t advertised as kata, but are useful just to have a playground to try out new techniques: