Adopting XP Practices for Teaching Object Oriented Programming

Author(s): K. Keefe, J. Sheard, and M. Dick
Venue: Proc. 8th Australian Conf. Computing Education
Date: 2006


Students that are first learning to program run into few difficulties. Divide and conquer of complex problems into smaller modules, the mechanics of programming, abstract programming techniques, and object-oriented concepts like inheritance, classes, and interfaces. XP has been proposed as a possible way to teach this concepts. Among XP topics are pair programming, test driven development, simple design, and refactoring. Test-driven development has been argued against, by stating that introductory programming courses should teach students how to program, not to teach them entire software development processes.

At Monash University, the authors wanted to find out the effects of XP on teaching introductory programming concepts. There were nineteen students in the study when they started, but by the final exam, only twelve remained, a particularly high drop rate unfortunately. The students all programmed in Java 1.5 using Netbeans 3.6. The study took place over eighteen weeks, and students used JUnit for writing test code. Several metrics were used to measure the outcomes of using XP. Surveys were conducted at both the start and end of the semester. Students results for previous programming subjects were gathered. The authors also asked reflective questions using a questionnaire, and observed students throughout the course of the semester. One validity constraint present in this study is that they used Action Research which allows for change and improvements throughout the course of the project.

Students perspectives provided a good measure of success for different aspects of XP. In general, the majority of students found pair programming, refactoring, and simple design beneficial. However, there were many disappointments with test driven development. The stronger students preferred practices of simple design and refactoring over pair programming. The weaker students preferred pair programming. No student preferred the test-first approach.

The test-first approach was a failure mainly because JUnit was a stumbling block. Test data and testing principles should have been introduced before the complex structure and framework of JUnit. At introductory levels of computer science, students struggle to find purpose in the code, so testing it is too difficult. An overall conclusion from the authors is that XP practices seem to benefit weaker students, who turned out with a better than expected understanding of programming and object oriented concepts by the finish of the semester.