4 ms·
We don't have any comments in the code base that I work on now. Before, for the last couple decades of my career as a programmer, I thought that it was importa
by rufus_foreman 3y ago
We don't have any comments in the code base that I work on now.
Before, for the last couple decades of my career as a programmer, I thought that it was important to have well commented code. I don't believe that anymore. I'm fine with no comments in the code.
If you would have told me that a few years ago, I would have told you you were crazy. But after trying it, it's fine. It works. At their best, comments in code are wasted effort. That's my opinion now after 4 years of working on a code base with zero comments.
- stevesimmons 3y ago"At their best, comments in code are wasted effort." Surely the "why" for anything non-obvious should be written down just as much as the code shows the "what"? Talking about comments as "wasted effort" sounds like you view them just as something added at the end to please a manager, rather a tool to help you write correct code in the first place.
- rufus_foreman 3y ago>> sounds like you view them just as something added at the end to please a manager, rather a tool to help you write correct code in the first place No, I've just worked for a long time where comments were required, and there was an effort in code reviews to make sure the comments were detailed and correct, and I've worked in a zero comment code base, and I don't see any difference. They just don't add value in my limited experience with one code base without comments for the last four years and with several code bases with comments for the 20 years before that. It was kind of surprising to me, but that's how it turned out. To be fair, the commits are associated with a JIRA ticket, and I can go that to figure out the "why". But I do that less than I would have expected also.