Documentation style

Course Queries Syllabus Queries 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

From the syllabus for one of my programming classes: "Your documentation will be sufficient if it would be possible to read only the comments, without looking at the code, and explain what the code does."

Have any of you heard of a documentation style like this? Is it a good practice? Seems extremely overzealous to me.

profilepic.png
manpreet 2 years ago

 

Code should be easy to follow. This can be achieved in a number of ways:

  1. appropriate and meaningful naming
  2. commenting on especially difficult algorithms or complex code
  3. extensive documentation of all the code

Appropriate documentation will use all three approaches where they are appropriate.

However, when the audience for the code is primarily trying to understand the code and assess understanding of the concepts - ie in an academic context, the third one is likely to be highly desirable.

All code should be written and documented so that it can be understood by your worst detractor, when he is on callout at three o'clock in the morning because there is a problem with the production system.

At the same time, excessive comments are another item to be maintained, and kept in sync with the code when changes are made to the code, and comments are the least likely item to be properly maintained under change.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.