Beauty and the Beast: on the readability of object-oriented example programs

Jürgen Börstler, Michael E. Caspersen, Marie Nordström
2015 Software quality journal  
Some solutions to a programming problem are more elegant or more simple than others and thus more understandable for students. We review desirable properties of example programs from a cognitive and a measurement point of view. Certain cognitive aspects of example programs are captured by common software measures, but they are not sufficient to capture a key aspect of understandability: readability. We propose and discuss a simple readability measure for software, SRES, and apply it to
more » ... iented textbook examples. Our results show that readability measures correlate well with human perceptions of quality. Compared with other readability measures, SRES is less sensitive to commenting and whitespace. These results also have implications for software maintainability measures.
doi:10.1007/s11219-015-9267-5 fatcat:ysrdfgaykjbsborgyt2qlaecsa