← Writing
Code as Composition
Work, meaning & craft

Code as Composition

*⚠️ Verify before publishing: if you quote Wallace Stevens or any poet, confirm the line
verbatim and correctly attributed first. This draft names poem titles (which is safe) but
quotes no lines; keep it that way unless you've verified a specific quotation.*

---

We keep the two in separate buildings. Poetry lives in the humanities, over where the feelings are, and code lives in engineering, over where the rigor is, and everyone agrees they have nothing to say to each other. I've written both for long enough to think the wall is a mistake. Code and poetry are not opposites but cousins, doing the same work under different names, and a poet's sensibility is one of the more underrated things a person can bring to a function.

Start with the most obvious rhyme: economy. A poem is language under pressure, every word made to carry more than its share, nothing in it that doesn't need to be there, and the discipline is not addition but removal, the ruthless cutting of anything that dilutes. A poet spends a morning deleting an adjective. Now ask what good code is. It is logic under the same pressure: the clearest expression of an idea with nothing extraneous, no dead branch, no clever detour, no line that doesn't earn its place. The good engineer, like the good poet, spends more time taking away than putting in, and knows the same private satisfaction: the solution that got smaller and truer at once, until you couldn't remove another piece without it breaking.

Then revision, which is the part nobody outside the work believes. The myth is that both arrive by inspiration: the poem in a flash, the algorithm in a shower. The truth is that both are made the same unglamorous way: draft, and reread, and recoil a little, and cut, and rename, and try the other structure, and throw out the thing you were proud of because it was serving your ego and not the piece. A poem is rewritten until it reads as though it could never have been otherwise. So is a well-built module. The seeming inevitability is the last thing to arrive, not the first, and it's manufactured by the same relentless returning.

And then the thing I find most beautiful in both, the discipline of the right name in the right place. Half of poetry is calling a thing by the word that makes you see it new: the exact noun, the verb that does unexpected work, the name that was waiting for that spot and no other. And half of programming, the half we pretend is trivial and isn't, is naming: the variable, the function, the abstraction, called so precisely that the next reader understands it before they've finished the word. A badly named function is a bad line of verse: it works, technically, and it dulls everything around it. A perfectly named one disappears into rightness. Anyone who has stared at a screen hunting for the true name of a thing has done a poet's work, whether or not they'd ever say so.

Wallace Stevens spent his days as an insurance executive and his mornings and evenings making some of the strangest, most exact poems in the language, a man who lived in both buildings and apparently never noticed the wall. I think about that more than I expected to. Not because the biography is charming, though it is, but because it suggests the two sensibilities were never really at odds: the mind which loves the exact word and the mind which loves the exact structure might be one mind, differently pointed.

So I've stopped apologizing for the poetry when I talk about the engineering. The attention to economy, the patience for revision, the near-religious care about the name: these are not soft skills borrowed from the other building. They're the same craft. Code is composition. It was always composition. We just filed it under the wrong faculty.

The best engineers I know write like poets. They'd mostly deny it. That, too, is very like a poet.