- hey @marthakelly have you met @garannm? she is also a big javascript fan... 7 hours ago
- woot looks like i get to spend a week working with the Know Your Meme team haxoring on some ruby in the near future. 8 hours ago
- Cheezburger is hiring C# devs. If you are lol-curious you should apply. cheezburger.theresumator.com/apply/NONdUl/A… 11 hours ago
- My weapon would be a ghost. #Blackwater 2 days ago
- RT @Cheezburger: Stick 'Em with the pointy end. A Game of Thrones Cheezburger Site chzb.gr/LBpFrw 4 days ago
I Am Not Myself
Bills.Pay(Developer.Skills).ShouldBeTrue()
TDD Kata Calculator Demonstration
Posted by on October 23, 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<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.
Hi Bobby,
I found this screencast via Roy Osherove’s blog. I’m teaching a short course in TDD and I’d like my students to look at some screencasts as an example of what TDD looks like in practice. I like this screencast because it uses C#, (a language they are familiar with), and it solves a straightforward Kata in a logical way, with consistent small steps and frequent refactoring.
Would it be ok with you if I asked my students to study this screencast? I’ll ask them not to bother you with questions, and since there are only 20 people in my class it shouldn’t overload your server. I’d just like to ask that you don’t take this screencast down from the web in the near future
Regards,
Emily
By all means, feel free. And your students are more than welcome to ask questions.
Thanks!
Instead of Camtasia you might like to try this CamStudio. It’s free. Thanks for the video!
What do you use to replace the spaces in the string with underscores? seems really neat.
It was a visual studio macro that I got from J.P. Boodhoo’s website. I currently use AutoHotKey and a script that you can find on J.P.’s site as well.