Monday, October 6, 2008

You must eat your SOLIDs!

Having just attended the Day of the Donkey, aka Los Techies Pablo’s Day of TDD aka something a little more blue which will leave to your imagination, I think I will violate my blogs virginity with a post about TDD.
The venerable folks behind Pablo’s conference chose to use a bare bones approach to TDD. That is to say they wanted to focus primarily on just the T the D and the D and not all the important but ancillary parts. I’m speaking of mocking frameworks, IoC containers, the solid ideas of SOLID. The idea clearly, being that TDD can be quite daunting to new comers and when presented with all the other even more complex aspects it would be a total overload, both of the presentations and the consumers.
This was definitely a good plan given the amount of time available. I even hear some quite complaints that it covered too much. However It really made clear to me just how important these things are. Having to type up a class called FakeRepository was kind of painful on principle. Ultimately we did touch on Rhino Mocks and programming to interfaces as it was almost impossible to avoid.
One could probably live without IoC containers and even mock objects but I really don’t think there’s much point in learning about TDD if you aren’t already familiar with SOLID. It really seems to be a pre-requisite. As long as you’re using huge classes with multiple responsibilities and no interfaces you’re going to find TDD to be very painful.
At the end of Pablo’s TDD we broke into groups to discuss different topics solid being one of them and I’m sure that was helpful l. I think if Pablo decides to do another similar conference I would suggest more emphasis on SOLID from the get go. Maybe even do a Pablo’s Day of SOLIDS Digestion!
Anyway, here is a great post about SOLID with a bunch of great links
SOLID Principles