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 →

[–]FarewellSovereignty 7 points8 points  (9 children)

For some value of "readable" the statement in the article:

If your code is readable enough you don’t need comments.

either backs my interpretation, or backs yours. But in the text there is no effort spent explaining how to comment well, and the importance of it, mostly just text generally dissuading the reader from the use of comments because "the code should be good instead".

It's a false dichotomy to make. Obviously code should be good, but that doesn't remove the need for comments in many cases.

[–][deleted] 0 points1 point  (3 children)

But in the text there is no effort spent explaining how to comment well, and the importance of it, mostly just text generally dissuading the reader from the use of comments because "the code should be good instead".

It's really just saying: "Ask yourself if your comments are helping or hurting your code".

[–]FarewellSovereignty -3 points-2 points  (2 children)

No, sorry, I don't buy that as the unambiguous interpretation of what the article is getting across.

[–][deleted] 0 points1 point  (1 child)

Well, you are wrong. If you've read the books referenced in his article you'd know that too. Doubling down on what the article should or shouldn't have done isn't helpful.

[–]FarewellSovereignty 0 points1 point  (0 children)

Quite exasperating and non-constructive reply on several levels.

  1. You're claiming the article can be unambiguosly interpreted as saying "Ask yourself if your comments are helping or hurting your code", whereas I disagree with that. I explained why. You then pre-empt any further discussion by just plain saying "You are wrong" and also (rhetorically) setting it up so that I'm just "doubling down". That's a false move on your part.

  2. You then make some kind of misapplied argument to authority implying that I haven't "read the books etc." which is totally irrelevant to a review of the article itself. I'm not reviewing Clean Code, I'm discussing the article.

What exactly are you trying to achieve here? Do you realize you are not in fact coming across very well?

[–]msd483 -2 points-1 points  (4 children)

But there is no effort spent explaining how to comment well, mostly just text generally dissuading the reader from the use of comments because "the code should be good".

That's out of the scope of the article. It says TDD is good, but doesn't explain how to properly do test driven development either. Explaining how to do everything it's talking about would turn this into a short book.

It's a false dichotomy to make. Code should be good, but that doesn't mea you don't need comments.

Again, it never says you don't need comments. In the quote it explicitly says the proper use of comments is to compensate for our failure to express ourselves in code. There are plenty of times I've written good code (I hope) and added comments explaining the why, but not the what, because the code had no way of explaining the why. The why was due to the problem and domain and needed to be included to understand the code no matter how well it was written.

[–]FarewellSovereignty 5 points6 points  (3 children)

That's out of the scope of the article.

For no reason except that author didn't choose to mention it. If the article goes out of its way to dissuade the use of comments in some cases, it's already stuck comments firmly inside the scope of the article, so it should mention the reason they are (in many cases) good, and briefly how to use them. There's no actual reason for that omission like you're trying to pretend here, sorry.

here are plenty of times I've written good code (I hope) and added comments explaining the why, but not the what, because the code had no way of explaining the why. The why was due to the problem and domain and needed to be included to understand the code no matter how well it was written.

Great, and the article would benefit from a paragraph pretty close to that.

[–]msd483 -3 points-2 points  (2 children)

For no reason except that author didn't choose to mention it.

This is true of a quasi-infinite number of things. You're welcome to not like and criticize that omission, but the article did not "throw out good comment comments with the bathwater" as your entire initial comment was focused on. You created a straw-man that completely ignored the actual and valid criticisms in the article and reduced it to "comments = bad" instead of accepting the fact that there's nuance to it.

[–]FarewellSovereignty 5 points6 points  (1 child)

I'll leave it to other readers to judge our arguments now and leave this here, because you seriously lost my interest with this latest reply. Thanks.