Ivie: Lightweight Anchored Explanations of Just-Generated Code

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yan, Litao, Hwang, Alyssa, Wu, Zhiyuan, Head, Andrew
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917604479729664
author Yan, Litao
Hwang, Alyssa
Wu, Zhiyuan
Head, Andrew
author_facet Yan, Litao
Hwang, Alyssa
Wu, Zhiyuan
Head, Andrew
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2403_02491
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Ivie: Lightweight Anchored Explanations of Just-Generated Code
Yan, Litao
Hwang, Alyssa
Wu, Zhiyuan
Head, Andrew
Human-Computer Interaction
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.
title Ivie: Lightweight Anchored Explanations of Just-Generated Code
topic Human-Computer Interaction
url https://arxiv.org/abs/2403.02491