David,

Well said. Readability is #1 in my book. Smaller programs is my #2,
even if most of what I write are not subprocedures in *SRVPGMS.

I believe that there are many in the RPG world like you and me, where we
are building things using the better way, but still using a lot of
global variables and a lot of subroutines. But we are nonetheless
creating internal procedures where we can and where we think it makes
sense.

And we recognize that these programs and procedures may never be touched
ever again. We recognize that we are still building monoliths - which I
tend to think of as having huge cliff faces of giant proportions. And
every time I need to get back into these again, it is a difficult uphill
climb to wrap my head around the entire block of granite that is the
program.

But if we do take the time to prototype where we can, then a few years
from now, when someone who follows us also climbs up this rock face,
they will be using the handholds we left, for every prototype we left
behind has put a little chink in the rock face, something to hold on to
as they navigate the monolith, and this will make it easier for those
that follow to extract that nugget we first exposed on our trip upward.

Good luck and have fun climbing.


from: David FOXWELL
subject: RE: Initialisation of global variables between calls

I admit I am probably using too many global variables. I work in an
environment where the norm seems to be copy and paste code rather than

reuse it. If I were to pass parameters instead, the procedures would
remain internal to that module so I'd then probably get my backside
kicked for taking too long setting up prototypes and the rest for
subprocedures that will never be reused. Most of my subprocedures just

seem to be there make the code readable and avoid coding monoliths.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.