|
Couldn't have said it any better. The code should be 1) Easy to understand for someone OTHER THEN YOU! 2) Since we have 4096 bytes for field definitions, please use a few of these within reason - Cryptic 4 byte field names should be a thing of the past now...(GRZK - the Greater Redmond Zero Kelvin... yeah - that's what that meant...) 3) Be relatively optimized - but don't try & out smart the stuff just for the sake of doing it (WOW - that program worked SOO much better when I Overrode the file read/write buffers using an Override DBF command - ...) 4) Stuff that is business logic MUST BE COMMENTED. 5) Make common routines callable/procedures/whatever you'd like. Callable w/parms has advantages because Web stuff can utilize these common routines...(pricing, allocation, etc..) 6) No empty IF's like If<blank>Else<something>- give them purpose IF<something>ELSE<something> or just IF<something> etc... 7) Try not to use GOTO's - if you DO however - NEVER goto a tag outside/within subroutines... (I've SEEN THIS!) NEVER re-write something to get rid of "old stuff you don't like 'cause you didn't write 'em" I've seen this happen, and unless there's something drastically wrong with the original, the user will NOT be pleased because you got rid of 8 lines of un-desirable code, they will be angry that you didn't deliver that "extra column" to their report on-time. And you know - I'm way off topic, so I'm a gonna stop there... :) Andrew Borts / Webmaster Seta Corporation 6400 East Rogers Circle Boca Raton, FL 33499 E-mail: Andrewb@setacorporation.com Corporate web site http://www.setacorporation.com E-Commerce web site http://www.palmbeachjewelry.com http://www.myfreeitems.com Voice: 561-994-2660 Ext. 2211 / Fax: 561-997-0774 -----Original Message----- From: Mike.Collins@syan.co.uk [mailto:Mike.Collins@syan.co.uk] Sent: Thursday, December 06, 2001 12:55 PM To: rpg400-l@midrange.com Subject: RE: Cycle Processing vs. Doing it my way I think all the answers point to the same thing....."it depends". Noone should reject a technique out of hand when it may be the most apposite for the purpose. For instance, I might have a piece of horrendous legacy code in front of me to which a minor change has been requested. Do I a) rewrite the entire program to use structured technique or b) insert a single GOTO to solve the problem. Compare that to having to do a major change to the same program, where the merits of rewriting may well outweigh those of leaving the unstructured mess as is. I completely agree with the opinion that the objective of writing a program is to condense everything into the least number of lines, as per the indicator example. Let us leave that to C programmers! _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.