A Controlled Experiment Comparing the Maintainability of Programs Designed with and without Design Patterns—A Replication in a Real Programming Environment

Marek Vokáč, Walter Tichy, Dag I. K. SjØberg, Erik Arisholm, Magne Aldrin
2004 Empirical Software Engineering  
Software "design patterns" seek to package proven solutions to design problems in a form that makes it possible to find, adapt and reuse them. To support the industrial use of design patterns, this research investigates when, and how, using patterns is beneficial, and whether some patterns are more difficult to use than others. This paper describes a replication of an earlier controlled experiment on design patterns in maintenance, with major extensions. Experimental realism was increased by
more » ... ng a real programming environment instead of pen and paper, and paid professionals from multiple major consultancy companies as subjects. Measurements of elapsed time and correctness were analyzed using regression models and an estimation method that took into account the correlations present in the raw data. Together with on-line logging of the subjects' work, this made possible a better qualitative understanding of the results. The results indicate quite strongly that some patterns are much easier to understand and use than others. In particular, the Visitor pattern caused much confusion. Conversely, the patterns Observer and, to a certain extent, Decorator were grasped and used intuitively, even by subjects with little or no knowledge of patterns. The implication is that design patterns are not universally good or bad, but must be used in a way that matches the problem and the people. When approaching a program with documented design patterns, even basic training can improve both the speed and quality of maintenance activities. Keywords: Controlled experiment, design patterns, real programming environment, qualitative results. CONTROLLED EXPERIMENT COMPARING MAINTAINABILITY OF PROGRAMS Pat: Abstract Factory, Composite Alt: AbstFactory 154 VOKÁ Č ET AL.
doi:10.1023/b:emse.0000027778.69251.1f fatcat:gnapc6zadjcehlrpvur3dcygl4