/ Kata

Doing Katas

I never quite understood the practicality of Code and TDD Katas. The idea behind a kata is that you do it over and over and over... Until you can do it in your sleep.
"Why would I want to code tic-tac-toe a thousand times over?"
"Why build a bowling scoring program repeatedly?"

Well... Yea. My mind's kinda changed. I've done some properly applied TDD in the past month; and... every time my response at the result is "Wow! So small, clean, and elegant... And amazingly powerful."

I did Uncle Bob's Bowling Game TDD Kata myself and was shocked at how clean the code was. I know I'd never get that level of clean code via just coding. The mindset while writing code is so different doing TDD vs not.
A big surprise to me when I did this kata is how unprepared I was for the final form. Normally I'll probably experience this doing a new problem via TDD; but the Bowling Game was in a book. I don't recall which book; I think it was Martin's Agile Software Development; but it's on a shelf about 10 feet away... so... Too hard to check.
I read about the process; I looked at the code. I even have previously SEEN the final form of the code... and when I did the TDD Kata myself; WOW, shocked at what it actually produced.

I feel a bit silly for being as surprised at the elegence of the result; when I'd seen it before.
I'm taking it as a testament to the power of TDD. I hope to do a kata every day; Either TDD or just Code. I do say 'just Code' as I think it's not going to be as powerful as a TDD kata. It doesn't force as much consideration of the code. A Code Kata is a focus on the result; a TDD Kata is a focus on the process and mentality.

Based on my Bowling Game experience, I'm planning to do a TDD kata every day. I may utilize Code Kata's and create a TDD Kata out of it for myself. I hope this helps me operate via the TDD Strategy of "Fake It". I expect I'll adjust to "Obvious Implementation" for production; until "Wha? What's that fail?"

My goal from doing these will be to improve my code production and able to better communicate this process to others.

Quinn Gil

Code Crafter beating the drum of Development Best Practices. Extreme Programming and Object Oriented Design.

Read More