- RT @mattyglesias: Look, just because Sessions hasn't actually been convicted of a crime is no reason we can't start seizing his property no… 8 hours ago
- Wow #DUNKIRK was pretty amazing. Go see it. 12 hours ago
- RT @FullFrontalSamB: “Sean Spicer crawled to freedom through five hundred yards of shit smelling foulness I can’t even imagine…” https://t.… 1 day ago
- RT @dotnetkicks: Creating a GitHub Issues Autoresponder using Webask.io by @NotMyself dotnetkicks.com/r/253540?url=h… #dotnet via @DotNetKicks 1 day ago
- RT @databozo: Doing a thing for school. If you have a kid and use(d) formula, mind taking a survey? surveymonkey.com/r/XHKFN6S 2 days 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.