Anti-patterns in Students' Conditional Statements
Etienne Naude, Paul Denny, Andrew Luxton-Reilly

TL;DR
This study analyzes the prevalence of anti-patterns in beginner Python students' code, revealing common issues in conditional statements and providing insights for educational improvements.
Contribution
It offers a detailed analysis of anti-patterns in student code and suggests targeted educational strategies to improve coding practices.
Findings
High occurrence of 'if/else return bool' and 'confusing else' anti-patterns
Nearly 60% of anti-patterns are from two specific types
Anti-patterns are consistent across various exercises
Abstract
Producing high-quality code is essential as it makes a codebase more maintainable, reducing the cost and effort associated with a project. However, students learning to program are often given short, automatically graded programming tasks that they do not need to alter or maintain in the future. This can lead to poor-quality code that, although it may pass the test cases associated with the problem, contains anti-patterns - commonly occurring but ineffective or counterproductive programming patterns. This study investigates anti-patterns relating to conditional statements in code submissions made by students in an introductory Python course. Our primary motivation is to understand the prevalence and types of anti-patterns that occur in novice code. We analyzed 41,032 Python code submissions from 398 first-year students, using the open-source "qChecker" tool to identify 15 specific…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsEducation and Critical Thinking Development · Online and Blended Learning
