+ 1

What's the Point of Comments?

I understand how to write a comment but I'm not sure why someone would insert it into the code. Found the explanation unclear. I maybe over-thinking it.

3rd Jul 2016, 2:51 PM
SWilliamsJD
SWilliamsJD - avatar
8 Antworten
+ 3
Mani method (){ something(); } // method to do something something (){ }
3rd Jul 2016, 4:18 PM
John Francis
John Francis - avatar
+ 2
comments helps when your program is more than 10K lines
5th Jul 2016, 11:29 AM
Aditya Porwal
Aditya Porwal - avatar
+ 1
comments help you to debug your code. It is like notes to help you remember or others understand what the code is without going through the code .It is not necessary but it will be helpful.
3rd Jul 2016, 3:17 PM
John Francis
John Francis - avatar
+ 1
how i use comments is when i am writing a big code and want to see what will happen if i remove that line i just make that whole line a comment by adding comment tag instead of deleting it and later when i want to add that line of code again i remove the comment tag from that line and now that line is applied. Tough this is not the reason why comments were made
8th Jul 2016, 2:50 PM
Parth Nagdev
Parth Nagdev - avatar
0
OK, can you provide an example of what one might put in the comments. This will clarify it for me...and THANK YOU for the quick reply.
3rd Jul 2016, 3:32 PM
SWilliamsJD
SWilliamsJD - avatar
0
it will be useful while doing complicated programmes
3rd Jul 2016, 4:19 PM
John Francis
John Francis - avatar
0
it will benefit to the reader of your code. :)
5th Jul 2016, 6:39 AM
Theresa P. Vivo
Theresa P. Vivo - avatar
0
if you ask your freinds , and they see your 10.000 lines then they would ask you : which line is doing what ? xD
9th Jul 2016, 12:07 AM
Sefa Corleone
Sefa Corleone - avatar