Geeks With Blogs


Dylan Smith ALM / Architecture / TFS

I will be giving a presentation on TDD to the Winnipeg .Net Users Group on Jan 9.  Should be an interesting talk.  Got about 2 hours and I want to go through a quick powerpoint and talk about some of the core concepts and benefits.  Then dive right into developing something simple with TDD.  Not sure what I'm going to use yet for my coding sample.  I might take the classical bowling game example.  But Bowling has been done ad nauseaum...  Sudoku could be fun to do, but last time I tried TDD'ing that I ended up using mock objects and I was hoping to avoid mocks and interaction based testing to keep things simple.  I could also do some boring business-type scenario, transferring funds from one bank account to another or something equally boring.  I think some people might prefer an example like that as it is more applicable to their day-to-day work; but to do any business-type scenario it almost has to include a database which means using mock objects in the tests.  I'll just have to do a test-run of a couple of the ideas and see which one feels best.

Jean-Paul Boodhoo was telling me that he likes to just let the audience pick out a problem.  That sounds like a great idea, can help show how easy it is to apply TDD to any problem by not having a pre-canned demo.  However, then I wouldn't be able to steer clear of some of the more advanced concepts like mocking and inversion of control principles.  If I had 1-2 more hours then I'd just cover mocking also and could tackle pretty much any type of problem as a demo...but in the 2 or so hours I have I just think it would be too rushed.

Anyways, it should be an interesting talk I hope.  Anybody out there who is interested in TDD or in techniques that produce clean, reliable, and easily maintainable code should try and make it out.  Also if anybody has any input as to what they think I should cover (or not cover) or use as a demo problem feel free to contact me (optikal "at"

Posted on Friday, December 15, 2006 9:02 AM | Back to top

Comments on this post: Presentation On TDD

# re: Presentation On TDD
Requesting Gravatar...
Great work last night...

As I've thought about TDD in retrospect, perhaps one of the reasons why it's easier to push off the "big design" for evolutionary design is because refactoring is so much less dangerous. If you already can quickly test that you don't break anything when refactoring. And I think that might be why we're so conditioned to think ahead--normally, it's easy to slip up when refactoring (especially if we're refactoring a lot of code), but the unit tests can confirm that we haven't regressed. (Or if we have, they help pinpoint the problem.)
Left by Orion on Jan 11, 2007 9:28 AM

# re: Presentation On TDD
Requesting Gravatar...
Thanks for the feedback. You've hit the nail right on the head. Refactoring really is the key part of TDD. The testing portion of it is just a tool to enable the constant and frequent refactorings to happen with ease.

However, having said that you do still need to have strong OO-design skills. If you have weak OO skills then TDD won't be a magical solution to help you end up with a good design. If you don't have the strong OO skills then it will be difficult to recognize when and how to refactor to improve the design. I still believe TDD will make it easier for somebody with weak OO skills, but by no means is it a silver bullet.
Left by Dylan on Jan 11, 2007 11:28 AM

Your comment:
 (will show your gravatar)

Copyright © Dylan Smith | Powered by: