According to the book Software Craftsmanship, an application should last longer than 10 years. Joel Spolsky goes even further to say that “the single worst strategic mistake…rewrite the code from scratch.” Developers, on the other hand, are quick to tell their customers about rewrite needs when they feel that the code is a mess. But should you ever throw the old application into the fire and write a new one?
What drives business is revenue and agility. Here are some business reasons to rewrite an application:
1. Rewrite when the code base causes a high turnover in resources. I once worked for a company where the code base was so awful to work with that there was a 70% turnover in the IT department every year. The turnover significantly impacted the company’s bottom line. I have also seen an entire IT department leave, because no time was being allowed by the business for refactoring. It took the replacement developers twenty times longer to find and change the code.
2. Rewrite when a technology is deprecated by the language vendor. If there is no clear upgrade path to the latest version, this will cause a development resource shortage. I talked to a manager recently where their core business application was written in Visual Basic 6. They were unable to find any developer resources that desired to maintain it.
3. Rewrite when the maintenance costs are causing a negative net operating profit. There was an application, which had such a high maintenance cost that it caused the company to abandon the product.
4. Rewrite when it affects your customers. If the performance or user experience is causing your business to lose customers to your competitors, rewrite those pieces.
5. Rewrite when it affects the agility of your business. If the maintainability of the application prohibits frequent releases, look into what is causing the delays. Keep track of your competitors. How often do they release? What new features did they add?
6. Rewrite the application when the refactoring cost is higher than a rewrite. Estimate how long it will take to refactor the application versus how long it will take to rewrite it. Long term cost savings will be gained by increasing the maintainability of the application.
What other reasons do you think warrant a rewrite? Share your thoughts.