Rebuilding Is Cheaper Than Refactoring
Rebuilding my iOS app took two days and about CHF 200. It came out better than before.
OK, that’s not true in every case. But I had to get you to read this somehow.
There’s something to it, though. On my iOS app, a private project, rebuilding really did beat any refactoring. It started with an old problem.
With AI, you hear it everywhere: spec first. An agent only builds as well as the spec you give it. That’s true. The catch is that we often don’t understand what we want until something is sitting in front of us.
Wireframes aren’t enough
Wireframes, Lovable and similar tools help. But you only get the real experience with a clickable prototype. Clicking through it is when you notice what’s missing, what’s annoying, and what you actually wanted to be completely different.
For me it’s become almost a rule: I only really know where I want to go once the solution is 60, 70 percent there. It’s the same with stakeholders. So there’s no way I can write the complete spec at the start.
Rebuilding was always too expensive
Then comes the moment everyone knows: if I started over, I’d do a lot of this differently.
- code and tests
- deployment
- design and UX
- security
Plan to throw the first version away. Fred Brooks said that back in 1975. Hardly anyone did it, because a rebuild cost weeks. So you refactored what you could and lived with the rest.
With my app, it suddenly hit me: why not? Why don’t I just rebuild it?
Prototype, findings, new spec, rebuild
- I built the app up to a rough prototype, maybe 60, 70 percent done.
- I used it and collected what I noticed. I was the stakeholder myself. Along the way I realized I actually wanted to go in a different direction.
- Then I gave the AI exactly that as the brief:
You’re an experienced software developer and product manager. Look at what we’ve built. Here are my findings. Based on them, write the spec for a rebuild, so we don’t repeat these mistakes and do it better.
- We challenged the spec for another two or three rounds.
- Then the AI regenerated the app from scratch.
The rebuild took two days. It used to take weeks.
It cost me about CHF 200 in extra tokens.
The new version is better than the old one, and nothing got lost. It carries no legacy baggage. So really, I built the first prototype so I could write the spec.
What this does to my work
Writing the findings down properly is real work, and nobody does it for me. If I get sloppy there, the agent just builds the same mistakes again, only cleaner.
That’s where my work sits now: noticing what’s wrong with the prototype and writing it down so the second attempt comes out better. The building after that is quick. For me, that’s a fantastic thing.