Code Kata

by Charles Miller on March 28, 2003

Pragmatic Dave has posted a “Programming Kata”. It looks like a worthwhile exercise, I might post my answer when I've finished it, but I'm way too busy today with work, and the office Christmas party this evening1.

A minor nitpick. While I can see the appeal of picking a cool, martial-arty name for the exercise, it's really not a kata. While I've never done these things myself and could be wrong, my understanding is that a kata is a repetitive exercise to be performed over and over, in order to train the muscles to move and react a certain way. For the un-initiated, think “Wax on, wax off”. Programming kata are, by their nature, problems that once solved can't be repeated.

Still, just because the name is wrong, doesn't mean the exercise isn't beneficial. Other creative pursuits have been doing this sort of thing for years: my friend Lonita, for example, keeps a list of writing prompts for precisely the same purpose.

1 Yes, it's a bit late. We sort of didn't get around to organising it last year. Officially, it's been renamed the Autumn Party, but we all know the truth.2
2 I've been writing far too many footnotes lately.

Previously: PortableRemoteObject.biteMe()

Next: Testing private methods (don't do it)