Skip to content | Skip to navigation
Grrr. What is it about comments, that makes them required? I don't see why teachers should mandate them; I mean really, I showed code, and code far better than expected of me, why should I be forced to explain my code in comments, when the code should explain itself? It's annoying is all. Can anyone else see any logic in this? I'm glad anyway, it's good to be in a C++ class.
Oh, well. I got a 90 %, the lower grade being due to my total lack of comments. Anyway, who else uses comments in that manner?
I should be ashamed of myself.
Dec 08, 2004 21:49 # 29891
null *** (11) has all the information you need...
why should I be forced to explain my code in comments, when the code should explain itself?
Only simple code explains itself. Believe me on this one, the first time you have to maintain a 25,000+ lines piece of software you didn't write yourself, comments are the one thing that keep you sane.
"God is dead." - Nietzsche, 1882 "Nietzsche is dead." - God, 1900
Dec 08, 2004 23:56 # 29896
majic *** (6) throws in his two cents...
Grrr. What is it about comments, that makes them required? I don't see why teachers should mandate them; I mean really, I showed code, and code far better than expected of me, why should I be forced to explain my code in comments, when the code should explain itself? It's annoying is all. Can anyone else see any logic in this? I'm glad anyway, it's good to be in a C++ class.
I strongly agree with the teachers mandate. The teacher wants to know how well you understand the code that you write. Having a bunch of lines that demonstrate some functionality is just not enough to know if what the teacher taught sank in. Plus in my own personal opinion (though I have not always put it into practice) I believe the programmer should comment the hell out of his code. For one thing, it will help him figure out what the program does in a year when he reads the code again. Plus another example is that when I read your code I'll know exactly what is going on. The longer and more indepth the comments the stronger an understanding I'll gain from it when I read it.
It's just a good practice. Pretend you are working on 10 or 20 thousand lines of code. Pretend it's open source, now invision that I download it. Let's assume I really like the program and see a need for a feature it doesn't have. If I go through your 20 thousand lines of code and there is no comments I'll likely just delete the code and forget about it. If I read through your code and see that it's well commented, easily understandable and something that I can grasp, I'll be more likely to be able to bring that feature to life.