I don’t buy “duplication is cheaper than the wrong abstraction” (2021)
The most important underlying issue isn&#x27;t discussed in the article:<p>DRY must be understood and applied correctly.<p>&quot;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system&quot;<p>The keyword here is _knowledge_.<p>When we see duplication, repetition and so on, then that might be because that piece of code represents:<p>- data of different entities that have similar structures<p>- logic that just happens to be similar.<p>- boilerplate code<p>None of these things have anything to do with representing the same piece of knowledge in a program. In fact, you can easily get into trouble _especially_ if you think the first two things are violating DRY when they are not.<p>I agree with the article, wholeheartedly though. If your code or data _model_ is not DRY, you can get into trouble very easily. Very nasty bugs, regressions during maintenance or extension, hours spent in frustration, money lost etc. On top of that: Non-DRY code almost always _proliferates incidental complexity_, because if you don&#x27;t fix it, then eventually you patch over it.<p>Here&#x27;s the best case scenario: Even if you are aware of code not being DRY, do everything right and turn multiple knobs at the same time to change or extend it correctly instead of fixing it, you will do so with much more reluctance and it will be much more mentally taxing.<p>Non-DRY code is by definition complex: You now have more interconnected parts than you need. So really, if you make your code more DRY, you _simplify_ it.