Objective

Tools like ChatGPT, Gemini and GitHub Copilot can write, fix and explain computer code. That is useful for students, but it raises questions about what students are actually learning, who the author of the work is, and what counts as cheating. Earlier research looked at how well ChatGPT writes code or took one-time snapshots of student opinions. Little is known about how students' habits and thinking change as they use the tool over time during real programming tasks.

This study looked at how undergraduate computer science students judge, use and think about the ethics of ChatGPT while they program. It asked three questions:

  1. How do students judge how reliable and useful ChatGPT's answers are when they complete programming tasks?
  2. What strategies do students use to balance help from AI with solving problems on their own, and how do those strategies change over time?
  3. What changes in teaching and institutional rules do students recommend so that AI use is ethical, inclusive and sound for learning?

The study focused on ChatGPT because it was the most widely used tool when the data were collected. Other tools, such as Gemini and Copilot, appear only when students chose to try them.

Methods

This was a qualitative study, meaning it relied on students' own words and work, not test scores. Studies like this can show how people think and what they experience, but they cannot show whether a tool improves learning, and results from a small group may not apply to others.

The participants were 21 undergraduate students in a computer science degree at a research-intensive university in the UK. The authors used quota sampling (choosing people to get a spread of backgrounds). The group had 12 men and 9 women. Seven students identified as Black, six as Asian and eight as White. Five disclosed a disability. Each student had finished at least two programming courses. Students took part voluntarily, gave consent, and got no course credit or marks. The university's ethics committee approved the study.

Over four weeks, each student did five Java programming tasks. For the first two, students wrote their own solution, then asked ChatGPT and compared the two. The third task had students use ChatGPT to build a shopping cart program and keep improving it with new prompts. The fourth had them ask ChatGPT for a clumsy program, then rewrite it. The fifth was an ethics scenario about submitting AI-written code as your own. Students received no training on how to use ChatGPT.

The data came from student code, screenshots of prompts and answers, weekly reflective journals, and an individual interview of 18 to 35 minutes with each student. The interviewer was a member of the team who had earlier taught the students. Two researchers coded the material using grounded theory (building themes from the data) in NVivo 14.

Key Findings

Students described a shift from passive use to more active, critical use of ChatGPT, though not everyone changed. All findings come from what students wrote and said.

Judging ChatGPT's code

  • Students first tended to trust the code because it worked. Journal entries later showed more checking, with students noticing missing handling of unusual inputs, such as empty text or single characters.
  • Students praised ChatGPT's clear names, structure and comments. One said that it added comments by default, which the student forgot to do.
  • Students who tried Gemini or Copilot compared them. One said Copilot worked well inside a code editor, while ChatGPT helped more with understanding. The paper reports that two students tried Gemini and one tried Copilot.

By the fourth week, journal entries included judgments such as good logic but no test coverage, which the authors take as a sign of growing critical awareness. Early entries had said only that the code worked, so they used it.

Changing strategies

  • One student's prompts grew over three weeks from a short request to detailed instructions that asked for a particular data structure, discounts and input checks.
  • Some students described using ChatGPT as a second coder, writing part of the code and asking for suggestions. Students less sure of Java asked for full solutions, while stronger programmers asked for critique of their own code.
  • One student stayed heavily dependent through the study, copying and pasting with few edits. The authors say this was not misconduct, but showed little thinking about their own learning.

The paper does not give counts for how many students followed each pattern, so it is not possible to say how common any one of them was.

Ethics and policy

  • Students split on authorship. Some felt uncomfortable calling AI-written code their own, while others said that understanding every line was enough.
  • Students asked for clear rules, and some worried about where their code and data go when pasted into ChatGPT.
  • Students agreed that ChatGPT should be taught, not banned, with one comparing it to a calculator.

Students with disabilities

  • Students with dyslexia and executive function difficulties said ChatGPT helped them break problems into steps. One also warned that it could become a crutch.

Implications

The authors draw implications for teachers, institutions and policy.

What the authors recommend

  • Teachers should add activities that compare student code with AI code, teach prompt writing as a skill, and use reflective journals and code walkthroughs.
  • Course designers should assess process and reasoning, not only the final answer, and write responsible AI use into learning goals.
  • Institutions should replace general AI clauses in conduct policies with clear rules for different tasks, for example separating debugging help from generating a full solution, and say when students must disclose AI use.
  • Equity: policies should be developed with student support services so that students who rely on AI as an assistive tool are not disadvantaged.
  • Privacy: orientation materials should explain data settings and how to remove sensitive details before sharing code with outside tools.
  • Staff: academics need training, such as workshops and communities of practice, to redesign assessments.

Our reading (not the authors' recommendation):

  • An instructor could ask students to attempt a task alone before using AI, then write a short note on what they accepted or changed, as the study's tasks did.
  • A department could write down which uses of AI are allowed for each assignment, since students in the study said they were guessing.
  • Because this study did not measure learning, it is wise to treat these ideas as promising practices and to check results in your own course.

Limitations

The authors list these limits:

  • All students came from one degree program at one UK university, so the findings may not apply to other places, postgraduate students or other subjects.
  • Students volunteered, so those who were more confident or curious about AI may be overrepresented.
  • Students logged which version of ChatGPT they used, but the study did not compare output across versions.
  • The interviewer had taught the students, which may have led them to give answers they thought were expected (social desirability bias). The authors took steps to reduce this, but the problem is acknowledged.
  • The study did not measure performance or learning results.
  • Five of 21 students disclosed a disability, and the study did not separate results by type of disability.

The paper does not mention, but there are further points to keep in mind. The paper does not mention, but with 21 students and quoted examples, it is hard to tell how common each pattern was. The paper does not mention, but the tasks were short, unrelated to marks, and done in a set order (solo first, then ChatGPT), which differs from everyday use that the authors themselves note. The paper does not mention, but quotes are chosen by the authors, so they may show the clearest cases.

Future Directions

The authors suggest several next steps for research:

  • Compare students across universities and countries, and include postgraduate students and other subjects.
  • Use random or stratified sampling to get a broader mix of students.
  • Run controlled studies comparing ChatGPT versions and other models on features such as reasoning and made-up answers, and how these affect learning and trust.
  • Use anonymous submissions, independent interviewers or outside facilitators to lower social desirability bias.
  • Combine this kind of study with test scores or task accuracy, in quantitative or mixed-methods designs, to see how AI use affects skills.
  • Follow students for longer than four weeks to see whether the changes in prompting and judgment last.
  • Study students with disabilities more closely, by type of disability and learning support need, including how inclusive design and AI policies can support equity.

The bottom line: In this small, four-week study of 21 computer science students at one UK university, students reported becoming more specific in their prompts and more critical of ChatGPT's code, while also raising worries about authorship, privacy and overreliance. Students with disabilities described real benefits. The evidence comes from self-reports and a former teacher's interviews, with no measure of learning. The study suggests teaching students to question AI output and giving clear rules, but it does not show these steps improve results.