Learning existing system is harder than to create something seemingly equivalent that author understands well. For some time at least.
Learning existing system is harder than to create something seemingly equivalent that author understands well. For some time at least.
If the code is on the back burner and only receiving maintenance then no need to mess with it.
But active feature development? Teams need to have a grasp on it and have a way to get a mental model of what is happening.
If there are knowledgeable people to lead the process, and the transition is done appropriately: it is 100% possible and I have done multiple times in my career.
The burden on rewriting shouldn't lie in developers alone. And before someone quotes Spolsky: not every software is Netscape Navigator.
(this corollary might be most applicable in robotics?; dealing with the fallout of kubernetes being forced onto robots by cloud-oriented folks)
Solving problems? Sure, love to.
But slogging out LOC for the sake of it? Hard pass. Even as a teen that never really appealed to me.
If I can do things better, and I usually can, it's because I have a more performant higher level algorithm or set of low level optimization strategies to apply.
I agree, Those API organizers are just creating future crap for others. However, objective benchmarks showing my changes yield 10 to 100 thousand times quicker execution than the old method mean the legacy code was crap...
Legacy being crap is not always the fault of devs. Back on Z80 and similar, before execution caches were expansive and expensive to invalidate, the short circuiting && and || bool operators made sense. Now that invalidating the CPU instruction cache with a jump is far more expensive than just running the ops these short circuits are trying to avoid, it is better to just use bitwise | or & instead of boolean || or && unless there are needed side-effects (really should make the conditional evaluations into proper branches [if statements] anyway, if only for clarity). Benchmark it and see. C is stuck doing LOTS of old and busted style logic, and coders imagine their compiler is doing a lot of magic voodoo under the hood that simply isn't happening. There's loads of compiler optimization hype.
Sometimes the hardware or platform just shifts underneath Good Code and turns it into Crap Code.