Objective

A coding assistant can suggest a solution quickly, but students still need to decide whether that solution works. Finding a problem in code someone else wrote calls for skills that differ from writing code from scratch. The authors wanted to see what undergraduate students thought about generative AI for programming and how students handled exam questions that required them to fix code written by a language model.

They examined these questions in separate studies. The first asked students how useful they found the tools, whether the tools helped them think of ideas, whether they planned to keep using them, and what concerned them. The second compared scores on debugging tasks with scores on other parts of the same exams. These questions capture different things. A student can see a tool as useful and still have trouble determining why a particular program fails.

Methods

The first study used an anonymous online questionnaire with 64 undergraduates at a higher education institution in Israel. All had completed at least one programming course. The survey went out in March 2024. It asked students about their programming knowledge and prior experience with AI in coursework, as well as views about usefulness, creativity, future use, and possible concerns. Students chose ratings on a five-point scale. The researchers compared the average ratings with the middle of the scale to see which views were clearly above or below neutral.

The second study analyzed exam results for 147 undergraduates at an institution in Germany. Students took courses in operations research, which examines ways to find effective solutions under constraints, or cryptography, which concerns techniques for protecting information. The researchers examined six exams across winter 2022/2023, summer 2023, and winter 2023/2024. Each included work that required students to correct AI-generated code, along with instructor-designed programming or theory tasks.

The researchers compared students’ scores across the different parts within each exam. This kept the comparison within the same class and exam, but the tasks required different kinds of work. Fixing an existing program requires reading and tracing it, while a construction task asks students to develop a solution. The paper reports informed consent and approval from the respective faculty ethics committees. The students who completed the survey were separate from those whose exam scores were analyzed, so the researchers did not link an individual student’s attitude with their performance.

Key Findings

The surveyed students generally saw value in generative AI. In the separate exam study, students often scored lower when fixing generated code, but the pattern did not hold across every term.

Students’ views of the tools

Overall usefulness averaged 3.63 on the five-point scale. Students rated the statement about learning more efficiently at 3.88 and the statement about learning more effectively at 3.27. This difference suggests students were more confident that the tools could help them work faster than that they could improve the quality of their learning. These were students’ views; the survey did not measure how quickly they learned.

Students gave creativity an overall rating of 3.66. Producing new ideas received a rating of 3.97, compared with 3.47 for helping them solve programming problems creatively. Willingness to continue using generative AI was the highest-rated broad category, at 3.92. The concern category averaged 2.98, which did not differ clearly from the neutral midpoint. Over-reliance drew more concern than the category as a whole, with a rating of 3.66. The results show that favorable views could coexist with worries about using the tool too often.

What the exam scores showed

In summer 2023 and winter 2023/2024, the researchers found statistically clear score differences in both courses, with lower scores on the generated-code debugging tasks. In summer operations research, for example, the averages were 0.57 on the debugging task and 7.00 on the instructor-designed work, as reported in the paper. In winter 2023/2024 cryptography, the corresponding averages were 3.67 and 7.59. The tasks were not matched versions of the same programming problem, so these figures cannot show how much of the gap was due to the origin of the code.

Results in winter 2022/2023 were different. The researchers found no clear difference in either course. In operations research, average scores were 6.96 on the AI-related task and 6.98 on the instructor-designed work. The authors suggest that low performance across the exams that term may have made differences harder to detect. That is a possible explanation and was not tested directly.

The two studies together identify a reason to look separately at attitudes and skills. The students who expressed favorable views were not the people whose scores were analyzed. The paper therefore cannot show that students who trusted AI more were worse at correcting it, or that frequent use of AI caused the observed exam pattern.

Implications

The authors recommend using generative AI as a resource for activities that ask students to brainstorm, explain code, or critique proposed solutions. They also recommend explicitly teaching students to check generated work. The exam analysis gives instructors a reason to provide practice reading and repairing existing code, alongside the assignments where students build their own solutions.

A practical reading is to ask students to explain which behavior they expected before they run a program. They can then trace a test case, identify where the output diverges from the expectation, and justify the change they make. An instructor can check whether the student understands the fix by asking for a second test that might reveal a different error. That structure makes the reasoning visible and gives students more ways to show what they know than submitting a corrected program alone.

For course leads, it is worth distinguishing enthusiasm for a tool from evidence about what students can do. A student may find AI useful for generating ideas and still need help inspecting an unfamiliar solution. A course can assess writing code and debugging code separately. If a program wants to know whether AI-generated code poses a distinct challenge, it can compare equally demanding debugging tasks with different sources. The paper gives reasons to teach verification and to review assessment design, while leaving open which teaching approach produces the strongest and most lasting skills.

Limitations

The two studies involved different students, institutions, and countries. The survey describes what the Israeli students reported, while the exam comparison describes what the German students did on particular tasks. The samples do not show how the same students’ views and technical skills went together. The survey also measures plans and impressions rather than later behavior.

The authors emphasize that the exam activities differed in their demands. Students fixed AI-generated code in one task and wrote code or answered theory questions elsewhere in the exam. A lower score could reflect difficulty reading unfamiliar code, differences in the material, or other task features. It cannot be attributed to the source of the code alone. The first term also differed from the later terms, so the pattern was not uniform.

The research focused on immediate perceptions and exam performance. It did not track whether students became better at checking code through repeated practice or whether they could do so across new subjects. The paper does not mention, but tests that report which errors students missed could provide more guidance for instructors than overall scores alone.

Future Directions

The authors call for comparing tasks that have similar requirements. One study could give students equivalent programs with comparable errors and vary whether the program was written by a person or produced by a model. That would help separate the source of the work from the problem of debugging itself.

They also recommend work across more institutions and longer periods. Researchers could compare teaching approaches in which students explain fixes to partners, test generated code independently, or build projects and review suggested changes along the way. They could check whether students can later find errors without help on a new problem. Following the same students from a survey into a performance task would also allow a direct comparison of what they believe about their skills and what they can demonstrate.

The bottom line: Undergraduates in one survey saw generative AI as useful for programming, especially for efficiency and idea generation. In a separate exam study, students often scored lower when correcting generated code than on other exam components. The tasks differed in what they required, so the results do not establish that AI-written code itself caused the difficulty. They give instructors a reason to teach debugging and verification explicitly. Ask students to show how they identified a problem, checked a fix, and decided the program now does what it should.