Litcius/Paper detail

CompareCFG: Providing Visual Feedback on Code Quality Using Control Flow Graphs

Lucy Jiang, Robert Rewcastle, Paul Denny, Ewan Tempero

202021 citationsDOI

Abstract

The quality of the code impacts the cost of its maintenance, yet "code quality" is often not given attention in introductory programming courses, perhaps due to the difficulty of providing automated code quality feedback. We have been exploring how to provide automated feedback on complexity, one aspect of code quality. We have developed CompareCFG that provides feedback based on control flow graphs (CFGs). It generates visualisations of students' submissions and provides the means for a student to compare the CFG of their own code with CFGs of less complex submissions, helping to support their understanding of code complexity. CompareCFG also provides actionable feedback by indicating specific issues in a submission that can reduce its complexity. We evaluated CompareCFG in a pilot study. We found it provides useful feedback to participants that helped them reduce the complexity of their code. CompareCFG offers a convenient way to provide programming students with automated visual feedback on code quality.

Topics & Concepts

Computer scienceCode (set theory)Quality (philosophy)Control flowControl (management)Code reviewVisual programming languageVisual feedbackFeedback controlSource codeProgramming languageStatic program analysisArtificial intelligenceSoftwareSoftware developmentSet (abstract data type)EngineeringEpistemologyControl engineeringPhilosophySoftware Engineering ResearchTeaching and Learning ProgrammingSoftware Testing and Debugging Techniques