An empirical study of the effects of modularity on program modifiability

An empirical study of the effects of modularity on adaptive program maintenance is reported. A discussion of methodological issues in empirical studies using programmers is also included. How to deal with the typically large within-group variation due to the different levels of programming ability among the participants is discussed. The study provides strong evidence that a modular program is faster to modify than a non-modular, but otherwise equivalent version of the same program, when one of the following conditions hold: (a) Modularity has been used to implement "information hiding" which localizes changes required by a modification. (b) Existing modules in a program perform useful generic operations, some of which can be used in implementing a modification. (c) A significant understanding of, and changes to, the existing code are required for performing a modification. In contrast, the study provides evidence that modifications not fitting into the above categories are unaided by the presence of modularity in the source code.