|
James Rich wrote: . . . > I think this example would help you find people who write hard to debug > code and eliminate those that follow best practices. . . . Ladies and Gentlemen: The "best practice" in programming is to avoid limiting oneself to one language, and to select the best available language for any given job. (Which is why I find it so ludicrous that anybody would attempt to call certain APIs from RPG, when those APIs are clearly poorly suited to RPG calling conventions.) And RPG, as a language, has exactly one thing to recommend it, and it happens to be the one feature that far too many RPG programmers either avoid like the plague, or have never learned to use: "The Cycle." Using it, even in unconventional ways, is hardly an "obscure trick"; it's as inherent a part of the language as "single-level store" is to OS/400. I've written perhaps two cycle programs that are controlled by a primary file (BOTH of which I wrote THIS VERY MONTH, the first one ENTIRELY from scratch, and the second borrowing code only from the first one, but I have written a whole bunch of interactive cycle programs that couple LR to KC. In my opinion, anybody who is unable to write or understand a cycle program, whether it's controlled by a primary file, or by the user, or by nothing at all, (or who can't tell at a glance what's controlling "The Cycle" in any given program) has no business using RPG in the first place. Besides which, with its rigid column layout that makes even the traditional BASIC, FORTRAN and COBOL source formats seem free, RPG is inherently a pain in the fundament to debug, because that rigid source format makes it a pain in the fundament to trace control structure nesting. By eliminating a nesting level, even the most unconventional use of "The Cycle" SIMPLIFIES the program. To all those out there who can only code fluently in one or two languages: LEARN ANOTHER! As many more as you can! And learn the strengths and weaknesses of all of them. -- James H. H. Lampert Professional Dilettante http://www.hb.quik.com/jamesl http://members.hostedscripts.com/antispam.html http://www.thehungersite.com Help America's Passenger Trains. http://www.saveamtrak.org Read My Lips: No More Atrocities!
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.