Resource naming guide
Overview
Why is this so important?
Note
Assigning names to anything, from business to concepts and actions, can be a difficult process, and it can be done well or poorly.
Naming issues
Ambiguity and the problem of vocabulary
Homonymy, polysemy, and false cognates
bank
can mean a financial institution or the edge of a river.Gift
in German means poison
and pain
in French means bread
.Names with unwanted associations
False cognates can lead to poor names and marketing mistakes.
Note
For instance, numbers may carry different associations in various cultures: in one culture, the number 8 is valued for its association with wealth, while in another, the number 4 is feared due to its connection to death, or buildings skip the 13th floor in Western cultures due to superstitions.
Some products have problems because of language differences.
Note
For example, the Mitsubishi Pajero had negative connotations in the Spanish language, so in the USA, It’s called the Montero to prevent negative associations and uphold a positive image.
Ignoring biases and ideas about names might seem okay, but it can cause big problems.
Discrimination
Names that assume impermanent attributes
Many resources are given names based on attributes that can become problematic later if the value or interpretation of the attribute changes.
Note
“Kentucky Fried Chicken” started in 1930 as a small cafe in Corbin, Kentucky, becoming one of the first international fast-food chains. In 1987, they opened their first restaurant in China and soon shortened the name to “KFC,” considering that many outside Kentucky, such as Beijing or London, might not be familiar with their location.
Some companies use dates or years in their names to indicate a future orientation.
Note
For example, the film studio “20th Century Fox” chose this name in the 1930s for its progressive and forward-thinking identity, but today, such a name might have the opposite effect.
The semantic gap
Names such as IMG30467.jpg
on a digital photo might make sense for the camera during sequential image storage, but they are inconvenient for humans.
We prefer names that describe the content of the image, for instance, MyBeautifulGarden.jpg
Long names
Very long names can be hard to use and make the code look messy. Adding too much information to names can make them confusing and repeat things.
Inconsistency
The lack of a unified naming style leads to confusion within a project or across projects.
Note
In 2008, Last.fm’s music recommendations employee Richard Jones compiled a list of the 100 most frequently described recordings of Guns N’ Roses’ cover of Bob Dylan’s song ‘Knockin’ on Heaven’s Door
1 Guns N' Roses - Knockin' On Heaven's Door
2 Guns N' Roses - Knocking On Heavens Door
3 Guns 'N' Roses - Knockin On Heaven's Door
4 Guns N' Roses - Knockin On Heavens Door
5 Guns N' Roses - Knockin' On Heavens Door
6 Guns N'roses - knockin on heavens door
7 Guns N' Roses - Knocking On Heaven's Door
8 Guns N Roses - Knockin' On Heaven's Door
9 Guns N Roses - Knockin On Heavens Door
10 Guns And Roses - Knocking On Heavens Door
11 Guns Nroses - Knockin On Heavens Door
12 Guns'n' Roses - Knockin' On Heaven's Door
13 Guns N Roses - Knocking On Heavens Door
14 Guns'n'Roses - Knockin' On Heaven's Door
15 Guns 'N Roses - Knockin' On Heaven's Door
16 Guns & Roses - Knockin' on Heaven's Door
17 Guns N'roses - Knockin' On Heaven's Door
18 Guns and Roses - Knockin' On Heaven's Door
19 Guns n Roses - Knocking On Heavens Door
20 Guns 'n' Roses - Knockin' On Heavens Door
21 Aerosmith - Knocking On Heaven's Door
22 Guns 'n Roses - Knocking On Heaven's Door
23 Guns 'n' Roses - Knocking On Heavens Door
24 Guns N Roses - Knocking On Heaven's Door
25 Guns N' Roses - Heaven's Knockin On Door
The inconsistent use of upper and lower case makes names less readable and harder to identify.
├── Documents ├── best_practice ├── important-item ├── InterestingTopic ├── myFile ├── new-element ├── OurData ├── randomKey ├── small-project └── your_resource
Unclear abbreviations and acronyms
For example, the abbreviation JK might refer to an employee, John Kowalski, but not everyone will understand it. PM could mean Project Manager or Product Marketing, causing confusion in context.
- Acronyms like:
PDCA
-> Plan-Do-Check-ActTPS
-> Transactions Per SecondSPA
-> Single Page ApplicationDNA
-> Deoxyribonucleic AcidSTEM
-> Science, Technology, Engineering, MathematicsCAGR
-> Compound Annual Growth Rate
may be unclear to non-professionals or newcomers
Unclear names
Names that don’t show what something is can make it hard to use and cause mistakes or slow work down.
temp
This name might be used for temporary variables in code, tables, or directories, but it doesn’t provide information about what exactly is stored in this variable or what it’s used for.
misc
An abbreviation for ‘miscellaneous,’ often used to group various items. However, this name is not informative, failing to indicate the specific components or purpose of this group.
data
The name ‘data’ might be used for various datasets, but by itself, it doesn’t convey the nature or format of these data.
new
These names can become problematic over time as they remain undefined and become less informative when the newness fades or another version emerges. In some cases, you might encounter abbreviations like new_new or newer, indicating something was new but has now become outdated or replaced by a newer version.
Choosing good names and identifiers
Make names informative
Avoid overly long names
Tip
Tip
You can progressively remove words:For instance, let’s consider the lengthy titleAdaptive project execution plan based on risk analysis and internal factors└── Adaptive project execution plan based on risk analysis and internal factors└── Adaptive project execution plan based on risk analysis└── Adaptive project execution plan└── Project execution plan
Continuing this way until the essential meaning is retained.
Consistency
Standards and conventions may specifically relate to formatting, like selecting a preferred style for compound names.
camelCase
Each new word starts with a capital letter, without spaces. Example: myVariableName, calculateInterestRate.
PascalCase
Similar to camelCase, but the first letter is also capitalized. Commonly used for class and data type names. Example: MyClass, CalculateInterest.
snake_case
Words are separated by an underscore, usually in all lowercase letters. Example: my_variable_name, calculate_interest_rate.
kebab-case
Words are separated by a hyphen, generally in all lowercase. Often used in URLs and file names. Example: my-variable-name, calculate-interest-rate.
MixedCase
Represents a mixed style where different parts of words may have different cases. Example: iOSDevelopment, JavaScriptProgramming.
Rules can also relate to the order of compound words and their suffixes and prefixes.
Tip
For complex systems like data warehouses, conventions are often developed using semantic rules to explain the object’s meaning by its name.
Prime Words
:- Nouns or phrases describing the subject or primary meaning of the name.Show the data element’s place in the logical context of the information model.For example:
PARTY
,DEAL
,CLIENT
,EMPLOYEE
,CURRENCY
The prime word imparts meaning to the attribute name, providing the right context for the modifier and classifying words.Although there is no standard list of prime words, terms commonly suitable as subjects are usually nouns, representing common things for any organization.Furthermore, prime words may consist of multiple terms, but brevity is crucial to accommodate the rest of the nominal group within a reasonable name size. Classifying Words
:- Indicate categorical differentiation or classification of information.Describe the main data category associated with the information element.For example:
DATE
,AMOUNT
,QUANTITY
,CODE
,NAME
,DESCRIPTION
,IDENTIFIER
,RATE
Modifiers
:- Add a description contained in the prime word and classifying words.Provide clarity and uniqueness to the data object name.Adjust the prime word and classifying words.Limit the meaning of the classifying words and prime words.For example:
FIRST
,LAST
,NEXT
,BEGIN
,END
,MAX
,MIN
For complex attribute names in a database table, the sequence might look like this:
The root part of the attribute name is the class word, which classifies the type of information being represented by the attribute.
- e.g.: PERMANENT_EMPLOYEE_LAST_NAME
- NAME -> Class WordLAST -> Modifier 2EMPLOYEE -> Prime WordPERMANENT -> Modifier 1
Avoid abbreviations and acronyms
However, established domain-specific abbreviations or acronyms that are universally clear within the field are possible:
API -> application programming interface
ROI -> return on investment
KPI -> key performance indicator
CRM -> customer relationship management
Document your names
For instance:
calculate_tax
The name itself might be good, but adding a description clarifies which tax is being calculated.
order_status
Adding a description can specify possible status values and their meanings.
employee_salary
A more detailed explanation could include how an employee’s salary is calculated and what parameters are considered.
Use controlled vocabularies
Context
Oxford, Dictionary of Finance and Banking
Forbes, A Glossary Of Basic Banking Terms
Allow aliasing
A controlled vocabulary is highly beneficial for those who use it, but when designing an organizational system for others who might not use or understand it, you need to consider the diversity of words they might use when searching or describing resources.
For instance, the official name of a particular fish species is “Amphiprion ocellaris”, but most people would search for it as “clownfish”, “anemone fish”, or even by its more popular name from the movie Nemo.
A related mechanism used by search systems is spell-checking, where all misspellings are treated as aliases for the correct term (“Did you mean California?” when you typed Califorina”).
Make names unique or qualified
Use reserved words cautiously
SELECT
, FROM
, WHERE
, JOIN
, GROUP BY
, ORDER BY
, and more.if
, else
, while
, for
, import
, def
, class
, try
, except
, and others.Versioning, modifications, and dates
Incorporating versions into document names or dates into file names can assist in identifying chronological order and aid in search and sorting.
YYYY-MM-DD
.Additionally, different stages or statuses of a document or process can be denoted such as vDraft
, vFinal
, vExecuted
, vPreRead
, etc.