If your code requires comments, it is probably requires refactoring in the first place. And/or appropriate architectural pattern. Possibly simpler one.
I used to write a lot of comments but I think if the code can explain itself, then you don't need to write comment. That is the ideal case.
However, in a complex software environement, comment usually cannot be avoided because when you look at the code, you have no idea. You rely on comments to tell you. Thus, comments become useful.
Exactly, I don't write comments for my personal projects but in bigger team projects, it is nearly needed and this also brings the necessary documentation policy for the business logic, not just code comments, it is 100% needed if you are building a library etc...
"Comment is a lie, it degrades over time and no one maintains it." -code book seller bob
This guy is the best marketing person I have ever heard. Totally out of touch with today's doc gens and the importance of comments.
Learn it from here folks, don't do jabba for 25 years or you end up like this
If your code requires comments, it is probably requires refactoring in the first place. And/or appropriate architectural pattern. Possibly simpler one.
wrong, comment is for docs and drawing attention to avoid mistakes
google.github.io/styleguide/go/dec...
Only if it is unavoidable. Assuming if you can code without comment, that can also avoid the mistakes, that will be ideal.
I agree on that, there is a balanceful ground, definitely we don't wanna read 180 lines of comments per 2 lines of code
I used to write a lot of comments but I think if the code can explain itself, then you don't need to write comment. That is the ideal case.
However, in a complex software environement, comment usually cannot be avoided because when you look at the code, you have no idea. You rely on comments to tell you. Thus, comments become useful.
Exactly, I don't write comments for my personal projects but in bigger team projects, it is nearly needed and this also brings the necessary documentation policy for the business logic, not just code comments, it is 100% needed if you are building a library etc...
Good one. I'm on the same page with you.