Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+37 votes

How did you guys answer this problem?
"In the ideal case, your code would be so clear and easily readable ("self-documenting") that no comments would be needed." [My answer is True]
In the book it says that "Always strive for self-documenting code" that is so clear that no comments are necessary.", but it also says that "self-documenting code is an ideal that is rarely met, and so additional comments are necessary."

asked in CSC285_Fall2018 by (1 point)
+5

Update: I talked to Dr.Stonedahl and he told me that the answer for the problem is true. However, he also stated that in real life, regardless of the level of coding you're at (whether you are a newbie to coding or a professional coder), the "ideal state" is always hard to achieve, therefore you always have to provide comments for your code.

+6

Well... you don't always have to provide comments... but even with the best-written code there will likely still be a few places that really need comments. Still, self-documenting code is a good ideal to strive for. (Especially work hard on choosing good class, variable, and method names!)

1 Answer

+14 votes

Yes I was also confused on this but, I also put True, because even though it says that "self-documenting code ... is rarely met..." It still says to try and strive for code where you do not need additional comments.

answered by (1 point)
...