Posts tonen met het label kata. Alle posts tonen
Posts tonen met het label kata. Alle posts tonen

dinsdag 23 februari 2010

Birthday greeting kata in C# .Net

One of the katas that I have recently had the pleasure of finding and trying out is the birthday greeting kata by Matteo Vaccari. It's a great exercise in what I have termed "refounding" of existing software (see an earlier post). Here is an opportunity to take existing code, refactor, and add unit tests.

Now I'm no java expert and although I had fun playing around with Eclipse, I felt more like a toddler learning to take it's first steps than a kung fu code master (not that I am that either mind you). So I decided to have some fun and port the code to C# .Net. If you're interested you can find it here (Visual Studio 2008 unit testing).


Have fun :-)

dinsdag 2 februari 2010

Test driven development workshop

The company I'm currently working for is interested in starting up with Scrum but finding it difficult to make headway. As a start, they've decided to start familiarizing themselves with some of the agile and scrum elements. For example, they asked me to prepare a Test Driven Development (TDD) workshop for them so that they could gain a better understanding of what the benefits are.

Not being an experienced TDDer either, I googled the great StingCalculator Kata by Roy Osherove and prepared this. I found this to be a great kata for TDD because:
1) it allows for incremental building of tests and functionality (triangulation)
2) it quickly demonstrates the value of refactoring and reuse of code
3) you can easily hit red when going for the Obvious Implementation (fast) and so it forces you to go back to Fake It and Traingulation (slow).

I also made a short introduction to TDD and this Kata.