In any language, good documentation is very important. You can add comments at the end of a line, or above a line. Your program should include comments within the code, not just at the top. These comments will explain what your program is doing. You should have good comments, informative function/variable names, and consistent indentation.
Comments should to be succinct (short and useful). Comments for the description, or above functions, should be as detailed as needed.
Your code should include good naming conventions for constants, variables, functions, etc.
If you need to answer questions, create a file and type in your answer. Below, you will use cat
to display your answer.
The following should appear at the very top of the work that you turn in. Put this information at the top-left. If you are turning in program(s), include this as comments at the very top.
File Name
Your Name
CSc class number Lab/Homework #Y
Account: your account name
Due date: put the due date here
Description: Detailed description of the program
Input: The description for Input
Output: The description for output.
When you are finished with the assignment, use the script
command to capture your activities. This creates a log file, and you should give it a ".txt" extension.
The script
command should be issued on the SNOWBALL server, not before you have connected to it (unless specifically requested).
Use cat
to show the programs you've made along with the file(s) containing explanations/comments. If appropriate, show data files.
Show the compilations of each program. Also show test run(s) of the programs.
If you need to answer questions, use cat to display your answers.
Turn in the log as a text file (i.e. with a .txt extension) through iCollege. Attach the source files (e.g. ".c" files, ".h" files, etc.) along with the log file.
The log file you turned in should be readable, which means program or test run(s) should be clearly shown line by line. All unreadable or unnecessary content should be removed. Your submission will not be graded if you fail to do so.
Call the cleaned-up version hmwkY_XX.txt. Here you have to replace XX with the name of your account and Y should be replaced with the appropriate number. For example Account name: hchebrolu1, and it is a 2nd homework then your filename should be hmwk2_hchebrolu1.txt. For Labs use the similar format labY_XX.txt
If any line is copied from other source that must be specified in comments. You should not be using other people's code in your programs. If you do, you must indicate what it is (including which lines), who wrote it, and where it comes from.
Make sure to keep a back-up of your files, including the log file before cleaning it up.
Note that we might use different input/file(s) to compile with your program, so you should make sure that it is a flexible solution.
Late submission within one week will receive the late penalty as given in the syllabus. A submission over one week late will not be graded.
If a demo is required, it has to be scheduled and shown within a week. Failure to show the demo will receive a penalty (typically 10 points).
Do not turn in files that are in a proprietary format. Use open formats such as .c, .sh, .txt, .ods, .odt, .csv, .ogg, .pdf, .md, .html. The format should be appropriate to the assignment. Files in a proprietary format will not be graded.