DEV Community

Discussion on: Removing Comments

moopet profile image
Ben Sinclair

I'm torn on this, too. Your example of "unsubscribedFilter" is ambiguous without either the comment or reinforcement from the similarly-used "duplicateFilter". If it was on its own I would probably interpret it as a filter which only let unsubscribed items through, not one which filtered them out.

The better solution for me would be to change the filter or method names and then remove the comments - which is too much change for this "boyscouting" idea.

I know what you're saying, and I know it might seem that I'm being picky, but I'm saying this to back up my point, which is that even if you think something is clear without comments, it might not be to someone else. It might be a good idea to ask the person at the next desk whether they agree with you that something's obvious.

burdettelamar profile image
Burdette Lamar
gonedark profile image
Jason McCreary Author

Agreed, removing comments is not the only step here. It must have the accompanying step to improve the readability of code without the comment.