Key Points

  • The strongest principle for organizing straight-line code is ordering dependencies.

  • Dependencies should be made obvious through the use of good routine names, parameter lists, comments, and—if the code is critical enough—housekeeping variables.

  • If code doesn't have order dependencies, keep related statements as close together as possible.

Get Code Complete, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.