How Novices Read Source Code in Introductory Courses on Programming: An Eye-Tracking Experiment

  • Leelakrishna Yenigalla
  • Vinayak Sinha
  • Bonita SharifEmail author
  • Martha Crosby
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9744)


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.


Eye 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. 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. 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
  3. 3.
    Just, M.A., Carpenter, P.A.: A theory of reading: from eye fixations to comprehension. Psychol. Rev. 87(4), 329–354 (1980)CrossRefGoogle Scholar
  4. 4.
    Rayner, K.: Eye movements in reading and information processing: 20 years of research. Psychol. Bull. 124(3), 372–422 (1998)CrossRefGoogle Scholar
  5. 5.
    Duchowski, A.T.: Eye Tracking Methodology: Theory and Practice. Springer-Verlag New York Inc., Secaucus (2007)zbMATHGoogle Scholar
  6. 6.
    Binkley, D., Davis, M., Lawrie, D., Maletic, J.I., Morrell, C., Sharif, B.: The impact of identifier style on effort and comprehension. Empir. Softw. Eng. 18(2), 219–276 (2012)CrossRefGoogle Scholar
  7. 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. 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. 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. 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. 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. 12.
    Hansen, M.E., Goldstone, R.L., Lumsdaine, A.: What makes code hard to understand? CoRR, vol. abs/1304.5257 (2013)Google Scholar
  13. 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. 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

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Leelakrishna Yenigalla
    • 1
  • Vinayak Sinha
    • 1
  • Bonita Sharif
    • 1
    Email author
  • Martha Crosby
    • 2
  1. 1.Youngstown State UniversityYoungstownUSA
  2. 2.University of Hawaii at MānoaHonoluluUSA

Personalised recommendations