3 ms·
Any pointers on how to do DRY without making the codebase too constrained ?
by vsskanth 6y ago
Any pointers on how to do DRY without making the codebase too constrained ?
- amw-zero 6y agoFirst, a codebase where you have to write every piece of logic by hand every time is much more constrained than an overly-DRY codebase. Let’s make sure that that’s clear. Then, it’s very difficult to give general advice because the usefulness of an abstraction is completely contextual. But I remove duplication from the start, and I re-duplicate by replacing the abstraction with its code inline in the places it isn’t working any more. That allows me to look for and apply a new abstraction.