3 ms·
> you should never abstract away code before you see the third duplication" has little to do with the article, and I'm also really not sure it's good advice Ab
by qes 6y ago
> you should never abstract away code before you see the third duplication" has little to do with the article, and I'm also really not sure it's good advice
Absolutes like that are rarely good advice.
- Tainnor 6y agoSure, but some comments on here are literally saying that. Not as a rule of thumb (although such comments can be found here too, which is ok), but as a "as an engineer I always enforce this rule" thing.
- lucbocahut 6y agoAbstractions have other purpose than deduplication. They make it easier to reason about your code as well. It might be the smartest thing sometimes to abstract away the first occurrence in a method imho.