HackerPapers

arXiv:1304.5257cs.SE

What Makes Code Hard to Understand?

Michael Hansen, Robert L. Goldstone, Andrew Lumsdaine

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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.

arXiv comments
19 pages, 2 figures
Journal reference
DOI
Subjects
cs.SESoftware Engineering

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jun 2013 to Jun 2013. Found in 3 HN submissions from Apr 2013 to Jul 2014. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. The history of curly braces 1 comment
    • As much as they are hated by some, there's empirical data indirectly suggesting that using curly braces for scoping might lead to less mistakes when reading code: > Similarly, the twospaces version of counting demonstrated that vertical space is more important then indentation…

      vanderZwanView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.