2 ms·
The problem here is not understanding which are the ends and which the means (I assume from other things in the essay that the author has since figured this out
by gumby 3y ago
The problem here is not understanding which are the ends and which the means (I assume from other things in the essay that the author has since figured this out).
I see this problem a lot in people who memorize but don't understand the GoF book (Patterns) so you see huge stacks of singleton envelope factories.
The point of not repeating yourself is so you can fix a bug in a single place, and understand common behavior. As it happens it can also reduce code size, not that that's a big deal for most people these days.
In this case of seemingly duplicated code the different implementations were not really common, at that early stage only coincidentally so, and it was known that they would eventually diverge. So even if DRY is desirable (generally it is) this case was one of premature optimization.
Patterns and rules of thumb like DRY should not become fetishes; they are conventions to be picked up when they make life easier and communicate something useful.