
Code Checklist
1.
All work should be pledged.
2.
Each program file should have a general comment with your name and the date along with a
description of what the code does.
3.
Code should include appropriate citations for any code, algorithms, and other referenc
ed material.
4.
Each function should have a) a comment describing the role of the function, b) all Pre
-
conditions for
the function, and c) all Post
-
conditions for the function.
5.
You should use meaningful variable names.
6.
You should make appropriate use of wh
ite space in your code.
7.
You should provide meaningful prompts for input stating the type of data and appropriate range of
values for what needs to be entered.
8.
You should verify t
hat meaningful data was entered (preferred), or should echo back the data th
e users
enters (second choice). Doing both is fine.
9.
All displayed information should be clearly labeled and formatted.
10.
Directions should briefly tell what the program does or otherwise identify the program. Directions
should clearly identify requiremen
t for input data.
11.
A
part from small homework problems, a
ll the code we will be writing is complex enough to need
function
s.
12.
Any time you find that your are rewriting the same lines of code or virtually identical code in several
places within the program,
you should consider putting that code into a separate subroutine.
13.
Be sure to clean up your code once it is working. Remove unneeded code or function calls.
14.
Please use a mono
-
space font like courier when printing your code.
15.
Individual routines should ge
nerally be less that one page in length.
16.
Do not use global variables unless you have a
very, very
compelling reason. If you absolutely must use
global variables, you should justify each variable.