# Is it appropriate to prune code blocks by editing out irrelevant Javadoc comments?

I've just did a compulsive edit on this question, essentially removing @author, @version and @since comments, to prune the code block (From 584 lines -> 491). I absolutely forgot that I don't have full edit privileges, and the "Thanks for your edit!" note made me wonder a bit if my edit was appropriate.

My reasoning was that the comments are absolutely unnecessary for a code review, and since OP already had a link to the proper version hosted on GitHub, it wasn't really a big deal. Ordinarily by posting to any Stack Exchange site, you implicitly accept the terms of the CC licence, and it shouldn't really matter.

My edit was accepted, but I think that some people may consider @author comments a bit special and will not appreciate such edits.

What do you think? Are such edits appropriate or frowned upon?

• I'm interested to find out how to community feels about this. For my part, I'll generally approve comment edits, but not code edits. If the author doesn't like that he can always roll back. – Michael K Jan 26 '12 at 16:45
• I was speaking in general :) I feel that most of the time you can assume that if an edit is bad/not useful, someone (the approver, an author, a moderator pulled in by a flag) will roll it back. – Michael K Jan 26 '12 at 16:56
• If it makes the post easier to read and as you said, "prunes" it down a bit then sure I dont see why you shouldn't as long as its in good faith. – DarkMantis Jan 26 '12 at 17:20

## 1 Answer

It seems to me that the comments are relevant to the code review. In my opinion, such comments are ridiculous wastes of space and the poster should be told to stop using them and start using version control instead. Of course, others may disagree with my perspective on that.

Either way, I think that the comments are relevant to the code review and thus shouldn't be removed. Comments in general are fair game for comments, and these are no exception. Given the large number of those comments, I think that's especially true here.

• I think that the comments are relevant to the code review Why? – yannis Jan 26 '12 at 18:12
• @yannis On OP's they can be relevant. Comments are fair game for review IMO. @uathor tags - less so. For answers I can see more aggressive editing of such items - not as much for OPs. – Michael K Jan 26 '12 at 18:20
• @YannisRizos, because lack of comments can make code bad. Too many comments can also make code bad. Both are fair game to point out in code review. – Winston Ewert Jan 26 '12 at 18:23
• @WinstonEwert Well although I see your point, I'm asking on a very specific type of comments, not comments in general. – yannis Jan 26 '12 at 21:13
• @YannisRizos, right. But I don't think that changes the situation. IMO, those comments serve no purpose but to distract the reader from the important content (as evidence by the fact you decided to remove them). If I were to post an answer to that question I'd point that out. But I can't know, because you've removed them. – Winston Ewert Jan 26 '12 at 21:58
• @WinstonEwert Fair enough. – yannis Jan 26 '12 at 22:00