News for hackers. Stuff that matters.
Re:Goodbye, Clean Code by JamesBarney on Saturday January 11, 2020 @08:41PM (#22023848)
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?

There are no comments on this comment yet.