News for hackers. Stuff that matters.
Re:Prefer duplication over the wrong abstraction by ktRolster on Saturday July 09, 2016 @12:41PM (#12062091)
If it's new code, and you are unsure what abstraction is needed, build the simplest abstraction possible. YAGNI

That way, as the code develops, and it becomes more clear what is needed, then you can easily build it at that time.

If you have code that needs to be duplicated, throw it into a function, a lightweight and powerful abstraction.

Re:Prefer duplication over the wrong abstraction by js8 on Saturday July 09, 2016 @12:57PM (#12062190)
That's what I am advocating in this thread. ;-)