Two controlled experiments assessing the usefulness of design pattern documentation in program maintenance. - Prechelt, L.
Using design patterns is claimed to improve programmer productivity and software quality. Such improvements may manifest both at construction time (in faster and better program design) and at maintenance time (in faster and more accurate program comprehension). The paper focuses on the maintenance context and reports on experimental tests of the following question: does it help the maintainer if the design patterns in the program code are documented explicitly (using source code comments) compared to a well-commented program without explicit reference to design patterns? Subjects performed maintenance tasks on two programs ranging from 360 to 560 LOC including comments. The experiments tested whether pattern comment lines (PCL) help during maintenance if patterns are relevant and sufficient program comments are already present. This question is a challenge for the experimental methodology: A setup leading to relevant results is quite difficult to find. We discuss these issues in detail and suggest a general approach to such situations. A conservative analysis of the results supports the hypothesis that pattern-relevant maintenance tasks were completed faster or with fewer errors if redundant design pattern information was provided. The article provides the first controlled experiment results on design pattern usage and it presents a solution approach to an important class of experiment design problems for experiments regarding documentation
Keywords: American undergraduate students; C++.; German graduate students; Java; PCL; Controlled experiments; Design pattern documentation; Design pattern information; Design pattern usage; Experiment design problems; Experimental tests; Pattern comment lines; Pattern-relevant maintenance tasks; Program comments; Program comprehension; Program maintenance; Programmer productivity; Software quality; Source code comments