4 ms·
>people think rewriting is a solution. It very never is. I often see this idea formulated, in this forum or in articles. >what is really broken in your legacy
by jffhn 6y ago
>people think rewriting is a solution. It very never is.
I often see this idea formulated, in this forum or in articles.
>what is really broken in your legacy system.
Software can be arbitrarily broken (think of only copy-pasting code from thedailywtf):
http://www.cs.utexas.edu/users/dsb/CS373S/Images/softwaredesign.jpg http://www.cs.utexas.edu/users/dsb/CS373S/Images/softwaredes...
I knew a legacy system where everything was broken.
There were no proper data model and structures, so every computation involved multiple nested loops, making everything much slower than needed.
Everything was modifiable as if it was public, so it was hard to keep things consistent.
Allocation/GC and latency were through the roof, they tried to add pooling but noone could figure out where objects could be released.
One of the core classes was called Banana (changed name) but actually referred to bananas or to banana trees.
And the list goes on (threading, database usage, still plenty to tell).
Then someone, new to both the domain and the language, stepped up to rewrite everything, which took a bit more than a month.
Ten years later the core of it didn't change much, they are still building on it and it's still smooth.
- waheoo 6y agoSo sometimes the cost benefit of a rewrite outweighs the risk but I'd still say all those things you pointed out were the problem that needed fixing, rewrite really just fast tracked that no?
- jffhn 6y agoIt was rewrite "from scratch" (not refactoring), but with the previous team available to answer any question (either about the legacy code or the domain, which they knew well), which was an essential part of the success (I guess a lot of rewrite fail because they are done by new people that didn't take care to learn enough from the old system and the domain to thoroughly understand what must be done). The legacy code was too bad to make refactoring worth it, but surely not every legacy system is in that bad of a shape.