Last Updated on: September 16, 2022
One thing that has always been important to me, no matter what coding language I am using, is maintaining the readability of my code.
We are constantly under pressure to get our development done, and a bit of foresight can help with maintainability in the future.
The Perl mentality is the idea of solving a problem in a script that uses as few bytes as possible. Back in the early days of coding, memory, storage and processor cycles were precious.
A saving of either of these helped your program run quicker and, in some cases, actually work.
This led to shortcuts, such as using two digits for the year (e.g. 89) instead of four (e.g. 1989) which resulted in a near crisis with the Millenium Bug.
Performance should always be considered, but the physical size of your code (i.e. the number of characters) is no longer a concern.
I prefer to be a little bit more verbose in my code if it means that it will be easier to understand.
There is a balance here, of course, and we all have our own styles.
But in our modern web development world, where we are collaborating more, it is ever more important to keep our code readable.
Get notified of new posts: