Beauty of Code and the Code of Beauty
Vikram Chandra’s erudite new non-fiction, Geek Sublime: The Beauty of Code, Code of Beauty, has been nominated as a finalist for The National Book Critics Circle Awards. Calling himself an “enthusiastic amateur,” Vikram Chandra described his infatuation with programming and drew some tantalizing connections between computer coding and creative writing.
“Writing is hell; but not writing is also hell,” he mused. Vikram Chandra finds freedom from the challenges of writing through coding. In writing, he intoned, “you are building language,” and “thinking about the weight and shape of the words,” groping in the ambiguity and confusion of the unknown. In coding, by contrast, you can revel in the joy of having something “work” and getting the machine to function as you wish.
This innovative thinker and writer gently intoned, however, that there is surprising overlap between coding and writing. Coders, like writers and poets, care about beauty, elegance, precision. Although programmers are, in one sense, writing for the computer, they are also writing for the universe of programmers and future programmers. The goal of any programmer worth her salt, therefore, is to write elegant and functional code that, like art, outlasts its author.
Chandra defies category with Geek Sublime when he draws such creative connections between coding and poetry; but also between the linguistic rules of Sanskrit – which he calls a “proto-programming language” – with the string transformation rules in computer coding. The brilliant Indian grammarian, Panini, from 4th century BCE developed a stable set of linguistic rules for Sanskrit. Chandra traced the fascinating ancestry among Sanskrit, Panini’s rules, modern linguistics and computer coding by pointing out how the language of computers is indirectly tied to Panini, often considered the father of modern linguistics.
Chandra quickly points out, however, the indelible difference between poetry and coding and their individual code of aesthetics. A poet often creates beauty by “breaking the rules slightly” and generating surprise. A coder aims for precision and follows the rules. Poetry “delights in purposeful ambiguity.” Computers, on the other hand, cannot tolerate ambiguity. The aim of a writer and poet is to create an “endless resonance” in the reader that reverberates far past the time when she actually reads the text. A coder, on the other hand, is working to solve problems and have the computer function the way she wishes.
This program was co-sponsored and held at Mechanics’ Institute, San Francisco.
You can listen to the complete program below: