× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David,

I understand your point, but I might counter with another. To me, a procedure as described below (wifesSistersDog) is too narrow to be included in a service module. One could presume that there are also procedures for WifesBrothersDog, WifesMothersDog, WifesFathersDog, and so on.... As a whole, having dozens of clones of a procedure to support a series of related test cases could be simplified with a better design. Perhaps you only need dog_acquireNameByRelation( aRelative ), then within your code, you can support any number of associations.

A rule of thumb, if you can't describe the effects of a procedure efficiently, then perhaps the design should be reviewed.

Jmo,
-Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Thursday, June 25, 2009 3:27 AM
To: RPG programming on the IBM i / System i
Subject: RE: Procedure naming conventions (WAS: Validate client name)

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:

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
the numeric
component tells you precisely NOTHING about what this
procedure does.
I like to choose names that seem to make sense when you
read them in
code, 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
'java-esque' mode ... so I'll have the major 'object' of my
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)".

I abhor short names and numbered names ... for the same
reasons Eric mentioned ... with the added reason that it
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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.