8086 (was Re: more talking to the press.)

From: Patrick Rigney <patrick_at_evocative.com>
Date: Fri Nov 14 20:16:57 2003

> -----Original Message-----
> From: cctalk-bounces_at_classiccmp.org
> [mailto:cctalk-bounces_at_classiccmp.org]On Behalf Of Tom Jennings
> Sent: Friday, November 14, 2003 5:29 PM
> To: cctalk_at_classiccmp.org
> Subject: RE: 8086 (was Re: more talking to the press.)
>
>
> On Fri, 2003-11-14 at 16:29, Patrick Rigney wrote:
>
> > > void foofill(char *start,char *end)
> ...
> > yeah... and, I assume if you specify start and end with the
> same value, you
> > want that ONE byte filled with zero, so the test should be:
> >
> > while (start <= end)
> >
> > Nicht war? --Patrick
>
> All criticisms are correct, my only defense is that it was 'for
> illustration purposes only' (sic).
>
> But it also proves a point, no code is 'temporary', kludges last forever
> to embarrass their authors and all code needs documentation :-)

Tom, I'll admit to being "Mr. Off-By-One-Error" myself. Daily. And twice
on Sunday. On the other hand, I've worked with many engineers who would
argue quite aggressively that if you intended to have only the byte at
"start" filled with zero, then you, the caller, should have specified "end"
as start+1. Philosophically they believe, code that exists is always more
correct than code now being created. If it's older it must be thoroughly
tested and therefore correct. Some of these people are also private pilots;
I will not fly with them. --Patrick :-)
Received on Fri Nov 14 2003 - 20:16:57 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:19 BST