Year: 2024
Type: article
Abstract: This study explores the relationship between predictability, as measured by surprisal, and processing difficulty in code comprehension. We investigate whether similar mechanisms govern the processing of programming and natural languages. Previous research suggests that programmers prefer and produce more predictable code, akin to natural language patterns. We utilize eye-tracking data from the Eye Movements in Programming (EMIP) dataset to examine the impact of surprisal on various eye movement measures. Contrary to expectations based on natural language processing, our results reveal that surprisal does not significantly influence fixation metrics. Additionally, regressions in code reading show an unexpected inverse relationship with surprisal, suggesting that readers have different reasons for making regressions while reading code versus natural text. These findings contribute insights into the unique dynamics of code comprehension and opens avenues for further research in this domain.
Authors: Dodd, Nicole, Reese, Skyler Jove, Morgan, Emily
Institution: University of California, Davis
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
Funder: National Science Foundation
OpenAlex ID: W7001283973
