- WTF twitter.com/realdonaldtrum… 10 hours ago
- Nice I love D3! gag.gl/eK0juj 22 hours ago
- RT @blackgirltech: If you're a Black woman & want to learn how to code but need some financial help, you should apply for the https://t.co/… 1 day ago
- Louie is growing so fast! https://t.co/hfvOqScGp3 1 day ago
- RT @vibronet: Open standards should be table stakes for everyone - but won’t be enough to save you from vendor lock-in https://t.co/TbMebtG… 1 day ago
TDD Kata Calculator Demonstration
October 23, 2009Posted by on
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<char>() 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.