Send a message
Repair or rewrite?
Decide whether to repair, replace a component, or rewrite an application by examining user impact, data risk, and the next required change.

Should you repair or rewrite an existing application?

Decide whether to repair, replace a component, or rewrite an application by examining user impact, data risk, and the next required change.

By Nicholas Howell · Full Stack Technologies ·

Diagnose the failure before choosing a rewrite

Begin with the behavior that is stopping progress. “The code is messy” is difficult to act on. “Customers lose a draft when this request fails” or “every billing change breaks reporting” identifies a problem you can investigate.

A rewrite may be appropriate, but it replaces working behavior as well as broken behavior. Before choosing it, identify what the current application does that users depend on, including undocumented rules and integrations. Those requirements do not disappear when the implementation changes.

Map one critical path through the application

Pick a workflow that matters to the business and trace it from entry to stored result. Note the services, data, permissions, and background work involved. Establish whether you can reproduce the reported failure in a safe environment.

Review the deployment and recovery process alongside the code. A system that is difficult to release safely may need better operating practices before substantial implementation changes. Check what evidence exists: incidents, logs, support reports, and relevant tests. Separate observed failures from untested suspicions.

Prefer focused repairs when the boundaries still work

Repair is a useful starting point when the application’s structure supports the required behavior and the failures are identifiable. Examples include missing validation, an incorrect query, or an integration without reliable error handling.

Add a check that demonstrates the failure, make the smallest complete repair, and verify the affected callers. The immediate goal is a safer critical path and a clearer next change. There is no requirement to clean up every file before restoring useful behavior.

Replace a component when the problem is contained

A targeted replacement can make sense when one module repeatedly blocks the work but the rest of the application remains useful. Define the boundary and expected behavior before replacing the implementation.

For example, a reporting component can sometimes be replaced while retaining the source records and existing sign-in flow. Compare outputs on representative data before moving users. This approach still needs a plan for compatibility, deployment, and recovery; a smaller replacement is not automatically risk-free.

Consider a rewrite when repair cannot meet the requirement

A rewrite deserves consideration when the existing design fundamentally cannot support a necessary change, or when maintaining the current platform is no longer feasible. Document the specific constraint and the alternatives that were considered.

The plan must account for data migration, integrations, behavior parity, access controls, and the transition for existing users. Identify which features must move first and how results will be reconciled. If those costs are missing, the rewrite estimate is incomplete.

Ask for a decision you can review

A useful assessment connects findings to user impact, identifies the next business milestone, and compares repair, targeted replacement, and rewrite against that milestone. It states what is known, what still needs investigation, and the order of recommended work.

Start there before commissioning a broad rebuild. The result should help you decide what to preserve and what to change, with enough evidence to question the recommendation.

Discuss your project →