Skip to content

Comment on All Programmers Are Self-Taughtparent

Comments

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.

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.