The paper “How do we read algorithms?: A case study” by Martha E. Crosby and Jan Stelovsky got my attention from the ones listed on the annotated bibliography about Code Reading and Program Comprehension. The authors monitored eye movement of 19 volunteers (randomly selected from the University of Hawaii’s computer science program) while reading an implementation of the binary search algorithm in Pascal. The subjects were divided in two groups (to make comparisons). The low-experienced group consisted of 10 subjects from the second semester, CS2, course. The high-experienced group consisted of eight graduate students and one recent PhD faculty member. Some interesting results presented on this paper are:
- Though both code-oriented and comment-oriented subjects were found in the low-experienced and high-experienced groups, the low-experienced group spent significantly more time reading the comments than the experienced-group.
- The high-experienced group expend more time reading the complex statements than the low-experienced group.
- Increasing experience, subjects learn to discover and focus on key areas of information.
The authors included an error in the implementation but didn’t make any comparisons on the time expend looking at that error.