Is it really important to include comments in the code ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Is it really important to include comments in the code ?

tell me what's your view about it . thanks :)

18th Apr 2017, 4:45 AM
Shreyas Salunkhe
Shreyas Salunkhe - avatar
8 Answers
+ 6
Writing comments is considered good practice. It helps others who view your code gain a better understanding of your code more quickly and also will help you be able to locate more quickly what parts of the code you need to make changes to!
18th Apr 2017, 6:15 AM
michael c
michael c - avatar
+ 6
write a program with at least a few hundred lines of code and don't comment it. open it again after half a year and try to understand what it does. it'll be really hard. and it's even harder for others who didn't know the code before.
18th Apr 2017, 5:55 AM
Mario L.
Mario L. - avatar
+ 5
if you are writing long code , comments can be very useful
18th Apr 2017, 4:53 AM
Serhat Merak
Serhat Merak - avatar
+ 3
its a good practice it helps understand the code
18th Apr 2017, 4:53 AM
Abhinav Singh
Abhinav Singh - avatar
+ 1
Writing comments helps others read the intent behind your code. Its especially a good practice to do comment as you program because its a pain to go back and fill every comment in later if you realise someone will read you code at some point.
18th Apr 2017, 5:48 AM
Brennan
Brennan - avatar
0
You could even start by sketching your program by only using comments (no actual coding at first), and then progressively implementing each snippet. That could be an approach of top-down analysis: breaking down your problem into smaller pieces that are easier to solve.
18th Apr 2017, 5:57 AM
Álvaro
0
I think comments very important to understand what's happened in code because every one how want to know what this code mean
19th Apr 2017, 3:58 PM
omer ali
omer ali - avatar