November 4, 2023 at 12:00 am
Comments posted to this topic are about the item A rose by any other name would not be a rose
November 4, 2023 at 4:24 am
Heh... what? You don't like using D1, D2, D3, D4, etc, for the names of cascading CTEs? 😛 Or, how about table aliases named T1, T2, T3, T4, etc?
I've seen that many times and, ironically, code of that nature is frequently written by people who insist that comments aren't needed because you only need to read the code.
Nice, to the point article, BTW.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 5, 2023 at 3:28 pm
I totally agree, Louis! Once I had a coworker who hated naming anything like VoucherServiceCode. She insisted that all columns in tables had to be abbreviated, so in this case it would be VSC. We had to keep copies of Word or Excel documents around, with the names of the column and the expanded meaning. Because once you're away from that code base for a year but have to do some maintenance on it, no one is going to look at VSC and know what it means.
I'm sorry to say I could never convince her to change her practice and insist upon her naming conventions.
I'm happy to say that in my years in this field, she is the only person who demanded her way of naming conventions.
Kindest Regards, Rod Connect with me on LinkedIn.
November 6, 2023 at 2:04 pm
I agree with your points, but I think you missed what that quote is really saying.
It's not really about "naming" things per se, it's a comment about how a name or word can never truly capture the essence of the "thing" (in this case, a rose). The word we choose to assign to the concept (i.e. "class") of "rose" does not in any way change what it truly is, its scent does not change, its thorns do not become any less prickly. "Rose" is simply an arbitrary sequence of sounds we assigned to the flower and mostly everyone agreed that it was a good name, and now our mental models, when we hear the word "rose", form an appropriate picture in our heads (that's what words do). But the word itself? Could have been anything. Had we originally chosen to call a "rose" a "shoe", then we'd be giving out bouquets of shoes today. But it would in no way change the essence, the being, of what the flower truly is (something no words can ever truly, fully convey).
That isn't to say I don't agree with you fully...I do. Names are important and it's important that we choose good ones and agree upon them so that our mental models align, so we can communicate effectively.
Apologies for the screed, I seem to be feeling a bit Zen today.
November 6, 2023 at 2:21 pm
I totally agree, Louis! Once I had a coworker who hated naming anything like VoucherServiceCode. She insisted that all columns in tables had to be abbreviated, so in this case it would be VSC. We had to keep copies of Word or Excel documents around, with the names of the column and the expanded meaning. Because once you're away from that code base for a year but have to do some maintenance on it, no one is going to look at VSC and know what it means.
I'm sorry to say I could never convince her to change her practice and insist upon her naming conventions.
I'm happy to say that in my years in this field, she is the only person who demanded her way of naming conventions.
at least the abbreviations made sense.
on my support role for a Cobol vendor I once bumped into a client where the IT person (small SME company, with only 2 devs) had implemented a naming convention of YYY999 - so each variable had a set of 3 letters and 3 numbers - anyone looking at the programs would NEVER know what they meant unless they had his translator - which he kept hidden from everyone else.
was trying to keep his job safe - and managed it for a few years until management decided it was time to let go.
November 6, 2023 at 2:39 pm
ddltbl
I promise, you'll never guess what that means. Never, ever, never. It was part of a naming standard at my old company that I raged against until it went away. Why?
Deductible
That's what it means. So, they just took out the vowels so it's easy, right? The goal was to use abbreviations because of the 30 character limit in Oracle. Sure, Ok, but then we get abbreviations like Orgnztn for Organization when the standard abbreviation, Org, was even smaller.
Oh, and where did the extra 'L' come from in ddltbl, cause there's only one in Deductible. Well, there was already another one for ddtbl, so they had to add a letter to deductible (and where did the c go? I don't know).
Clarity, clarity, clarity and anything else just makes for pain.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
November 6, 2023 at 4:06 pm
WOW, Frederico, YYY999 as variable names. Yes, at least "VSC" did make sense, given that we worked with a data that was called "Voucher Service Code". The naming convention of YYY999 is wrong. What a mess. I'm sorry you and your former coworkers had to put up with that.
Kindest Regards, Rod Connect with me on LinkedIn.
November 6, 2023 at 4:19 pm
WOW, Frederico, YYY999 as variable names. Yes, at least "VSC" did make sense, given that we worked with a data that was called "Voucher Service Code". The naming convention of YYY999 is wrong. What a mess. I'm sorry you and your former coworkers had to put up with that.
ahh.. I didn't have to work with it luckily - I only gave support to the compiler/runtime - but had to go there once to help setting up some unix dumb terminals with the application so I saw their code.
Another "interesting" client - their code was generated by a inhouse tool - when upgrading to a newer version (which limited number of variables and code size) it blew up - some of the generated code had over a million lines with over 80k variables (max was 64k on new compiler)
November 6, 2023 at 5:53 pm
A SQL select looks really cool with a column name [SELECT] and a table named [FROM] with a where clause using like to compare column [WHERE] with column [LIKE]. Finding a good name can be very hard sometimes. Sometimes all we can hope for is not the worst name.
I don't consider databases as self-documenting. Naming can help. Sometimes it does not. A data dictionary is one of those mysterious documents that has been theorized to exist. 20 years ago, I heard a story that one existed from a mainframe coder. (That was about the time the mainframe was replaced and its hardware ceremoniously pushed off the loading dock.) I did not ask the coder if they remembered the time before cars existed.
RandyHelpdesk: Perhaps Im not the only one that does not know what you are doing. 😉
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply