Code quality

Code quality is a popular topic among software engineers. Reflective literature about this very subject is often recommended between practitioners (for examples see Goodreads). In this line of research, I analyse how teachers provide feedback on code quality to university students and how this aligns with norms in use among professionals.


Below, you’ll find the relevant publications that explain the design and development of a rubric that aims to provide students with a complete view of code quality, as relevant to them. A rubric may adopt several different forms. For a basic overview, see the explanation at Berkeley or consider the book “Effective Grading” by Walvoord.

We provide a rubric that is fairly comprehensive, but because of that, also harder to learn to use. A student might learn about code quality by taking one of the criteria (e.g., “comments”) and study the different levels that may be distinguished. Of course, interpretation is an important part of assessing code quality, and in this form, the rubric is not useful for grading (or at least, should not be).

Let me know if you’re using it and how! Just send an e-mail with a few details of how you teach (or learn). The rubric is provided under a Creative Commons BY-SA 4.0 license, which means that you must attribute and share any modifications under the same licence.

Paper: Designing a rubric for feedback on code quality in programming courses

Presented at Koli Calling 2016. Proceedings. Pre-print.

“We investigate how to create a rubric that can be used to give feedback on code quality to students in introductory programming courses. Based on an existing model of code quality and a set of preliminary design rules, we constructed a rubric and put it through several design iterations. Each iteration focused on different aspects of the rubric, and solutions to various programming assignments were used to evaluate. The rubric appears to be complete for the assignments it was tested on. We articulate additional design aspects that can be used when drafting new feedback rubrics for programming courses.”

Paper: Towards an empirically validated model for assessment of code quality

Presented at Koli Calling 2014. Proceedings. Pre-print.

“We present a pilot study into developing a model of feedback on code quality in introductory programming courses. To devise such a model, we analyzed professional standards of code quality embedded in three popular software engineering handbooks and found 401 suggestions that we categorized into twenty topics. We recorded three instructors who performed a think-aloud judgment of student-submitted programs, and we interviewed them on the topics from the books, leading to 178 statements about code quality. The statements from the instructor interviews allowed us to generate a set of topics relevant to their practice of giving feedback, which we used to create criteria for the model. We used the instructor statements as well as the book suggestions to distinguish three levels of achievement for each criterion. This resulted in a total of 9 criteria for code quality. The interviews with the instructors generated a…”