0

What do comments do? Do u really need them? They don't do or display anything right?

Are comments necessary?

11th Dec 2017, 4:59 AM
Daeshawn Houle
3 Respostas
+ 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
11th Dec 2017, 5:09 AM
Koketso Dithipe
Koketso Dithipe - avatar
+ 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 :)
11th Dec 2017, 5:13 AM
Dima Makieiev
Dima Makieiev - avatar
+ 2
Oh Ok. Thank both of you
11th Dec 2017, 5:15 AM
Daeshawn Houle