Wacky Programming Tales

Ben Caradoc-Davies bmcd at es.co.nz
Mon Aug 16 00:30:28 CEST 1999


On 15 Aug 1999 21:45:57 GMT, Aahz Maruch <aahz at netcom.com> wrote:
>Not only that, but perhaps that was the third or fourth draft of the
>code, and a while loop was more appropriate for the original draft.
>It's often the case that even when I know there's a more "appropriate"
>structure for code that I'm modifying, I leave the old code intact as
>long as there's nothing actually *wrong* with it -- fewer changes
>equates to fewer bugs (not always, but in general).

Sure, if it ain't broke ...

Unfortunately, in this case, the original specifications appear to have been
reduced, and there are huge chunks of partly implemented and even obsolete
code, including a large source source file which should have been entirely
deleted as it's functionality had been absorbed into another. This was only
deducible by examiing the linker options.

If there was any evidence of a drafting process, it wasn't obvious.

But yes, there may well have been something more complicated in the loop. For
example, if he was messing with "i" in the loop, a while loop would have been
a good way to draw another programmer's attention to the fact that something
fishy was going on, if he was so averse to comments.

-- 
Ben Caradoc-Davies <bmcd at es.co.nz>




More information about the Python-list mailing list