3 ms·
The problem with these kinds of articles is that they disprove an idea but leave you without any concrete guidance on what you should do instead. Yes, abstracti
by _aqmj 3y ago
The problem with these kinds of articles is that they disprove an idea but leave you without any concrete guidance on what you should do instead. Yes, abstractions could become obsolete because we didn't foresee the future (rightfully so), but what would you do instead? At any point in time, you have a limited amount of information and you should come up with the least stupid code that you can. Overdoing abstractions almost always leads to this terrible result, but you can't just call it "goodbye clean code", this is more of a marketing post than an actual useful informative one.
- IshKebab 3y agoThe thing to do instead is to keep the code simple and concrete, even if it is duplicated a bit. I think maybe what you mean is it doesn't give you any guidance on when to do that, other than "sometimes". That's just a matter of taste and experience. It depends on the specific code and circumstances.
- bigtunacan 3y agoThe long answer is a bit complicated, but the short answer is you should duplicate code. It is far less work to dedupe WET and abstract later once you truly understand the correct abstraction than it is to try to untangle the wrong abstraction later. Or as Sandi Metz would say, "Duplication is far cheaper than the wrong abstraction."
- TheCapeGreek 3y agoDoes every post need to propose a new One True Way? Letting go of the Old Way is just as valuable without having a preferred replacement. It's similar to the bell curve meme about any niche/skill. A beginner only focuses on the fundamentals, a "mid-level" focuses on all the best tools & methodologies (to the point of overcomplicating things), and the master only focuses on the fundamentals.