• Subject: Re: Coding standards ( Was: An odd thing)
  • From: Richard Baird <rbbaird@xxxxxxxxxxx>
  • Date: Tue, 16 Dec 1997 12:06:26 -0500
  • Organization: Premium Systems, Inc.

Buck Calabro wrote:

> >I personally like being able to scan source for a field name in pos 43
> >(or 50 for RPGIV) to see where it's changed.
> >
> >It really depends on what you're used to.
> It *does* depend a lot on what one is used to, but I'd like to caution you
> that scanning in 43 will not get you all the places in your code where
> a field is changed.  Don't forget the "I" specs, col 53 (Data structures?
> Field renames?) or the "O" specs, col 32 (Blank after?) or, for that matter,
> any input operation where your target field is in the record format.  Don't
> forget the odd instance of LOKUP with an array and an index, with the
> index specified in factor 2 somewhere...

I know!  I would never trust this technique to give a comprehensive
list.  I was just using it as an illustration of the convenience of
scanning for something in a particular column.  

> The point to this is that scanning source code is an incomplete way to
> find field references in either fixed or free format.  I rarely work without
> the compiler cross referenceI wouldn't care one whit
> which format I programmed in if I could get an AS/400 editor that was
> capable of regular expressions and grep.  Why AS/400 based?  Because
> I work on 50+ customer machines connected by 9600bps phone lines,
> and I can't really afford the luxury of downloading code to my PC, edit
> there and upload back.  Also, what would I do when I'm on-site, and don't
> have my PC with me?

I agree, though I rarely even look at a compiler listing unless I'm
fixing compile errors.  Experience (I've always been in consulting) has
taught me where to look for 95% of program bugs, no matter how ugly the
code is. Those I can't find, I can usually find in debug.

> I don't think that the format of the language has as much to do with 
> as shop standards do.  Even if you have very old standards, at least each
> program will *look* kind of the same.  Even if you use indicators liberally,
> *every* program uses the same indicators for the same thing, and it's not such
> a struggle to work past the structure of the program to determine it's intent.
> I think that was one of the points brought up by the "free format" poster: one
> has more options in setting up standards for free form code than for fixed.

but one also has more opportunity to break those standards (or come up
with more stuff that would cause you to want to implement mor standards)
in freeform code.


| 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-2020 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 on our policy page. If you have questions about this, please contact [javascript protected email address].