Secondary notation
≈ 6 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
Secondary notation is the set of visual cues used to improve the readability of a formal notation. Examples of secondary notation include the syntax highlighting of computer source code, sizes and color codes for easy recognition of consumer symbols such as bank notes or coins, or the regular typographic conventions often found in technical books to highlight sections with the same type of content. Secondary notation provides redundant (more than necessary) information; if the visual cues are the only way that some information is provided, such as in traffic lights, or a chart's key, it is not secondary. Secondary notation is often not a part of the formal notation itself. Rather, it is a method of organizing the formal notation to allow it to be more easily understood. Thus, secondary notation does not change the actual meaning of the formal notation, rather it allows for the meaning to be readily understood. In text such as programming languages, this can be done using cues such as indentation and coloring. In formal graphical notations, this can be done through the use of symmetry or proximity to indicate relatedness.
Secondary notation is the set of visual cues used to improve the readability of a formal notation. Examples of secondary notation include the syntax highlighting of computer source code, sizes and color codes for easy recognition of consumer symbols such as bank notes or coins, or the regular typographic conventions often found in technical books to highlight sections with the same type of content. Secondary notation provides redundant (more than necessary) information; if the visual cues are the only way that some information is provided, such as in traffic lights, or a chart's key, it is not secondary. Secondary notation is often not a part of the formal notation itself. Rather, it is a method of organizing the formal notation to allow it to be more easily understood. Thus, secondary notation does not change the actual meaning of the formal notation, rather it allows for the meaning to be readily understood. In text such as programming languages, this can be done using cues such as indentation and coloring. In formal graphical notations, this can be done through the use of symmetry or proximity to indicate relatedness. ==In different contexts== Secondary notation annotates formal notation in a number of contexts which can be broken down to two main domains: text and graphics. ===Textual context=== There are a number of common instances of secondary notation that are seen in text. Secondary notation is common in typography and in code editors appearing as boldness, italics, and spacing/indentation. ====Textual secondary notation in computer source code==== Secondary notation in the form of coloring and indentation is commonly implemented in integrated development environments to make source code more readable and make the formal notation more understandable. The following C source code does not use secondary notation to ease the interpretation of the formal notation: int main(){while(true){printf("I'm stuck in an infinite loop!");}} The following is the same code, but with indentation and syntax highlighting. As a result, the formal notation of C is easier to read: int main() { while (true) { printf("I'm stuck in an infinite loop!"); } } ====Textual secondary notation in typography==== A number of examples of secondary notation that commonly appear in English writing include Boldness which is used to put emphasis on a certain area of text. Italics which is another method of applying emphasis on a certain area of text. The following example effectively uses indentation to separate items on a shopping list that must be bought at different stores. Indented items all must be bought at the store within which the items are nested. 1. Allison's Frozen Foods - Frozen Tuna - Chicken patties - Fish sticks - 2lb of hamburgers 2. Sarah's Groceries - 3 boxes of cereal - 2 boxes of fruit juice - 2 dozen eggs 3. Jim's Formal Wear - 2 dress shirts - 1 orange tie ===Graphical context=== Secondary notation is commonly used in graphical contexts to better convey information beyond what the formal notation of the graphic makes explicit. ==Experts vs. novices== The ability of individuals to understand and use secondary notation has been shown to vary based on experience within the relevant field. Experts in a field are generally more able to utilize the clues provided by secondary notation. Specifically, while reading diagrams, experts have been shown to have more skill at reading the larger structure of the diagram and using it to guide their examination of the details provided by the formal notation. This compares to novices who often focus on the details of the formal notation, ignoring the hints provided by the secondary notation. There are also differences based on level of experience/expertise when creating documents that utilize secondary notation. Experts tend to be more consistent in their use of conventions while novices tend to vary between conventions, sometimes adhering on a surface level, but failing to convey the desired information. In the case of circuit diagrams, this is illustrated by common novice mistakes such as creating visual symmetry where there is no logical symmetry and frequent transitions between differing secondary notation conventions. if x == 1: print("x is 1") print("x is odd") print("This is always printed") # this is illegal print("Hello world") str = " ".join( "these words are indented", "for better readability") Markdown also uses indentation as part of the formal syntax of the language. Indentation is required in Markdown when creating certain source code representations of block quotations as well as when creating sections of source code to be rendered as the code itself. Heading 1# #Indented Markdown source code that will be rendered as source code# ==See also== Cognitive dimensions Syntax highlighting Syntactic sugar ==Notes== ==References== . Marian Petre, Why looking isn't always seeing: readership skills and graphical programming. Commun. ACM, 38(6):33-44, 1995. Marian Petre, M. Petre. Cognitive dimensions 'beyond the notation'. J. Vis. Lang. Comput., 17(4):292-301, 2006. Rule, Revisiting Landin’S. Offside, and Michael D. Adams. "Principled Parsing for Indentation-Sensitive Languages." (2013).
Text derived from https://en.wikipedia.org/w/index.php?oldid=1327450630 under CC BY-SA 4.0; modifications have been made.