skip to main content
10.1145/3587102.3588840acmconferencesArticle/Chapter ViewAbstractPublication PagesiticseConference Proceedingsconference-collections
research-article

Student Code Refactoring Misconceptions

Published:30 June 2023Publication History

ABSTRACT

Teaching students to develop code of good quality is important. Refactoring -- rewriting a program into a semantically equivalent program of better quality -- is a common technique to improve code quality. It is therefore relevant for students to learn about refactoring, even for the smaller programs they write as beginners. However, students make mistakes when refactoring programs. Some of these mistakes appear often, and might be caused by misconceptions they have. In this paper, we investigate common student code refactoring misconceptions. We do this by analyzing log data containing program snapshots of students working on refactoring exercises in a tutoring system. We manually inspect all transitions from a correct program state to an incorrect state. We then use grounded theory to identify and categorize misconceptions students might have when refactoring programs. As a result, this work (1) defines the concept of refactoring misconception, and (2) provides an initial list of 25 such misconceptions, together with an accompanying website with full details.

References

  1. Vicki L Almstrum. 1996. Investigating student difficulties with mathematical logic. Teaching and Learning Formal Methods (1996).Google ScholarGoogle Scholar
  2. Jecton Tocho Anyango and Hussein Suleman. 2018. Teaching Programming in Kenya and South Africa: What is difficult and is it universal?. In Koli Calling.Google ScholarGoogle Scholar
  3. Kent Beck and Martin Fowler. 2018. Bad Smells in Code. In Refactoring: improving the design of existing code. Chapter 3.Google ScholarGoogle Scholar
  4. Anastasiia Birillo, Ilya Vlasov, Artyom Burylov, Vitalii Selishchev, Artyom Goncharov, Elena Tikhomirova, Nikolay Vyahhi, and Timofey Bryksin. 2022. Hyperstyle: A Tool for Assessing the Code Quality of Solutions to Programming Assignments. In SIGCSE.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Jürgen Börstler, Harald Störrle, Daniel Toll, Jelle Van Assema, Rodrigo Duran, Sara Hooshangi, Johan Jeuring, Hieke Keuning, Carsten Kleiner, and Bonnie MacKellar. 2018. " I know it when I see it" Perceptions of Code Quality: ITiCSE'17 Working Group Report. In ITiCSE.Google ScholarGoogle Scholar
  6. Dennis M Breuker, Jan Derriks, and Jacob Brunekreef. 2011. Measuring static quality of student code. In ITiCSE.Google ScholarGoogle Scholar
  7. Neil CC Brown and Amjad Altadmri. 2017. Novice Java programming mistakes: Large-scale data vs. educator beliefs. Transactions on Computing Education (2017).Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Yuliya Cherenkova, Daniel Zingaro, and Andrew Petersen. 2014. Identifying challenging CS1 concepts in a large problem dataset. In SIGCSE.Google ScholarGoogle Scholar
  9. Luca Chiodini, Igor Moreno Santos, Andrea Gallidabino, Anya Tafliovich, André L Santos, and Matthias Hauswirth. 2021. A curated inventory of programming language misconceptions. In ITiCSE.Google ScholarGoogle Scholar
  10. Rohan Roy Choudhury, Hezheng Yin, and Armando Fox. 2016. Scale-driven automatic hint generation for coding style. In ITS.Google ScholarGoogle Scholar
  11. Giuseppe De Ruvo, Ewan Tempero, Andrew Luxton-Reilly, Gerard B Rowe, and Nasser Giacaman. 2018. Understanding semantic style by analysing student code. In ACE.Google ScholarGoogle Scholar
  12. Stephen H Edwards, Nischel Kandru, and Mukund BM Rajagopal. 2017. Investigating static analysis errors in student Java programs. In ICER.Google ScholarGoogle Scholar
  13. Tomá? Effenberger and Radek Pelánek. 2022. Code Quality Defects across Introductory Programming Topics. In SIGCSE.Google ScholarGoogle Scholar
  14. Martin Fowler. 2018. Refactoring: improving the design of existing code.Google ScholarGoogle Scholar
  15. Luke Gusukuma, Austin Cory Bart, Dennis Kafura, and Jeremy Ernst. 2018. Misconception-driven feedback: Results from an experimental study. In ICER.Google ScholarGoogle Scholar
  16. Paul Richard Halmos. 1960. Naive set theory. van Nostrand.Google ScholarGoogle Scholar
  17. Geoffrey L Herman, Michael C Loui, Lisa Kaczmarczyk, and Craig Zilles. 2012. Describing the what and why of students' difficulties in Boolean logic. Transactions on Computing Education (2012).Google ScholarGoogle Scholar
  18. Maria Hristova, Ananya Misra, Megan Rutter, and Rebecca Mercuri. 2003. Identifying and correcting Java programming errors for introductory computer science students. SIGCSE (2003).Google ScholarGoogle Scholar
  19. Christopher Hundhausen, Anukrati Agrawal, Dana Fairbrother, and Michael Trevisan. 2009. Integrating pedagogical code reviews into a CS 1 course: an empirical study. SIGCSE (2009).Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Cruz Izu, Paul Denny, and Sayoni Roy. 2022. A Resource to Support Novices Refactoring Conditional Statements. In ITiCSE.Google ScholarGoogle Scholar
  21. Bernard J Jansen. 2006. Search log analysis: What it is, what's been done, how to do it. Library & information science research (2006).Google ScholarGoogle Scholar
  22. Hieke Keuning, Bastiaan Heeren, and Johan Jeuring. 2017. Code quality issues in student programs. In ITiCSE.Google ScholarGoogle Scholar
  23. Hieke Keuning, Bastiaan Heeren, and Johan Jeuring. 2020. Student refactoring behaviour in a programming tutor. In Koli Calling.Google ScholarGoogle Scholar
  24. Hieke Keuning, Bastiaan Heeren, and Johan Jeuring. 2021. A tutoring system to learn code refactoring. In SIGCSE.Google ScholarGoogle Scholar
  25. Diana Kirk, Tyne Crow, Andrew Luxton-Reilly, and Ewan Tempero. 2020. On assuring learning about code quality. In ACE.Google ScholarGoogle Scholar
  26. Essi Lahtinen, Kirsti Ala-Mutka, and Hannu-Matti Järvinen. 2005. A study of the difficulties of novice programmers. SIGCSE (2005).Google ScholarGoogle Scholar
  27. Andrew Luxton-Reilly, Paul Denny, Diana Kirk, Ewan Tempero, and Se-Young Yu. 2013. On the differences between correct student solutions. In ITiCSE.Google ScholarGoogle Scholar
  28. Steve McConnell. 2004. Code complete.Google ScholarGoogle Scholar
  29. Ioana T Mow. 2008. Issues and difficulties in teaching novice computer programming. In Innovative Techniques in Instruction Technology, E-learning, E-assessment and Education.Google ScholarGoogle Scholar
  30. Sebastian C Müller and Thomas Fritz. 2016. Using (bio) metrics to predict code quality online. In ICSE.Google ScholarGoogle Scholar
  31. Yizhou Qian and James Lehman. 2017. Students' misconceptions and other difficulties in introductory programming: A literature review. Transactions on Computing Education (2017).Google ScholarGoogle Scholar
  32. Teemu Sirkiä and Juha Sorva. 2012. Exploring programming misconceptions: an analysis of student mistakes in visual program simulation exercises. In Koli Calling.Google ScholarGoogle Scholar
  33. John P Smith III, Andrea A DiSessa, and Jeremy Roschelle. 1994. Misconceptions reconceived: A constructivist analysis of knowledge in transition. The journal of the learning sciences (1994).Google ScholarGoogle Scholar
  34. Juha Sorva. 2013. Notional Machines and Introductory Programming Education. Transactions on Computing Education (2013).Google ScholarGoogle Scholar
  35. Martijn Stegeman, Erik Barendsen, and Sjaak Smetsers. 2016. Designing a rubric for feedback on code quality in programming courses. In Koli Calling.Google ScholarGoogle Scholar
  36. Anselm Strauss and Juliet Corbin. 1990. Basics of qualitative research.Google ScholarGoogle Scholar
  37. Leo C Ureel II and Charles Wallace. 2019. Automated critique of early programming antipatterns. In SIGCSE.Google ScholarGoogle Scholar
  38. Kurt VanLehn. 1982. Bugs are not enough: Empirical studies of bugs, impasses and repairs in procedural skills. The Journal of Mathematical Behavior (1982).Google ScholarGoogle Scholar
  39. Eliane S Wiese, Anna N Rafferty, Daniel M Kopta, and Jacqulyn M Anderson. 2019. Replicating novices' struggles with coding style. In ICPC.Google ScholarGoogle Scholar
  40. Eliane S Wiese, Michael Yen, Antares Chen, Lucas A Santos, and Armando Fox. 2017. Teaching students to recognize and implement good coding style. In L@S.Google ScholarGoogle Scholar

Index Terms

  1. Student Code Refactoring Misconceptions

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ITiCSE 2023: Proceedings of the 2023 Conference on Innovation and Technology in Computer Science Education V. 1
      June 2023
      694 pages
      ISBN:9798400701382
      DOI:10.1145/3587102

      Copyright © 2023 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 30 June 2023

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate552of1,613submissions,34%

      Upcoming Conference

      ITiCSE 2024

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader