General Considerations in Using Data

General Data

  • Do all variables have the smallest scope possible?
  • Are references to variables close together?
  • Do control structures match the corresponding data structures?
  • Does each variable have one and only one purpose?
  • Is each variable's meaning explicit, avoiding hidden meanings?
  • Are all the variables that have been declared, used?

Global Data

  • Are all variables local unless they absolutely need to be global?
  • Do variable names differentiate between local, module, and global data?
  • Are all global variables documented?
  • Is the code free from pseudo-global data, big data structures containing a mishmash of data that's passed to every routine?
  • Are access routines used instead of global data?
  • Are access routines and data organized into modules, rather than lumping all global data and access routines together?
  • Do access routines provide a level of abstraction beyond their underlying data?
  • Are all related access routines at the same level of abstraction?