Hacker News new | ask | show | jobs
by onemoreact 5287 days ago
Few of the good programmers I know write much in the way of comments. 1 good comment per 30-50 lines of code is actually plenty as long as the code is readable. (Edit: Plus one comment per WTF.) The problem is writing readable code is difficult and must be maintained.

PS: At best a comment only says what someone thinks the code does. Program for long enough and you will get bitten by this.

1 comments

Furthermore, on a team of any size, it is virtually guaranteed that someone will change the code without changing the comment as well. Then you have a bunch of comments that are not only useless, but actively misleading.