IvIE: Lightweight Anchored Explanations of Just-Generated Code

IvIE: Lightweight Anchored Explanations of Just-Generated Code

May 11–16, 2024 | Litao Yan, Alyssa Hwang, Zhiyuan Wu, Andrew Head
IVIE is a lightweight, anchored explanation system that provides instant, in-situ explanations for generated code in programming assistants. It helps programmers understand unfamiliar code by offering brief, informative explanations at the level of code blocks and expressions. IVIE is designed to be easy to invoke and dismiss, with explanations appearing next to the code they explain. The system leverages a large language model (LLM) to segment code into explainable units and generate brief explanations. IVIE was implemented in Visual Studio Code and tested in a lab study comparing it to a chat-based baseline tool. The study showed that IVIE improved code comprehension and was perceived as a useful, low-distraction complement to programming assistants. IVIE's explanations are tailored to help programmers understand unfamiliar APIs and idioms in generated code. The system supports both expression-level and block-level explanations, with explanations appearing in the right margin for blocks and beneath lines for expressions. IVIE's design aims to reduce the cognitive load and time required to understand generated code, making it a valuable tool for programmers using programming assistants. The study found that IVIE significantly improved code comprehension and was preferred by participants over chat-based tools. IVIE's explanations are concise, informative, and easy to use, making it an effective aid for understanding generated code.IVIE is a lightweight, anchored explanation system that provides instant, in-situ explanations for generated code in programming assistants. It helps programmers understand unfamiliar code by offering brief, informative explanations at the level of code blocks and expressions. IVIE is designed to be easy to invoke and dismiss, with explanations appearing next to the code they explain. The system leverages a large language model (LLM) to segment code into explainable units and generate brief explanations. IVIE was implemented in Visual Studio Code and tested in a lab study comparing it to a chat-based baseline tool. The study showed that IVIE improved code comprehension and was perceived as a useful, low-distraction complement to programming assistants. IVIE's explanations are tailored to help programmers understand unfamiliar APIs and idioms in generated code. The system supports both expression-level and block-level explanations, with explanations appearing in the right margin for blocks and beneath lines for expressions. IVIE's design aims to reduce the cognitive load and time required to understand generated code, making it a valuable tool for programmers using programming assistants. The study found that IVIE significantly improved code comprehension and was preferred by participants over chat-based tools. IVIE's explanations are concise, informative, and easy to use, making it an effective aid for understanding generated code.
Reach us at info@study.space