Cognitive Apprenticeship and Artificial Intelligence Coding Assistants

Cognitive Apprenticeship and Artificial Intelligence Coding Assistants

Eric Poitras, Brent Glen Charles Crane, David Dempsey, Tavis A. Bragg, Angela A. Siegel, Michael Pin-Chuan Lin
Copyright: © 2024 |Pages: 21
DOI: 10.4018/979-8-3693-1066-3.ch013
OnDemand:
(Individual Chapters)
Available
$33.75
List Price: $37.50
10% Discount:-$3.75
TOTAL SAVINGS: $3.75

Abstract

The aim of this chapter is to examine the impact that AI coding assistants have on the manner in which novice programmers learn to read, write, and revise code. These discussions revolve around the concept of cognitive apprenticeship, a pedagogical framework informed by extensive research on tutoring dialogues and collaborative problem-solving practices. It involves guided instruction through modeling, coaching, and scaffolding. Within the realm of programming, these principles hold the key to nurturing skills in reading, writing, and revising code, thus making the learning process more effective and engaging. The chapter concludes by reflecting on the challenges and considerations of implementing cognitive apprenticeship within AI coding assistants. These insights are intended to benefit educators, developers, and researchers alike, offering a roadmap to enhance the learning experiences of novice programmers through AI support.
Chapter Preview
Top

Introduction

Recent advancements in deep learning algorithms have raised significant interest in utilizing Large Language Models (LLMs) for a wide range of natural language processing tasks, including code generation for computer programs. To name just a few, notable examples include OpenAI Codex, DeepMind AlphaCode, and Amazon CodeWhisperer. Students learning a programming language now have continuous access to Artificial Intelligence (AI) driven tools to help them complete their coursework. The affordances of these tools have received significant critical attention in the computing education literature, as have the potential drawbacks for introductory programming instruction (see Becker et al., 2023; Yan et al., 2023).

Novice programmers engage in self-regulation to inform their problem-solving, but the effectiveness of these efforts depends on their programming knowledge (Loksa & Ko, 2016). AI code generators assist information retrieval by generating starter code, allowing students to build upon and modify existing code rather than reaching an impasse or searching for an online resource (Denny, Kumar, & Giacaman, 2023; Finnie-Ansley, Denny, Luxton-Reilly, Santos, Prather, & Becker, 2023). These tools facilitate program comprehension through several means, including student efforts to trace the execution of code, generate analogies to real world settings, and summarize code at multiple levels of abstraction (MacNeil et al., 2022; MacNeil, Tran, Leinonen, …, et al., 2023). AI-based tools can also be designed to scaffold problem solving by reducing encountered errors (Kazemitabaar, et al., 2023), explaining error messages and reasoning about the original intention of incorrect code (Szabo, Sheard, Luxton-Reilly, Simon, Becker, & Ott, 2019), as well as providing suggestions for fixing the issues based on the input code and errors (Leinonen et al., 2023).

The focus of this chapter is on guidelines for designing instructional prompts using cognitive apprenticeship as a pedagogical approach to facilitate robust learning outcomes. According to the cognitive apprenticeship model of instruction (Collins, Brown, & Newman, 1989), instruction involves modeling cognitive skills and strategies for students while providing necessary support through scaffolding when students require assistance to complete a task. After students demonstrate competence, scaffolds are progressively removed to allow them to complete tasks without assistance. The assumption is that students should be offered opportunities to reflect on their own understanding and apply their knowledge to solve novel problems.

Key Terms in this Chapter

Artificial Intelligence (AI) Code Generation Tools: AI code generators, also known as code-generating AI or code generation tools, are software applications or systems that use artificial intelligence techniques to automatically generate source code, scripts, or other programming artifacts.

Cognitive Apprenticeship: Cognitive apprenticeship is a theoretical framework and a teaching/learning approach that draws from cognitive psychology and educational psychology. It was introduced by Collins, Brown, and Newman in the 1980s and emphasizes the notion that learning is not just about acquiring facts and information but also involves acquiring problem-solving skills and domain-specific expertise.

Complete Chapter List

Search this Book:
Reset