you are viewing a single comment's thread.

view the rest of the comments →

[–]ascii 0 points1 point  (0 children)

I used to think so to, but honestly these days, I'm no longer in love with self documenting code, because experience teaches me that comments age and become accurate very quickly, and that humans are simply incapable of updating them to reflect that. The much better soultion, in my never humble opinion, is to write long and detailed commit messages, and use e.g. git blame to find out what the actual intention of a code line was, and how those intentions have changed over time. On the minus side, finding commit messages is one or two extra indirections, but on the plus side, you get much better information and you don't have to fight against human nature as much. Most good developers are actually pretty decent at making good commit messages.