How do you decide if an app needs a rewrite?

November 17, 2026 5 answers
Asked by m.729~cobaltspool

When adding features keeps breaking existing ones, how do you decide between refactoring the app and starting over? What makes a full rewrite worth considering?

Answers

Kelmori.5v

For a large app, I'd look hard at replacing pieces before committing to a complete rewrite. Old code often contains fixes for edge cases that aren't obvious from reading the feature list. A clean version can quietly lose those behaviors.

Pick a boundary, document what the existing piece does, and replace it while the rest of the app keeps running. New screens can use a newer stack, with older screens moved when they need work anyway. It's slower than a clean slate sounds, but you can keep shipping and check behavior as you go.

_b28!mosaicladle.5:

Tests around the existing behavior can help here, including the odd cases that look accidental but may matter to users.

Reply to this answer
Nuvrali+7p

The data model is a stronger reason to consider a major rebuild than messy code alone. If the core tables or entities no longer describe the business, every feature may need another workaround just to fit.

Even then, separate the decision to change the model from the decision to rewrite every screen. Figure out what has to move together and what can be migrated in stages.

Reply to this answer
7m~fablecaper_381

Sometimes the platform itself is the problem. If a technology is unsupported or the client can't provide capabilities the app now needs, replacing it may make sense. That doesn't automatically mean throwing out the backend or rebuilding every feature at once.

Reply to this answer
5k!hingepulley_738

Being fed up with the code isn't much of a business case. A rewrite can recreate the same coupling with newer tools, and the old app still needs maintenance while the replacement is built.

I'd identify a few changes that are unusually painful, trace why they break other things, and estimate what it would take to fix those areas. Compare that with the scope of a replacement, including the behaviors and fixes it needs to retain.

m.729~cobaltspool:

That helps. The question isn't just whether the code is unpleasant, but whether the specific problems can be contained.

Reply to this answer
q.763+gimbalcrayon

Age or a few major versions behind wouldn't convince me on their own. A long-lived app can be irritating to work in and still be worth maintaining. Check whether upgrades or targeted migrations solve the actual limitations before treating the whole codebase as disposable.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions