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

> Rejiggering an algorithm so as not to have special cases just puts cognitive load on whoever reads the code to suss out what the original algorithm was.

Sometimes that's how it goes, but other times the special cases were a result of just not knowing the original problem well enough to think of a clean solution that really captures its essence, and the special cases are evidence of a sort of resultant duct taping.

Agreed though, what you're describing definitely happens and I'm not a fan.



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

Search: