re: The Importance of Quality Comments VIEW POST

TOP OF THREAD FULL DISCUSSION
re: In my experience, even well-written code can be improved by comments and I'm pretty sure that if the code is well-written the comments will be wher...

Your personal experience with bad comments is exactly why I use comments only as a last resort. Once I write a comment I try to think of how I can express my intent in code with out the comment and look at ways to remove them through refactoring. With modern refactoring tools it is pretty easy to extract a method and name it with the comment you just wrote. So why not encourage that instead of writing comments that can easily go out sync or move and mislead people and waste time because the comment was wrong?

code of conduct - report abuse