Programming Code Checklist for Effective and Efficient Development - Prof. Joseph D. Sloan, Assignments of Data Structures and Algorithms

This checklist outlines essential guidelines for writing clean, well-documented, and efficient code. It covers various aspects such as pledging work, adding comments, using meaningful variable names, providing clear prompts, and organizing functions. Following this checklist can help improve code readability, maintainability, and overall quality.

Typology: Assignments

Pre 2010

Uploaded on 08/16/2009

koofers-user-emz
koofers-user-emz 🇺🇸

9 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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.

Partial preview of the text

Download Programming Code Checklist for Effective and Efficient Development - Prof. Joseph D. Sloan and more Assignments Data Structures and Algorithms in PDF only on Docsity!

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 referenced material.
  4. Each function should have a) a comment describing the role of the function, b) all Pre-conditions forthe function, and c) all Post-conditions for the function.
  5. You should use meaningful variable names.
  6. You should make appropriate use of white 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 that meaningful data was entered (preferred), or should echo back the data the usersenters (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 requirement for input data.
  11. Apart from small homework problems, all the code we will be writing is complex enough to needfunctions.
  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 generally be less that one page in length.
  16. Do not use global variables unless you have aglobal variables, you should justify each variable. very, very compelling reason. If you absolutely must use