Coding with AI

会議の名前
CHI 2024
Validating AI-Generated Code with Live Programming
要旨

AI-powered programming assistants are increasingly gaining popularity, with GitHub Copilot alone used by over a million developers worldwide. These tools are far from perfect, however, producing code suggestions that may be incorrect in subtle ways. As a result, developers face a new challenge: validating AI's suggestions. This paper explores whether Live Programming (LP), a continuous display of a program's runtime values, can help address this challenge. To answer this question, we built a Python editor that combines an AI-powered programming assistant with an existing LP environment. Using this environment in a between-subjects study (N=17), we found that by lowering the cost of validation by execution, LP can mitigate over- and under-reliance on AI-generated programs and reduce the cognitive load of validation for certain types of tasks.

著者
Kasra Ferdowsi
UC San Diego, La Jolla, California, United States
Ruanqianqian (Lisa) Huang
UC San Diego, La Jolla, California, United States
Michael B.. James
University of California, San Diego, San Diego, California, United States
Nadia Polikarpova
University of California, San Diego, La Jolla, California, United States
Sorin Lerner
UC San Diego, La Jolla, California, United States
論文URL

doi.org/10.1145/3613904.3642495

動画
Learning Agent-based Modeling with LLM Companions: Experiences of Novices and Experts Using ChatGPT & NetLogo Chat
要旨

Large Language Models (LLMs) have the potential to fundamentally change the way people engage in computer programming. Agent-based modeling (ABM) has become ubiquitous in natural and social sciences and education, yet no prior studies have explored the potential of LLMs to assist it. We designed NetLogo Chat to support the learning and practice of NetLogo, a programming language for ABM. To understand how users perceive, use, and need LLM-based interfaces, we interviewed 30 participants from global academia, industry, and graduate schools. Experts reported more perceived benefits than novices and were more inclined to adopt LLMs in their workflow. We found significant differences between experts and novices in their perceptions, behaviors, and needs for human-AI collaboration. We surfaced a knowledge gap between experts and novices as a possible reason for the benefit gap. We identified guidance, personalization, and integration as major needs for LLM-based interfaces to support the programming of ABM.

著者
John Chen
Northwestern University, Evanston, Illinois, United States
Xi Lu
University of California, Irvine, Irvine, California, United States
Yuzhou Du
Northwestern University, Evanston, Illinois, United States
Michael Rejtig
University of Massachusetts Boston, Boston, Massachusetts, United States
Ruth Bagley
Northwestern University, Evanston, Illinois, United States
Mike Horn
Northwestern University, Evanston, Illinois, United States
Uri Wilensky
Northwestern University, Evanston, Illinois, United States
論文URL

doi.org/10.1145/3613904.3642377

動画
Ivie: Lightweight Anchored Explanations of Just-Generated Code
要旨

Programming assistants have reshaped the experience of programming into one where programmers spend less time writing and more time critically examining code. In this paper, we explore how programming assistants can be extended to accelerate the inspection of generated code. We introduce an extension to the programming assistant called Ivie, or instantly visible in-situ explanations. When using Ivie, a programmer's generated code is instantly accompanied by explanations positioned just adjacent to the code. Our design was optimized for extremely low-cost invocation and dismissal. Explanations are compact and informative. They describe meaningful expressions, from individual variables to entire blocks of code. We present an implementation of Ivie that forks VS Code, applying a modern LLM for timely segmentation and explanation of generated code. In a lab study, we compared Ivie to a contemporary baseline tool for code understanding. Ivie improved understanding of generated code, and was received by programmers as a highly useful, low distraction, desirable complement to the programming assistant.

著者
Litao Yan
University of Pennsylvania, Philadelphia, Pennsylvania, United States
Alyssa Hwang
University of Pennsylvania, Philadelphia, Pennsylvania, United States
Zhiyuan Wu
University of Pennsylvania, Philadelphia, Pennsylvania, United States
Andrew Head
University of Pennsylvania, Philadelphia, Pennsylvania, United States
論文URL

doi.org/10.1145/3613904.3642239

動画
Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programming
要旨

Code-recommendation systems, such as Copilot and CodeWhisperer, have the potential to improve programmer productivity by suggesting and auto-completing code. However, to fully realize their potential, we must understand how programmers interact with these systems and identify ways to improve that interaction. To seek insights about human-AI collaboration with code recommendations systems, we studied GitHub Copilot, a code-recommendation system used by millions of programmers daily. We developed CUPS, a taxonomy of common programmer activities when interacting with Copilot. Our study of 21 programmers, who completed coding tasks and retrospectively labeled their sessions with CUPS, showed that CUPS can help us understand how programmers interact with code-recommendation systems, revealing inefficiencies and time costs. Our insights reveal how programmers interact with Copilot and motivate new interface designs and metrics.

受賞
Honorable Mention
著者
Hussein Mozannar
MIT, Cambridge, Massachusetts, United States
Gagan Bansal
Microsoft Research, Redmond, Washington, United States
Adam Fourney
Microsoft Research, Redmond, Washington, United States
Eric Horvitz
Microsoft, Redmond, Washington, United States
論文URL

doi.org/10.1145/3613904.3641936

動画
CodeAid: Evaluating a Classroom Deployment of an LLM-based Programming Assistant that Balances Student and Educator Needs
要旨

Timely, personalized feedback is essential for students learning programming. LLM-powered tools like ChatGPT offer instant support, but reveal direct answers with code, which may hinder deep conceptual engagement. We developed CodeAid, an LLM-powered programming assistant delivering helpful, technically correct responses, without revealing code solutions. CodeAid answers conceptual questions, generates pseudo-code with line-by-line explanations, and annotates student's incorrect code with fix suggestions. We deployed CodeAid in a programming class of 700 students for a 12-week semester. A thematic analysis of 8,000 usages of CodeAid was performed, further enriched by weekly surveys, and 22 student interviews. We then interviewed eight programming educators to gain further insights. Our findings reveal four design considerations for future educational AI assistants: D1) exploiting AI's unique benefits; D2) simplifying query formulation while promoting cognitive engagement; D3) avoiding direct responses while encouraging motivated learning; and D4) maintaining transparency and control for students to asses and steer AI responses.

著者
Majeed Kazemitabaar
University of Toronto, Toronto, Ontario, Canada
Runlong Ye
University of Toronto, Toronto, Ontario, Canada
Xiaoning Wang
University of Toronto, Toronto, Ontario, Canada
Austin Henley
Microsoft, Redmond, Washington, United States
Paul Denny
The University of Auckland, Auckland, New Zealand
Michelle Craig
University of Toronto, Toronto, Ontario, Canada
Tovi Grossman
University of Toronto, Toronto, Ontario, Canada
論文URL

doi.org/10.1145/3613904.3642773

動画