3 ms·
> Does it count to say "this code exists because the original author added a lot of nonsense - let's refactor"? No. Why is the code nonsense? What caused the a
by yuliyp 6y ago
> Does it count to say "this code exists because the original author added a lot of nonsense - let's refactor"?
No. Why is the code nonsense? What caused the author to land nonsense vs something different? It's very possible that the authors have very poor taste and/or decision making, or maybe had different understanding of requirements or potential future direction. Understand how they were mistaken and why the refactored version is better.
Unless you're dealing with code which is literal nonsense (i.e. doesn't compile and/or never did what it was supposed to), assume you're mistaken until you see how the code is mistaken instead.