Syntax highlighting as an influencing factor when reading and comprehending source code

  • Tanya R. Beelders University of the Free State Bloemfontein, South Africa
  • Jean-Pierre L. du Plessis University of the Free State Bloemfontein, South Africa
Keywords: eye tracking, syntax highlighting, code comprehension, reading behaviour

Abstract

Syntax highlighting or syntax colouring, plays a vital role in programming development environments by colour-coding various code elements differently. The supposition is that this syntax highlighting assists programmers when reading and analysing code. However, academic text books are largely only available in black-and-white which could influence the comprehension of novice and beginner programmers. This study investigated whether student programmers experience more difficulty in reading and comprehending source code when it is presented without syntax highlighting. Number of fixations, fixation durations and regressions were all higher for black-and-white code than for colour code but not significantly so. Subjectively students indicated that the colour code snippets were easier to read and more aesthetically pleasing. Based on the analysis it could be concluded that students do not experience significantly more difficulty when reading code in black-and-white as printed in text books.
Published
18-12-2015
How to Cite
Beelders, T. R., & du Plessis, J.-P. L. (2016). Syntax highlighting as an influencing factor when reading and comprehending source code. Journal of Eye Movement Research, 9(1). https://doi.org/10.16910/jemr.9.1.1
Section
Articles