3 ms·
First, 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 tha
by amw-zero 6y ago
First, 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.