The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Unless every few lines of code has ASCII art murals or you are commenting with things like "this is an if statement -- it provides the ability to conditionally execute a branch of code. A branch of code is...", I very much doubt you have too many comments.
At my last job, everybody seemed to be opposed to any formatting or code comments.
Cntrl X all the comments, and replace them with a code using 0 -> 9, A -> Z and a -> z. This will give you close to 240,000 references using just 3 characters for each comment.
Next, type the code into a spreadsheet, and paste the text of the comment next to it.
When all the comments have been entered into the spreadsheet, sort the sheet alphabetically on the comment text. Print it all out, and delete the spreadsheet, so it doesn't take up any space. Present the DBA with the sole printout, and suggest she photocopies it.
... and then you pray that you never have to maintain the code yourself. But hey, you can't have everything!
I ran into it one time. It was about twenty years ago and I was doing a contract job to port a chunk of code to another platform. I commented all of the tweaks I did to accommodate the new platform and the customer promptly removed them all when I gave them the code.
I can't remember the exact reason now but I remember thinking it was ridiculous at the time.
You get that from DBAs all the time. At one of my past jobs, I got the same thing, and coincidentally, it was from an Oracle DBA.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
Has anyone ever run across "too many comments" before? I've only heard "not enough" in the past.
I see comments like this all the time:
// Add some trees to the forest
They don't help anyone understand what's going on anymore than the code already does, so I would classify them as "too many comments."
I think it boils down to quality vs. quantity. I could riddle my code with comments like those above but they wouldn't help anyone. I could put a few well placed comments that describe how the algorithms in the code work and they would be much more useful.