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

I think DRY should be supplemented by "Don't make me read it multiple times". Repeat yourself, by all means, if that makes it so that I don't get all twisted up jumping between so many files that I can't keep the main thread straight while I read your code.


Another on this. If you abstract away code that throws or returns an error document that somehow.

The amount of times I've had to dig through 6 levels of abstraction to find what error gets returned in some edge case so I can catch and handle it gave me PTSD and gave me not invented here syndrome.


Don’t repeat yourself…but don’t obfuscate the code either.




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

Search: