Paper · 2024-05-28 · cs.AI, cs.HC
The Widening Gap: The Benefits and Harms of Generative AI for Novice Programmers
Lab study of 21 CS1 students solving one C++ problem with GitHub Copilot and ChatGPT, coded for metacognitive difficulties with think-aloud and eye tracking. Students who struggled accepted more Copilot suggestions (no test reported) and often reached fixes through ChatGPT. Replicates Prather et al. (2018) with GenAI added. Small sample, qualitative claims, no code.
Human evaluationCode completioneducationmetacognitioneye-trackingcode-completionuser-study
AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Beginners who learn to program often get stuck because they do not notice where they are in the process of solving a problem. They read the task too fast, lock onto the wrong idea, or keep patching a solution that needs to be rethought. This study asks what happens when students also have AI coding helpers that suggest code while they type and can answer questions in chat.
The authors watched 21 students work on one small problem, recording what they said, where they looked, and what they accepted. Some students used the AI to move faster and ignored the bad suggestions. Others were pulled off track by constant suggestions and by chat answers that did not fit their problem. Several of those students felt they understood the problem when they did not. The authors suggest teaching students to notice when they are stuck and to recognise a bad suggestion, before they lean on AI tools.
TL;DR
- A replication of a 2018 lab study of novice metacognition, with GitHub Copilot and ChatGPT available §1 §3.1.
- Half of the 21 students showed metacognitive difficulties. The 10 who struggled accepted more Copilot suggestions on average §4.1 tab. 4.
- The paper names three new difficulties linked to GenAI: Interruption, Progression and Mislead tab. 2.
- All findings are from one course, one problem and 21 students. There are no code, no equations and no model-level experiments.
Problem
Novice programmers often fail to move through the problem-solving steps and lack metacognitive awareness of where they are §1 §2.2. Earlier surveys of students using GenAI report positive attitudes but do not show how students actually use the tools §2.1. The authors ask two questions: what benefits novices get from GenAI for solving programming problems (RQ1), and what difficulties they face while using it (RQ2) §1.
Method
The study replicates the protocol of Prather et al. (2018) and adds GenAI tools. The steps below follow the paper.
- Problem and setting. The same problem as the 2018 study, "More Positive or Negative"; its full statement appears only in Figure 1. It was served through the Athene automated assessment tool, integrated into the Canvas LMS, which compiles the program and runs test cases, then returns feedback §3.1 fig. 1 fig. 2. The course used C++ and had GenAI from the first day. The instructor, who is one of the researchers, installed Copilot for students and modeled its use in class §3.1.
- Participants. 27 students were enrolled in a CS1 course, and 21 opted in. Students who did not opt in were offered an alternative extra-credit task; one chose it §3.2.
- Lab session. Each student used a lab computer with VS Code and GitHub Copilot, plus ChatGPT. The browser had two tabs: the problem page and ChatGPT. The ChatGPT history and the source file were cleared between sessions §3.3. Eye tracking was calibrated, then students did a "Hello World" warm-up while thinking aloud, then the problem with a 35-minute limit §3.3.
- Observation and interview. Researchers took notes on what each student said and did. After the task, students answered questions about their use of Copilot and ChatGPT and about AI and programming experience. One week later, the self-efficacy subscale of the MSLQ was collected in class §3.3.
- Coding. Notes were split by line and tagged with a codebook of 15 codes: the six problem-solving stages of Loksa et al. §2.2, the five difficulties of Prather et al., and four affect codes §3.4. Two researchers coded the first sessions separately while watching the eye-tracking replay, then discussed disagreements. Agreement reached Cohen's kappa 0.74 §3.4. The rest were coded independently. Three new difficulties were added when new phenomena appeared §3.4.
- Analysis. Descriptive results, Pearson correlations between course variables and difficulty counts tab. 1, and a narrative account for each struggling student §4.1. Eye-tracking is used qualitatively, through replays and gaze descriptions §3.3 §4.1.
Metacognitive difficulties, as defined in the paper tab. 2:
- Forming (old): the wrong conceptual model of the right problem.
- Dislodging (old): an incorrect model is not fixed by rereading the prompt.
- Assumption (old): the correct model for the wrong problem.
- Location (old): moving too fast through stages, leading to a false sense of progress.
- Achievement (old): refusing to abandon a wrong solution because it feels nearly done.
- Progression (new): being behind in the course material without knowing it.
- Interruption (new): not being able to concentrate because of frequent suggestions.
- Mislead (new): the tool steers the user down the wrong path.
Key equations: none. The paper contains no equations and no algorithms.
Procedure as pseudocode. The paper gives no code, so this sketches the coding procedure in §3.4 only:
# Coding of lab-session notes [§3.4]
# Input: sessions, one list of note lines per participant
# Output: tags per line; difficulty labels added during coding
def code_sessions(sessions, codebook):
# 1. Calibrate: two coders tag the first four sessions separately [§3.4]
for session in sessions[:4]:
tags_first = tag_lines(session, codebook)
tags_second = tag_lines(session, codebook)
# Disagreements are settled by discussion [§3.4]
resolve_by_discussion(tags_first, tags_second)
# 2. Agreement: Cohen's kappa of 0.74 is reported [§3.4]
kappa = cohens_kappa(tags_first, tags_second)
# 3. Remaining sessions are tagged independently [§3.4]
for session in sessions[4:]:
tag_lines(session, codebook)
# 4. Phenomena outside the codebook become new labels [§3.4]
codebook.add("Interruption")
codebook.add("Progression")
codebook.add("Mislead")
return codebookHyperparameters
This is a study design, so the table lists its settings.
| Name | Value | Where | Notes |
|---|---|---|---|
| Participants | 21 opted in, of 27 enrolled | §3.2 | 7 identified as women, 14 as men |
| Problem | "More Positive or Negative", C++ | §3.1 fig. 1 | Full statement is in the figure only |
| Time limit | 35 minutes | §3.3 | Same limit as Prather et al. |
| Warm-up | "Hello World", thinking aloud | §3.3 | Not timed |
| Course timing | Loops taught 2 weeks before | §3.1 | |
| Copilot, ChatGPT | VS Code with GitHub Copilot; ChatGPT | §3.3 | Versions and dates not stated |
| Assessment tool | Athene, in Canvas | §3.1 fig. 2 | |
| Eye tracking | Tobii hardware and software | §3.3 | Model, sampling rate and calibration accuracy not stated |
| Self-efficacy | MSLQ self-efficacy subscale, 1 week later | §3.3 | Collected outside the lab on purpose |
| Codebook | 15 codes | §3.4 | 6 stages, 5 old difficulties, 4 affect codes |
| Coding agreement | Cohen's kappa 0.74 | §3.4 | Read as high agreement, citing McHugh |
| Added labels | 3 (Interruption, Progression, Mislead) | §3.4 tab. 2 | |
| Correlation labels | weak, moderate, strong, very strong | §4 (footnote) | Pearson; test details not stated |
| Ethics | Exempt under the lead institution's IRB; consent forms | §3.2 |
Results
Author-reported. Setup: 21 students in one CS1 course, one C++ problem, 35 minutes. The baseline is the 2018 study (31 students, no GenAI). Where the paper gives no value for that baseline, the cell says "not stated".
| Metric | Result | Baseline (Prather et al., 2018) | Source |
|---|---|---|---|
| Students who produced a working program | 20 of 21 | 11 of 31 did not finish within 35 min | §4 §5.2 |
| Time to finish | mean 17.1 min, SD 8.1, range 5 to 35 | not stated | §4 |
| Copilot acceptance rate, per student | 10% to 53% | not stated | §4 tab. 3 |
| Mean acceptance, students with difficulties | 34.1% (SD 12.5%) | not stated | tab. 4 (see Pitfalls) |
| Mean acceptance, students without difficulties | 24.5% (SD 6.6%) | not stated | tab. 4 (see Pitfalls) |
| Grade vs new difficulty count | r = -0.503, p = 0.020 | not stated | tab. 1 |
| Grade vs time | r = -0.727, p = 0.0002 | not stated | tab. 1 |
| Difficulty count vs time | r = 0.693, p = 0.00049 | not stated | tab. 1 |
| Negative self-efficacy vs difficulty count | r = 0.552, p = 0.0094 | not stated | tab. 1 |
| Programming vs AI experience (self-reported) | r = 0.622, p = 0.0026 | not stated | tab. 1 |
| Students with any difficulty | 10 of 21 | 5 difficulties identified, 31 students | §4.1 §2.2 |
| Students with no difficulty | 11 of 21 | not stated | §4.2 |
| Struggling students who used GenAI to reach a solution | 9 of 10 | not stated | §5.2 |
Figure 3 shows the interview Likert results, which the text does not give fig. 3. Figures 4 to 7 are screenshots from individual sessions (P8, P11, P17, P21) fig. 4 fig. 5 fig. 6 fig. 7.
Paper vs code
No official code. The paper has no code link, and the arXiv metadata has none. Searches on GitHub for "widening gap generative AI novice" and "novice programmers metacognition genai" returned no repositories. There is no code to compare against the paper.
Pitfalls
- Per-student labels disagree between Table 3 and the narrative. For 7 of the 10 struggling students (P1, P4, P7, P8, P13, P14, P17), the labels in the case narrative differ from their Table 3 row. In six of the seven, Table 3 swaps Progression and Interruption relative to the narrative (P4, P7, P8, P13, P14, P17). P1 has the same swap, and Table 3 also adds Location §4.1 tab. 3. Check which source is right before you use per-student tags.
- Count of students with new labels. The text says 8 students had new labels §4. Table 3 lists 9 rows with a new label (Progression, Interruption or Mislead).
- Acceptance means do not match Table 3. The 10 struggling students in Table 3 average 32.5%, and the 11 others average 25.1%. Table 4 reports 34.1% and 24.5%. The paper does not say how the means were computed, for example whether they weight by suggestion count. The acceptance rate is shown only as a ratio in one example: P2 accepted 2 of 20, which is 10% §4.2. No test is reported for the difference between the two groups.
- Text and table disagree on two correlations. The text gives r = 0.552 for self-efficacy and grade, while Table 1 gives r = 0.553. The text gives p = 0.268 for old difficulties vs grade, while Table 1 gives p = 0.02682 §4 tab. 1. Treat the table as the source for values.
- "Grade" means different things. Methods define the grade as weekly programming quiz grades §3.4. Results and the correlation table say "course grade" tab. 1. The paper does not explain the difference.
- Sample size and test are not reported for each correlation. The paper does not state n for each correlation, the test's assumptions, or whether any multiple comparisons were corrected. Table 1 shows only the moderate and high correlations, selected "for space" §4.
- Intro claim not supported by the results. The Introduction links higher grades and self-efficacy to using GenAI to speed up work §1. The results give correlations of grade with difficulty counts and with time tab. 1, and no measure of how often students used GenAI or of acceleration. The Discussion cites a prior study that found higher performers used GenAI less often §5.1.
- Eye tracking is qualitative only. Gaze data appear as replays and as descriptions of single students. No gaze metric is reported, and the sampling rate, calibration accuracy and fixation criteria are not stated §3.3.
- Self-report is unreliable, by the authors' account. P3 said they did not use Copilot, yet the observations show slow accepts. The authors argue self-reported usage may not match behaviour §5.1.
- Tool versions are not stated. Neither the Copilot nor the ChatGPT version is given, and conversations were reset between sessions §3.3. The tools change over time, so the observed suggestions cannot be reproduced exactly.
- Confounds from the design. The instructor was one of the researchers and modelled GenAI use in class §3.1. The course had GenAI from the first day, while the 2018 study did not. Comparisons with the 2018 baseline therefore mix the effect of GenAI with differences in the course.
- Small, single-site sample. The authors name the single site and the 21 participants as limits §3.5. The demographic breakdown (race, gender) is too small for conclusions, as the paper also says §6.
- Acceptance differences are not causal. The group difference in acceptance rate is shown only in a table, and the paper does not test whether difficulty causes higher acceptance tab. 4.
Lineage
- Builds on: Prather et al. (2018), a lab study of 31 students without GenAI, which defined the five difficulties §1 §2.2. Loksa et al. (2016), the six problem-solving stages §2.2.
- Compared against: Margulieux et al. (2024), Vadaparty et al. (2024), Liu et al. (2024), and Ziegler et al. (2024), mostly survey or productivity studies §2.1 §5.2.
- Superseded by: not known from this card.
Source and license
Adapted from “The Widening Gap: The Benefits and Harms of Generative AI for Novice Programmers” by James Prather, Brent Reeves, Juho Leinonen, Stephen MacNeil, Arisoa S. Randrianasolo, Brett Becker, Bailey Kimmel, Jared Wright, Ben Briggs (arXiv:2405.17739), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.