Building the Product

When is the right moment to stop iterating on the MVP and rebuild it properly, and how do I avoid the second-system rewrite trap?

A starting point

Rebuild when the tech debt is measurably slowing every new feature or breaking under real usage you already have, not when the code merely feels ugly. The trap is the big-bang rewrite that stalls the roadmap for months and ships worse than what you replaced; prefer to strangle and replace piece by piece while the old thing keeps running. A good signal to rewrite is repeated production pain tied to specific choices, not a general urge for cleanliness. This is a starting point, most early rewrites are premature.

Go deeper

Hand-picked from around the web, each with a note on why it earns your time.

3 resources 3 link-checked Watch Read

Watch

▶️ Video
✓ Link checked Free Intermediate

Why we picked it Metz shows, live, how to untangle genuinely ugly code by following the smells rather than reaching for the rewrite button, and her line "duplication is far cheaper than the wrong abstraction" is the honest test for whether your MVP mess is worth rebuilding around yet. It reframes the rebuild decision around real usage: wait until the code shows you the pattern instead of guessing the perfect structure up front. Watch it when you feel the pull to abstract or rebuild too early.

All the Little Things

On RailsConf 2014 (YouTube) by Sandi Metz ~35 min

  • Premature abstraction is more expensive than duplication, so resist rebuilding around a structure you have not seen the real usage for yet.
  • You can make tangled code dramatically simpler through small, test-covered refactoring steps, and it often gets a little worse before it gets better.
  • Let the code smells tell you what to change next, which keeps the rebuild decision grounded in real signals instead of gut feel.
Watch on YouTube youtube.com

Read

✍️ Essay
✓ Link checked Free Intermediate

Why we picked it This is the canonical warning against throwing away working code and rebuilding from scratch, told through Netscape's rewrite that handed years to competitors. Read it before you convince yourself the messy MVP needs a clean-slate v2: it names the exact trap you are about to walk into. Treat it as a starting point, not gospel, since sometimes a rewrite really is right, but the burden of proof is on you.

Things You Should Never Do, Part I

From Joel on Software by Joel Spolsky ~10 min read

  • Old code that looks ugly is usually carrying years of hard-won bug fixes and edge-case knowledge you cannot see, and a rewrite silently throws all of it away.
  • It is harder to read code than to write it, which is why the instinct to rebuild almost always feels stronger than it should.
  • Most of what tempts you toward a rewrite (architecture, slow spots, cosmetic mess) can be fixed incrementally through refactoring instead.
Open joelonsoftware.com
📄 Article
✓ Link checked Free Intermediate

Why we picked it If Spolsky tells you not to rewrite from scratch, this gives you the alternative: replace the old thing piece by piece while it keeps running, so you never take a big-bang risk. Fowler's strangler fig metaphor (a new system grows around the old one until it can stand alone) is the practical middle path between suffering the MVP and blowing it all up. A good next read once you have decided some part genuinely needs replacing.

Strangler Fig Application

From martinfowler.com by Martin Fowler ~8 min read

  • You can modernize a system incrementally by building new features alongside the legacy code and gradually routing traffic away from the old path, instead of a risky all-at-once cutover.
  • Investment and returns arrive gradually and visibly, so you can stop, ship, or change course at any point rather than betting everything on one launch.
  • A facade or proxy in front of old and new lets you shift functionality over piece by piece while the product stays live for users.
Open martinfowler.com

People also ask