Big picture thoughts on software and other topics

October 1, 2008

"Getting Started With TDD" Workshop Recap

by Brian Donahue

Last night, I was the speaker at the monthly Philly.NETBroken Link: http://phillydotnet.org/ Hands-On Workshop event.  This was my second time doing a hands-on with them - last timeBroken Link: javascript:void(0);/*1222914593775*/ I got a lot of help from my friend Erik PetersonBroken Link: http://erikbase.blogspot.com/, and we did a workshop on TDD with Model-View-Presenter and Webforms.

Our first workshop got mixed reviews.  Many people really appreciated seeing all the ideas we were discussing, but I’d say a majority of them felt it was too much, too fast, and I sensed they were leaving without enough knowledge or confidence to try the techniques we were showing on their own.  On the positive side, I learned a great deal from the experience, and decided that I needed to take a much more back-to-basics approach for the next one.

So, last night, the theme of the workshop was "Getting Started With TDD."  Whereas last time, we basically implemented an entire new (small) feature on a web site, this time we literally spent almost three hours test-driving a single method.  To focus as much as possible on the principles and techniques for Test Driven Development, I avoided any advanced tools like mocking frameworks and IoC containers.  We hand-rolled our own test-doubles, and tested interaction in a very explicit manner.  We went at a very slow pace, but took a lot of time to explain every step, and answer questions. 

From my vantage point, the night felt very different from the prior workshop (which was still a lot of fun).  People seemed more engaged as participants rather than spectators, they were able to follow along, keep their solution building, and eventually, their tests passing.  Questions were frequent, and I was pretty careful to try not to leave anyone behind as we went along. 

One of the great things about these workshops, is at the end of the night Bill Wolff, the Philly.NET leader, stands up and asks everyone what they thought of the workshop.  Talk about holding your feet to the fire! :)  Last night the feedback was overwhelmingly positive, and the best thrill for me was when he asked "How many people had a working solution with tests passing at the end of the night?" and almost everyone in the room raised their hands.  Awesome!  I also was very encouraged by Scott L. Holmes' comments and notesBroken Link: http://slholmes.org/blog/?p=71 on the workshop, and some emails I received today. 

Going forward, I am hoping to add on to the "building blocks" with more TDD and design techniques, and start to look at mocking tools to help take out the extra work of rolling your own, and how you can use IoC containers to handle dependencies more easily.  In fact, at Philly.NET Code CampBroken Link: http://www.phillydotnet.org/Default.aspx?tabid=682 on October 11th, I’ll be doing an intro to mocking which will build a bit upon this workshop.