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.
18.188.119.81