In general, I found that rewriting code tends to be a problem (it is expensive, time consuming and involves the discovery phase, which makes the first system better).
However, here are a few questions to ask:
Will basic refactoring be sufficient? You will learn from the system assessment whether the central problems will be deeper than the code. If the problems are in the code base (and not the technology itself), I prefer refactoring.
To what extent can the current system be checked? The ability to test is of great importance to extend the life of any system module, because the code being tested is usually easier to extend and maintain. This also applies to # 1.
Finally, whether the value afforded by the rewriting will justify the effort. This is a business matter, of course, but one that a developer can and should do.
In most cases that I encountered, there was no answer.
Lawrence P. Kelley
source share