News for hackers. Stuff that matters.
Re:Why do so many developers get DRY wrong? by dllthomas on Saturday February 15, 2020 @02:16PM (#22337265)
Confusing knowledge for syntax leads us to both false positives and false negatives. An example of each:

In designing a web page, if you find yourself saying "there is a button here" in HTML, and in CSS, and in JS, and on the back end, that is not DRY even though the syntax looks nothing alike.

Two different APIs, for services serving different purposes controlled by different external entities, happen to have the same structure and you find that a large chunk of code can be factored out of both. I would argue that "what we currently need to do to API 1" is a separate piece of knowledge from "what ... API 2", and unifying them is not DRY.

There are no comments on this comment yet.