Welcome to My Blog

Mirrored Mind: My Life in Letters and Code (Penguin India (2013); also appeared as Geek Sublime: The Beauty of Code, the Code of Beauty, Faber and Faber (2014)

This is Vikram Chandra’s saga of his work as programmer and writer. The first part is largely about computers and programming; the second reaches back hundreds of years to Sanskrit literature. In between, there are short accounts of his own life and and how he became involved with these two areas. On face value, this is absolutely riveting stuff as programming and Sanskrit are from different worlds. The reader must wait for the end to know how well he succeeded.

Who is this book written for? Admirers of Vikram Chandra certainly, and there are many; also, geeks curious to know how their work scores on creativity and beauty. Perhaps Sanskrit scholars too, intrigued by the notion that their well-ordered world may subsume computing. It needs someone who is both computer scientist and Sanskrit scholar to evaluate the book completely. I am a computer scientist who enjoyed Love and Longing in Bombay and Sacred Games, has little knowledge of Sanskrit and even less of Sanskrit literature. I can look at some parts of the book critically and must accept what he says in the rest.

The first chapter discusses similarities between the creativity of artists and how some programmers regard their work, even considering it artistic and beautiful. He quotes Paul Graham as saying, ‘Of all the different types of person I’ve known, hackers and painters are among the most alike’. A fine commendation for those who consider Paul Graham an authority; Chandra himself seems in two minds as he later describes Graham’s writings on art as ‘full of majestically fatuous statements delivered with oracular certainty’!

For Chandra, beauty lies in the text of the program. It was disappointing to see only a trivial and decidedly unbeautiful ‘Hello World’ program written in Microsoft’s C# language. This is like writing a paen on the beauty of poetry without showing the reader any examples. Instead, he skims through Knuth’s Literate Programming and Greg Wilson’s invitation to expert programmers to explain their work to the world. He fails to point out that it is the abstract form of an algorithm like Quicksort that has beauty, not its text when written in a workaday language like C#.

He presents Butler Lampson’s famous 1972 prediction that in the future ‘almost everyone … will use a computer’. Chandra thinks this has failed to come about but of course Lampson was bang-on: most of us now own substantial computing power in our cellphones and ‘program’ their use through apps of one kind or another.

He refers to a host of other sources including Babbage, Countess Lovelace and George Boole. He throws in names I have not heard of before as authorities: Jack Ganssle, Chris Sawyer, Nathan Ensmenger and many others. He even brings in Cosmopolitan magazine’s article on The Computer Girls to talk about gender equality in computing and then claims that it was lost when times got hard and companies brought in the (inevitably male) bareback bronco-rider programmers to solve their problems.

Much of Chandra’s descriptions of computers can be found in textbooks of the kind that fell out of use a long time ago. I was disappointed that he did not introduce the reader to propositional and predicate calculus (if he is familiar with them) and shown how logical assertions are related to programs.

Chandra’s world of programming is that of the commercial programmer in the United States. He describes with some admiration how bronco-rider programmers created self-modifying code (without a thought for those who will later maintain these programs). He calls Steve Wozniak the ‘Original Gangsta’ for the way he ‘wired together his television set and a keyboard and a bunch of chips on a circuit board and so created the Apple 1 computer’. Breathtaking stuff! He would have done well to point out that the ‘bunch of chips’ was part of a meticulously designed circuit to perform arithmetic and logical operations.

Far more interesting is his description of his own life. Schooling in Mayo College (the school for princes) then a short spell at St Xavier’s College, Bombay, before he moved to Pomona College, Clairmont, CA, as an undergraduate. A brief period in the Columbia film school before breaking off to write his first novel, supporting himself by working in medical transcription and slowly becoming interested in programming.

Chandra’s account of hearing the poet A.K. Ramanujam read his translation of a classic Tamil poem and the influence this had on him is fascinating. It took his mind back hundreds of years to when the poem was written and the division of the world into an ‘interior landscape’ and the ‘external panorama’. It started his reading into Indian literary theory and discovering himself in that landscape. It took him to Sanskrit and the Vedas, to the understanding that grammar was ‘the Veda of Vedas, the science of sciences’ and thence to Panini.

The rigour of Panini’s rules impresses him most. He stretches a point when he describes the Ashtadhyayi is an algorithm that produces words and sentences from morphemes and phonemes, even more so when he claims that Panini’s machine can be compared to a Turing machine. (At this point I threw up my hands. I either had not understood Panini’s rules from his description or he does not know what a Turing machine is!) Later, and more plausibly, he compares the rules to the well-known Backus-Naur Form and adds that Peter Zilahy suggested that it should be called Panini-Naur Form. I was not able to trace Peter Zilahy from the reference given; he is probably not the well-known Hungarian writer and performer of that name.

There follows a long account of the work of Anandavardhana and what is called dhvani, ‘to reverberate’, as good poetry must. This is what he calls ‘the code of beauty’.

The next chapter is about the beauty of code. He starts by showing the spaghetti-like dependency diagram of a large unstructured program. Nerds, geeks and techies will be familiar with this but what will the others make of it? Or indeed of the involved description of the work of Matsumoto who tried to combine beauty and correctness.

Aside: Since the 1960s, computer scientists have worked on program correctness. It makes no sense to talk about program beauty if the damn thing does not do what it should do. And if it does, it must do it efficiently. It is quite possible to write a beautiful bubble sort program but no-one with serious intentions would use it: it is just too grossly inefficient. So apart from beauty and correctness, there is the question of efficiency.

Chandra’s whistle-stop tour continues with procedural programming, obfuscated C programs, the perversely complex Malebolge, Visual Basic and Object-Oriented Programming. There is Test-Driven Design and SQLite and there are John Bentley’s programming pearls. There are quick mentions of the Ariane 5 failure and the Therac 25 accidents. Then he comes to functional programming and Clojure, Gartner’ Hype Cycle, the use of Git for revision control and the dangers of using Excel. Whew!

Which brings one back to the original question: who was all this written for? What was he trying to establish?

One must be cautious about Chandra’s claims: in 2013, when the book was published, it is extremely unlikely that ‘90% of the planet’s financial transactions and 75% of all business data’ were still processed by COBOL programs. The figures probably originate in a Gartner study published in 1997, when it could have been true. From that time, Indian IT companies bankrolled themselves converting these COBOL programs to other languages, like C++ and Java, to the point where COBOL and its practioners have become close to extinct.

On to Abhinavagupta’s commentary on Anandavardhana’s work, the connective between two sequential states and finally to memory ‘from which all literature derives its powers’.

I am no Sanskrit scholar so I must take what Chandra says at face value. And on those terms, the chapter on The Code of Beauty: Abhnavagupta (to distinguish it from The Code of Beauty: Anandavaradhana) is interesting reading. There are repeated references to stories in Chandra’s first book Red Earth and Pouring Rain and how they relate to memory and culture. I let the most of that chapter wash over me as if I was walking in the rain, discomfited at times by claims I could not understand and the self-referential kind of justification: Abhinavagupta claims that the existence of rasa (the emotional or aesthetic impression of art) is ‘proved by our own self-awareness, because savouring is a form of knowledge.’

Read on for his account of Tantra and Kamakhya, chakra puja (a kind of wife swapping) and the Kartabhajas; how reaction to colonialism resulted in a nationalistic Hinduism with the monotheism of Abrahamic religions and uniformity of practice and interpretation. There is a diversionary discussion on women’s rights and the characteristics of Radha.

Finally, we come to the Language of Literature and the language of writing which for him is English (‘the language of the conquerors’). This includes programming, for ‘when you are writing code using the formal languages of computing you are making something that aspires to elegance and beauty, and therefore you are making art’. He thinks programmers are being humble when they suggest their work is similar to that of writers: they do far more.

No lay person will understand how a computer works from the account in the book. And no geek, sublime or not, will follow the extensive Sanskrit extracts. This may be why Rajni George, reviewing the book in India Today (20 December 2013) called it ‘an unlikely book,’ gratuitously adding, ‘the conceit is obvious and meaty’. (http://indiatoday.intoday.in/story/mirrored-mind-my-life-in-letters-and-code-book-review-vikram-chandra/1/332162.html)

The reader interested in more reviews of the book will find some here: http://www.complete-review.com/reviews/india/chandrav2.htm#ours

None of this will be a substitute for drawing one’s own conclusions. Don’t be overawed, either by Chandra’s formidable reputation or his wide-ranging claims. Decide for yourself.

Sumit Kumar Jha on May 1, 2013 at 10:26 pm said:
Dr. Narsingh Deo forwarded information about your book to me. It was a huge mistake to read the excerpts of your book – now I will have to buy and read the whole book !!

Zhiming Liu on April 27, 2013 at 9:45 pm said:
With his rich experiences in both academics and industry, and in both India – one of the largest and fast growing economies – and in the Developed world, Mathai is one of the few computer scientists who has made significant contribution to both Theoretical Aspects of Computing and Research and Development of an company, to both education and IT industry development. I thus believe the book contains materials interesting to computer scientists of Mathai’s generation, topics that have influenced the generation of his students including me, and inspirations to younger people. I am looking forward to reading the book.

One thought on “Welcome to My Blog

Leave a Reply

Your email address will not be published. Required fields are marked *