There is a lot that has been said and written about why re-writing a legacy application from scratch is a bad idea. The introduction to Clean Code by Robert C. Martin covers it in some detail. My favorite recent tweet from @ziobrando was:
“Legacy is whatever you’re afraid to change.”
And yet we can’t deny the urge all developers have to start afresh. Sometimes it’s just so much easier to write new clean code than it is to get down and dirty with someone else’s bad code. The difference is that the legacy application who’s code you so abhor, well, it’s in production. Your new application, which is going to be like, amazing; it’s just a twinkle in your eye. How then does one reach the Minimum Viable Product from the perspective of your users? They quite like the current one, nothing wrong with it really, it works. Requirements might form along the lines of: just make the new one do everything the old does for starters.
That legacy application, as full of bugs as it may be, has hidden depths which may obscure many implicit requirements and conceal important edge cases. It’s earned its right to be there, over countless iterations and releases.
In the most recent dramatization of H.G. Well’s War of the Worlds, starring Tom Cruise, the super advanced aliens rise from their hibernation below the Earth’s crust, and steadily begin to exterminate humanity on their path to global domination. But just when it seems all hope is lost, our best weapons of no avail… the aliens are undone… and we hear Morgan Freeman’s voice:
“…from the moment the invaders arrived, breathed our air, ate and drank, they were doomed. They were undone, destroyed, after all of man’s weapons and devices had failed, by the tiniest creatures that God in his wisdom put upon this earth. By the toll of a billion deaths, man had earned his immunity, his right to survive among this planet’s infinite organisms. And that right is ours against all challenges. For neither do men live nor die in vain.”