What is the biggest motivation for a major rewrite/refactor?<p>I feel the effort and time it takes to rewrite Architectures and Applications (especially when the entire team thinks it has been poorly designed to scale) is too high and probably not worth for the current requirements of the stakeholders and users involved.<p>I'm just wondering whether rewriting or redesigning architectures to a great scale makes sense especially with stringent deadlines and expectations.<p>Joel Splosky's blog post on "Why rewrite is a mistake" makes so much sense yet is a challenge on poorly designed codebases.<p>So, when does it all make sense to go ahead and rewrite?
If you can quantify the amount of time & expense between the two, you get your answer:<p>1) no rewrite but painful updates over x period of time (total)
2) painful rewrite but easy updates over x period of time (total)<p>If the delta is small between the two, then think about how long you intend x period of time to be - when does it make financial sense?<p>Also, be aware that painful update experience winds up costing you in developer turnover. This can be a HUGE cost.<p>Short term thinking of "it's too painful to do a rewrite" has killed more companies than I care to remember.<p>But you need to figure out how to glean realistic and correct numbers for these things to justify EITHER decision. Neither option is always right - and if someone is saying it is, that person needs to be jettisoned ASAP- they're poisoning your well of information.
When the cost of failure is low.<p>Rewriting involves introducing new bugs and incompatibilities with existing systems. It means delays, data corruptions, and failed milestones. It means disrupted routines and failed expectations. It means pissing off a LOT of people, and so the biggest risk is political. Chances are pretty high the project will simply be canceled once people see it in action and understand how difficult their lives will be during the "transition", which could span years.<p>Don't rewrite a system people actually use. It'll be your head on the chopping block.