{"id":1058,"date":"2023-09-18T12:00:00","date_gmt":"2023-09-18T11:00:00","guid":{"rendered":"https:\/\/computingeducationresearch.org\/?p=1058"},"modified":"2023-11-03T11:11:09","modified_gmt":"2023-11-03T11:11:09","slug":"debugging-a-powerful-and-dangerous-skill-to-learn","status":"publish","type":"post","link":"https:\/\/computingeducationresearch.org\/debugging-a-powerful-and-dangerous-skill-to-learn\/","title":{"rendered":"Debugging: A powerful and dangerous skill to learn"},"content":{"rendered":"\n

Programming has now been part of the school computing curriculum in England for almost a decade, with many other countries following suit. For school students, learning to program is coupled with the challenge of bug-fixing errors in their code, also known as debugging.<\/p>\n\n\n\n

But why is debugging such a struggle for so many students? And what can we do to improve students\u2019 experiences with it?<\/p>\n\n\n\n

\"Teacher<\/figure>\n\n\n\n

Being able to debug is a necessity for any aspiring programmer. Errors cannot be avoided when programming, no matter how expert you are. As a result, programmers need to be confident in their debugging ability, which becomes more important as their programs become larger and more complex.<\/p>\n\n\n\n

Even for young people who do not wish to go on to study computing after school, debugging is a useful skill. Some researchers consider it a \u201cspecial case of troubleshooting\u201d\u00b9, making it an ideal way of learning problem-solving skills that can be used in other subjects. Students can also benefit from the perseverance needed to bug-fix, giving the skill affective benefits too.<\/p>\n\n\n\n

What makes debugging so difficult?<\/strong><\/h3>\n\n\n\n

It\u2019s no secret that fixing bugs is difficult when learning to program. This is completely understandable; learners have to understand program concepts, sequencing, syntax, and more when starting out, which is hard to keep track of. Things aren\u2019t helped by the wealth of sometimes cryptic error messages that may be spewed out to students, making bug-fixing far from simple.<\/p>\n\n\n\n

That isn\u2019t all. These challenges often lead to emotional reactions in learners, which is no different for secondary students. Research indicates that these tend to be more often negative than positive, with undergraduates in one study mentioning feelings of confusion, frustration, and desperation when struggling with debugging\u00b2. I\u2019m sure many teachers have witnessed these reactions in their classrooms.<\/p>\n\n\n\n

This is not what we want for students learning to program. We cannot expect students who find debugging difficult to benefit from or engage with the subject, let alone enjoy it. Alternatively, students may see the merit of computing, but not see themselves as \u201cclever enough to do it\u201d. Either way, it\u2019s vital that students’ first experiences of debugging are positive; they will benefit from this problem-solving even if they don\u2019t go on to become programmers.<\/p>\n\n\n\n

Despite the importance and challenges of debugging, we know little about how secondary students, who begin learning their first text-based programming language, feel and fare with debugging.<\/p>\n\n\n\n

Making debugging easier for students<\/strong><\/h3>\n\n\n\n

As a first-year PhD at the research centre, I\u2019ve decided to focus my research on this area. Debugging is a useful skill that is often a source of struggle, which I would like to change. Before this can be changed, I believe the following needs investigating:<\/p>\n\n\n\n

    \n
  1. Students\u2019 attitudes and emotions<\/strong> towards debugging (as I mentioned, this is an innate part of debugging, so research should investigate the current state of affairs for this)<\/li>\n\n\n\n
  2. Students\u2019 debugging behaviour<\/strong><\/li>\n\n\n\n
  3. Key stage 3 (KS3) computing teachers\u2019 perspectives<\/strong> on debugging teaching<\/li>\n<\/ol>\n\n\n\n

    I conducted my first study to investigate the first two points earlier in the year. Now I have a better feel of students’ perspective, it\u2019s time to find out how teachers find teaching debugging.<\/p>\n\n\n\n

    Ideas for teaching debugging:<\/strong><\/h3>\n\n\n\n

    Later on in the PhD, I hope to provide some in-depth advice for teachers looking for ways to teach debugging. For now, I can certainly share what I\u2019ve already learned about teaching bug-fixing:<\/p>\n\n\n\n

      \n
    1. Teach it!<\/strong> There is no explicit mention of debugging in the UK KS3 computing curriculum, leading to it not always being taught in classrooms. But programming can’t be done without debugging, so a good first step is to mention some useful debugging strategies. A good example would be to ask the following questions:\n