3 ms·
I'm not saying refactoring is always worthwhile (it usually isn't, in my experience anyway). But the refactor is generally done with the benefit of hindsight o
by nickelcitymario 6y ago
I'm not saying refactoring is always worthwhile (it usually isn't, in my experience anyway).
But the refactor is generally done with the benefit of hindsight of all the things you would have done differently if only you'd known then what you know now.
It's like saying that the second draft or edited manuscript of a novel isn't going to be better than the initial draft. Of course it's better the second time. In theory, you fixed what was wrong with the first one and implemented new and/or improved ideas.
If your refactored code is worse than the original, I feel like you're doing something wrong.