+ 14
What level of commenting code is right for learning?
Comment main method? All helper methods? EOL for tricky statements? other thoughts?
5 Answers
+ 5
Indeed comments in the code increases the readability of code, but at the same time excessive comments can make a good code complicated. More on comments, visit following link
https://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-super-readable-code--net-8118
+ 13
ty everyone here helpful for SL and classroom.
+ 6
documentation is verry important, there cant be enough, when I look back to my old codes its like an textbook and I can remember why did I took that step exactly. The idea is read once understand all, if you cant apply that, do more documentation ☺👍
thumb rule :
Documentation : Code
0 : 1 - > use documentation omg!
1 : 1 - > great
2 : 1 - > ok
3 : 1 - > if it gets complicated
you dont need to comment every line, you can also work on sections and use up to 3 lines of documentation for a code segment , but keep in mind you have to remember after 3 weeks what was your thought on this part.
Remember: read once understand all
+ 3
Comments and hierarchical flow of program helps us for following
1. For future reference
2. For Documentation
3. Understood by the Lay man
4. Updating codes in future.
5. Helping tester team to understand it.
+ 2
Your code should be able to speak for itself, but meaningful comments might add clarity