4 ms·
You definiteyly shouldn't strive to DRY for everything. The tricky part is to understand when duplicated code can be abstracted away and when it is duplicated "
by blackbear_ 6y ago
You definiteyly shouldn't strive to DRY for everything. The tricky part is to understand when duplicated code can be abstracted away and when it is duplicated "by chance", i.e. the code is the same but there is no real underlying abstraction.
The latter tends to happen for business logic: suddenly requirements change and your beautiful "abstraction" falls like a castle of cards.