How Novices Read Source Code in Introductory Courses on Programming: An Eye-Tracking Experiment
We present an empirical study using eye tracking equipment to understand how novices read source code in the context of two introductory programming classes. Our main goal is to begin to understand how novices read source code and to determine if we see any improvement in program comprehension as the course progresses. The results indicate that novices put in more effort and had more difficulty reading source code as they progress through the course. However, they are able to partially comprehend code at a later point in the course. The relationship between fixation counts and durations is linear but shows more clusters later in the course, indicating groups of students that learned at the same pace. The results also show that we did not see any significant shift in learning (indicated by the eye tracking metrics) during the course, indicating that there might be more than one course that needs to be taken over the course of a few years to realize the significance of the shift. We call for more studies over a student’s undergraduate years to further learn about this shift.
KeywordsEye tracking study Program comprehension Novices
We thank all the students for their time and participation in this study. Many thanks to Teresa Busjahn for providing inspiration for some tasks in the study.
- 1.Busjahn, T., Schulte, C.: The use of code reading in teaching programming. In: Proceedings of the 13th Koli Calling International Conference on Computing Education Research, New York, NY, USA, pp. 3–11 (2013)Google Scholar
- 2.Busjahn, T., Schulte, C., Busjahn, A.: Analysis of code reading to gain more insight in program comprehension. In: Proceedings of the 11th Koli Calling International Conference on Computing Education Research, New York, NY, USA, pp. 1–9 (2011)Google Scholar
- 7.Sharif, B., Maletic, J.I.: An eye tracking study on camelCase and under_score Identifier styles. In: 2010 IEEE 18th International Conference on Program Comprehension, pp. 196–205 (2010)Google Scholar
- 8.Sharafi, Z., Soh, Z., Gueheneuc, Y.-G., Antoniol, G.: Women and men - different but equal: on the impact of identifier style on source code reading. In: 2012 IEEE 20th International Conference on Program Comprehension, ICPC, pp. 27–36 (2012)Google Scholar
- 9.Turner, R., Falcone, M., Sharif, B., Lazar, A.: An eye-tracking study assessing the comprehension of C++ and Python source code. In: Proceedings of the Symposium on Eye Tracking Research and Applications, New York, NY, USA, pp. 231–234 (2014)Google Scholar
- 10.Crosby, M.E., Scholtz, J., Wiedenbeck, S.: The roles beacons play in comprehension for novice and expert programmers. In: 14th Workshop of the Psychology of Programming Interest Group, pp. 58–73 (2002)Google Scholar
- 11.Fan, Q.: The effects of beacons, comments, and tasks on program comprehension process in software maintenance. Ph.D. Dissertation, University of Maryland at Baltimore County, Catonsville, MD, USA (2010)Google Scholar
- 12.Hansen, M.E., Goldstone, R.L., Lumsdaine, A.: What makes code hard to understand? CoRR, vol. abs/1304.5257 (2013)Google Scholar
- 13.Busjahn, T., Schulte, C., Sharif, B., Simon, Begel, A., Hansen, M., Bednarik, R., Orlov, P., Ihantola, P., Shchekotova, G., Antropova, M.: Eye tracking in computing education. In: Proceedings of the Tenth Annual Conference on International Computing Education Research, New York, NY, USA, pp. 3–10 (2014)Google Scholar
- 14.Busjahn, T., Bednarik, R., Begel, A., Crosby, M., Paterson, J., Schulte, C., Sharif, B., Tamm, S.: Eye movements in code reading: relaxing the linear order. In: International Conference on Program Comprehension, pp. 255–265 (2015)Google Scholar