Test Driven Development is growing in popularity.
The audience tonight at the Cleveland .NET SIG responded that about half were aware of TDD and around 8-9 attendees were already practicing it!
I have noticed a definite pattern of increased popularity of TDD at each new speaking engagement. Is this just a side effect of the rising popularity of Agile techniques in general? Are the upcoming TDD-based tools in Whidbey adding to the hype? Whatever it is, it is wonderful to see such keen interest - there were around 60 attendees at the meeting tonight. Thank you for your hospitality and enthusiasm. Slides and code are here.
Some of the attendee questions were:
- What is the expected overhead in terms of schedule when using TDD instead of traditional development? (in other words, how much longer will it take?)
Anecdotal evidence suggests that TDD is actually quicker! This is not intuitive since it stands to reason that writing tests and code versus just code must take longer. But as any TDDer will tell you, TDD provides a methodical approach allowing the two steps forward without the one step back (small steps almost always forward with no time lost in the debugger!). This paper argues that if TDD is slower the benefits gained by the improved quality of code may still be worth it. I couldn't find any published evidence for the assumption that it takes less time - but it certainly feels that way for me as a developer. Please let me know if you come across anything.
- What do you do when your tests take too long to run?
Refactor. Profile your tests - the nunit2report task for NAnt is wonderful for generating HTML reports of your test results with test duration times which can quickly help you spot the problems. Andy Marks talks more about this problem and strategies to combat it here. If some of your tests just take a long time and there is nothing you can do about it, then run them on an automated schedule of a build server so that their results are continually available - while this is not ideal, it *is* a workable solution.
- How can VNC be used when programming in pairs?
At one of my clients, we use VNC to connect to our dedicated pairing workstation from our notebooks. This gives us both access to a keyboard and mouse while using a much beefier machine (instead of one of our notebooks). Look for a blog post with a photograph on this soon. Some folks use VNC when pairing remotely over the internet.
I am flying back to DC early tomorrow ... taxi at 4:15AM to the airport!
Good night. :-)