Shorter is always better how?
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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|