Lysergid@lemmy.mltoProgramming@programming.dev•Write code that is easy to delete, not easy to extend
13·
5 days agoNo, title only
No, title only
Right, but my initial comment was about article’s statement being wrong. Refactoring in the way you described will make code harder to delete which is bad according to the article.
I don’t understand too. Are you suggesting me to drop bunch of features in the product?
TLDR;
My current project has mostly easy to delete code and not easy to extend. Why? Coz shit was copy-pasted 50 times. It’s not fun to work in this project.
No, that means you falling into author’s bait where they misuse term “delete”. Refactoring is not equal to deleting. One can be result of another. But the truth is that extendable code needs to be modular to be extendable. And modular code is easy to refactor. Author couldn’t not name it “Write code that is easy to refactor, not easy to extend” coz it’s even more dumb