Software quality is tested, among other criteria, by its level of modularity. Nevertheless, novice programmers (NP) are not so careful to provide a modular code. To examine this tendency, we aim, in this study, to examine the circumstances in which NP decide to write modular code. Two student groups, twenty in each, were given a programming assignment, each in different format. The assignment of the first group was constituted from several parts, each add complexity to the previous one, while the second group received the entire assignment at once. The modular solution of the given task requires the definition of several classes and methods to address each of the problem's aspects. The students' solutions were analysed using the Dual-process and the Cognitive Dissonance theories as well as content analysis methods to explore the extent of modularity. The analysis revealed the following findings: (1) In the first group, a minor increase in the number of modular solutions was found while they progressed along the assignment stages; (2) The number of modular solutions of the second group was higher than of the first group. Analysis of students' justifications for lack of modularity in the first group revealed the following. The first stages of the problem were perceived as rather simple hence many students did not find any reason to invest in designing a modular solution. When the level of complexity increased in the following stages, the students realized that a modular solution would fit better, hence a cognitive dissonance was raised. Nevertheless, many of them preferred to decrease the dissonance by continuing their course of non-modular solution instead of re-designing a modular new one. Students of both groups also attributed their non-modular code to lack of explicit criteria for the evaluation of the code quality that lead them to focus on functionality alone. In view if the obtained findings, we recommend on several guidelines for instruction that might raise the students' awareness to the importance of code modularity.
© 2001-2024 Fundación Dialnet · Todos los derechos reservados