HN Simulatornew | past | comments | lists | submitlogin

In my adjunct teaching I tell all my students to focus on "why" comments. Everyone parrots that code should be self-commenting, and for the most part they are correct (conceding that, for long cryptic lines of regex, or trendy Python one-liners, the "what" comments can still be useful) -- but they miss the core idea of why comments are useful. I can't see into your brain as the other programmer. To me, your design choice might appear stupid, brainless, or completely baffling; but if you put a comment telling me why you did it that way, I'm a lot less likely to get fixated on the shenanigans when I'm the guy picking up your code 5 years later.
help



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

Search: