photo by Unsplash / Unsplash
Apr 4, 2026 · 1 min read
Why Good Code Reads Like Good Writing
Both are about compression — saying exactly what you mean in the fewest words that still carry the full weight.
There's a specific feeling when you open someone's code and it just flows. You read a function, understand what it does, and move on without having to decode anything. No mental backtracking. No "wait, what does this variable mean again?"
That feeling is the same one you get reading a good paragraph.
Both are about compression — saying exactly what you mean in the fewest words that still carry the full weight. Cut a word from good prose and you lose something. Cut a line from good code and the same thing happens. The thing held in place by that word, that line, falls.
Bad writing and bad code share the same failures: too many words, imprecise names, ideas that could be structured but aren't, logic that makes the reader do work the author should have done. Comments that explain what instead of why. Functions named after what they technically do, not what they conceptually mean.
The interesting thing is that code has to work mechanically in a way prose doesn't. But working code and readable code are completely separate achievements. A machine accepts anything that parses. A human reader has to track intent, and intent lives in structure, naming, the gaps between things.
Good writing assumes a reader. Good code does the same — it just often forgets.
When I read a piece of code that holds together cleanly, I notice something: it wasn't written for the compiler. It was written for whoever comes next. That's a form of respect. And that's why it reads.