0

Are documentation comments really necessary to remember

1st Jun 2018, 5:14 AM
Hardeep Kaur
Hardeep Kaur - avatar
4 Respostas
+ 9
Comments are there to help you (or anyone else) to understand the code better. Depends on who you work for, there may be different standards on how comments are supposed to be written.
1st Jun 2018, 5:22 AM
Hatsy Rei
Hatsy Rei - avatar
+ 6
Daniel Silva If you think you can comprehend your code without comments, it is fine to omit them. However, we have to consider those who are not programming-savvy. Our comments should also make it easier for beginners to understand what we are doing.
1st Jun 2018, 5:50 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
Comments are there to describe the intent of the code (ie, what it is for), not paraphrasing how it is done in code( clean code is self explanatory). If you write comment, best is to write it in a standard so that tools can extract them for documentation. example, ., javadoc is used for the documentation of java libraries.
1st Jun 2018, 5:38 AM
ifl
ifl - avatar
+ 1
is a good practice when you have a long code but if your code is clean, you use indentation and your variables have are good identified, you can forget it if you want, although i do not recommend it at all
1st Jun 2018, 5:31 AM
Daniel Silva
Daniel Silva - avatar