northdan.
Vezi pagina în română

Comparison

Refactoring or rewriting: what to do with the old application

A rewrite looks clean on paper and is the most expensive decision a company with a working application can make.

Any application that has earned money for years contains rules nobody remembers any more: the exception made for a long-standing customer, the fix added after a complaint, the odd behaviour somebody's monthly report quietly depends on. Refactoring accepts that reality and changes the code in pieces while preserving behaviour: you isolate an area, cover it with tests, rewrite it, put it into production, move to the next. The application stays live throughout, and the risk is distributed in small portions. A full rewrite starts from the promise of a clean beginning, but carries an obligation rarely stated at the start of the project: the new system has to do everything the old one did, including the rules nobody can explain, before anyone can use it. During that interval, sometimes a year or more, the company pays for two teams and receives nothing new. The signals that genuinely justify a rewrite are few, but they are unambiguous, and we set them out below.

Let’s talk about your project

Message us on WhatsApp or send an email — you talk directly to a developer.

office@northdan.com · +40 752 070 247

Key takeaways

What refactoring gains you

The application keeps working and keeps earning while it improves. Every step can be stopped, evaluated or reversed, and the budget is phased instead of being locked into one large project whose result is visible only at the end.

What a rewrite gains you

You escape a technology no longer receiving security fixes, a data model blocking the product, and dependence on the single person who still understands the code. You also gain delivery speed, but only after you have reached feature parity.

The principal risk of each option

Refactoring can stretch indefinitely if nobody defines an end point and success metrics. A rewrite can turn into a project that never reaches production, because the list of old features keeps growing as it is discovered.

The approach that works most often

Gradual replacement: the new system takes over one area at a time while the old one gives up pieces until it stands empty. You get visible deliveries every few weeks, you can stop at any point, and users move across without a single big-bang day when everything can break.

The three signals that justify a rewrite

First: the underlying technology no longer receives security updates, and the components it depends on can no longer be installed on modern systems. That is no longer a business decision but a risk decision. Second: you can no longer find people who will work in it, and those who exist charge scarcity rates and refuse long-term maintenance. Third: the data model no longer supports where the product is going — you need multiple companies, multiple currencies or multiple warehouses, and the structure assumes everywhere that there is only one.

If none of those signals applies and the real frustration is that adding a feature takes too long, then you have a problem of code organisation and testing, not of technology. That is solved through targeted refactoring guided by measurement: where the time goes, which areas break most often, which modules generate the most incidents. The investment is several times smaller and shows results within months.

When you do not need us to touch anything

If the application does exactly what it should, nobody is asking for new features and incidents are rare, the best decision is to do nothing. Pay only for security updates and backups, document what exists, and keep the credentials safe. We have met companies talked into rewriting perfectly functional systems because they did not look modern; that money would have produced more almost anywhere else.

Call us when the cost of doing nothing has become visible: deliveries take months, every change breaks something else, only one person can still intervene, or the current supplier has stopped answering. We start with a short paid audit that ends in a reasoned recommendation — including, if that is what the numbers show, the recommendation to keep the current system and build separately only the part that blocks you.

Frequently asked questions

How long does a complete rewrite take, on average?

Longer than the initial estimate, almost as a rule, because the list of old features is discovered along the way. A prudent indicator is to take the supplier's estimate for reaching feature parity and double it, then ask what ships in the first three months. If the answer is nothing visible, renegotiate the approach.

How do I know the refactoring is actually progressing?

Through metrics measured monthly: time from request to delivery, the number of production incidents, automated test coverage, the duration of a release. If the supplier cannot show those figures moving, you are paying for activity rather than outcome, and the project can stretch indefinitely.

Can I run the old and the new system in parallel?

Yes, and it is the safest form of transition. The key is that data has a single source of truth at any moment, and that each migrated area is switched off definitively in the old system. Parallel running turns dangerous only when both systems write the same information.

What do I do if nobody understands the existing code any more?

Start by documenting observed behaviour rather than the code: what goes in, what comes out, which rules apply. A set of tests written against current behaviour becomes the safety net for any later intervention and, additionally, tells you exactly what a replacement system would have to reproduce.