Explaining Code with a Purpose: An Integrated Approach for Developing Code Comprehension and Prompting Skills

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Denny, Paul, Smith IV, David H., Fowler, Max, Prather, James, Becker, Brett A., Leinonen, Juho
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910361697910784
author Denny, Paul
Smith IV, David H.
Fowler, Max
Prather, James
Becker, Brett A.
Leinonen, Juho
author_facet Denny, Paul
Smith IV, David H.
Fowler, Max
Prather, James
Becker, Brett A.
Leinonen, Juho
contents Reading, understanding and explaining code have traditionally been important skills for novices learning programming. As large language models (LLMs) become prevalent, these foundational skills are more important than ever given the increasing need to understand and evaluate model-generated code. Brand new skills are also needed, such as the ability to formulate clear prompts that can elicit intended code from an LLM. Thus, there is great interest in integrating pedagogical approaches for the development of both traditional coding competencies and the novel skills required to interact with LLMs. One effective way to develop and assess code comprehension ability is with ``Explain in plain English'' (EiPE) questions, where students succinctly explain the purpose of a fragment of code. However, grading EiPE questions has always been difficult given the subjective nature of evaluating written explanations and this has stifled their uptake. In this paper, we explore a natural synergy between EiPE questions and code-generating LLMs to overcome this limitation. We propose using an LLM to generate code based on students' responses to EiPE questions -- not only enabling EiPE responses to be assessed automatically, but helping students develop essential code comprehension and prompt crafting skills in parallel. We investigate this idea in an introductory programming course and report student success in creating effective prompts for solving EiPE questions. We also examine student perceptions of this activity and how it influences their views on the use of LLMs for aiding and assessing learning.
format Preprint
id arxiv_https___arxiv_org_abs_2403_06050
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Explaining Code with a Purpose: An Integrated Approach for Developing Code Comprehension and Prompting Skills
Denny, Paul
Smith IV, David H.
Fowler, Max
Prather, James
Becker, Brett A.
Leinonen, Juho
Human-Computer Interaction
Computers and Society
Software Engineering
Reading, understanding and explaining code have traditionally been important skills for novices learning programming. As large language models (LLMs) become prevalent, these foundational skills are more important than ever given the increasing need to understand and evaluate model-generated code. Brand new skills are also needed, such as the ability to formulate clear prompts that can elicit intended code from an LLM. Thus, there is great interest in integrating pedagogical approaches for the development of both traditional coding competencies and the novel skills required to interact with LLMs. One effective way to develop and assess code comprehension ability is with ``Explain in plain English'' (EiPE) questions, where students succinctly explain the purpose of a fragment of code. However, grading EiPE questions has always been difficult given the subjective nature of evaluating written explanations and this has stifled their uptake. In this paper, we explore a natural synergy between EiPE questions and code-generating LLMs to overcome this limitation. We propose using an LLM to generate code based on students' responses to EiPE questions -- not only enabling EiPE responses to be assessed automatically, but helping students develop essential code comprehension and prompt crafting skills in parallel. We investigate this idea in an introductory programming course and report student success in creating effective prompts for solving EiPE questions. We also examine student perceptions of this activity and how it influences their views on the use of LLMs for aiding and assessing learning.
title Explaining Code with a Purpose: An Integrated Approach for Developing Code Comprehension and Prompting Skills
topic Human-Computer Interaction
Computers and Society
Software Engineering
url https://arxiv.org/abs/2403.06050