CS 1320 (Principles of Algorithm Design II):
Guidelines for Programming Assignments

What to turn in

Tips:

Submitting programs electronically

To submit your program, e-mail its source code (as described below) to the address corresponding to your section number.

(Please use this address only for submitting homework. If you have questions, please use my main e-mail address bmassing@cs.trinity.edu.)

To e-mail source code, use one of the following approaches. You will get an automated reply indicating that the mail was received; if you do not get such a reply within a few minutes, this could be an indication that you've done something wrong.

If for some reason you submit a homework and then want to submit it again (perhaps you found a mistake in your program after submitting it), just repeat the above procedure. I will grade the most recent version I receive.

Grading criteria

Tips for writing good documentation and "clear code"

Something that early programmers did not fully appreciate is that programs tend to take on a life of their own, being reused and modified over a period of years, often by people other than their original authors. The better a job the original author did of documenting the program and writing it clearly, the easier it will be to reuse and modify. The sample programs are examples of what I consider reasonable documentation and clear code.

Documentation

By "documentation" I mean comments at the start of the program that help potential users understand exactly what the program does without necessarily understanding how, and definitely without reading the whole program. Generally speaking, these comments should describe the program's inputs (command-line arguments, file input, input from the keyboard, a keyboard) and outputs (file output, output to the screen) and how they are related. See the sample programs for examples.

Clear code

The object of these suggestions is to make the code clear and readable for the human reader, perhaps a programmer who wants to reuse it with modifications. Here are some tips for writing clear code.