News for hackers. Stuff that matters.
Re:Golden rules for becoming a better programmer by imron on Wednesday January 27, 2016 @12:22AM (#10978390)
However 10 years later, it is also likely you'll be reading the comments for the explanation and realise that what the comments say is different from what the code does (because over the span of 10 years the code was updated but not the comments) and that's just as confusing.

If the code is written with meaningful variable and function names, and functions no larger than a screen, then lack of comments isn't really a problem.

Re:Golden rules for becoming a better programmer by yoklov on Wednesday January 27, 2016 @02:36AM (#10978789)
Yep, and often the code that breaks what the comment says is far away. Too easy to change something that subtly invalidates a comment in some other module. Especially if you didn't write that module.
Re:Golden rules for becoming a better programmer by mannykannot on Wednesday January 27, 2016 @08:15AM (#10979835)
It is also possible that your change subtly invalidates the semantics implied by the identifiers used in some other module. In either case, there is a nontrivial possibility that you have introduced a bug (and quite possibly a subtle one).
Re:Golden rules for becoming a better programmer by mannykannot on Wednesday January 27, 2016 @08:08AM (#10979799)
Variable and function names can be just as misleading as comments. I am not aware of any language which guarantees the semantics implied by your choice of identifiers.