Naming things is hard … and very important

Have you ever watched “The Croods“? When my daughter was younger, I watched it many times. The Croods are family of a caveman trying to survive another day in the dangerous, prehistoric world. There is no doubt in the entertaining value of the movie, but the thing that I remembered the most are the scenes where cavemen are attempting to name new “things”. I always wondered how did they come up with names for things, how come “wheel” is a wheel? It is difficult even to imagine the thought process. Why not try yourself? Think of a different name for a “wall”. 

800px-English-English_and_English-Persian_dictionaries

Naming things is hard. It’s even harder when you have to do it regularly during the day. If you are somehow puzzled to what profession requires to continually come up with proper names for things throughout the day, let me put you out of your misery; it is Software Developer or Software Engineer. 

When creating software, developers have to name: variables, functions, objects, modules, systems, classes, etc. All of them would have behaviour, which requires a proper name as well. Proper naming is crucial because:

  • it communicates meaning
  • it helps collaborate
  • reduces time and cost of maintenance

Working with a team means that developers have to collaborate and incorporate each-others code in their work. They need to understand the meaning of the code, intention and behaviour to incorporate it within their work correctly. 

Naming things in Software

Today, computer programs can contain thousands if not millions of lines of code. Without code being transparent, it is hard to modify it, change it, improve it. The naming of different elements of code is a massive part of making code clean. 

Each programming language has its own set of conventions and practices when it comes to naming. Following those standards provides a mental shortcut and reduces cognitive load during the development process. 

Naming standards are also crucial for aspects of the development process itself. Thanks to the common understanding of words and phrases like “build” and “release”, or “story” and “feature”, we know how to work with each other.

Naming things in the Development Flow

When working with code, we collaborate using Version Control Systems. The one that is the most popular at the moment is Git. Few services are offering Git repository hosting, with GitHub being defacto golden standard in the industry. 

branches

Git is quite flexible with the ways of using it; however, teams typically adopt one of the standard models. GitHub or Atlassian has a great set of posts explaining the different models. The model that seems the most suitable for the Enterprises that worked 90% of the time for the teams in companies I worked for seems to be GitFlow. The flow prescribes names for branches. Those names are relevant as of the points mentioned above in my post. Branch names help with the understanding of:

  • where to put code that is Work in Progress
  • where to integrated completed code
  • where to stage code ready for creating a release candidate
  • where to put code that is officially released and in production
  • where to put code that fixes issues and bugs

I do like to make it easy for people to do the right thing and hard or impossible to do the wrong thing. Hence I created a little GitHub Application, that looks after names of branches in the repository and raises an issue if the name is wrong or deletes the offending branch. 

You can check it out at https://greggigon.com/brunchyyy and https://github.com/greggigon/brunchyyy.

Final words

Correct naming is essential in software development. Naming standards provide mental shortcuts, reducing cognitive load. They also provide a shared vocabulary for communicating and building blocks of understanding. Pay attention to naming and help your teams adopting standards. 

I’m going to leave you with this funny short Clip from “The Croods” illustrating how hard it could be to name things correctly 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s