For some reason this whole Code Kata movement passed me by, so I'm coming late to the party, but I'm getting hooked.
The term kata comes from Japanese martial arts and means "detailed choreographed patterns of movements practiced either solo or in pairs" (wikipedia). The intent is to practice and practice some sequence of movements until it becomes second-nature, flowing, and effortless. Repetition, practice, training.
When applied to programming, it's the same intent. Every day, you take 30 minutes or so and and write some code; the same code every day. It's like practicing scales when you learned how to play the piano: every day you'd repeat the same scales, getting better at doing them, polishing, polishing.
The object is not necessarily to think of different ways of implementing the same solution, but to practice writing the same implementation from scratch every day, and throw everything away at the end of the session. You are learning your development tools through repetition; you are rehearsing your basic programming skills; you are not writing code for posterity.
Many code katas emphasize TDD. That is, once you've worked out the solution to your kata problem, you work through building it test-first and practice doing it. Perhaps you'll see different ways of working your way through the red-green-refactor cycle and slowly modify your approach. But again it's not particularly about that, it's about rehearsing your coding abilities for a certain set time every day, no matter what else happens that day.
I was talking to my old friend Maxx about this recently because we were both bemoaning the fact that we hardly program any more, and we really wanted to get back into it, to feel the Zen of being able to write code quickly and effortlessly. This is one way to prepare ourselves for that.
For some examples of code kata, check out these sites:
I've started with Roy's suggestion and once my kata session is elegant and effortless (!), I'll record it for a DevExpress video (since I'll be using CodeRush).
Now playing:
Police - Roxanne
(from Outlandos d'Amour)
1 Response
#1 Dew Drop – February 25, 2010 | Alvin Ashcraft's Morning Dew said...
25-Feb-10 7:21 AMPingback from Dew Drop – February 25, 2010 | Alvin Ashcraft's Morning Dew
Leave a response
Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.
_emphasis_
**strong**
[text](url)
`IEnumerable`
* an item
1. an item
> Now is the time...
Preview of response