Unnecessary comments do indeed clutter things up and could be considered code smell, especially when what's being commented is obvious. Sadly, those who do this commenting were conditioned to by their professors when they went to school. I've noticed more unnecessary commenting coming from those who went through schooling vs. those who are self-taught.
That said, comments are necessary when it's not obvious what the code does. Personally, I also comment when changes are made in the code. For example, I might put in:
// 10/11/2017 JLC - Added to support X feature
Datestamping the comments is immensely helpful because then I know when a certain change happened. Changelogs are fine, as are commit comments, as they are datestamped, but putting the date and by who just above where the change occurred can help jog my memory as to why a change happened. At that point, it's just a matter of going back to email to figure out what was really being asked for. It's happened many times where I'll get asked why a certain behavior is happening, I'll see this, correlate it to an email exchange, then say to the person: "Because you requested it back on XXXX date. Check out our email exchange that day." The issue typically gets dropped after that. :)
Don't miss out!
Join the growing dev community
Get started (no password needed)
Or Sign in with: