How to Kata
What makes a kata a kata? Why is that different than solving quick puzzles? How can performing katas more than once be helpful?
It may help to relate this to something else. I recently read a blog post where the author spoke about walking, and how you don’t just get better at walking from having done it. The premise was, since people walk their whole lives they should be expert walkers in a given amount of time. I think this is spot on, and helps to tell the difference between “doing programming” and doing a programming kata.
Let’s think about running, or perhaps weight lifting. When you first start you’ll have some newbie gains for sure. But eventually if you just go out jogging you’re not going to get better. You’ll have minor spikes of improvements, but overall you won’t progress. This goes to show you that just doing something doesn’t necessarily make you better at it.
Weight lifting is much the same way. If you just go in and tinker about then you’ll only have low success after your newbie gains. You probably won’t get stronger, bigger, or whatever your goal is.
The way we progress is to measure and create goals. Getting better at running and getting better at weight lifting require similar things. It requires a plan, a goal, and specific work towards that goal. With weight lifting it could be as simple as keeping a journal so you can improve each session, but eventually that will stop producing results. You need a plan. You need a program.
People who run races create or follow running plans. Most people I know who do it consume information about running. You can see how this is different than casual running. There is always a goal. There’s always a program. Every run has a purpose.
This relates well to Katas, and this is why I think katas are different than the quick mind puzzles that are so popular with programming. When you do a kata you need to have a goal in mind. You need to be practicing something intentionally. You may pick an easy problem so you can practice doing TDD. You might pick a more complex problem so you can practice architecture. In fact, if you have that specific improvement in mind, I think those quick puzzles can be katas.
This is how doing a kata more than once can be helpful. Sometimes in order to practice something new or difficult, we need an environment we are familiar with. Think for instance if you had an OOP kata that you’d solved a couple different ways. You used this kata initially to practice inheritance. Then you knew how to solve it so you wanted to practice SOLID principles. It’s easier to exercise a new skill on some problem you could already solve. Then you decide that you want to use this kata to practice TDD or maybe try some other architecture choices out. Sometimes it’s beneficial to use a kata you’ve already solved, and sometimes it’s fun to use a new one.
People go out for a run just for fun or go lift with friends to have a good time. Sitting down to bang out some programming can be fun. Solving a quick algorithm puzzle can be rewarding. There’s no reason not to do it. However, you should make a distinction between practicing for improvement and having fun. It’s my opinion that in order to be a professional we are responsible for staying sharp at our craft and learning. This means dedicating time each week to several things, one of them being programming skills.
Now you know how to kata.