Why Does Beautiful Code Still Matter for AI Agents?
David Heinemeier Hansson still sweats the details when agents change the Ruby that runs the 37signals business. For 25 years the economic reason was simple. A coherent, malleable architecture let a small team change the software quickly, without an exorbitant cost and without a pile of bugs every time one edit touched another. Beautiful code is easier to understand, simpler, and more malleable. That case assumed humans would do the edits.
The payoff of that sweat is diminishing, and how far it still matters is an open question. For the moment it does, because tokens are scarce. Anyone without an endless budget is token limited. A system an agent can change without relearning the whole context keeps the next edit as cheap as the last one. The failure mode is the classic ball of mud, where nothing connects. He has seen agents produce it in his own code bases: the first pull request is mediocre, and five more stacked on top are not good. The argument is about this moment, not a forecast of what the tools will do in nine months or two years.
#501 – DHH: Future of Programming, AI, Agentic Engineering, Vibe Coding & Linux ·
From the transcript
So what does your current setup look like? Because you, I assume, are still looking for the beauty, for the chiseling, for the crafting, but you're just crafting in a different medium. And at different levels of abstraction. When I'm working in Ruby code, and we have a lot of Ruby code because it's in our entire business, and I'm asking agents to make changes to that code, I still sweat the details.
Mm-hmm. What I'm coming to realize is that the economic
payoff of that sweat is diminishing rapidly. The reason why I, for 25 years, was sweating every line of code so judiciously was because I knew the payoff of keeping an architecture coherent and malleable was software that could change and evolve quickly with a small team and not exorbitant cost and not introducing a bunch of bugs when you change one thing over the other.