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

> The worst feeling is "cleaning up" some code, discovering the edge case under which the "simple" case fails, then re-implementing the same solution.

Whenever I encounter this I:

1. Add a comment explaining why the complexity is needed, because it will happen again.

2. Add it to my mental list of case examples of when I need to add a comment explaining something the first time I write it.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: