81Language Models in a Programming Course
Gregor Jošt, Viktor Taneski and Sašo Karakatič, Applied Sciences 14(10), 4115, 2024
Linked to 13 chapters: supports 6 · contradicts 1 · mechanism 7 · same claim 1 · pairing 2
Jošt, Taneski and Karakatič ran a second-year React course at the University of Maribor and turned the last week of it into a measurement. For nine weeks thirty-two students built four applications in React and TypeScript, free to use any language model they wanted and never told to; two assistants with more than ten years of programming behind them were on hand as well. In week ten the students sat for two hours with Google and the React documentation and no model, watched to make sure of it, and wrote an application that asked nothing of them they had not already done. The mark on that application is what the paper measures against. On a five-point scale filled in after the marks were out, each student said how often they had used a model for three things: to generate code, to debug, and to ask for an explanation. Generating code correlates with the two-hour mark at Spearman's rho of −0.305, debugging at −0.360, and both bootstrap intervals sit entirely below zero. Asking for explanations, which students did nearly as often as they debugged, gives −0.201 and an interval straddling zero. The line does not fall between using a model and not using one. It falls between having it do the work and having it explain the work.
What the reviews could not settle
By early 2024 the literature on language models in education was already large and almost entirely appraisal. Fuchs weighed personalised learning and on-demand support against reduced human contact and bias. Lo read fifty articles on GPT-3.5 and came back with incorrect information and plagiarism on one side, course materials and active learning on the other. Grassini, Halaweh and Montenegro-Rueda and colleagues each arrived at the same shape of conclusion: promise, risk, and a recommendation that instructors be trained and assessments redesigned. On the tools themselves the work was sharper. Dakhel and colleagues found Copilot's output correct and efficient on basic algorithmic problems, better than a junior developer's, and dependent on how clearly the prompt was written — and noted that telling a flawed solution from a sound one still required an experienced developer. Vaithilingam, Zhang and Glassman found that Copilot did not reliably shorten task time or raise the success rate, though people preferred working with it.
None of that measures a student. The reviews ask whether the tool is good and whether the institution can cope; the Copilot studies ask whether the generated code is correct. What nobody had asked, on the authors' reading, is what a student who has used these tools through a course can do when the course is over and the tools are gone. Jošt and colleagues restrict their survey to models the public can reach without special hardware or machine-learning knowledge, which dates the whole question to the eighteen months since ChatGPT opened, and set out four predictions in advance: that heavier average use goes with lower final marks; that using a model to generate code goes with lower marks; that using one to debug goes with lower marks; and that using one for explanations does not. Each was tested one-sided, in the direction stated.
Nine weeks with the tools, one without
The participants were chosen for what they did and did not know. All thirty-two had a first year of HTML, CSS and plain JavaScript behind them, and none had been taught React, so the course would be their first encounter with component hierarchies, props and state. The nine weeks carried four assignments that built on each other: a basic component hierarchy first, then routing, then state management, then lifting state up, each set in a scenario of the kind a working developer would meet. The reference solutions, written by the course's own staff, run to 137, 461, 427 and 921 lines.
Through all four, use of a model was, in the authors' phrase, "unrestricted but not specifically encouraged". Students could use ChatGPT, Copilot, Bing Chat, Gemini or anything else, for whatever they found it useful for, and they also had two experienced assistants to ask. That combination is the point of the design: it reproduces the ordinary condition of a person learning to program in 2024, with a model in one window and a human being down the corridor, rather than an artificial one in which help is rationed.
Week ten removed the model and kept everything else. Two hours, Google and the official React documentation allowed, the two assistants in the room watching that nobody opened a chat window. The task was an application for tracking television shows: a list on the home page with each show's name and whether it had been watched, rendered conditionally; details opening below the list when a show is clicked; a form for adding a show with a name and a description, defaulting to unwatched; props and lifted state to move the data between components. Nothing in it was new. The staff solution runs to 915 lines, about the size of the fourth assignment, and the mark on it is the paper's only outcome variable.
The measure of use came afterwards. Students filled in a questionnaire in Slovenian, after their marks had been issued so that nothing they admitted could cost them anything, rating three statements on a five-point scale: that they had used models for code generation, for additional explanation of coding problems, and for debugging. Participation was voluntary, and anyone who declined was left out of the analysis.
Three uses, three correlations
The reported quantities are worth reading before the correlations. Code generation was the least common use, at a mean of 2.59 with a median of 2.50 — students were not, on the whole, having the model write their assignments. Explanation stood at 3.75 and debugging at 3.78, both with a median of 4, and the average across the three uses at 3.38. The marks were spread wide: a mean of 6.72 against a median of 8.00, with a standard deviation of 3.10 and a range from 0.50 to 10. A mean more than a point below the median means a tail of students who could not build the application at all in two hours.
Shapiro–Wilk rejected normality for every variable, so the analysis is Spearman's rank correlation, one-sided, with bootstrap confidence intervals to show how far the estimate might move under resampling from a set of thirty-two.
| Use of the model | Spearman's rho | 95% bootstrap interval | p |
|---|---|---|---|
| Generating code | −0.305 | −0.595 to −0.058 | 0.045 |
| Additional explanations | −0.201 | −0.523 to 0.220 | 0.135 |
| Debugging | −0.360 | −0.628 to −0.011 | 0.021 |
| Average across the three | −0.347 | −0.626 to −0.044 | 0.026 |
Three of the four intervals lie below zero. Debugging gives the strongest negative correlation in the study and is also the use students reported most; code generation, reported least, still correlates negatively; and the average of the three carries a negative correlation of its own, so that a student's overall reliance predicts the tenth-week mark as well as any single use of it does.
The explanation result should be read for what it is. The authors predicted no significant effect and found none, and they are right that the finding separates explanation from the other two uses. But a p of 0.135 on thirty-two students is a failure to detect rather than a demonstration of safety, and the interval runs from −0.523 to +0.220 — wide enough to contain a harm larger than the one measured for code generation. What the data establish is a difference in order between the three uses, not a clean bill for one of them.
Generation and debugging against explanation
The authors read the split by what each use takes away from the student. Generating code and finding the fault in code are the two activities in a programming assignment that demand a model of how the system works; hand either to a machine and the assignment can be completed without ever forming that model. Asking what a hook does, or why an effect runs twice, leaves the student to write and fix the code afterwards.
Debugging is where the paper puts its weight, and it borrows the case from elsewhere. Michaeli and Romeike treat systematic search for a fault as a core competence of professional developers, hard for novices and a common source of frustration, which is exactly why it has to be practised rather than avoided. Carver and Risinger, writing in 1987, found that teaching debugging transfers to problems outside programming altogether. Pudari and Ernst note that models help with syntax and error messages while code smells, idiom and design remain out of reach, so the part of the work a model covers is the part that teaches least. Haque and Li, on ChatGPT as a debugger, reach the same practical conclusion: useful as a starting point, not a substitute for human review and testing.
Explanation is the exception, and the authors are careful about how much they claim for it. It may serve as a supplement rather than, in their words, "a crutch that impedes skill development" — a sentence with two hedges in it, and they add that further work is needed before the role of explanation is settled. Their recommendation to instructors follows from the ordering rather than from any one correlation: bring the tools in later, after the basic principles of writing and fixing code are in place, so that students get the productivity of the model without losing the competence that lets them judge its output. They do not argue for a ban. They argue about sequence.
Since 2024
The limits are the ones a ten-week course imposes. Thirty-two students in one place, one language and one library; ten weeks against a skill that forms over years; and a measure of use that is what a student remembers and is willing to write down weeks later on a five-point scale. There is no control group and no random assignment, so the correlations cannot carry a direction on their own — and the authors name the alternative reading themselves, in the form of a question they did not answer: whether the students who used models most were the ones already struggling, reaching for help because they were behind rather than falling behind because they reached. Until someone checks prior marks against model use, that account fits the data as well as theirs does. The raw data are available from the authors on request.
Two years later Shen and Tamkin put the same question to an experiment rather than a course: fifty-two professional programmers, a library none of them knew, random assignment to an assistant or to documentation, and a quiz at the end taken by everyone without help. The assisted group scored lower, and when the screen recordings were sorted by what people had asked for, the ranking matched Maribor's — the participants who asked the model to write the code or to find the fault scored under forty per cent, and those who asked it why scored sixty-five and above. Neither study can stand alone. The course has ten real weeks and no randomisation; the experiment has randomisation and one hour. They fail in different directions and agree about where the line falls.
What has changed underneath both is the interface. The models in this study were chat windows a student had to type a question into, and typing the question well requires understanding the problem well enough to ask. The editors that have since become ordinary complete the line before the question is formed. On the authors' own account of why generation and debugging cost what they cost, that change should move the correlation, not soften it.