Do Developers Read Type Information? An Eye-Tracking Study on TypeScript
Samuel W. Flint, Robert Dyer, Bonita Sharif

TL;DR
This study investigates whether developers actively read TypeScript type annotations during code comprehension tasks, revealing that they do not focus on type annotations more often, which impacts tool design and educational practices.
Contribution
It provides empirical evidence that developers do not frequently read type annotations, challenging assumptions about their role as in-code documentation during comprehension tasks.
Findings
Developers do not look more at type annotations when present.
Type annotations are not heavily used during bug localization.
Implications for tool design and educational strategies.
Abstract
Statically-annotated types have been shown to aid developers in a number of programming tasks, and this benefit holds true even when static type checking is not used. It is hypothesized that this is because developers use type annotations as in-code documentation. In this study, we aim to provide evidence that developers use type annotations as in-code documentation. Understanding this hypothesized use will help to understand how, and in what contexts, developers use type information; additionally, it may help to design better development tools and inform educational decisions. To provide this evidence, we conduct an eye tracking study with 26 undergraduate students to determine if they read type annotations during code comprehension and bug localization in the TypeScript language. We found that developers do not look directly at lines containing type annotations or type declarations…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Teaching and Learning Programming · Software Engineering Techniques and Practices
