On Sunday 06 June 2004 22:59, Jim Weirich wrote:
> Sean O'Dell wrote:
>
> It would be interesting to compare our techniques for while I have a
> similar background (e.g. over 25 years of programming experience and
> low-defect rates), in recent years I have found myself becoming a strong
> advocate of test-first/test-driven development.  TFD/TDD has not lowered
> my defect rate, nor has it found more bugs for me.  What it does do is
> allow me to refactor the code with more speed and confidence.

It's hard to describe my technique.  I just have a lot of little habits that 
add up to a lot of smooth sailing.  I guess it would amount to a lot of petty 
things, as opposed to XP's tiny set of strange and radical ideas.  My 
techniques are boring, but practical.  I think if I could sum up a lot of 
them, it would sound something like this: "I set up landmines for myself so 
that anything that needs to be done explodes in my face the minute I get 
there, so I remember that it needs attention."  It sounds silly put that way, 
but the net effect is I can pay attention to a huge number of things by 
forgetting what I don't need to worry about right now, and after a certain 
point, when I've ground through it all, every last issue ended up getting a 
lot of quality attention.

Which is why some form of typing is so important to me.  Being able to test 
for what I need easily, without having to craft out custom solutions every 
time this comes up, to me, is absolutely necessary.  Without it, it's a 
time-sink to deal with, and I find that there are certain types of errors 
that are cropping up more often than I am accustomed to, and a form of type 
checking would take care of it easily.

>  > [...] and a lot of younger programmers
>  > haven't figured it all out yet and unit tests get them to a higher
>  > quality of code quicker.
>
> This is the comment that triggered my response.  Its not just the young
> programmers who are finding TDD effective.   A lot of us old-timers are
> too.

I wish I knew how.  I've re-visited the issue a number of times, and it's 
always left me unproductive and paying more attention to the tests than I 
felt I should.  I also found that organizing them to be a great hassle.  
Sometimes I need to deliberately break parts of my code to work on others 
more easily, and when unit tests start throwing errors in my face about the 
disabled code, I find I have to stop thinking about my programming and go 
spend more time arranging my unit tests to shut them down.

I also find that my projects are done before I ever really get my unit tests 
organized.  I mean it.  I have a small army of components/projects here that 
all work fantastic, but for which I probably need to spend time to get the 
unit tests working completely.  This is what always happens.  I see the light 
at the end of all my tunnels, and I can't justify delaying finishing things 
just to get the unit tests finished.  So the unit tests never end up helping 
me.

	Sean O'Dell