Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommend good online sample walkthrough of TDD? [closed]

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.

like image 828
DiggerMeUp Avatar asked Dec 17 '09 08:12

DiggerMeUp


2 Answers

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.

like image 200
philant Avatar answered Dec 19 '22 18:12

philant


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.

like image 33
Handcraftsman Avatar answered Dec 19 '22 18:12

Handcraftsman