3 ms·
"In the industry code that isn't DRY is a much bigger problem than code that is too DRY." which industry is that? in general programming, absolute nope not-D
by jacknews 2y ago
"In the industry code that isn't DRY is a much bigger problem than code that is too DRY."
which industry is that?
in general programming, absolute nope
not-DRY code can be weaseled out with a good ide
badly abstracted code, not so much
in fact in a way, DRY is the responsibility of the IDE not the programmer - an advanced IDE would be able to sync all the disparate code segments, and even DRY them if necessary
but when I read DRYed code, the abstraction better be a complete and meaningful summary, like 'make a sandwich', and without many parameters (and no special cases), or else I'd rather read the actual code
i understand the impulse to try to factorize everything but it just doesn't work beyond a certain point in the real world; it's too difficult to read, and there's always an 'oh, can you just' requirement that upends the entire abstract tower.
- goatlover 2y agoYou didn’t provide any evidence for this, you just stated your coding preference. Which is usually the case in these discussions. Some anecdotes, and then people making grand claims based on personal preference. Obviously, some programmers have thought the opposite and have their own anecdotes.
- jacknews 2y agothe comment I replied to was merely a strong opinion same same i don't believe there is much evidence, certainly nothing conclusive, in this debate but factorizing code concentrates the logic that can be an advantage, to a certain degree, but it also reduces resilience, by specializing the code, and can reduce readability by forcing lookups of nested abstractions