IfSQ
Best size for routines is 100-150 lines
Research Finding:
A study showed that when routines averaged 100 to 150 lines each, code was more stable and required less changes.
IfSQ Defect Indicators based on this finding:
-
SP-1—Routine Too Long
Routines longer than 150 lines (excluding comments and blank lines) have been shown to be less stable, more subject to change, and more expensive to fix than shorter routines.
Source:
An Experimental Investigation of Software Metrics and Their Relationship to Software Development Effort
- Randy K. Lind, and Kenneth G. Vairavan
- Recorded 1989 in IEEE Transactions on Software Engineering, SE-15, no. 5, May
- Pages 649-53