[DUPLICATE] What is the point of commenting? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 14

[DUPLICATE] What is the point of commenting?

Hey guys just womdering what is the point of commenting if it gets ignored by the ide

26th Apr 2017, 12:03 AM
itsyaboidankmeme 360noscope
itsyaboidankmeme 360noscope - avatar
59 Answers
+ 36
It's like making notes in a reference book, highlighting stuff here and there and explaining to yourself why things are so. Those may be ignored by other people reading the book, but it would help people to understand what you did.
26th Apr 2017, 1:08 AM
Hatsy Rei
Hatsy Rei - avatar
+ 17
Remembering what you did/how it works since you must forget sometimes what an specific part of the code does, explaining the code for any other programmer that will work on it
26th Apr 2017, 12:06 AM
Welliton Malta
Welliton Malta - avatar
+ 16
comment is explaining something, & indicate things that are still to complete, for the next person working on the code and can just be a description, it doesn't have to be code.
30th Apr 2017, 5:54 AM
Vidya
Vidya - avatar
+ 14
Goods comments are an important part of your code. It's important for other programmers to understand your code. An is important for you too, when you need to remember what you write in the future.
26th Apr 2017, 12:15 AM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar
+ 11
Because it helps viewers to understand your code better
28th Apr 2017, 6:02 PM
Sukhjeet Singh
Sukhjeet Singh - avatar
+ 10
READ THIS TO KNOW THE FACT: the point of comment is that - you can write; //this code is written by 'Min Somai' and give credit to your work without other programmers questioning you that this has nothing to do with the program.
28th Apr 2017, 9:11 AM
Min Somai
Min Somai - avatar
+ 9
Commenting is important for the programmer and anyone who updates or modifies your code. For example, if you sell a program to a customer, they'll need the comments for reference if something needs a hot fix or something like that
26th Apr 2017, 1:32 AM
Jake Blankenship
Jake Blankenship - avatar
+ 9
notes and easier to find things also it doesnt got ignored by the ide itself, the compiler ignores it only when it runs
28th Apr 2017, 1:05 AM
DeleteThisAccount
+ 5
Comments are good when your code requires explanation. You should write your code such that it's self documenting, but sometimes comments can help explain what the intended purpose of your code is when it's a little more complex. You should try to avoid using them as much as possible, but they can help for the reasons I stated above.
27th Apr 2017, 11:09 PM
Mike
Mike - avatar
+ 5
you don't forget variables you declared with their functions. make it easy to read ya code even after a very very long time
28th Apr 2017, 1:59 PM
Tuchy
Tuchy - avatar
+ 5
I think the point of comments differs from person to person. I never used to use them but found that I would come back to code I wrote weeks of months before, maybe to make some improvements or changes, and the first thing I'd think is 'how does this work again?' I find comments really useful for helping me remember what my code does but also when I've worked with other people it helps us to develop code collaboratively. But it's not for everyone, I've worked with a guy who didn't like the use of comments and said he found it harder to read the code. I think it's a matter of opinion.
28th Apr 2017, 8:29 PM
Ross Whitfield
Ross Whitfield - avatar
+ 5
Others can understand what you wrote (No one can understand my codes Not even myself ) 😅😅😅
29th Apr 2017, 11:33 AM
keivan Ipchi
keivan Ipchi - avatar
+ 5
You create a program today without comment. Then years later you come back to see it. You say "who write this, why he do this, why do that" because you forgot to write comment. This happen to me.
30th Apr 2017, 3:00 AM
Yusuf Malikul Mulki
Yusuf Malikul Mulki - avatar
+ 4
Well !! It helps to make the program more user-friendly
27th Apr 2017, 9:55 AM
Akash Verma
Akash Verma - avatar
+ 4
It makes your code easy understandable ... and it can serve as a chat between programmers ;)
27th Apr 2017, 7:58 PM
Hovhannes Petrosyan
Hovhannes Petrosyan - avatar
+ 4
Comments are mainly for Advice for Quetions
28th Apr 2017, 12:16 AM
SyntaxError
SyntaxError - avatar
+ 4
there is none! Indeed, comments can be even misleading if they aren't updated with every code changes. Therefore you should avoid commenting as much as possible. Clean code is self-explanatory. If you do have to make comments, then you should feel bad about it. ;) Source: "Clean Code" - by Rober "Uncle Bob" Martin.
28th Apr 2017, 12:19 PM
Thanh Le
Thanh Le - avatar
+ 3
It helps you to understand your own program after a while or to a second person.
29th Apr 2017, 1:17 AM
Bilal E
Bilal E - avatar
+ 3
To inform other programmers what your code is doing so they can make adjustments as needed.
29th Apr 2017, 4:16 AM
Anthony Perez
+ 3
to help like I am commenting to help you
29th Apr 2017, 11:31 AM
Mangalam
Mangalam - avatar