PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
March 7, 20248 citationsOpen Access

Fixing Your Own Smells: Adding a Mistake-Based Familiarisation Step When Teaching Code Refactoring

View Full Paper
ITIvan TanCPChristopher M. Poskitt

Key Points

Key points are not available for this paper at this time.

Abstract

Programming problems can be solved in a multitude of functionally correct ways, but the quality of these solutions (e.g. readability, maintainability) can vary immensely. When code quality is poor, symptoms emerge in the form of 'code smells', which are specific negative characteristics (e.g. duplicate code) that can be resolved by applying refactoring patterns. Many undergraduate computing curricula train students on this software engineering practice, often doing so via exercises on unfamiliar instructor-provided code. Our observation, however, is that this makes it harder for novices to internalise refactoring as part of their own development practices. In this paper, we propose a new approach to teaching refactoring, in which students must first complete a programming exercise constrained to ensure they will produce a code smell. This simple intervention is based on the idea that learning refactoring is easier if students are familiar with the code (having built it), that it brings refactoring closer to their regular development practice, and that it presents a powerful opportunity to learn from a 'mistake'. We designed and conducted a study with 35 novice undergraduates in which they completed various refactoring exercises alternately taught using a traditional and our 'mistake-based' approach, finding that students were significantly more effective and confident at completing exercises using the latter.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Tan et al. (2024) studied this question.

synapsesocial.com/papers/68e75441b6db6435876ccc61https://doi.org/10.1145/3626252.3630856
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1Learning from wrong and creative algorithm design2008 · 32 citations
  2. 2How video production affects student engagement2014 · 1,840 citations
  3. 3Learning from wrong and creative algorithm design2008 · 11 citations
  4. 4Object-oriented software construction1989 · 2,017 citations
  5. 5Refactoring: Improving the Design of Existing Code2002 · 5,650 citations