re: Coding practices your future self will love you for VIEW POST

re: It is a good idea to copy-paste the same function a minimum two times No. I'm steadfast against this. The first copy-paste is already reason to a...

That's the whole point of premature abstraction. In my experience, just because 2 things look the same initially doesn't necessarily mean that they will evolve to be the same. Obviously there are tiny functions such as "add 2 numbers" which will still remain the same and hence can be abstracted early.
As with any rule, apply with care and don't over-stretch it. The answer to most questions in programming (and life) are "It depends" :D

code of conduct - report abuse