Is the laziest excuse I’ve come across. Like, not everyone knows everything and complex code exists, it is not hard to put in some text explaining the basics of what something does.
Like, unless you’re dealing with that code everyday it’s going to look like double dutch to anyone new coming to it.
I’ve had people say that to me before, and it is absolutely infuriating in its laziness and cop out excuse.
You can’t read code, can you? You need some simplified text explanation of what it does. And a programming language higher than assembler is already a set of simplified text instructions. Why are you even participating in this discussion?
The documentation is a summary of the code, a quick guide to the software to more easily find your way to what you need to work with.
Are you saying that when you work with some random library, you skip their documentation and go directly to the source code? That’s absurd. If you do it that way, you’re wasting so much time!
If someone must explain to me what code does in comments, then I think that code is bad.
Developers invented high-level programming languages for a reason. If someone writes bottom-top, unreadable code with comments, then they might as well write top-bottom, readable code without comments instead. That’s what I believe self-documenting code is.
But if someone explains to me why code does what it does in comments, then that’s fine. Essential complexity exists. The point is that that code is readable already, we know what it does, but not why. That’s what needs an explanation in comments.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
“Code is the documentation”
Is the laziest excuse I’ve come across. Like, not everyone knows everything and complex code exists, it is not hard to put in some text explaining the basics of what something does.
Like, unless you’re dealing with that code everyday it’s going to look like double dutch to anyone new coming to it.
I’ve had people say that to me before, and it is absolutely infuriating in its laziness and cop out excuse.
You can’t read code, can you? You need some simplified text explanation of what it does. And a programming language higher than assembler is already a set of simplified text instructions. Why are you even participating in this discussion?
👆 Case in point.
They sound like a great person to work with, “it’s not my fault for lack of documentation, it’s your fault for being an idiot”
The comments are not for what, they are for why.
The documentation is a summary of the code, a quick guide to the software to more easily find your way to what you need to work with.
Are you saying that when you work with some random library, you skip their documentation and go directly to the source code? That’s absurd. If you do it that way, you’re wasting so much time!
If someone must explain to me what code does in comments, then I think that code is bad.
Developers invented high-level programming languages for a reason. If someone writes bottom-top, unreadable code with comments, then they might as well write top-bottom, readable code without comments instead. That’s what I believe self-documenting code is.
But if someone explains to me why code does what it does in comments, then that’s fine. Essential complexity exists. The point is that that code is readable already, we know what it does, but not why. That’s what needs an explanation in comments.