One of the key aspects of a Software Craftsmanship is constant practice.
Kata (from Martial Arts) is one form of such practice. The notion of a Code Kata was first introduced by Dave Thomas and can be viewed as:
- Practice of the same methods, solutions and activities to a perfection.
- Practice of the same problem, tackling it each time from a different angle or with a different solution.
Solving a problem in different methods helps to identify solutions that work better in the right context (requirements).
Below (also here) is one of my Prime Factors Kata's sessions recorded late at night :).
The Kata demonstrates finding a number's prime factors using TDD (C#, NUnit, VS 2008).
(Don't forget to turn on the speakers)
I must admit, that it is super difficult to record a completely clean demonstration, especially while synchronizing the music and the moves. Moreover, one of the real obstacles is statically typed languages (C#) that slow a bit the moves. Exercising the Kata with dynamically typed languages can ease and speed the performance.