2 ms·
I'd say it depends on context and just how bad it is. I'm in the embedded world and I often advocate for rewrites. As an example the current code bases I mainta
by jack_h 5y ago
I'd say it depends on context and just how bad it is. I'm in the embedded world and I often advocate for rewrites. As an example the current code bases I maintain has code that persist certain (per product) information to flash which dates all the way back to EEPROM. That is it doesn't take into account wear leveling, it's not power loss resilient, it's copy-pasted between numerous code bases except one implementation which is shared between several products, it relies on a ton of undefined behavior, it's a bad design, has no tests, and not all of our products can even be updated. Realistically there is no fixing this. It's also just one part of a larger whole that will eventually collapse into technical bankruptcy while a competitor leap frogs us.
Embedded is certainly a different world though. The complexity really comes from the fact that 95% of the code is custom, generally poorly designed without tests, and then duplicated and modified over and over again. So rewrites can be very successful in my realm if upper management can be convinced.