|
I get PTSD with long names, but I'll explain why :
We started off with this kind of prodedure naming :
AcqCltNam
ACltNo
Meaning Acquire client name, with the client number as a parameter. Prefix
A is reserved for parameters.
All procedures has 3, 3, 3 abreviation format. Parameters 3 + 2 characters.
Then, a bright spark dreamt up using DS as one input parameter and one
output parameter.
So we'd always have this format :
AcqCltNam ( AcqCltNamInDS : AcqCltNamOutDS )
The zones of the DS continued to follow the parameter convention, so you'd
end up with a zone named :
AcqCltNamInDS.ACltNo which identifies the client number for input to the
procedure.
As people discovered the ... Extender, they started putting whole sentences
as the procedure name, but still with the same kind of abreviations, for
example :
Acquire the client's wife's sister's dog's name might give you :
AcqCltWifSisDogNamInDS.ACltNo.
Hence my PTSD.
-----Message d'origine-------
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Vern Hamberg
Envoyé : mardi 23 juin 2009 17:52
À : RPG programming on the IBM i / System i
Objet : Re: Procedure naming conventions (WAS: Validate client name)
David
Had to look up PTSD, then almost had to get a mop for my keyboard.
Thx
Vern
David Gibbs wrote:
DeLong, Eric wrote:the numeric
Good for you! Keep your procedures short and on-point.
Seconded!
Naming conventions, like all standards, vary from shop to shop.
Personally, I never liked aaannn type conventions, since
procedure does.component tells you precisely NOTHING about what this
read them inI like to choose names that seem to make sense when you
'java-esque' mode ... so I'll have the major 'object' of mycode, like "Clt_NameIsValid" and "Com_NameIsValid". In use, your
code reads like a book:
I agree in general ... although I prefer to go with a more
procedure as the first part ... and then the method as the
2nd part. For instance: for something that checks to see if
an issue number is valid ... "Issue_isValid(issueNum)" or
"Issue_setState(issueNum, newState)".
reasons Eric mentioned ... with the added reason that it
I abhor short names and numbered names ... for the same
harkens back to the dark ages of short variable names ...
which has been known to cause PTSD type responses in some programmers.
--
david
This is the RPG programming on the IBM i / System i
(RPG400-L) mailing list To post a message email:
RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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.