Correct code/unit testing (was Re: Efficient python programming...)

Peter Hansen peter at engcorp.com
Tue Jun 11 05:43:47 CEST 2002


"Delaney, Timothy" wrote:
> 
> > From: Peter Hansen [mailto:peter at engcorp.com]
> > Perhaps, assuming you put a lot of bugs in the code, some
> > amount of staring will be necessary.
> >
> > I believe staring is of little or no use, however, having
> > tried it many times with my and others' code which had bugs and
> > not having found those bugs by staring.
> 
> Staring in and of itself is not of much use ... however, simply getting
> another set of eyes on the code is. I have found that in the majority of
> cases, one of two things will occur:
> 
> 1. The new set of eyes will immediately see the thing you've been failing to
> see for the past 2 hours ...
> 
> OR
> 
> 2. While explaining to the new set of eyes enough for them to understand the
> problem, *you* will see what you've been failing to see for the past 2 hours
> ...

Agreed!  Of course, in XP that's called "pair programming" and you do
it all the time on production code, not just after you've wasted two
fruitless, frustrating hours. :-)

-Peter



More information about the Python-list mailing list