Code Perfumes: Reporting Good Code to Encourage Learners

Florian Obermüller, Lena Bloch, Luisa Greifenstein, Ute Heuer, Gordon Fraser
8/13/2021
cs.SE

Official code: se2p/LitterBox (36 stars, Java, GPL-3.0, last commit 2026-03-07).

Abstract

Block-based programming languages like Scratch enable children to be creative while learning to program. Even though the block-based approach simplifies the creation of programs, learning to program can nevertheless be challenging.

Show full abstract

Automated tools such as linters therefore support learners by providing feedback about potential bugs or code smells in their programs. Even when this feedback is elaborate and constructive, it still represents purely negative criticism and by construction ignores what learners have done correctly in their programs. In this paper we introduce an orthogonal approach to linting: We complement the criticism produced by a linter with positive feedback. We introduce the concept of code perfumes as the counterpart to code smells, indicating the correct application of programming practices considered to be good. By analysing not only what learners did wrong but also what they did right we hope to encourage learners, to provide teachers and students a better understanding of learners' progress, and to support the adoption of automated feedback tools. Using a catalogue of 25 code perfumes for Scratch, we empirically demonstrate that these represent frequent practices in Scratch, and we find that better programs indeed contain more code perfumes.

View on arXivView PDF

Code Implementations(1)

se2p/LitterBoxOfficial100%
GPL-3.0

Static code analysis tool for detecting recurring patterns in Scratch projects.

366Java, JavaScriptMar 24, 20208 months agoGPL-3.0
scratch

Similar Papers

Cite this paper

@article{obermller2021code,
  title  = {Code Perfumes: Reporting Good Code to Encourage Learners},
  author = {Florian Obermüller and Lena Bloch and Luisa Greifenstein and Ute Heuer and Gordon Fraser},
  year   = {2021},
  eprint = {2108.06289},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.06289}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.06289.svg)](https://codeofpaper.com/paper/2108.06289)

Discussion