News for hackers. Stuff that matters.
Re:The Wrong Abstraction (2016) by naringas on Sunday July 05, 2020 @12:42PM (#23739970)
sometimes it's better to copy and paste some code only to make each copy diverge more and more over time (somewhat like a starting template) as opposed to introduction an abstraction to generalize some slightly different behaviors only to use said abstraction twice.

this makes even more sense when the code will live on in different programs

there's a point when incurring the cognitive overhead costs of the abstraction become worthwhile, probably after the 3rd time. but my point is that it's also important to consider that the abstraction introduces some coupling between the parts of the code.

Re:The Wrong Abstraction (2016) by rightbyte on Monday July 06, 2020 @04:37AM (#23745855)
I find it easier to read long functions of code than jumping around in helper functions or abstractions. Especially if I am not familiar with the code base and don't know common functions by heart.