I have been reading up on code katas and think they are a fantastic idea, for those of you who don’t know what a code kata is have then don’t worry read on.

A code kata is, as I see it, how to take a requirement, break it down into a list of simple tasks and then write the code to solve those problems, pretty much what a developer would normally do anyway but you could tackle the problem using different coding languages/styles/patterns.

The reason I think code katas are interesting is as follows:-

  1. It will help you learn to use TDD – Use Test Driven Development to write a test before you write the code, write the test, run it so it fails, then write the code to make the test pass and that’s all, do this for each part of the problem your trying to solve.
  2. Estimate how long you think it will take to complete, then time yourself and see how long you take to complete the code kata.
  3. Help improve your typing skills and learn shortcut keys as you try to be more productive and learn to do the kata quicker each time.
  4. Use them at interviews to test your interviewees, see what they come up with and how they think rather than asking them about something they googled the night before the interview.
  5. The best way to learn how to code well is to practice, just like a musician needs to practice, good developers practice too.

Good examples

As a good starting point take a look at Roy Osherove’s string calculator – this can be done using a number of different code languages.

More code Kata’s can be found below:-

Let me know if you find any more and I will add to the list.