How Does LLM-powered Coding Assistance Shape Incidental Learning? Exploring Cognitive Forcing Strategies in Programming Education

0Citations
Citations of this article
6Readers
Mendeley users who have this article in their library.

Abstract

Many AI-based code assistants, particularly those powered by Large Language Models (LLMs), provide complete solutions, which can reduce active problem solving and limit incidental learning, the acquisition of knowledge as a byproduct of task engagement. Such learning requires active participation rather than passive acceptance of AI-generated answers, which answers might be incorrect. This study examines how incidental learning can be supported through guided interaction. We present LeetCoach, an LLM-assisted coding platform that applies a cognitive forcing strategy, prompting learners to reflect and take incremental steps instead of receiving full solutions. Using LeetCode-style questions, we conducted a pilot study with novice and advanced college programmers who completed tasks under assisted and unassisted conditions. Novices showed substantial post-test gains despite receiving AI guidance only during the intervention, suggesting that incidental exposure improved later performance. Advanced learners showed smaller gains. Across both groups, participants required fewer debugging attempts in the post-test compared to earlier stages, indicating improved debugging efficiency and algorithmic understanding. These findings provide early evidence that LLMs can be designed to promote indirect learning while shaping problem-solving strategies. This work offers a proof of concept for cognitively informed tutoring systems in computer science education and discusses implications for integrating LLMs to enhance both immediate outcomes and lasting skill development.

Cite

CITATION STYLE

APA

Tran-Le, B. T., Thomas, P., Stiffler, N. M., & Nguyen, T. N. (2026). How Does LLM-powered Coding Assistance Shape Incidental Learning? Exploring Cognitive Forcing Strategies in Programming Education. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 40, pp. 40880–40888). Association for the Advancement of Artificial Intelligence. https://doi.org/10.1609/aaai.v40i48.42121

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free