Check Naming Conventions for Consistency

Just a quick blog before I hop on a flight back to Helsinki.

One thing I noticed in Denmark was how they labelled floors in buildings, particularly when it came to labels in elevators and around escalators. Unlike what www expect in Australia, the ground floor is marked as “zero” with floor above it incrementing by one and floors below is decrementing by one. This means that the first floor bellow ground is “minus one”.

In comparison with Australian naming conventions for the first floor below ground, we might have B1 then B2 below that floor. In one building in which I used to work, the first floor below ground was B6 then B5 all the way to B1. Other building use different letters for different floors.

Then we have mezzanine levels. Sure, these aren’t too hard with which to deal as in Australia we just chuck an “M” after the preceding floor number. I don’t know how these were labelled in Denmark but I wouldn’t be too surprised if they were marked as floor 1.5 or something similar.

So what does this have to do with technology?

Particularly when it comes to coding, naming conventions are simple but important aspects of building stuff. In databases, you can distinguish database objects in SQL by their prefix without having to dig around a schema to verify the type of object you are handling (like tbl for tables, fn for functions, qry for views, etc). It’s also useful for naming variables in your programming and making your code easier to read for other people. It also helps to enforce some fundamental discipline.

Giving thought to naming before you code is important as attempting to rename objects later can be problematic. As the size of code increases the greater the effort required to migrate to a better naming convention. Also, if you have exposed APIs in your programming that have changed names and perhaps the ordering of arguments or variables then this will also cause issues.

So even if it is something like your filing system on your computer or how you keep notes in your notebook, give some though to naming – it could save you a world of hurt later on.

Leave a Reply

Your email address will not be published.