Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?




"Michael Mattias" <michael.mattias@xxxxxxx> wrote in message
news:gA7Ce.1028$4F4.165@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> "Pete Dashwood" <dashwood@xxxxxxxxxxxxxx> wrote in message
> news:3jse0aFrgk9nU1@xxxxxxxxxxxxxxxxx
>>
>> "Howard Brazee" <howard@xxxxxxxxxx> wrote in message
>> news:db5qnq$rev$1@xxxxxxxxxxxxxxxxxxxxxxx
>> >
>> > I'm close to this. The reason for structured code is to make it
>> > easier
>> > for the human debugger...
>>
>> I have to disagree with you Howard. ( I don't enjoy it, because you are
>> usually right and certainly one of the reasonable people here. :-))
>>
>> I contest your premise "The reason for structured code is to make it
> easier
>> for the human debugger."
>>
>> That is certainly _A_ benefit of structured code, but there are other
>> reasons for structuring, that may be more important than this...benefits
>> from avoiding duplication and encapsulating functionality into code
> blocks,
>> for example.
>
> Call me a semantic nitpicker, Pete, but eliminating duplication and
> putting
> functionality into compact code blocks sure sounds like a direct benefit
> to
> us mere humans.

Of course it is. But only if a human gets to see it... :-)

My point is that whether a human gets to see it or not, there is benefit in
structured code. So, in an automated system, you might well prepare
structured code, not "to make it easier for the human debugger" but because
if the other uses it has.

>
> I have five bucks (US or NZ, your choice) says more than once in your long
> and distinguished career you have commented with disparaging adjectives on
> the work of others who put the same <expletive> code in seven different
> places and you only found and fixed six on your first run; or took a
> single
> business rule and devised a procedure which managed to separate the code
> actually used by that procedure with 4000 or more lines of totally
> unrelated
> source code plus two telephone area codes and a partridge in a pear tree.
>

Ansolutely :-). I wouldn't take the bet. Removal of duplicated code is a
very good benefit of structuring (whether a human gets to see/maintain it or
not :-))

> Sure, there are resource issues resulting from duplication, and
> potentially
> some efficiency issues from 'non-compactness' , but the bottom-line cost
> of
> these is far, far less than the cost of programming - programming done by
> humans.
>

Sure. No disagreement from me. I think I failed to explain clearly just
exactly what my disagreement with Howard was. Hope this helps.

Pete.



> MCM
>
>
>
>



.