Re:10x developer talk is fundamentally misguided
by lukeschlather on Friday April 05, 2013 @12:01PM
(#5499215)
Personally I think it's rare that rewriting subpar code is a great idea. Some refactoring is frequently in order, but that's true in general. Even understanding the faults of an existing system, it's a big undertaking to rebuild it and make it better in one go.
There is a certain class of code that is not merely subpar but actually can be easily rewritten with 1/10th the code and will be less buggy as a result. We may be talking about the same thing, but if so I think "subpar" is being too polite for code that will actually benefit from a rewrite.
I've had to deal with code written by 3rd parties where I doubted the person was actually a programmer who wrote it; nonsensical or nonexistent naming conventions, large methods of dubious logic that were often never actually called (anymore?), and a general avoidance of best practices (and I don't mean advanced code; even simple things like code comments along the lines of "this is a for loop").
#2 is a different beast altogether and I think this more applies to your last paragraph. Is the source code too advanced for the programmer reading it, or is the code/architecture too obtuse? Unfortunately, I think it's often primarily programmer laziness more so than the design itself. I've been told by devs they don't understand a system and when asked what they don't understand, they simply shrug their shoulders. If you don't make an attempt to "get" the current system, in no way should you be allowed to rewrite it from scratch. You need to at least learn the mistakes of the current system.