in reply to Re: Short routines matter more in OO?
in thread Short routines matter more in OO?
Less error prone? Five studies cited by McConnel found that routine size was either inversely correlated with error frequency, or not correlated at all [1,2,3,4,5]
Easier to understood? A study of upper level comp. sci. students found that comprehension of a super-modularized program into routines about 10 lines long was no better than their comprehension of a program with no routines (but when moderate length routines were used, comprehension scores rose 65%). [6]
Less changes required? Another study finds that code needs to be changed least when routines average 100 - 150 lines. [7]
So, on the one hand we have several empirical studies which find that shorter routines do not require less changes, are not easier to understand, and are not less error prone. All of that relates to software cost in the real world. On the other hand, we have your unsupported opinion.
[1] Basili & Perricone (1984) "Software Errors and Complexity: An Empi +rical Investigation." Communications of the ACM 27, no. 1 (Jan) 42-52. [2] Shen et al (1985) "Identifying Error-Prone Software --- An Emprici +al Study" IEEE Transactions on Software Engineering SE-11 (Apr) 317- +324 [3] Card, Church, & Agresti (1986) "An Empirical Study of Software Des +ign Practices" IEEE Transactions on Software Engineering SE-12 no 2 ( +Feb) 264-271 [4] Card & Glass (1990) "Measuring Software Design Quality". Englewood CLiffs, N.J.: Prentice Hall [5] Shelby & Basili (1991) "Analyzing Error-Prone System STructure" I +EE Transactions on Software Engineering SE-17 no 2 (Feb) 141-152 [6] Conte, Dunsmore, Shen (1986) "Software Engineering Metrics and Mod +els" Menlo Park, Calif: Benjamin/Cummings [7] Lind & Vairavan (1989) "An Experimental Investigation of Software Metrics and Their Relationship to Software Development Effort" IEE +E Transactions on Software Engineering SE-15 no 5 (May) 649-653
|
|---|