2 ms·
My rule of thumb is that "why did we change this?" goes in a commit message, and "why is this like this?" goes in a comment. The latter is less often necessary
by pm215 8y ago
My rule of thumb is that "why did we change this?" goes in a commit message, and "why is this like this?" goes in a comment. The latter is less often necessary than the former, but if the reader of the code would otherwise spend five minutes puzzling it out, or worse, would remove an apparently incorrect bit of code, it's worth the effort of the comment.
- _Codemonkeyism 8y agoYes, same here.