+ 2
What's the point of using comments?
Im new I started today and have been playing around with what I've learned. Whats the point of using comments?
6 Respostas
+ 4
Comments allow you to write plain text in your application without causing syntax errors. This allows you to take notes, comment out lines of code so the code doesn't run and leave notes for other users who may edit your application where the notes will help them identify how the application works quickly than compared to sitting down and reading line by line.
+ 3
Leaving comments not only makes the code more easy to understand, it also allows other programmers to know what a specific function is doing. It allows you to write TODO lists or to simply remember what your code does. There are times when you're going to review your own code and you will have no idea why it does something. Comments help to avoid these kind of problems.
+ 2
OOHH that makes a lot more sense now!
+ 1
In addition to readability, sometimes the code remains unchanged for a long time, after which hardly remember everything.
0
Required for reference points when you need to edit your code a year or so down the road.
0
To understand your code properly by another programmar or user.
As a problem can be solved in multiple ways or user can give variable name in their own choice which is hard to understand by another person without comment.