News for hackers. Stuff that matters.
Re:Goodbye, Clean Code by m47h4r on Friday December 08, 2023 @03:56AM (#38566803)
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.
Re:Goodbye, Clean Code by bigtunacan on Friday December 08, 2023 @04:09AM (#38566902)
The 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."

Re:Goodbye, Clean Code by TheCapeGreek on Friday December 08, 2023 @04:11AM (#38566917)
Does 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.

Re:Goodbye, Clean Code by IshKebab on Friday December 08, 2023 @04:04AM (#38566865)
The 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.