Using a Tutoring System to Learn to Write High Quality Code

Amruth Kumar
Ramapo College of New Jersey

Need: Too often, students write poor code – code that is correct, but is hard to read, modify or extend. Since the code is correct, students have no incentive to revise it, and therefore, get no opportunity to address the important issue of poor coding practices. Computer Science educators are of the consensus that code quality must be more thoroughly discussed in courses. Yet, they have found it hard to teach good coding practices. Current approaches such as tutor/peer code review, live coding, and refactoring instruction are resource-intensive and/or do not scale. Software utilities developed to address poor coding practices help students reactively improve their code, not proactively learn good coding practices.

Guiding Questions: Can a software tutor be built to help students proactively learn good coding practices by solving problems? Will solving problems using the tutor help students learn better coding practices? Will any such improved understanding lead to students writing better code? Will women benefit differentially than men from the software tutor?

Outcomes: A software tutor will be developed that will 1) present problems on good semantic coding practices; 2) provide feedback to help students learn from their mistakes; 3) adapt to the learning needs of students by presenting problems on only those coding practices that they have not yet mastered; and 4) provide reports to instructors. The tutor will cover 100 semantic coding practices, with 5 – 10 problems encoded per coding practice. It will be self-paced: students can use it to learn on their own time, at their own pace and use it as often as necessary. The tutor will be usable for C++, Java and Python. The problems and feedback will be formatively evaluated. The efficacy of the tutor in helping students learn good coding practices and its effectiveness in helping them write good code will be summatively evaluated.

Broader Impacts: The software tutor developed in this project has the potential to improve the coding practices of Computer Science students, contribute to the improvement of the quality of Computer Science graduates, and thereby increase the productivity of computing workforce. The project has the potential to improve the participation of women in Computer Science major and subsequently, in computing careers. The project will contribute to research on learning programming.