Statements in code are easy.
Even if you look at code from the obfuscated C contest, they ultimately come down to statements like
c+v (add c and v) or
t (access the second element in the array t).
Except for some obscure relics which you probably won’t have in modern languages, every single statement is simple; it is only the combination of those statements that is difficult to understand.
The more things we need to keep in mind at once, the more difficult a piece of code is.
That’ is the reason why Millennial Programming sometimes goes to extreme lengths in order to keep the amount of things to think about to a minimum. In many cases, the rules given here started out as a calibration experiment – “Let’s go to the extreme to get a better idea where our optimum would be” – and surprisingly ended up being very practical and efficient.
Ultimately, this makes sense – when we are thinking about an algorithm, we already have several things we need to keep in mind. Even something that seems ridiculously easy to grasp when you think about it in isolation, becomes just another potentially forgotten thing when it’s only part of the context of something else.
What the Principle of Least Distraction comes down to in code is that we will go to seemingly extreme lengths in order to keep it as simple as possible.
Next Article: Four Worlds