McConnell_2004_Ch14_Organizing_Straight_Line_Code Flashcards
1
Q
What is a Dependancy in code…?
A
The easiest sequential statements to order are those in which the order counts. Here’s an example:
2
Q
State 5 guidelines for organizing straight line code?
A
- Organize code so that dependencies are obvious.
- Name routines so that dependencies are obvious
- Use routine parameters to make dependencies obvious
- Document unclear dependencies with comments.
- Check for dependencies with assertion or error handling
Page 348 to 350
3
Q
What is McConnell’s PRINCIPLE OF PROXIMITY?
A
Page 351
4
Q
What order should a program be able to read in? Why?
A
Page 351
5
Q
What are 3 ways in which code can be related?
A
Page 352