|
Hi Charles,
<snip>
Your examples are perfect examples of such. I don't think anybody on the
list would have looked at RtnVal and read it any other way than ReturnValue.
</snip>
This is a very interesting and common reaction to questions of naming
standards in RPG.
We have suffered so long with short names that we have convinced ourselves
that it is either a "good" thing or at least we can make a good thing out of
it.
It just simply isn't true. We have the ability to code long names for a
very good reason - it makes life easier.
For me there are two points to this:
1) Readability - Although you "don't think" anybody on the list would have
looked at RtnVal and read it any other way than ReturnValue, I can GUARANTEE
that only the intellectually challenged would look at ReturnValue and NOT
read it as ReturnValue.
2) Usability - We write our variable, parameter, and procedure names as
well as read them. The use of full and descriptive names removes the
ambiguity out of its intended use and helps the developer to decide on a
suitable name.
Case in point: Variable - holds the Rate Effective Date, logically derived
long descriptive name: RateEffectiveDate
Possible other abbreviated variable names: rteeffdat, refdat, rateEffdat,
rateEffDate, rteEffDate, etc...
Although there are a very large number of variations of names available
when abbreviating a variable name, there is one and only one long
descriptive name.
I am responsible for standards in our shop and our standards state clearly
that a full descriptive name is required. In the case above, there really is
only one name that every developer in our shop would arrive at when forced
to use these standards - RateEffectiveDate.
I also totally agree with Mihael. The use of Content Assist in WDSCi / RDi
/ RDP makes a nonsense of the short-is-quicker rule. Its actually quicker to
use the long name because you start typing the long name and Content Assist
helps complete it for you. When you are open to the seemingly-infinite
variation of abbreviations I wouldn't know whether to start typing Rte,
rate, ref, etc... This makes it MUCH HARDER to use Content Assist.
Cheers
Larry Ducie
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.