From: "Michael Dinowitz" <[EMAIL PROTECTED]>



> I've started to use some variable prefixes in some of my code and was
> wondering what others were using. I'd like to see a few examples before I
> post an article on it. My usage at the moment is limited to complex data
> types:
>     aArray
>     sStructure
>     qQuery
>     oObject
> I'm sure a case can be made for something like xWDDX, bBoolean, iInteger,
> nNumber, dDate, tTextString, lList but I'd rather not go that far yet.
> Who's using something like this? Is it helping you in any way? Is it
> hindering you in any way?
>

After too many years of obfuscating my own code with prefix oriented  var
naming schemes I've devolved to using two basic rules.

1. Context relative functional naming of variables - code should show meaning,
not
force a reference to a secondary decoding table.

I.E.     pingHost_NAME, pingHost_IP, pingHost_lastRTT, etc.


2. Suffixing when 1. produces ambiguity or there is no easy context relative
naming possible.

I.E.,    getHostsDATA_array, employeeData_STRUCTURE,
          doIncludeDateParser_boolean etc.

There isn't any penalty for using long var names. If visibility of logic and job
steps is of a higher priority than simplifying code writing, then using explicit
names is (IMO) better. Prefixing has always seemed to be a feature of top down
imposed shop rules for controlling idiosyncratic programmer-babarbrians.
"Extreme programming" seems to be the latest incarnation of this kind of style.

Besides - something from COBOL should be still useful.  :)

Of course, if we were still restrained by hardware issues (ram/storage) and
if assembler and microcode were still the only way to code, then
hyperabbreviated
names would be highly prized - i.e., as much like APL coding as possible. :)

ObOldFartStory:
 Once there was a colleague of Pottowatami extraction who used a naming scheme
that always seemed to include referents like

DO scalpem-whiteman
WHILE counting-coup

Pan





------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to