I’ve been writing code for 53 years, rose to somewhere near the top of the Software Engineering profession (Consulting Scientist at NRL, Principle Investigator at DARPA). This article meshes with, but doesn’t state explicitly, the coding philosophy I’ve evolved over the years:
The main, overriding criterion of good code is READABILITY.
That is, write code that can be understood by other programmers, that “explains itself” to someone who hasn’t seen it before. If necessary, sacrifice processing speed and storage use to this goal (but don’t go crazy). (That latter rule has become easier to meet over the course of my career as processor speeds have increased by 6–8 orders of magnitude and storage costs have decreased by similar amounts.)
I taught for many years in good Computer Science departments (Brown, VA Tech) and as a result tend to think of a software program in the same way as a lecture. It must be structured and ordered to lead the audience through it, to tell them what they need to know to understand a piece of it before they get to that piece. That’s an important part of the readability mindset, and something that most programmers don’t consider.