Photograph by Oliver Berg/dpa/AP

I am pressing my fingertips down onto the keys of my laptop, a sequence of movements that is somehow making these words appear on a screen in front of me. At some point, over the next couple of days, once a sufficient number of words has appeared on that screen in a manner I can just about live with, I will sign in to my e-mail account and send a file containing them to an editor several thousand miles away. Not long after that, you will be able to read these words on a screen much like the one I am looking at, or perhaps on a smaller screen, one that you hold in the palm of your hand as a talisman against the passing minutes and hours.

Let me ask you a question about all of this: Do you have the slightest idea how any of it works? Because I certainly don’t. My computer, my phone, my mind—I don’t know what’s going on with any of these things. I don’t understand them; I just use them. (And perhaps one of the effects of not understanding them, of just using them, is not understanding the extent to which I am used by them.)

I’ve been thinking about my deep ignorance of the technological world as a result of reading a new book by Vikram Chandra called “Geek Sublime: The Beauty of Code, the Code of Beauty.” Chandra is a major figure in the contemporary fiction of the Indian diaspora, the author of “Red Earth and Pouring Rain” and “Sacred Games,” novels epic in both scope and length; but for as long as he has been writing fiction he has also been a programmer. This seems at first like a curious combination of enterprises, and “Geek Sublime” is, among many other things, Chandra’s attempt to bring these undertakings into focus in a single essayistic frame, to view them in sympathy with, and in contrast to, each other. The writing of code and the writing of fiction exist for him in tense equipoise; “the stark determinisms of code,” he writes, “were a welcome relief from the ambiguities of literary narrative.”

The book proceeds by a kind of loose dialectic, in which Chandra considers these discrete aspects of his intellectual life in separate chapters, but allows for a certain play and overlap between them. The question of aesthetics provides a crucial link, and he makes a persuasive case for the importance of elegance in the writing of code. There’s a tendency among some programmers, though, to place their work in the same category as that of writers and musicians and painters, and Chandra is, in the end, disinclined to indulge this conceit. For all its complexity, the work of the programmer is always oriented toward an exactitude of language and a simplicity of function, whereas poetic forms of language are concerned with much less quantifiable results. Chandra brings to bear Sanskrit aesthetic terms such as dhvani and rasa (which might be reductively translated as “resonance” and “affect,” respectively). “Code,” he writes, summarizing the more facile equivalencies drawn between the two forms of expression,

is denotative, [while] poetic language is centrally concerned with dhvani, that which is not spoken; the end purpose of code is to process and produce logic, and any feeling this code arouses in an immediate sense is a side effect … Code may flirt with illegibility, but it must finally cohere logically or it will not work; the language of art can fracture grammar and syntax, can fail to transmit meaning but still cause emotion, and therefore successfully produce rasa.

This is not to say that programming isn’t troubled by its own mysteries, its own illegibilities; it’s just that, unlike the ambiguities of literature, these are bugs rather than features. Early on in the book, Chandra makes a very interesting claim: many programmers and I.T. professionals have no real idea how computers work, either. Because they don’t need to, essentially; they need to make them perform specific tasks, but they don’t need to understand how they perform them. He quotes a plaintive post by a programmer named Rob P. on the Q. & A. site stackexchange.com. Rob begins by saying that he is almost embarrassed to reveal what he’s about to reveal, given that he has a degree in computer science and has worked full time as a developer for five years. “But I Don’t Know How Computers Work!” he says. “I know there are components … the power supply, the motherboard, ram, CPU, etc … and I get the ‘general idea’ of what they do. But I really don’t understand how you go from a line of code like Console.Readline() in .NET (or Java or C++) and have it actually do stuff.”

Chandra goes on to provide a fairly thorough explanation of how computers work—of the things that are physically caused to happen by these coded commands, the “mediating dialect between human and machine.” He devotes an entire chapter early in the book to the language of logic that is the native tongue of computer processors; this is the torrent of binary numbers, of ones and zeros, that constitutes the universal grammar of machines. Chandra even goes so far as to include diagrams, as well as photographs of functioning logic gates constructed from Legos, but my humanities-addled mind went into a kind of automated retreat from any sustained engagement with this applied abstraction. And this forced me to confront a form of illiteracy I don’t ordinarily acknowledge as such, raising, in turn, the question of whether this glazing over is acceptable. Am I guilty of a peculiarly modern philistinism?

One of the most intriguing aspects of the book is its exploration of the layered impenetrability of many of the computer programs that we unthinkingly rely on every day. The sleek exterior of your Web browser, Chandra points out, often conceals a roiling chaos that nobody can fully decipher. “There are some areas of code in running programs,” he writes, “that may as well be marked Here Be Dragons, and there are some programs that have run for decades—at universities, corporations, banks—that cannot be efficiently maintained or enhanced because nobody completely understands how they work.” The Pentagon, ground zero of the Internet itself, uses to this day a piece of payroll-and-accounting software that “comprises about seven million lines of COBOL code, mostly written in the sixties.” The system hasn’t been updated in many years, because its documentation has long since disappeared, and nobody now has a full understanding of what went into it in the first place. (And how could they? Seven million lines of code: that’s about six hundred and sixty-two times the length of Milton’s “Paradise Lost,” and presumably it’s less interesting to read.) Chandra doesn’t belabor the analogy here, but it’s hard not to see this as a kind of synecdoche for a wider field of complexity and uncertainty: we speak languages, and exist within cultures, whose foundations and structures are often unconsidered or obscured or unknown. “The past lives on,” Chandra writes, “under the shiny surface of the present, and often, it is too densely tangled to comprehend.”

This matter of hidden code, of obscured histories, is central to the book in a larger sense. I was surprised to learn of the formative role played by women in the development of computer science. The first programmable computer was designed by Charles Babbage, but it was his collaborator Ada Lovelace (daughter of Lord Byron) who wrote the first-ever program, designed to run on a machine that was not completed in either of their lifetimes. And the aforementioned COBOL (Common Business-Oriented Language), one of the earliest standardized programming languages, is largely based on work done in the nineteen-fifties by Grace Hopper, a computer scientist and U.S. Navy rear admiral. The programmers who worked on the U.S. military’s first computer, the ENIAC (Electronic Numerical Integrator and Computer), were all women, recruited by the system’s exclusively male engineers and managers. At the time, programming was mistakenly perceived as a kind of high-tech manual labor not unlike the tasks performed by telephone operators. In 1967, Chandra writes, Cosmopolitan published an article titled “The Computer Girls,” in which Hopper was quoted as saying that programming was “just like planning a dinner … You have to plan ahead and schedule everything so it’s ready when you need it. Programming requires patience and the ability to handle detail. Women are ‘naturals’ at computer programming.” Once it became clear that the pioneering work these women were doing was far more intellectual than mechanical, it was quickly decided that, actually, the work would be better suited to the more finely developed minds of men. And so the masculinization of the profession began, leading to the birth of geek culture and the aspirational virility of gamers, tech entrepreneurs, and brogrammers.