24 Jan 2012 03:25
Getting the mindset
mpnalvin <markpaters <at> gmail.com>
2012-01-24 02:25:51 GMT
2012-01-24 02:25:51 GMT
Hi all! I have several years of experience in traditional development, but I'm trying to adapt to a TDD
approach. The trouble is, I can't get the mindset right. I believe I understand the methodology, and I have
several good books to refer to, but here's what happens.
I start off thinking "OK, got to write that first test. What should it be?" Then I get a design idea. Then my
brain gets excited. It doesn't want to write the test; it wants to follow the idea. It heads off at speed down
the trail, throwing up design candidates, creating interfaces, throwing in the odd pattern etc. as fast
as I can scribble. I try to say to my brain "Bad brain! You are not allowed to think about this. The design
needs to emerge from the test cases." But honestly, cutting off that flow of potentially fruitful ideas
and forcing myself back to the business of plodding along one test at a time reminds me of Douglas Adam's
description of drinking a pan-galactic gargleblaster. Is this just how it is when you start TDD? Am I
addicted to design? :)
I have read some TDD books ("Growing Object-Oriented Software" comes to mind) where there does seem to be
some level of design up front and initial tests serve to validate the architecture. I would love to hear
from those of you who have succeeded in adapting to TDD how you find the design emerging. Do you have a
broad-brush solution up front, using TDD to get the low-level details right, or do you go into TDD with
nothing more than an initial user story and no design in mind?
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/testdrivendevelopment/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/testdrivendevelopment/join
(Continue reading)
RSS Feed