Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> but the diffs are simple, bugs are simple (often you simply forgot to copy piece of code into 7 different places which is easy to solve)

I am sorry but that sounds like an absolute nightmare. 7 different places means 7 different times that bugs might crop up because you forgot, specially if it isn't documented that you need to copy the code in other places. It also seems a nightmare to maintain documentation about that, as comments might get lost or not updated in all the copy paste. Of course, unit tests are out of the question, are you writing 7 slightly different unit tests and keeping them updated? And I'm supposing it's simple bugs, not pervasive, hard-to-reproduce, indirect bugs that take days just to find the root cause.

> In comparison, you'll stare at DRY class for 2 hours and realize you need to refactor absolutely everything, it will break half of the codebase and diffs are insanely complicated.

Sounds like a problem of overcomplicated, bad coding and bad documentation. It's not a problem with DRY.



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

Search: