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

Using AI to reality-check comment would be cool.

But if you're using comments to explain the code, 9/10 you just wrote it in too unreadable way.

Sure, some algorithms are complex enough that some comments are needed to explain the how (that's the 1/10) but in most cases the comments should explain why, not how. So instead it should be

  // Add the calibrated skew to compensate for latency
  x+=2;
or whatever is the reason for the code existence.


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

Search: