Fix it if it is solving the right problem. Rebuild it if it is not, or if the ground it stands on is gone.

That sounds glib, so here is what it means in practice. Almost every rebuild debate I have been brought into was being argued on the wrong axis. People argue about code quality: how messy it is, how much the developers hate it, how long the last feature took. Code quality matters, but it is rarely the deciding factor. The deciding factors are what the application is for, what the data underneath looks like, and what platform it runs on.

When fixing is the right call

If the application does what the business needs and the complaints are about speed, reliability or missing pieces, fix it. That usually means some combination of:

  • Performance work on a few hot spots. Most slow applications are slow because of a small number of modules, not the whole thing. I go into this in our application keeps getting slower.
  • A handful of supporting services. Background processing, an integration, a reporting service. Small, separate pieces that take load or complexity off the core application.
  • Tightening the parts that were rushed. Tests around the fragile areas, configuration out of the code, logging somebody can actually read.

This is the cheaper path, it carries less risk, and the users keep working the whole time. When the premise is sound, I default to it.

When rebuilding is the right call

There are three situations where I stop defaulting to fix.

The application was built to solve the wrong problem. I have seen companies choose the wrong solution, build it well, and wonder why it did not help. No amount of polish changes what the application is for. If the business problem was misread at the start, which I wrote about in why doesn't our software do what we asked for, improving the existing build just makes the wrong thing nicer.

The data is the real problem. This is the one people miss. An application sitting on disorganized, inconsistent, unstructured data will disappoint no matter how good it is, and a new application on the same data will disappoint in the same way. The data has to be cleaned and structured first. Once it is, the application question often answers itself, and sometimes the answer is that a much simpler application will do. Rescuing a stalled platform migration covers what that data work actually involves.

The platform is past end of support. An application on a framework version that stopped receiving security patches years ago is accumulating risk every month whether anyone touches it or not. Known vulnerabilities in the runtime stay open permanently, and every security review, customer questionnaire and penetration test will keep finding the same thing. Upgrading in place across several major versions is often close to a rewrite anyway, and slower. A rewrite onto a modern, supported stack is frequently faster, cheaper, and closes most of the security gaps in one move.

The questions I actually ask

When I am asked to make this call, I want answers to these, roughly in this order:

  1. What is the application for, and does it do that? Ask the users, not the people who commissioned it.
  2. What does the data look like? Structured and consistent, or a decade of free text and duplicates.
  3. What is it built on, and is that still supported? Framework, runtime, database, hosting.
  4. Where is the pain concentrated? One or two modules, or everywhere.
  5. What has to keep running while we change it? Rebuilds that cannot run alongside the old system are where the risk really lives.

The answers usually point clearly one way. When they do not, the tie goes to fixing, because a working application that the business depends on is worth more than people credit until they try to replace it.

The worst option

The most expensive outcome is not choosing. Teams that half-rebuild, rewriting pieces opportunistically while patching the rest, end up maintaining two systems with neither one finished. Make the decision deliberately, write down why, and commit to it.

This is what an architecture review is for, and if the trigger is performance rather than fit, start with before you rebuild. The same questions sit behind most cloud cost conversations too.

More in the platform engineering library.