Hacker News new | past | comments | ask | show | jobs | submit login

As some have put it: "duplication is preferred to the wrong abstraction".



I think that agrees very much with my comment, but is sort of orthogonal to the comment above - which I think would recommend reimplementing even the right abstraction if the existing implementation is sufficiently poor.


One way I've always heard it referred to is: refactor the code so your task is easy to do. If making a new abstraction does that (just had this happen last week for me) then so be it.


I think that is incomplete. One should be aware of what other tasks a refactor is making more difficult or more error prone; it is not purely a matter of whether it makes the current task easy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: