> I've just spent years wrestling with someone else's poorly written, ill-intentioned code, bringing it into line. I've taken the above approach of slowly reworking it. Sometimes I wonder if I just kept the tests and jettisoned large bits of it if I'd be better off?
That's the main reason we have this discussion in the first place IMO. There is no one right answer to the question.
Which is why I find folks that throw out Joel's article to be a little black and white. Like "never rewrite anything from scratch".
It takes many years to develop good intuition around this stuff though, so I appreciate that as a first approximation. It can get a little dogmatic amongst senior folks though.
When it comes to a whole application rewrite, I'm pretty certain you should at least be much closer to "never ever rewrite" than "in some cases rewriting makes sense"
If you are talking about refactoring or changing/replacing parts of a system - that's not the same thing. At least to me
That's the main reason we have this discussion in the first place IMO. There is no one right answer to the question.