Skip to main content

Posts

Showing posts from December, 2022

How to name things in code

I was looking for an article to recommend to my junior colleagues about naming things and I found a lot of great ones, but I couldn't decide which was the most suitable. No one contained all and only the things I consider important, so I decided to write my own.  "There are only two hard things in Computer Science: cache invalidation and naming things."   — Phil Karlton As developers, we are constantly rushing to meet deadlines, there are always a lot of features to add and bugs to fix, and our clients are impatient. In such a hurry it is easy to overlook code quality to get things done in the illusion of saving time . As a result, the code grows in a messy way, and the complexity increases. Choosing good names could help us to deal with and reduce this complexity . Have you ever thought that the names of variables, classes and functions are a major part of programs’ source code ? They serve as implicit documentation and a...