3 ms·
I ask myself a couple of questions to decide when to abstract code to de duplicate it. 1. Is this domain logic or plumbing code?(for instance would this logic
by JamesBarney 7y ago
I ask myself a couple of questions to decide when to abstract code to de duplicate it.
1. Is this domain logic or plumbing code?(for instance would this logic be described in a spec for the application)
2. How many times will these be duplicated?
3. How abstractable is it?
3.a. to abstract it will I have to do anything tricky like pass functions around use reflection?
3.b If I abstract this logic into a function is there a good concise name for it?