4 ms·
I've come to the conclusion that there are at least 3 kinds of DRY, and application varies: 1) There's a higher level abstraction in your code. Abstract at yo
by sbov 10y ago
I've come to the conclusion that there are at least 3 kinds of DRY, and application varies:
1) There's a higher level abstraction in your code. Abstract at your own risk, unless you have at least 3-4 instances, or your architecture absolutely requires it.
2) There's wrappers around libraries and you only use it a certain way. I'm OK with this here. Sure, I could copy-paste the same exact parameters each time I use it in my code, but I will just write my own fiddleFoo() and use that every time.
3) There's when things MUST BE THE SAME. You should abide by DRY even if you only have 2 instances. E.g., we have an SOA and we DRY our routing. Routing MUST match or else things break.