this post was submitted on 06 Jul 2024
1498 points (99.4% liked)

Programmer Humor

18961 readers
1162 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] AlexCory21@lemmy.world 61 points 1 month ago (27 children)

I had a old job that told me that code is "self documenting" if you write it "good enough". And that comments were unnecessary.

It always annoyed the heck out of me. Comments are imo more helpful than hurtful typically.

Is it just me? Or am I weird? Lol.

[–] homura1650@lemm.ee 11 points 1 month ago (1 children)

Have you ever worked in a place where every function/field needed a comment? Most of those comments end up being "This is the , or this does ". Beyond, being useless, those comments are counter productive. The amount of screen space they take up (even if greyed out by the IDE) significantly hurts legability.

[–] Alexstarfire@lemmy.world 0 points 1 month ago (1 children)

And a good IDE let's you hide it so.... what is your point?

[–] EpeeGnome@lemm.ee 4 points 1 month ago (1 children)

The issue with having mandatory useless comments is that any actually useful comments get lost in the noise.

[–] Alexstarfire@lemmy.world 3 points 1 month ago

I get what you're saying. Perhaps I just haven't had too many variables and such that have had such comments. VsCode shows the comments on hover when you're in other parts of the code base. Which makes most any comment useful because something that is obvious in one part of the code isn't immediately obvious in another. Though, that necessitates making comments that actually help you figure that out.

load more comments (25 replies)