Programmers use both discrete linguistic symbols and analogue mental imagery simultaneously when reading and writing code
Paivio’s Dual Coding theory posits two complementary symbolic systems: discrete logogens (language) and continuous imagens (imagery). McLean applies this to programming: source code is formally a one-dimensional discrete symbol sequence, but programmers supplement it with visuospatial mental imagery — imagining code as a visual structure, hearing ‘buzzing’ glitches, picturing a desert of solutions. Secondary notation (whitespace, indentation, naming) bridges the two systems. This matters for live coding language design: effective notations support both channels, not just the parser-visible discrete layer.
Examples
Expert programmer reports: ‘it moves in my head … like dancing symbols … luminous characters suspended behind my eyelids.’ ‘It buzzes … there are things I know by the sounds, by the textures of sound.’ These show simultaneous activation of linguistic and imagery systems.
Assessment
Given two equivalent code fragments (one formatted, one compressed to one line), explain why a human finds one harder to parse, framing your answer in terms of Dual Coding theory. Identify which cognitive dimension of notation this corresponds to.