[dba-Tech] Naming Objects (functions, procedures, etc.)
Gustav Brock
gustav at cactus.dk
Sun May 26 11:04:15 CDT 2019
Hi Arthur
I left the Hungarian notation many years ago and haven't looked back. Actually, I felt it as some kind of relief to get rid of the prefixes.
You can study my VBA.xxx repositories for a lot of examples:
https://github.com/GustavBrock
/gustav
________________________________
Fra: dba-Tech <dba-tech-bounces at databaseadvisors.com> på vegne af Arthur Fuller <fuller.artful at gmail.com>
Sendt: 26. maj 2019 17:33
Til: Discussion of Hardware and Software issues
Emne: [dba-Tech] Naming Objects (functions, procedures, etc.)
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