For Programmers: Free Programming Magazines  


Home > Archive > Extreme Programming > January 2005 > Curious minds want to know....









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Curious minds want to know....
krasicki

2005-01-02, 3:56 am

Paul,

This is such a great example.

Tammy, please do take the time to enlighten us as to what here is in
error and how it compares to your control group.

Paul Sinnett

2005-01-02, 3:56 pm

First I have a correction. When I re-checked my notes I found that I
made a syntax error after point 4. I'll call that one 4.1:

4.1) code failed to compile because I included the header "algorithm"
rather than "numeric"

> Tammy, please do take the time to enlighten us as to what here is in
> error and how it compares to your control group.


Using the unexpected result as Tammy suggests I make it 4 errors (3,
4.1, 8, and 10) and maybe 10 lines of code (depending on how you count
them...)

Paul Sinnett

2005-01-02, 8:56 pm

One more on this. I decided to try again, this time creating the whole
program in one step. The code turned out about 50% longer but when I
compiled it and ran it I had made no typing errors and it passed all
the tests first time. I think the bowling game example may be too small
to show up errors coded this way.

For some reason I feel more confident about the code written TDD style,
but I can't explain why - they have, after all, passed exactly the same
tests.

krasicki

2005-01-02, 8:56 pm

I don't think this experience is unique. It is an old adage that the
best thing to do is to throw the first attempt away.

Personally, I think these draft versions darned well should be full of
errors and sloppy stuff and your example was just an excellent
traversal of developing a program. I don't think that designs and
programs arrive whole-cloth. The whole damned thing is a bugathon
until the abstractions move from the fuzzy to the concrete.

I think that's what I find so baffling about this thread - the act of
creation must be regarded a throw-away. Otherwise investing too much
an intellectual or emotional stake in the thing makes it impossible to
design review it, code review it, and dispose of it if necessary.

Now, the second part of your observation is that you have developed a
comfort zone with TDD. There are worse druthers to have.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com