Design Checklist


Following is a non-exhaustive checklist of things you should think about when you design programs.

  1. Do your variable names clearly indicate the type of data stored by the variables?
  2. Do your class names clearly describe the functionality of objects of the class?
  3. Do you use inheritance correctly and when necessary?
  4. Can you concisely describe the purpose of each class?
  5. Does each method perform one well-defined operation?
  6. Have you eliminated repeated code, for example by using loops or defining a single method that can be called repeatedly?
  7. Do your classes contain constructors that appropriately initialize the data members of the class?
  8. Do your methods return appropriate values?
  9. Do you appropriately avoid the use of magic numbers?
  10. If a variable is used only in one method, is it declared local to that method rather than as a data member of the class?
  11. Do you avoid inefficiency by only creating objects when necessary?


Sami Rollins

Date: 2007-09-27