Wednesday, December 31. 2008SQL Coding Standards To Each His OwnPrinter FriendlyRecommended Books: PostGIS In Action PostgreSQL 8.4 Official The SQL Language PostgreSQL 8.4 Server Administration
Comments
Display comments as
(Linear | Threaded)
In the MS SQL world, most of the examples I've seen use lower case letters as aliases. Unfortunately for me, I've gotten in the habit of copying this convention:
"FROM sometable a INNER JOIN someothertable b" What was even weirder was the convention of some Teradata people I worked with from the data warehouse group that used numbers. Josh B. was right about one thing - there don't appear to be any set conventions established.
Possibly you meant the Far Side cartoon brought out by Steve Yegge in
http://steve-yegge.blogspot.com/2006/10/egomania-itself.html
Who cares whether everyone on the project makes the same choice between underscores versus camel style?
What is important is that the name describes the content of the variable well enough that the reader need not read huge tracts of code to figure it out.
I have to agree with you that variable naming is pretty important, but I also think consistency in basic style is important too.
Have you ever worked on a code-base where half the people indent one way and other half indent another? For me it doesn't matter one way or another but seeing 2 different styles confuses new people coming into the project (should I do it this way or that way?) and just reading the code requires a sort of non-sensical context switching (at least for me anyway). I guess its kind of hard to explain and maybe I'm just more sensitive to those kinds of things. |
Entry's LinksQuicksearchCalendar
Categories
Blog Administration |
Welcome, readers, to the 129th edition of Log Buffer, the weekly review of database blogs. Welcome also to 2009, so fresh it still has that wonderful new year smell. Let’s take ‘er out on the road and see what she can do. Starting with Or...
Tracked: Jan 06, 13:00