返回
How programmers read regular code: a controlled experiment using eye tracking
DOI:10.1007/s10664-016-9477-x.png)
摘要
En 中文
Regular code, which includes repetitions of the same basic pattern, has been shown to have an effect on code comprehension: a regular function can be just as easy to comprehend as a non-regular one with the same functionality, despite being significantly longer and including more control constructs. It has been speculated that this effect is due to leveraging the understanding of the first instances to ease the understanding of repeated instances of the pattern. To verify and quantify this effect, we use eye tracking to measure the time and effort spent reading and understanding regular code. The experimental subjects were 18 students and 2 faculty members. The results are that time and effort invested in the initial code segments are indeed much larger than those spent on the later ones, and the decay in effort can be modeled by an exponential model. This shows that syntactic code complexity metrics (such as LOC and MCC) need to be made context-sensitive, e.g. by giving reduced weight to repeated segments according to their place in the sequence. However, it is not the case that repeated code segments are actually read more and more quickly. Rather, initial code segments receive more focus and are looked at more times, while later ones may be only skimmed. Further, a few recurring reading patterns have been identified, which together indicate that in general code reading is far from being purely linear, and exhibits significant variability across experimental subjects.
Keyword:
Eye-tracking
Controlled experiment
Code regularity
Software complexity
AI总结
对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。
期刊
IF:
3.6
论文数:
2.0K
被引数:
6.4K
机构
引用论文
Analysis of Immunoglobulin, T Cell Receptor and bcr Rearrangements in Human Malignant Lymphoma and Hodgkin’s Disease
Oncology
IF0
A study on the anti-tumor mechanism of total flavonoids from Radix Tetrastigmae against additional cell line based on COX-2-mediated Wnt/β-catenin signaling pathway基于COX-2介导的Wnt/β-catenin信号通路研究柴草总黄酮 对其他细胞系的抗肿瘤机制
Oncotarget
IF0

