Re: Reviving REMARKS
- From: "jce" <defaultuser@xxxxxxxxxxx>
- Date: Thu, 04 Aug 2005 05:32:08 GMT
"Peter Lacey" <lacey@xxxxxxx> wrote in message
news:42F11CFC.1880825E@xxxxxxxxxx
> Richard wrote:
>> Actually the point about _self_ documenting is that it doesn't need
>> remarks or comments.
> That's incomplete. I have come across innumerable examples of code that
> were perfectly easy to follow but were completely inexplicable. An
> example - a price was determined by looking things up in a 2-d table;
> easy; but then $1.26 was added. No indication why; nobody could tell
> me; I eventually found a five-year-old memo by an engineer that cleared
> things up. Now if the programmer had included as a comment, a reference
> to the memo and (possibly) where to find it I'd have saved several hours
> of exasperation.
> There are many other possibilities where the code, by itself, doesn't
> tell you what you need to know. (I'm speaking of maintaining the code,
> of course).
>
> PL
The code was self documenting..it was saying lookup a price and add $1.26.
The reason why is a not part of the code - that's part of the system
functionality and should be documented with the system function guide or
whatever you call it. If someone was to ask a non programmer what the price
would be for a customer you wouldn't ask them to read code would you?
In addition using something like 77 [reason]-SURCHARGE PIC 9.99 VALUE 1.26
may have helped even more.
JCE
.
- Follow-Ups:
- Re: Reviving REMARKS
- From: Peter Lacey
- Re: Reviving REMARKS
- From: Richard
- Re: Reviving REMARKS
- References:
- Reviving REMARKS
- From: john
- Re: Reviving REMARKS
- From: Richard
- Re: Reviving REMARKS
- From: Peter Lacey
- Reviving REMARKS
- Prev by Date: Re: Reviving REMARKS
- Next by Date: Various "debuggin" tools (for IBM mainframe development)
- Previous by thread: Re: Reviving REMARKS
- Next by thread: Re: Reviving REMARKS
- Index(es):