Kata

What is kata?

Kata is martial arts term. It is a japanese word meaning “form”. It is a form of practice. Generally, it involves practicing certain moves as if you were fighting an imaginary opponent. It a prescribed set of basic movements and techniques that you just keep practicing over and over again and refining.

Kata is really just about repetition of the basics. In general the moves aren’t fancy. It’s about perfecting and fine tuning each of the basic movements. It’s about putting in the time to where it becomes muscle memory. Every class typically includes some time spent doing kata. It’s based on the idea that the better you know the basics, the more advanced you are.

How does it apply to coding?

In software there are certain basics actions that we take all the time: writing tests, refactoring, etc. A coding kata is a simple exercise that we do which allows us to practice those basic tasks. The idea is that it is a low-risk environment where we can try out new techniques and see what works. It also allows us work out the mechanics of our workflow and helps us to get really comfortable with all the features of our IDE.

List of katas

There are several well-known katas and there are several websites that collect them, such as this one. You can certainly start with any of those. For me, none of them really spoke to me as a LabVIEW programmer, so I tried to create some that seem more relevant to LabVIEW.

Alarm Kata

I took one of the more common katas, FizzBuzz and decided to create one that was similar. I changed the context to process monitoring and calculating alarms and warnings. I decided to call it the Alarm Kata (ALARM is our local LabVIEW User Group, for anyone who is not from Colorado). This particular kata is designed to help you practice TDD, so start by writing the tests first.