Hacker News new | ask | show | jobs
by diggan 3197 days ago
In my mind "the code is self-documenting" doesn't mean that you should have no comments anywhere in the code. It rather says that instead of lazily adding a comment for some complex piece of code, try to refactor the code so it better explains what is happening there.

And then sometimes, you just have some compiler-hack or otherwise complex piece of interaction that you can't refactor into something better, and then it's of course better to add a comment rather than just leaving it there.