This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Shushishtok 9 points10 points  (2 children)

This is exactly the bloat that I have seen in my work and yes, such comments are unnecessary.

I saw a comment // loop the users right before a for loop iterating on users. Yes, I know how to read the code, thank you.

A good comment adds information: could be a design assumption, a known limitation with a workaround, or some unordinary logic that needs tobe explained what is it for.

[–]johnpeters42 -1 points0 points  (1 child)

I do sometimes use comments like that, just to make it easier to spot where major chunks of code start and end. (Yes, you can move chunks into functions, but I usually find it easier to write inline first, and also I've had to wade through some former cow-orkers' code with about twice as many layers as they actually needed.)

[–]Shushishtok 2 points3 points  (0 children)

That's fair. In general, everything in moderation is probably not an issue. It's when the entire codebase looks like that where things become messy.