CraftJune 12, 20261 min

Clever code is a loan you repay with interest

There's a specific kind of pride in collapsing ten lines into one dense, elegant expression. I've felt it. I've also been the person six months later, staring at that same line, unable to remember what it does. Clever code feels like a win when you write it and a debt when you read it.

The dopamine of clever

Compressing logic into something tight and surprising is genuinely satisfying. But that satisfaction is a bad compass. It optimizes for the moment of writing — the one moment the code will never be in again. Code is written once and read dozens of times. Pleasing the writer at the reader's expense is a bad trade.

Who actually pays

The bill goes to whoever reads it next, and that's usually a teammate, or future you, who has lost all the context you had in your head today. Since most of the job is reading code, every clever line taxes the part of the work that happens most. A trick that saves you four lines but costs every future reader two minutes is not a saving.

Boring is a feature

The best code is often almost dull to read — obvious names, plain control flow, nothing that makes you stop and decode. That's not a lack of skill; it's the harder skill. Anyone can make code complicated. Making a complex problem look simple is the actual craft.

Write for the tired person reading this at 2 a.m. trying to fix a bug. Usually, that person is you.

Related notes