English

What Makes Code Hard to Understand?

Software Engineering 2013-04-29 v2

Abstract

What factors impact the comprehensibility of code? Previous research suggests that expectation-congruent programs should take less time to understand and be less prone to errors. We present an experiment in which participants with programming experience predict the exact output of ten small Python programs. We use subtle differences between program versions to demonstrate that seemingly insignificant notational changes can have profound effects on correctness and response times. Our results show that experience increases performance in most cases, but may hurt performance significantly when underlying assumptions about related code statements are violated.

Keywords

Cite

@article{arxiv.1304.5257,
  title  = {What Makes Code Hard to Understand?},
  author = {Michael Hansen and Robert L. Goldstone and Andrew Lumsdaine},
  journal= {arXiv preprint arXiv:1304.5257},
  year   = {2013}
}

Comments

19 pages, 2 figures

R2 v1 2026-06-22T00:02:38.594Z