English

Explaining Code Examples in Introductory Programming Courses: LLM vs Humans

Computers and Society 2024-03-13 v2 Human-Computer Interaction Software Engineering

Abstract

Worked examples, which present an explained code for solving typical programming problems are among the most popular types of learning content in programming classes. Most approaches and tools for presenting these examples to students are based on line-by-line explanations of the example code. However, instructors rarely have time to provide explanations for many examples typically used in a programming class. In this paper, we assess the feasibility of using LLMs to generate code explanations for passive and active example exploration systems. To achieve this goal, we compare the code explanations generated by chatGPT with the explanations generated by both experts and students.

Keywords

Cite

@article{arxiv.2403.05538,
  title  = {Explaining Code Examples in Introductory Programming Courses: LLM vs Humans},
  author = {Arun-Balajiee Lekshmi-Narayanan and Priti Oli and Jeevan Chapagain and Mohammad Hassany and Rabin Banjade and Peter Brusilovsky and Vasile Rus},
  journal= {arXiv preprint arXiv:2403.05538},
  year   = {2024}
}

Comments

3 tables; 1 figure

R2 v1 2026-06-28T15:13:56.667Z