Secondary notation

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In design a secondary notation is defined as "visual cues which are not part of formal notation". Examples in the programming subjects are position, indentation colour and symmetry. They don't affect the behaviour of the program, but they make it easier to read and understand the code. The colours don't have show the semantics of the code, but make it easier to understand (and easier to see potential bugs). An example:

int main(){while(true){printf("I'm stuck in an infinite loop!");}}

None of the code is indented or coloured so it's hard to read.

int main()
    while (true) {
        printf("I'm stuck in an infinite loop!");

This is the same code, but indented and syntax highlighted - something that doesn't affect the program but makes it a lot easier to comprehend as a human.

See also[edit]


  • Green, T. R. G.; Petre, M. (1996). "Usability analysis of visual programming environments: A 'cognitive dimensions' framework". Journal of Visual Languages and Computing 7 (2): 131–174. doi:10.1006/jvlc.1996.0009.  .
  • Schrepfer, Matthias; Wolf, Johannes; Mendling, Jan; Reijers, Hajo A. (2009). Part 5. "The Impact of Secondary Notation on Process Model Understanding". THE PRACTICE OF ENTERPRISE MODELING-Lecture Notes in Business Information Processing 39 (SpringerLink). pp. 161–175. doi:10.1007/978-3-642-05352-8_13. Retrieved 2011-07-12.