this post was submitted on 14 Mar 2025
807 points (100.0% liked)

Programmer Humor

21988 readers
1136 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 11 points 2 weeks ago (2 children)

Self documenting code is a myth as what's self documenting to one person is not to the next. Code comments and process/workflow documentation is needed for a healthy codebase.

[–] [email protected] 2 points 2 weeks ago (2 children)
[–] [email protected] 6 points 2 weeks ago (1 children)

♫tale as old as time♫ ♫opinions that are mine♫

[–] [email protected] 1 points 2 weeks ago

Not really an opinion when most companies run on self documenting code since time immemorial.

[–] [email protected] 3 points 2 weeks ago (1 children)

Try handing over your "self documenting code" to a junior dev who doesn't know the language it's written in and see how far they get with it.

Now hand that exact same codebase with comments to the same junior dev, and I guarantee you they'll get further than without the comments.

[–] [email protected] 3 points 2 weeks ago (1 children)

I have given well documented code to plenty of juniors, it comes with being a senior dev / techlead. And it was perfectly understood. Maybe you simply don't write self documenting code.

[–] [email protected] 3 points 2 weeks ago

Lmao. Sure buddy.

[–] [email protected] 1 points 2 weeks ago

I thought the same, until I spent a few years on a codebase where self-documenting code was enforced with detailed code reviews. That does a very good job of clearing up the ambiguity.

If you can't get that kind of review, then by all means use comments.