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:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is McConnell’s PRINCIPLE OF PROXIMITY?

A

Page 351

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What order should a program be able to read in? Why?

A

Page 351

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are 3 ways in which code can be related?

A

Page 352

How well did you know this?
1
Not at all
2
3
4
5
Perfectly