TDD Kata Calculator Demonstration

Back to Listing

TDD Kata Calculator Demonstration

23 Oct, 2009

While at Alliance, a couple team members and I got the bug to do Code Katas. We picked up on Roy Osherove’s TDD Kata and started doing it as a team every morning time boxing ourselves to half an hour.

The three of us would hit a conference room and throw an IDE up on the wall with a projector. One person would write tests, another would implement and the third would be the “Business” representative by reading the requirements and making judgment calls on any questions we had. Every morning we switched positions.

This worked out really well, one person would do something interesting one day and the others would pick up on it and start doing it as  well. For example, when creating a list of delimiters we all started out using a List() because we couldn’t remember how to add a element to an array and didn’t want to take the time out of our thirty minutes to look it up. But then John, started using a string to hold our delimiters simply appending any extra ones on that were need. He then performed the split by using “delimiters.ToCharArray()”.

Terry, sick of writing the same setup code for the unit tests for each test, implemented a extension method that wrapped it up nicely so that all our tests were a single clear line.

This was a great way to practice TDD and to learn from my peers. I’ve moved on now from Alliance, but I am going to miss those guys. Hopefully, I’ll be able to get something similar going at the new gig. And, eventually recruit Terry and John… Just kidding, Craig. 8)

This video is just me, but it represents all the things we came up with to improve the design of our earlier solutions. It is also a great demonstration of using ReSharper and xUnit. Be sure to watch it in full screen, so that you can actually see what is going on. Next time, I’ll try some thing bigger. Anyone have tips?

And before you ask, yes you can have my crazy color scheme. 8) Oh I used Camtasia Studio 6 to produce the video. Great tool easy to use. Wish I had $300 to buy a license. 8) Well I’ll try to produce as many as I can in my 30 days.

Share this story

Bobby Johnson

About Author

I am a passionate engineer with an interest in shipping quality software, building strong collaborative teams and continuous improvement of my skills, team and the product.

comments powered by Disqus
Back to top