DEV Community

Eamon Keane
Eamon Keane

Posted on • Originally published at eamonkeane.dev on

Why Naming Conventions are Important (and useful) in Software Development.

Why Naming Conventions are Important (and useful) in Software Development.

We've all heard of programming conventions. Every language seems to have it's own take on how you should name something; should you use camelCase or PascalCase for the class name? How about a method? In C# you'd use PascalCase for method names whereas in Python uses lowercase_seperated_by_underscores also known as snake_case.

Why Naming Conventions are Important (and useful) in Software Development.
C# naming convention for methods using PascalCase.

Why Naming Conventions are Important (and useful) in Software Development.
Python naming convention for methods using snake_case.

Naming conventions and indeed all style related conventions in programming are important.

bUt WhY?

  1. It improves readability.
  2. It speeds up development.
  3. Onboarding new team members is faster. <!--kg-card-end: markdown-->

Readability

When scanning through a file it makes it easy to pick out the various members by just looking at how they're named. This shouldn't be underestimated as we read code way more than we write code.

Velocity

Naming a variable, method, field? Having naming conventions mean you don't even have to think about these things. You know what it should look like, you just have to come up with a good name. Good naming is another article in itself!

Onboarding new team members

You're joining a team that uses a new language? Cool, go and see how they name their members and then just follow suit. Obviously, if they're doing something crazy with their naming then you might want to discuss it without blindly following along.

Discussion (0)