4 ms·
I find Repeating Code very useful to find common patterns and then refactor over those to do DRY.
by ro-mx 6y ago
I find Repeating Code very useful to find common patterns and then refactor over those to do DRY.
- Cthulhu_ 6y agoGotta know the common factor before you can make the right refactoring. And then you can make the judgment whether the abstraction is an improvement over the duplication. Better to have multiple lots of dumb code than one lot of clever code.
- remify 6y agoMy motto is abstract at the third duplication. Before that you don't know if you're going to need it.