Andrew Maddison

Flowerchild.

Codemanship TDD Master Class - Fizz and Indeed Buzz.

I just got back from attending a budget friendly TDD Masterclass weekend course run by Jason Gorman of Codemanship, and I’m duly enthused and encouraged about the whole TDD thing. Specifically, I’m now happy that I can do exercises and KATAs test first and actually learn something.

So I set myself the challenge of completing FizzBuzz TDD on the tube between Waterloo and Woodside park, about 40 minutes. I failed. Dismally.

In fairness most of my failure was because hordes of tourists meant by the time I got a seat I only managed to get one test passing by the time I had to get off. It took me three stations just to boot the laptop and open visual studio.

Anyway, when I got home I tried again and I’ve just finished FizzBuzz, hopefully remembering some of the 13 good habits of TDD Jason’s been trying to drum into us. It took me about 55 minutes (including adding an “empty test method” snippet into Visual Studio). Longer than I was expecting, but never mind.

Just for context, hacking out a console app FizzBuzz in C# last week took me 6 minutes from a cold start (not running visual studio), and that included getting confused and trying to use the modulus operator back to front.

Another little suggestion I’m going to try to take on board is to be realistic in the short term. I’m not going to use this at work any time soon, but I’ll try and use it on my pet projects at home from now on and to do the odd exercise regularly to keep getting the hang of it. Of course the road to hell is paved with good intentions, which is why I’m writing this post to expose myself to public ridicude when if I don’t try very hard.

Anyway, a big thank you to Jason for organising a great course.

Now, how do I write a blog post without sounding like my Father putting on his telephone voice?

Comments