Twenty-five centuries ago, a Hindu scholar named Panini produced an analysis of the Sanskrit language so remarkable that later language theorists such as Ferdinand de Saussure would eventually cite it as the foundation of linguistics itself. Panini shows up in Geek Sublime: The Beauty of Code, the Code of Beauty, a new book by novelist and computer programmer Vikram Chandra, who describes the ancient scholar's achievement thus:
His objects of study were both the spoken language of his time, and the language of the Vedas, already a thousand years before him. He systemized both of these variations by formulating 3,976 rules that -- over eight chapters -- allow the generation of Sanskrit words and sentences from roots, which are in turn derived from phonemes and morphemes ...
The rules are of four types: (1) rules that function as definitions; (2) metarules -- that is, rules that apply to other rules; (3) headings -- rules that form the bases for other rules; and (4) operational rules. Some rules are universal while others are context sensitive; the sequence of rule application is clearly defined. Some rules can override others. Rules can call other rules, recursively. The application of one rule to a linguistic form can cause the application of other rule, which may in turn trigger other rules, until no more rules are applicable. The operational rules "carry out four basic types of operations on strings: replacement, affixation, augmentation, and compounding."
This is interesting on its own, but a reader who shares Vikram Chandra's familiarity with technology will probably notice how much fun Vikram Chandra is having here with words that have become standard computer programming jargon: "rules" and "metarules", "override", "recursion", "trigger", "operations on strings". The problems that concerned Panini as he read the Rig Veda in 400 BCE are apparently the same problems that concern software developers around the world today.
Geek Sublime is subtitled "The Beauty of Code, The Code of Beauty". I suspect this catchy subtitle was suggested by the publisher's marketing department, because it promises a much simpler equation than this unique work actually delivers. There's nothing very original about finding beauty in computer programs, which have aspired to be "elegant" since the days of FORTRAN and COBOL. Geek Sublime does touch upon the familiar topic of beauty in its first chapter, "Hello World!", but only as the starting point for a series of independent explorations that refuse to combine and intersect in predictable ways. I expected Geek Sublime to be an extroverted book, an accessible work of non-fiction, but in fact I'm now sure that Vikram Chandra wrote it with a novelist's mind, and even with a novelist's refusal to tie up loose ends.
Geek Sublime turns out to be a work of imagination and suggestion, a core dump of various ideas that have obsessed its author as he writes fiction and codes algorithms on the same keyboard. This is not a book that can be described by a flowchart, but it delivers something more worthwhile than a pat message: an invitation into the author's own peculiar ideas about language and logic as they manifest themselves in our everyday lives.
The topics Chandra touches upon here include:
The Soul of the Indian Programmer: In the early 1950s, India's government had the bright idea to start setting up the IIT (Indian Institute of Technology) system and importing mainframe computers for its fledgling computer scientists to learn on. This program was, obviously, a gigantic success, even though the soul of the Indian programmer remains mysterious to others, techie and non-techie alike. As a member of this global community, Chandra explains its contradictions, such as an alleged attitude of humility that masks a competitive intensity strangely invisible to outsiders. As an American-born techie who has often had the pleasure of being outnumbered by Desis in cubicle farms, I particularly enjoyed Chandra's point of view about the meaning of technology in the life of a modern Indian immigrant to America. I also enjoyed learning a few new words -- like jugaad, a creative workaround designed to solve a tough problem -- that I've never actually heard in any office, since the Indian programmers I work with (unlike Vikram Chandra) communicate with me exclusively in English. The richness of this vocabulary makes me wish they wouldn't always do so.
Gender and Ethnicity in the Workplace. Vikram Chandra recognizes the character of Raj in the TV comedy "The Big Bang Theory" all too well: an Indian "brain", awkward and unconfident, lacking the bull-headed masculinity of another techie stereotype: the superhero invincible programmer who can handle the toughest languages and debug the worst disasters with ease. This leads Chandra into a topic he has less first-hand knowledge of: the difficulties female programmers face in the overwhelmingly male world of software development.
This is a very relevant topic today, but like the book's subtitle it may have been grafted onto this book in an appeal for sales-worthy relevance, as Vikram Chandra really doesn't have anything new to add to this much-discussed controversy, except to point out that Indian programmers also sometimes struggle to fit into raucous American workplaces. These sections of the book are less successful than others also because Chandra seems to lack firsthand observation: while this novelist certainly is a real computer programmer, he does not appear to have held a full-time job in a technology department for a long time, and does not have his own stories to tell.
The Search for Elemental Roots of Language: modern programming languages are designed to be expressive and readable, which means they are abstracted by several layers from the actual physical instructions that are executed by the computer processor itself. These physical instructions are called "machine code" and are written in machine language, which is expressed in hexadecimal expressions that correlate to a more readable format known as "assembly code" written in assembly language.
In describing the work of the ancient linguist Panini, Chandra points out the traditional belief that Sanskrit words have roots in primal sounds that actually express the true nature of the universe. This is a lovely belief (of course, for all we know it may be true), especially when considered alongside the primal electronic structures known as logic gates, the tiny physical circuits that actually run machine code instructions on the processor chips that live deep inside each computer.
Like Chandra, I am also a longtime admirer of logic gates, and I can sense the novelist's true techie nature as he obsesses over the psychological metaphors these circuits provide, and when he provides photos of actual logic gates built with Lego blocks, movable by gears and dials.
The search for a physical corollary to language may be closer to Geek Sublime's elusive core than anything else. The book is much more about rootedness than about beauty -- though I guess "The Rootedness of Code, the Code of Rootedness" would not have worked as a subtitle.
This section unintentionally reveals how rapidly the field of software technology is changing, because the examples Chandra uses in this section would have made more sense twenty years ago than they do today. (Like me, Chandra became a computer programmer in the 1980s, though unlike me he was able to make enough money writing to stop coding full-time.) In the chapter titled "The Language of Logic" Chandra implies that C# programs are compiled into machine language instructions that run directly on a processor's circuits. While this might be true if he were writing in C++, a language that has stubbornly resisted virtualization, Vikram Chandra is actually simplifying a much more complex story here, since modern computer languages like C#, Java and PHP tend to run in virtual environments that sever the programmer's direction connection with the computer's physical circuitry. If a computer is like a film projector, it's a simple fact that C# and Java and PHP programmers do not get to ever create the film that runs on the spool. In the age of cloud computing and virtual machines, we are much farther away from the physical chip than we were twenty years ago when Chandra was actively hacking for a living.
Dhvani and Rasa: along with new Sanskrit words for various flavors of technological frustration and revelation, I'm happy to learn from Geek Sublime a new vocabulary for artistic expression. Dhvani and rasa appear to represent the full appreciation of the meaning of a work in both an objective and subjective sense, and that's as much as I can confidently explain about these fascinating words, which I did not know before I read Geek Sublime. I may need to read the book a second time -- or follow up on some of the Sanskrit texts it beguilingly teases -- before I can try to explain these terms better. Till then, though, I'm happy to have them in my toolkit, where they may find some use.
Like the fascinating vocabulary it presents, Geek Sublime is certainly a work of depth and serious purpose. It's not the trendy nonfiction book it pretends to be, which is why I suspect it may actually be a novelist's latest novel in disguise. It works well enough that I'm looking forward to checking out the author's earlier ones.