Program comprehension is an essential activity in software engineering. Not only does it often challenge professionals, but it can also hinder novices from advancing their programming skills. Gaze, an emerging modality in developer tools, has so far primarily been utilized to improve our understanding of programmers' visual attention and as a means to reason about programmers' cognitive processes. There has been limited exploration of integrating gaze-based assistance into development environments to support programmers, despite the tight links between attention and gaze. We also know that joint attention is important in collaboration, further suggesting that there is value in exploring collective gaze. In this paper, we investigate the effect of visualizing gaze patterns gathered from experts to novice programmers to assist them with program comprehension in a new codebase. To this end, we present GazePrinter, designed to provide gaze-orienting visual cues informed by experts to aid novices with program comprehension. We present the results of a mixed-methods study conducted with 40 novices to study the effects of using GazePrinter for program comprehension tasks. The study included a survey, a controlled experiment, and interviews. We found that visualization of expert gaze can have a significant effect on novice programmers' behavior in terms of which path they take through the code base; with GazePrinter, novices took a path closer to the path taken by experts. We also found indications of reduced time and cognitive load among novices using GazePrinter.
翻译:程序理解是软件工程中的一项基本活动。它不仅常常给专业人员带来挑战,也可能阻碍新手提升编程技能。凝视作为一种开发者工具中的新兴模态,迄今为止主要被用于增进我们对程序员视觉注意力的理解,并作为推理程序员认知过程的手段。尽管注意力与凝视之间存在紧密联系,将基于凝视的辅助功能集成到开发环境中以支持程序员的研究仍十分有限。我们还知道,共同注意力在协作中至关重要,这进一步表明探索集体凝视的价值。在本文中,我们研究了将专家收集的凝视模式可视化对新手程序员的影响,以帮助他们在新的代码库中进行程序理解。为此,我们提出了GazePrinter,旨在提供由专家知情且引导凝视的视觉线索,以辅助新手进行程序理解。我们展示了一项混合方法研究的结果,该研究对40名新手进行了观察,以探索使用GazePrinter进行程序理解任务的效果。研究包括问卷调查、对照实验和访谈。我们发现,专家凝视的可视化对新手程序员的行为有显著影响,体现在他们遍历代码库的路径上;使用GazePrinter时,新手会采取更接近专家路径的路线。我们还发现,使用GazePrinter的新手在时间和认知负荷方面有所减少的迹象。