Internal Documentation Guidelines. Here is what to include
in your assignments:
-
Comments at the beginning of the script:
-
a first line that indicates which Unix shell to use for this script
-
the script name and its purpose.
-
any arguments and what they do.
-
the author's name, the date of creation
-
for later modifications, the author, date, and what was changed.
-
Comments in the body of the script:
-
Before each function: an explanation of its name, purpose,
and arguments.
-
Before each major section: at least one comment that explains the
purpose of that section.
-
Before complex or obscure command lines: a note to remind yourself
what you were doing.
-
Indent the code within loops and control statements so that the
logic of the program is easier to see.
-
Choose variable and file names carefully so that they remind you
of their purpose.
|