views:

230

answers:

4

I find unit testing vital.

Several times I have tried the TDD but given up on it as sitting down with a piece of paper and drawing out a few diagrams first always seem more productive. As so many advocate the TDD I will keep trying.

I looked at this http://xprogramming.com/xpmag/sudoku5 (the last article of 5) but this seemed to highlight the difficulty I have with the approach.

Are there any good sample walkthroughs on the web based on a simple easily defined problem? This way I could try the approach again myself then compare with the sample. The sample would need to explain the thinking behind the approach.

I prefer to code in C# but have used Java.

Thanks

+3  A: 

The XP bowling game episode in the usual example, it's a dialogue between two developers coding. Theit code is written in Java. It's a nice illustration of how design emerge, rather than being defined up front.

philippe
@philippe - thanks I will take a look
DiggerMeUp
ps: I will upvote when I get enough rep.
DiggerMeUp
I have given you an upvote and will keep the question unanswered for a while to see if there are any more responses.
DiggerMeUp
Can't say I was a fan of this. I prefer the Money example by Beck. Maybe it's online somewhere.
Finglas
+1  A: 

Roy Osherove's String Calculator TDD Kata is a very good place to start because many people have done it and blogged about it or posted screencasts of doing it. He has linked to a number of them. This video in c# is a pretty good low-ceremony implementation IMO. People writing about doing the kata in C# or Java are easy to find. If you prefer a step-by-step textual walkthrough try David Tchepak's.

Handcraftsman
A: 

http://katacasts.com/ has many good examples (in many different languages) of doing Code Katas which include heavy TDD.

Just recently Kent Beck has put video's up at http://pragprog.com/screencasts/v-kbtdd/test-driven-development (pay to watch) and I have yet to hear anything bad about them.

Chad Gorshing