11 ms·
DRY when it makes things simpler. Sometimes you would have to make things so much more complicated in order to completely not repeat yourself that it ends up no
by nerfhammer 16y ago
DRY when it makes things simpler. Sometimes you would have to make things so much more complicated in order to completely not repeat yourself that it ends up not being worth it if it's not maintainable or difficult to debug what it's doing.
The point of DRY is to keep things simple and more maintainable. If DRY ends up making things more complicated and less maintainable overall then hold your nose and use your judgment. DRY makes some people miss the forest for the trees; KISS is better than DRY, which ought to be subservient to it.