logoalt Hacker News

hungryhobbit • today at 1:12 AM • 1 reply • view on HN

Even the DRY principle isn't a hard and fast rule, and in fact most experienced engineers will say that two copies of duplicate code shouldn't be "DRY-ed up". Most set the max at three copies, because "DRY-ing up" code before that point ends up being counter-productive.

Similarly here, except the author isn't talking about code, but systems made out of code. And they're not saying "don't get rid of repetition" ... they're just saying sometimes repetition serves a good purpose, so don't try to "DRY" everything up.


Replies

AnimalMuppet • today at 1:31 AM

Well... remembering to ask "did you fix it everywhere?" is strictly harder than having only one place, if you don't introduce too much contortions to bring that about.

If.