3 ms·
Names for classes, methods, parameters, and variables all suffer from this same problem. I think the solution to align code and comments is code reviews. Not
by JamesBarney 11y ago
Names for classes, methods, parameters, and variables all suffer from this same problem. I think the solution to align code and comments is code reviews. Not writing comments also works but fails to solve related issues.
- u801e 11y agoWhere I work, I've always required that code that's submitted for review has a descriptive commit message. That is, the commit should explain what the problem was and how it was fixed, and why it was done that way. This way, I can run git blame (or the equivalent VCS command) on the file and get a reasonable set of comments that usually match up with the code.