[dba-Tech] Naming Objects (functions, procedures, etc.)

Arthur Fuller fuller.artful at gmail.com
Sun May 26 10:33:32 CDT 2019


This morning I came across an article containing this snip:
naming things is hard; maybe it’s the hardest thing in programming at all.
This intrigued me for several reasons. Early on, I was a big fan of
Hungarian Notation; it's still wildly popular in the coding community, but
I eventually concluded that it was backwards: it placed the type first,
followed by the variable's name. Ultimately I decided that this was
backwards: the type should be a suffix not a prefix. In other words,*
tbl_customer* ought to be named *customer_tbl*. The main reason behind my
conclusion is alphabetic sorting; all objects, including queries, views and
stored procedures, sort naturally, and clump by the objects to which they
refer. In my opinion, this principle also applies to constants and
variables.
Enough about my theories of how to code. I'm interested in reading yours,
and invite your contributions to this thread.

-- 
Arthur


More information about the dba-Tech mailing list