Code Smells for Assessing and Improving Students’ Coding Skills and Practices
摘要
This paper introduces a simple and practical approach aimed at enhancing students’ object-oriented programming skills with a focus on producing clean and maintainable code. The approach leverages the concept of code smells as indicators of potential issues in code quality, integrating the identification and rectification of code smells as a continuous practice throughout the semester. Incentives are provided to encourage students to invest extra efforts in addressing these non-functional but important dimensions of their code. Implemented in a junior-level object-oriented programming course, the approach yields promising preliminary results, demonstrating substantial reductions in code smells densities and marked improvements in code quality. Additionally, there is a correlation between lower code smells occurrences and better student grades. We also identified several common code smells persisting across all assignments, offering valuable insights into student coding practices and suggestions for future course improvements. We believe our approach is applicable and adaptable to enhance non-functional and long-term code quality awareness in a variety of programming-intensive courses.