an exploratory study of program comprehension strategies
play

An exploratory study of program comprehension strategies of - PDF document

Int. J. Human-Computer Studies (2001) 54, 1 } 23 doi:10.1006/ijhc.2000.0423 Available online at http://www.idealibrary.com on An exploratory study of program comprehension strategies of procedural and object-oriented programmers C YNTHIA L. C


  1. Int. J. Human-Computer Studies (2001) 54, 1 } 23 doi:10.1006/ijhc.2000.0423 Available online at http://www.idealibrary.com on An exploratory study of program comprehension strategies of procedural and object-oriented programmers C YNTHIA L. C ORRITORE College of Business Administration, Creighton Uni v ersity, Omaha, NE 68178, USA. email: cindy @ creighton.edu . S USAN W IEDENBECK College of Information Science and Technology, Drexel Uni v ersity, Philadelphia, PA 19104, USA. email: susan @ cse.unl.edu. (Recei v ed 14 July 1999 and accepted in re v ised form 19 July 2000) This exploratory study examines the nature of program understanding strategies em- ployed during a series of comprehension and maintenance activities carried out over time. Two dimensions of comprehension were examined: the direction of comprehension and the breadth of comprehension. Thirty expert procedural and object-oriented (OO) programmers studied a program and then performed modi " cations during two sessions held 1 week apart. The results showed that the direction of comprehension was mixed. The OO programmers tended to use a strongly top-down approach to program under- standing during the early phase of familiarization with the program but used an increasingly bottom-up approach during the subsequent maintenance tasks. The pro- cedural programmers used a more bottom-up orientation even during the early phase, and this bottom-up approach became even stronger during the maintenance tasks. The breadth of the programmers ' comprehension was found to be greater for the procedural programmers than for the object-oriented programmers. However, after carrying out a series of tasks, all programmers had examined the majority of the program code. The results suggest that, regardless of paradigm, expert programmers eventually build a broad systematic, rather than a localized, view of a program over time. � 2001 Academic Press KEYWORDS: procedural programmers; object-orientated programmers; software maintenance; program comprehension. 1. Introduction Software maintenance, which involves making enhancements, adaptations and correc- tions to existing software systems, has been estimated to account for more than half of programmer time (Layzell, Champion & Freeman, 1993). Because of its large role in the software process, maintenance has a large e ! ect of programming productivity, and even small gains in productivity have the potential for signi " cant economic e ! ects (Henry & Humphrey, 1993). It has been argued that many of the problems in modern software development are related to the cognitive complexity of programming (Fisher, 1987). 1071-5819/01/010001 # 23 $35.00/0 � 2001 Academic Press

  2. 2 C. L. CORRITORE AND S. WIEDENBECK Brooks (1983) and Koenemann and Robertson (1991) identify program comprehension, the understanding of program code, as a critical cognitive activity in programming. Successful program maintenance, in particular, depends on comprehension (Koenemann & Robertson, 1991; Rajlich, Doran & Gudla, 1994; von Mayrhauser & Vans, 1995 a , b ; Canfora, Mancini & Tortorella, 1996; Tilley, Paul & Smith, 1996). The programmer must have an adequate understanding of what a program does and how it does it in order to make functional modi " cations and extensions to a program without introducing errors. While there have been some experimental studies of programmers carrying out mainten- ance tasks (Littman, Pinto, Letovsky & Soloway, 1986; Pennington, 1987 a ; Koenemann & Robertson, 1991; von Mayrhauser & Vans, 1996, 1997), our understanding of program comprehension during program maintenance is still fairly sparse. We propose that the study of program comprehension in maintenance should begin with an examination of the key comprehension-related activities involved in mainten- ance: breadth and direction (Shneiderman & Mayer, 1979; Brooks, 1983; Letovsky, 1986; Koenemann & Robertson, 1991). There is a need for more knowledge about the strategies programmers use during maintenance to comprehend programs, how the use of information sources changes over time, and what e ! ect the programming paradigm has on comprehension-related activities during maintenance. These issues are important ones since program comprehension is the key foundation to good program maintenance. In order to improve program maintenance, we must " rst understand the processes underlying this activity. This information could then be used to develop tools or training which support the programmer in these activities. In addition, such study will empirically examine the claims of OO programming advocates about the advantages the paradigm brings to program maintenance. We also designed this study as a follow up of previous research, extending earlier work by adding a longitudinal and paradigm components, and eliminating what we felt to be lacking in previous work. In this research we analyse in detail the knowledge sources used by expert program- mers during maintenance of a program in order to determine the direction of compre- hension and the breadth of comprehension. We analyse how comprehension-related activities proceed in repeated maintenance tasks and how the comprehension activities of procedural and object-oriented (OO) programmers di ! er. The organization of this paper is as follows. Section 2 summarizes previous research on program comprehension, with emphasis on comprehension during program mainten- ance and similar activities. It then states our research questions. Section 3 outlines the methodology of the study, including the participants, materials and experimental pro- cedure. The results are presented in Section 4. Section 5 discusses the results, and Section 6 contains concluding remarks. 2. Previous research 2.1. DIRECTION OF COMPREHENSION The direction of comprehension concerns the programmer ' s strategic approach to program comprehension, which may be top-down, bottom-up, or a combination of the two. Shneiderman and Mayer (1979) and also Pennington (1987 b ) describe bottom-up theories of program comprehension. In the Shneiderman and Mayer model program

Recommend


More recommend