4 ms·
Sometimes a comment is appropriate. Sometimes a commit message is appropriate. Sometimes I need both. Often when dealing with legacy code I find neither. I'd be
by js2 3y ago
Sometimes a comment is appropriate. Sometimes a commit message is appropriate. Sometimes I need both. Often when dealing with legacy code I find neither. I'd be happy with either.
A commit message lets me tell a short story about a change that touches multiple locations in the code base. Maybe no one part of the change is all that tricky.
A commit message also allows me to explain why I'm making the change, whereas a comment may explain why the code is the way it is.
Commit messages and comments have overlapping use cases, but the Venn diagram is not a circle.
$0.02.
- sverhagen 3y ago>Sometimes a comment is appropriate. Sometimes a commit message is appropriate. Sometimes I need both. And often your get neither...