Nomenclature is like a Tattoo, you better hope you like it. (1 Viewer)

Thales750

Formerly Jsanders
Local time
Today, 01:15
Joined
Dec 20, 2007
Messages
2,097
This has been a frustration for some time. Sadly, over the years, I have vacillated over the finer points.

Following is a narrow example, but the question is much broader

How do you determine the name of an Object?

Example: Determining if a lookup table is a "Type" or a "Category".

I'm really interested in hearing (I hear words when i read) how you actually manage this process. I've inherited some databases before, and some of them used naming conventions that were different. Sadly, these names were fully integrated.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Feb 19, 2002
Messages
43,257
Type and category are two of the many synonyms we encounter in everyday use.

A lot of the nomenclature for objects comes from what the domain experts currently use. If they call something a "type" then I would also call it Type unless there were multiple different uses of that common word in the application. In that case, I would disambiguate them and call them MediaType and TransType or whatever. Once I determine that there is a second "type" with different values, I would rename any objects I had already built to disambiguate Type from the start. Hopefully, I wouldn't be too far into the build before I encountered the second use of "Type". I would not want to have Type and MediaType in the same application. That would only cause confusion but MediaType and TramsType are fine.
 

plog

Banishment Pending
Local time
Today, 00:15
Joined
May 11, 2011
Messages
11,643
I think you are over and underthinking it, the answer is super simple: Always go with 'Type'. Its just 4 characters.

Then if you need other synonymous designations you go 'Group', 'Flavor', 'Variety', and 'Category'. In that order.
 

Thales750

Formerly Jsanders
Local time
Today, 01:15
Joined
Dec 20, 2007
Messages
2,097
I think you are over and underthinking it, the answer is super simple: Always go with 'Type'. Its just 4 characters.

Then if you need other synonymous designations you go 'Group', 'Flavor', 'Variety', and 'Category'. In that order.
I agree about the overthinking part. It's just my OCD that occasionally cause trepidation.

The bottom line is that once you get past creating the structure, using the names in queries is not really problematic. And a Form can have any kind of Label you need.
 

Thales750

Formerly Jsanders
Local time
Today, 01:15
Joined
Dec 20, 2007
Messages
2,097
Type and category are two of the many synonyms we encounter in everyday use.

A lot of the nomenclature for objects comes from what the domain experts currently use.
Category and Type are somewhat synonymous. But there are subtle differences. Mostly in use.

Type seems more like what type of record is it. Possibly referring to an action.
Category seems to me to be the type of information it would hold.

That seem to be these people's thoughts as well:
https://english.stackexchange.com/q...-the-difference-between-a-category-and-a-type

That was why I originally started this post. Years ago I used Category, when it was clearly a Type. So today I wasted 2 hours tracking it down, getting even more frustrated. Now I've given up and wasted even more time on it writing this post.
Is it time for a cigar yet? I think it is.

What is a domain expert?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Feb 19, 2002
Messages
43,257
There are always subtle differences between synonyms. Otherwise why would we need additional words? That is why I use what the users use even if I think they're wrong.
 

Thales750

Formerly Jsanders
Local time
Today, 01:15
Joined
Dec 20, 2007
Messages
2,097
There are always subtle differences between synonyms. Otherwise why would we need additional words? That is why I use what the users use even if I think they're wrong.
Of course. I;m developing a system as a service. I don't have a Design Requirements from the Users.

Who are the Domain Experts?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Feb 19, 2002
Messages
43,257
Domain experts are the people who know what the system you are developing is supposed to do. If you are the domain expert, then you define the nomenclature. However, if you are reimagining something that already exists, you should probably stick with the current terminology.
 

Isaac

Lifelong Learner
Local time
Yesterday, 22:15
Joined
Mar 14, 2017
Messages
8,777
Disagree with the over thinking comment. Names are extremely important. They will color and frame other people's understanding for YEARS to come. 100's, perhaps 1000's of times I've sat somewhere needing to understand someone else's design, and the person training me had to tell me "I know it seems weird - it's called ______, but it really means _______".

First: Too many developers create things as if they were the last people on Earth. Every time you name something, ask yourself whether the average developer in your shoes would well understand it - not just how well you understand it. Think longer term, think business continuity, think about the reality of the 'next' person.

Second: Too many developers think that object names and variables are all about shortness. Wrong. They're about descriptiveness. Anyone in the dev world these days ought to be a fast typist in the first place. Saving 3 characters of typing isn't your goal. Being able to EASILY remember WHAT that variable means - after you're 2 pages down from the declarations area - is your goal. It is incredibly difficult to come in and be told to refactor TSQL where every temp table is named #temp, every cte is named cte, and every variable is named var.

Third, name scaling. How many times have I foolishly called a Worksheet variable ws, rather than something a bit more descriptive - and then realized I needed to declare 5 worksheet variables. The same principle applies to anything. How often do you begin thinking "this is only going to be 20 lines of code", and the project morphs into a lot more?

Lastly, I like hungarian notation, despite it being considered old fashioned by many. It does the job.
As for the never ending debate about prefixing things like a Table with tbl or whether that's silly because you know it's a table - to me, it depends on the platform. In a platform with awesome intellisense, like SQL Server Management Studio, it might be silly to add "tbl".
However, in a platform like VBA with zero assistance of any kind, it could be helpful - and maybe worth it.

In my personal experience, really thoughtfully named things are absolutely priceless - and if you don't think so, the guy replacing you will. :p
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Feb 19, 2002
Messages
43,257
One of my best programmers couldn't spell if his life depended on it. It drove me crazy to read his code. This was back when programs were on punched cards so it was a real PITA to fix spelling errors. The best I could do was ti remove them from labels on reports and forms.
 

Thales750

Formerly Jsanders
Local time
Today, 01:15
Joined
Dec 20, 2007
Messages
2,097
Domain experts are the people who know what the system you are developing is supposed to do. If you are the domain expert, then you define the nomenclature. However, if you are reimagining something that already exists, you should probably stick with the current terminology.
Both. I designed this system, and I don't like some of the naming. I imagine most of it will stay the same.
 
Last edited:

Thales750

Formerly Jsanders
Local time
Today, 01:15
Joined
Dec 20, 2007
Messages
2,097
Disagree with the over thinking comment. Names are extremely important.
On this table that I named tblOrderDetailCategory, when it should have been tblOrderDetailType; what's left of my grey hair, is in a pile by my desk.
 

Isaac

Lifelong Learner
Local time
Yesterday, 22:15
Joined
Mar 14, 2017
Messages
8,777
Last edited:

cheekybuddha

AWF VIP
Local time
Today, 06:15
Joined
Jul 21, 2014
Messages
2,274
But there are subtle differences. Mostly in use.

Type seems more like what type of record is it. Possibly referring to an action.
Category seems to me to be the type of information it would hold.

>> Category seems to me to be the type of information it would hold. <<

Now I'm confused - does that refer to an action? ;)

Looks like you've probably answered your own question in that statement - perhaps category is a sub-type?
 

Users who are viewing this thread

Top Bottom