0
What do comments do? Do u really need them? They don't do or display anything right?
Are comments necessary?
3 Answers
+ 7
If you're going to refer to your code in the future, you might need something remind yourself why you added certain blocks of code, this where comments come in.
This usually happens when your codes grow in length and in numbers.
For more info...
Added:
https://www.sololearn.com/Discuss/750072/?ref=app
https://www.sololearn.com/Discuss/882192/?ref=app
https://www.sololearn.com/Discuss/899191/?ref=app
https://www.sololearn.com/Discuss/273226/?ref=app
+ 2
There are two points of view on this question:
1: Yes definitely you should comment you code for a devs who will maintain or change it after you.
2: Your code should be a pretty much self-explanatory so you dont need to comment it. For example variable userName should contain name not ID or age.
I personally like 2nd since I am to lazy to write something twice :)
+ 2
Oh Ok. Thank both of you