People generally read a program from top to bottom. Write your programs to help others understand them. Among the implications of this principle are:
- Include a detailed external specification up front to clearly define the program purpose and use.
- Specify externally accessed routines, variables, and algorithms up front.
- Use the "structured" programming constructs, which are inherently easier to follow.
Reference:
Kernigham, B., and Plauger, P., The Elements of Programming Style, New York: McGraw-Hill, 1978.