News for hackers. Stuff that matters.
Re:Why do we fall into the rewrite trap? by wpietri on Tuesday January 21, 2020 @10:24AM (#22107703)
And if you don't have a decent test suite, you might as well build one. So much of a rewrite is archaeology, figuring out what elements of a system are intentional versus accidental. A great way to do that archaeology is to start weaving a net of tests around the existing system. Sort of like Fowler's Strangler Fig pattern: https://martinfowler.com/bliki/StranglerFigApplication.html
Re:Why do we fall into the rewrite trap? by majormajor on Tuesday January 21, 2020 @03:06PM (#22110934)
Yeah, if you don't have a detailed test suite, and can't build one, you probably don't fully understand your requirements, and your rewrite is in trouble already.
Re:Why do we fall into the rewrite trap? by AstralStorm on Wednesday January 22, 2020 @04:18AM (#22115916)
Mind you, maintenance is in trouble too. Just a different kind of trouble.

If you have original code, you can always write a test suite based on it, unless management is averse to this. (Begging the question why they're not averse to a rewrite.) Like any test suite it is not going to be complete.

Ultimately it's best not to get piled on by rewriting really and often in small parts. (Carmack way.)