Throw away your code
A few years ago code was the important bit. A hard-won relic formed through countless hours of thought and typing. The invariants and decisions codified into something long-lasting. The product. The main event.
Yet even then, engineers relished the idea of throwing it away and starting fresh. Why? Because it gave us the freedom to rethink the system and how it’s arranged. To swap bad abstractions without concern for the hundred callsites designed around them. To kill cruft for cleanliness. Sometimes a good move, though often the aspiration didn’t match the result.
It was always hard to sell “months of rebuilding everything” over “quick customer value”.
Today, AI makes code generation trivial. Humans can live in the idea space. Yet code cruft still slows us down. Agents have to understand the whole environment to be effective. A big rewrite still requires deep system understanding. The invariants need to be teased out of what’s already there.
We need to be more comfortable with throwing away code.
Treat full systems as if they’re spikes. A way to quickly learn, dispose, then start again. The learning survives. The code doesn’t have to.
I’ve spent weeks building increasingly complex systems with AI. Then had AI distil what we’d learned and rebuild from scratch. Often, it produced something much simpler and better in minutes.
Throw away your code. It’ll come back faster and better.