Readability is often treated as a subjective thing. When someone says code is more readable, what they really mean is they can more easily read it. The straw-man goes, this is all taste and convention, just follow the team's rules and use the auto-formatter.

There is however, one very objective criterion: we have a limited working set.

We humans have little short term memory, and tend to forget things over time. Our screens offers only a small window, and even the smartest IDE can't give us instant access to everything. It's easier for us to act upon code that we've just read. It's even easier to act upon code we can see right there on the screen. How much code that is, is fundamentally limited.

Therefore, to efficiently grow and maintain programs, code that is read together should be written together.

continue reading on loup-vaillant.fr

⚠️ This post links to an external website. ⚠️