July 1006

TDD Kata 1

Code Kata are small programming tasks that are repeated regularly to help developers learn and develop their skills and just the other day I discovered TDD Kata on Roy Osherove’s blog which he describes as “an exercise in code, refactoring and test-first” and recommends you practice daily.

The idea of kata is borrowed from martial arts in which patterns are practiced over and over until the techniques become ‘second nature’. When you start out the techniques are new and might feel strange, but over time you become more familiar with them and with continued practice refine your techniques becoming more efficient and more proficient in their use.

So today I started my practice; it is time-boxed to 30 minutes and one of my goals was to do the exercise without using my mouse to become more proficient in just using the keyboard. The exercise is to create a String Calculator using TDD; I won’t bore you with a blow-by-blow account of the steps I took on my first attempt. I didn’t complete the kata, but I will repeat it tomorrow and the day after and so on – each time I will aim to be just a bit better than before so I make small, incremental progress in learning and internalising the practice of TDD.

Incidentally there are some recorded sessions showing people doing the kata and in quite a few languages, so if you want to peek and see how someone else (in your favourite language) approaches this kata you can.

Permalink | Comments (3)

Comments

  1. oil painting United States oil painting (Saturday, July 10, 2010) #

    Very nice blog. Haha, I'm the first to leave a comment to your post.

  2. pingback sjmdev.com (Monday, July 12, 2010) #

    Pingback from sjmdev.com

    My TDD Kata progress

  3. Karl United Kingdom Karl (Thursday, July 15, 2010) #

    I got up to Part 4 in 30 minutes but then ran out of time Frown Didn't get part 4 to pass its test either.

    More tomorrow Smile

Comments are closed