Organizing Straight-Line Code


  • Does the code make dependencies among statements obvious?
  • Do the names of routines make dependencies obvious?
  • Do parameters to routines make dependencies obvious?
  • Do comments describe any dependencies that would otherwise be unclear?
  • Does the code read from top to bottom?
  • Are references to variables as close together as possible, both in total live time and from each reference to a variable to the next?
  • Are related statements grouped together?
  • Have relatively independent groups of statements been moved into their own routines?