4 ms·
yeah, DRY and "less code is better" are to concepts that should be very loose guidelines and nothing more. "The wrong abstraction is worse than no abstraction"
by shados 10y ago
yeah, DRY and "less code is better" are to concepts that should be very loose guidelines and nothing more.
"The wrong abstraction is worse than no abstraction" comes to mind here. Very simple, repeated code that is unlikely to change (or unlikely to change everywhere at once because things are unrelated and just happen to do the same thing... -for now-) is much easier to read and maintain than short, clever, DRYed up code.
- leetrout 10y agoI agree with this 100%. Nothing wrecks my mental model of code like poor abstractions and even bad naming choices, too. I'm big on linting code though... For me the more everyone's code looks the same the easier it is to read without doing mental gymnastics.