arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2609.24616cs.HC

结构感知渲染:代码揭示方式如何塑造程序员的视觉注意力

Structure-Aware Rendering: How Code Reveal Shapes Programmers' Visual Attention

Xiaotian Su, Jan Brasser, David Robert Reich, Lena A. Jäger, April Yi Wang

首次发表
浏览论文内容

中文总结 AI 辅助

本研究提出结构化渲染技术,通过眼动追踪实验证明,基于语法结构的代码揭示方式能引导程序员视觉注意力,促进高层理解。

中文摘要 AI 辅助

AI编码界面要么一次性呈现生成的代码,要么逐token呈现。这些渲染策略反映了模型生成方式,而非程序员实际阅读代码的方式:选择性、非线性且由结构引导。我们认为,代码渲染是一等交互原语,它塑造了程序员阅读和理解代码的方式。为探索这一设计空间,我们引入了结构化渲染技术,该技术根据代码的语法层次结构,以语义上有意义的块来揭示代码,先展示高层结构,再展示低层细节。为隔离渲染对视觉注意力的影响,我们开展了一项眼动追踪研究,共有53名参与者,比较了静态渲染、基于字符的渲染和结构化渲染。我们的研究结果表明,渲染会改变视觉注意力和阅读行为:动态渲染导致更少但更长的注视和更持续的专注,而结构化渲染进一步将注意力引向语义上有意义的单元,并支持高层理解。我们发布了匿名数据集及交互式演示(此HTTPS URL),以支持未来研究。

英文摘要

AI coding interfaces present generated code either all at once or token-by-token. These rendering strategies reflect model generation rather than how programmers actually read code: selectively, non-linearly, and guided by the structure. We argue that code rendering is a first-class interaction primitive that shapes how programmers read and understand code. To explore this design space, we introduce structured rendering, a technique that reveals code in semantically meaningful chunks derived from its syntactic hierarchy, exposing high-level structure before low-level details. To isolate rendering effects on visual attention, we conducted an eye-tracking study with 53 participants comparing static, character-based, and structured rendering. Our findings show that rendering alters visual attention and reading behavior: dynamic rendering induces fewer but longer fixations and more sustained focus, while structured rendering further guides attention toward semantically meaningful units and supports high-level understanding. We release the anonymized dataset with an interactive demo (https://codegaze.vercel.app/) to support future research.

↑