Perspectives
The Future Reader of Your Code Is a User Too
The visible users of software are not the only people who experience it. Someone who later has to understand, change, or debug the code at night is a user of its structure too.
The visible users of software are not the only people who experience it. Someone who later has to understand, change, or debug the code at night is a user of its structure too. Ambiguous relationships consume that person's time, so maintainability is part of the product's behavior.
A small function can be clever and still be expensive to change if its assumptions are hidden. Making clear where data comes from, what is mutated, and what is returned reduces the risk of future work.
Comments do not need to translate every line of code into prose. They are more valuable when they explain why an unusual decision exists and which constraint must not be removed. If the reason disappears, a future maintainer may confidently delete the correct thing.
I do not want to judge good code only by whether it runs today. How people work with it later matters too. Software exists through time, and leaving room for the future reader is part of taking responsibility for that time.