RE:     An odd structure (?)

>>>But for all of the below average programmers (that'd be half or more,
>>>right?) I'd like at least some structure there that is recognisable a few
>>>weeks later.  Rambo-style makes me jittery.


Don said;

>Rambo-style??
>Compare:

--- example 1 -----------------

CHAIN  FILE( Customer )   KEY( Id )  NR( CustomerNotFound )
IF     CustomerNotFound
         MOVE  'This Customer does not exist'  TO  ScreenErrorMsg
ENDIF

---- example 2 --------------------------------   
        
        ID      CHAIN   CUSTF                            54
        *IN54   IFEQ    *ON
                MOVE    ERR,1          SCRERR
                ENDIF
----------------------------------


Well Actually, I can read/understand/digest/ example 2 faster.  


>Waitaminit!  Did I get the columns right???
>Free-format does NOT mean that you can't align the code. In fact, a
>professional programmer (see any book by Henry Ledgard for the definition of a
>"professional" versus "P-sub-A") will use good style to make the code more
>readable.
>Instead, you're FORCED into a box with RPG.

Waitaminit!  First you say that any "PROFESSIONAL" programmer would align
the columns to make it readable,   Then you say RPG forces you into a box
by enforcing a readable(asper Henry Ledgard so you say) columnar format???

Is this a contradiction?   How much code do you work on that is the result
of a "PROFESSIONAL" programmer?   Not that much or else we wouldn't have 
a Y2K problem(its not like the year 2000 happened by supprise right?) 
or nearly as much garbage code we all have to work with every day. 
(who writes that stuff by the way???)

Look at the #$%@% code we all have to live with...  
"hurry up, does it work?,  move it into production, or 
"I'm not working on that, I can't even read bobs/mary's/joes/jane's 
(you fill in the name) code."

Do you really think it(free) would make better programers out of the 
programmers in our ranks? Just curious?     How many have seen a 
500-1000 line CLP program(completely free format) that you have to 
sit down with a listing and a cup of coffee to understand(no comments, 
no space lines, just compressed line after compressed line of code)?   

Did being FREE format in of and by itself make CLP more readable?  
GOOD looking CLP programs generally were written by people who took the 
time to "Line up" the commands,  used positional parameters where they made
sense(like in the DCL area) for readablitity.  In essence made it "Columar"

I'm just saying by making it FREE format by itself and leaving it up to the
"intestional fortitude" of the programmers to make it "readable"  will 
produce code that is no better than it is now. (possibly slightly worse. 
By that I mean at least now your eyes know where to look for the opcodes,
Factor 1, Factor 2  etc)

Look at your example 1 and example 2 again. Which one is more readable?
WHY?   Which one (if you saw a thousand lines of it) could you look at
with your eyes to find what it is doing quickly? 

Here's a point that is overlooked by people discussing this historical
debate.  

Why is columnar more readable?   Because with columnar your eyes do half
the processing without the use of the brain.  If your eyes are looking
for an opcode they look down the middle of the code and look for a 
specific symbolic pattern(CHAIN is a symbolic patteren,  IFEQ is a 
symbolic pattern for examples).  

The EYES do the front end processer work with out having to pass that
piece of data to the main processor(your brain).  

With example 2 you have to actually read right to left, pass each piece
of data to the main processor(brain) who does a translation/lookup to 
see if it's what it's looking for.  It must first understand it, then 
decide.  

With columnar,  there is no right to left reading/translating done.
the eyes do most of the work

At least that is what I found.

But I'm probably wrong again.

John Carr
EdgeTech
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact [javascript protected email address].