Which is exactly why employers fire programmers who don’t comment their code. They don’t want to be forced to rely on one programmer for life, so they don’t tolerate this behavior. They’ll fire you and hire someone to rewrite the code from scratch if they have to.
I don’t write comments because I don’t expect anybody to see or touch my code. If I were put in an environment where others would see or touch my code, I’d write comments. This is the right way to do it
I agree that comments are only necessary when someone else is trying to comprehend your code, but consider this: you are not the same person you were yesterday, and the you who wants to make changes to your code six months from now - not because your code wasn't perfect when you wrote it, but because the world changed, and now your software needs to change with it - is in fact someone else.
Vibe coding normally means getting an AI to produce code and then never looking at that code again. So they're basically doing that but without the AI.
Been there: Bill used undocumented voodoo, Bill was let go, new hires write replacements, Bill's code is archived. "Oh, that was him" hung around a while, but no more Bill.
If it was hard to write, Bill, that's exactly why you write comments. Unless you think you're Master Bill, Jedi Knight in forbidden, ancient code-fu and others should feel like archeologist discovering mystic runes, then, you're just stupid.
Edit: I was once that Jedi Knight myself. Taking the challenge to how many things I can bring into one line. So I'm speaking of the experience of discovering my old self again. I was stupid, that's for sure.
I can read the code because I just wrote it, and that's exactly the problem.
EDIT: Re-reading, I get your point better, but I don't agree. With intimate understanding of the project, I can understand spaghetti code that I'm pretty sure would be unacceptable to anyone else.
This is the correct answer. Look into any real project on GitHub and chances are you won't see that many comments in the code. Code is a set of instructions, which a decent programmer should be able to follow if it is written with some thought about readability. If it's too complex to read a comment won't solve the issue, you either need documentation or more readable code.
Yes there are exceptions to every rule and an occasional comment is the exception.
A bug is a discrepancy between existing and intended behavior.
A well crafted sentence in natural language can express the intent of a whole piece of code in very few words. That would allow a programmer to check if the existing behavior matches the intended behavior.
There are good reasons not to document:
- you are not able to accurately express what the code needs to do. Then go home and let the grown ups do the hard parts.
- your code is so simple that a name can convey everything. Then write your "GetUserBirthdayFromDatabase" methods and make a linkedIn post about selfdocumenting code.
Another solution is to use the "CleanCode"-method and rip the 200 lines of complicated code into 1500 lines of 54 little helper methods that have an expressive name which makes the helper methods easy to understand but does not help at all at understanding the logical issue in the construct that is then distributed into multiple files and no longer fits on one screen.
62
u/[deleted] Apr 20 '26
The lion does not concern himself with documentation
28
u/PhilSchmil Apr 20 '26
If Bill needs to support it, Bill is also extremely stupid.
4
u/Mr_Otterswamp Apr 20 '26
Bill makes himself unreplaceable, only Bill knows how the code works. Bill stays in his job, so he can pay his bills
9
u/Living_The_Dream75 Apr 20 '26
I don’t write comments because I don’t expect anybody to see or touch my code. If I were put in an environment where others would see or touch my code, I’d write comments. This is the right way to do it
3
u/Circumpunctilious Apr 20 '26
Been there: Bill used undocumented voodoo, Bill was let go, new hires write replacements, Bill's code is archived. "Oh, that was him" hung around a while, but no more Bill.
3
u/Kokuswolf Apr 21 '26 edited Apr 21 '26
If it was hard to write, Bill, that's exactly why you write comments. Unless you think you're Master Bill, Jedi Knight in forbidden, ancient code-fu and others should feel like archeologist discovering mystic runes, then, you're just stupid.
Edit: I was once that Jedi Knight myself. Taking the challenge to how many things I can bring into one line. So I'm speaking of the experience of discovering my old self again. I was stupid, that's for sure.
2
u/BorisLeLapin33 Apr 20 '26
*ragebill
2
u/Beautiful-Reason-894 Apr 21 '26
comments always lie
4
u/Imaginary-Bat Apr 20 '26
Bro comments are useless unless it is something particularly confusing. Just write readable code.
2
u/Comfortable_Dish_905 Apr 20 '26
Claude can figure out Bills code easily.
1
u/Zealot_TKO Apr 20 '26
"it's self documenting!"
1
u/East_Lengthiness_866 Apr 20 '26
I don't really like the reasoning but I try to use descriptive names and docs than in-line comments.
1
u/Jbolt3737 Apr 20 '26
Ragebill
1
u/Henry_Fleischer Apr 21 '26
I've gotta write more and better comments.
1
u/Geridax Apr 21 '26
I am not smart, I don't know how my code works after I forget to comment it.
1
u/ByteBandit007 Apr 22 '26
Bill++
1
u/Xadartt Apr 22 '26
Not even Bill himself knows how it works anymore. Only God knows. Why, Bill? Oh why?
1
u/enigma_0Z Apr 22 '26
“It’s self documenting!”
No, Bill it’s dozen ternary operators chained together because it’s a few characters shorter than some if statements.
1
u/thatlightningjack Apr 22 '26
Easiest way for me to reject your PR
1
u/mathetesalexandrou Apr 23 '26
Hell no, I regret not commenting my code afrer revisiting them
1
u/Orkiin Apr 23 '26
I'm bill
1
u/BluebirdDense1485 Apr 23 '26
Well call me Uma Thurman
1
u/TheSwiftOtterPrince May 12 '26
A bug is a discrepancy between existing and intended behavior.
A well crafted sentence in natural language can express the intent of a whole piece of code in very few words. That would allow a programmer to check if the existing behavior matches the intended behavior.
There are good reasons not to document:
- you are not able to accurately express what the code needs to do. Then go home and let the grown ups do the hard parts.
- your code is so simple that a name can convey everything. Then write your "GetUserBirthdayFromDatabase" methods and make a linkedIn post about selfdocumenting code.
Another solution is to use the "CleanCode"-method and rip the 200 lines of complicated code into 1500 lines of 54 little helper methods that have an expressive name which makes the helper methods easy to understand but does not help at all at understanding the logical issue in the construct that is then distributed into multiple files and no longer fits on one screen.
21
u/wenos_deos__fuk_boi Apr 20 '26
bill is a dickhead who deserves a minor pay dock stretched over a time that will never come
0
u/[deleted] Apr 20 '26
[deleted] — view deleted comment