Data Creation


Creating Types

  • Does the program use a different type for each kind of data that might change?
  • Are type names oriented toward the real-world entities they represent rather than programming-language types?
  • Are the type names descriptive enough to help document data declarations? Are they used specifically for that purpose?
  • Have you avoided redefining pre-defined types?

Declaring Data

  • Have you used a template to streamline data declarations and promote stylistic consistency?
  • If your language uses implicit declarations, have you compensated for the problems they cause?

Initialization

  • Does each routine check input parameters for validity?
  • Does the code initialize variables close to where they're used?
  • Are counters and accumulators initialized properly?
  • Are variables reinitialized properly in code that's called multiple times?
  • Does the code compile with no warnings from the compiler?