[AccessD] Naming Conventions

Mitsules, Mark S. (Newport News) Mark.Mitsules at ngc.com
Wed Aug 4 12:29:07 CDT 2004


Arthur,

I agree in principle...in fact, before I was "educated" in common coding
practices, I too had "naturally" developed and utilized a naming scheme that
employed suffixes rather than prefixes.  I don't know if you wanted the
likes of me on your side;) ...but there it is.  IMHO a standard is a
standard and one should work to whatever procedure fits his/her style.  The
point, I believe, is consistency, not conformity.  I'm hopeful that the
conversation won't raise to the point of a fanatical flame war.



Mark



-----Original Message-----
From: Arthur Fuller [mailto:artful at rogers.com] 
Sent: Wednesday, August 04, 2004 12:41 PM
To: AccessD
Subject: [AccessD] Naming Conventions


After two decades of propounding standard Hungarian notation, I am now
dead set against it, for two reasons:

A) You have to read past the prefix to find out what anything relates
to. IOW, you increase noise at the expense of signal.
B) All objects named thus sort poorly. How does it help you if every cbo
is prefixed "cbo"?

For the past year or so I have used what I call the "object-action"
naming scheme. It uses Hungarian notation but as suffix not prefix. This
preserves the sort order in a meaningful way. A couple of examples:

CustomerInsert_ap - suffix means application procedure (as opposed to
system procedure)
CustomerSelectByName_fnt - user-defined function that returns a table of
customerIDs and names sorted by name (SQL 2000+ only)
CustomerFilter_cbo - combo box that filters the form by selected
customer (i.e. show only the orders placed by selected customer)

Perhaps the main reason that I have moved to this convention is the ease
of teaching it to a new hire, and letting her find her way around the
database quickly. "Look for the object of interest, followed by the
action of interest, and know what you're dealing with by the suffix."

In Access 2002+, this convention is especially profitable, because a
single "Queries" tab houses sprocs, UDFs and views. Prefixing them all
with standard Hungarian prefixes muddies the water, IMO. My convention
lets you type "C" and immediately go to all the "Customer" related
stuff. Then you can quickly deduce what's available for re-use, and what
sort of object it is.

Given the overwhelming devotion to standard Hungarian notation, I expect
this message to cause lots of flames and rebuttals. That's why we're
here, after all :)

Arthur

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list