Abstract
The research presented in this Masters Thesis identifies the comprehension strategies used by novice programmers during maintenance tasks on a previously unknown application in Java. In addition, the difficulties the participants had while performing the tasks are identified and analysed. The skill of comprehending a program is useful, especially in relation to software maintenance. Still, students of computer science courses are primarily taught only how to make programs from scratch. In order to improve software maintenance, knowledge of how programmers comprehend a program is important. This knowledge can be used to develop tools to help the process, or to improve the teaching.
We conducted a controlled experiment with 39 participants (students). The participants were introduced to a Java application on which to perform three maintenance tasks. The participants had little or no prior experience with software maintenance. Their actions were logged and an extensive amount of verbal data was collected.
Two different approaches to the task solving were identified. In the first one, called systematic strategy, the participants tried to get an overview of the application before performing the maintenance tasks, by reading the documentation available or running the application. 56% of the participants applied this strategy. In the second one, called as-needed strategy, the participants proceeded to the task solving immediately, without trying to acquire any knowledge of the system by reading the documentation or running the application. This strategy was applied by 44% of the participants.
The performances of the participants applying the two strategies were compared with respect to quality of solution, solution time and the number of classes visited. Participants with a systematic approach showed better results than the as-needed group. The participants with the systematic strategy spent more time on Task 2 than the as-needed group, but for Task 3 the situation was reversed. However, for the total solution time (Task 2+3), the participants who applied the systematic strategy seemed to spend more time than participants who applied the as-needed strategy.
In addition, the difficulties the participants had during the task solving were identified. The difficulties were analysed to see what the nature of the problems was; if they were general or software specific, and whether or not they were connected to the understanding of object-oriented principles. A large part of the difficulties were in fact related to the comprehension of the program. In particular, understanding the structure of the program proved difficult. The participants also had difficulties with object-oriented concepts; instantiation of objects and placement and inheritance of functionality were a few of the difficulties recorded.