I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
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.
Started out teaching English at Embry-Riddle.
Graded 10,000 essays.
Lesson learned.
Became a mathematics teacher.
Discovered computing.
Never looked back.
Location
Houston TX
Education
Stetson University: B.A., M.A. in English; M.S. in mathematics
I build things with my hands. The human behind Shift - https://laravelshift.com, master of Git - https://gettinggit.com, and author of "BaseCode" - https://basecodefieldguide.com
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.
Agree: burdettelamar.wordpress.com/2018/0...
Agreed, removing comments is not the only step here. It must have the accompanying step to improve the readability of code without the comment.