TY - GEN
T1 - How Programmers Read Regular Code
T2 - 23rd IEEE International Conference on Program Comprehension, ICPC 2015
AU - Jbara, Ahmad
AU - Feitelson, Dror G.
N1 - Funding Information:
This research was supported by the ISRAEL SCIENCE FOUNDATION (grant no. 407/13).
Publisher Copyright:
© 2015 IEEE.
PY - 2015/8/5
Y1 - 2015/8/5
N2 - 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 an irregular one with the same functionality, despite being 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 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 or cubic 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.
AB - 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 an irregular one with the same functionality, despite being 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 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 or cubic 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.
KW - Code complexity metrics
KW - Code regularity
KW - Controlled experiment
KW - Eye tracking
UR - http://www.scopus.com/inward/record.url?scp=84961302068&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84961302068&partnerID=8YFLogxK
U2 - 10.1109/ICPC.2015.35
DO - 10.1109/ICPC.2015.35
M3 - Conference contribution
AN - SCOPUS:84961302068
T3 - IEEE International Conference on Program Comprehension
SP - 244
EP - 254
BT - Proceedings - 2015 IEEE 23rd International Conference on Program Comprehension, ICPC 2015
PB - IEEE Computer Society
Y2 - 18 May 2015 through 19 May 2015
ER -