RSS RSS feed | Atom Atom feed

The Bowling Game Kata

Several years ago, I attended the SD West conference. One of the most memorable things I did there was a hands-on session with "Uncle Bob" Martin on TDD and pair programming. Everyone brought their laptops, and for 3 hours we learned how TDD works. The Bowling Game Kata was the example he used as the attendees 'paired' with Bob. He drove, we made comments.

After the Bowling Game example, he had us divide up into pairs and work on a few other sample problems. I ended up pairing with someone several years older than me, a very experienced developer who had never used Java - which is the language we were using for the exercise. I was skeptical at first, but by following the steps - write a test, see it fail, make it pass, repeat - we were able to get good solutions to 2 problems in a short period of time. And each time we were surprised at how simple and elegant the resulting code turned out to be.

I remember coming back from the conference all charged up about pair programming and TDD, and tried to spread that enthusiasm to my team. It didn't work. I kept saying to myself "I need to set up a meeting so we can all do this exercise together, then they'll get it." But everyday work always seemed to get in the way. We didn't have time to spend 3 hours learning something new. Kinda like that old story about the guy who doesn't have time to sharpen his saw, because he's too busy cutting down trees...

I'm glad I'm starting to actually do it now. It takes time to learn, and you have to keep doing it, but it pays off. You get better, things go faster. Keep at it.




Add a comment