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

Hansen's Second Law: Clever is the opposite of maintainable

There is nothing that will stop a code review quicker than "I discovered a clever way to..." A dozen engineers are going to have to try to reverse engineer your cleverness in order to safely make any change to your code, so you'd better make double-sure that the performance you're buying with your cleverness is worth the total maintenance cost going forward.

There are some times it's worth it (the Fast InvSqrt hack and many others), but most of the time, it's just tickling our intellectual curiosity for our own benefit, and that's a bad trade.



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

Search: