Free Novel Read

Bitwise




  Copyright © 2018 by David Auerbach

  All rights reserved. Published in the United States by Pantheon Books, a division of Penguin Random House LLC, New York, and distributed in Canada by Random House of Canada, a division of Penguin Random House Canada Limited, Toronto.

  Pantheon Books and colophon are registered trademarks of Penguin Random House LLC.

  Grateful acknowledgment is made to Schocken Books, a division of Penguin Random House LLC, for permission to reprint an excerpt of “In the Penal Colony” from The Completed Stories by Franz Kafka, edited by Nahum N. Glatzer, copyright © 1946, 1947, 1948, 1954, 1958, 1971 by Penguin Random House LLC. Reprinted by permission of Schocken Books, a division of Penguin Random House LLC. All rights reserved.

  Some material in the chapters “Logo and Love” and “Chat Wars” first appeared, in a different form, in Slate and n + 1.

  This page constitutes an extension of this copyright page.

  Library of Congress Cataloging-in-Publication Data

  Name: Auerbach, David (David B.), author.

  Title: Bitwise : a life in code / David Auerbach.

  Description: First edition. New York : Pantheon Books, 2018. Includes bibliographical references and index.

  Identifiers: LCCN 2017055983. ISBN 9781101871294 (hardcover : alk. paper). ISBN 9781101871300 (ebook).

  Subjects: LCSH: Computer science—Philosophy. Computer science—Social aspects. Auerbach, David (David B.)—Philosophy. Computer scientists—United States—Biography.

  Classification: LCC QA76.167 .A84 2018 | DDC 004—dc23 | LC record available at lccn.loc.gov/​2017055983

  Ebook ISBN 9781101871300

  www.pantheonbooks.com

  Cover design by Tyler Comrie

  v5.3.2

  ep

  For Nina, Eleanor, and Iris

  Contents

  Cover

  Title Page

  Copyright

  Dedication

  Introduction

  Part I

  Chapter 1: Logo and Love

  Chapter 2: Chat Wars

  Chapter 3: Binaries

  Interlude: Foreign Tongues

  Part II

  Chapter 4: Naming of Parts

  Chapter 5: Self-Approximations

  Chapter 6: Games Computers Play

  Interlude: Adventures with Text

  Part III

  Chapter 7: Big Data

  Chapter 8: Programming My Child

  Chapter 9: Big Human

  Epilogue: The Reduction of Language, the Flattening of Life

  Acknowledgments

  Notes

  Further Reading

  Works Cited

  Illustration Credits

  A Note About the Author

  INTRODUCTION

  Thoughtfulness means: not everything is as obvious as it used to be.

  —HANS BLUMENBERG

  COMPUTERS always offered me a world that made sense. As a child, I sought refuge in computers as a safe, contemplative realm far from the world. People confused me. Computers were precise and comprehensible. On the one hand, the underspecified and elusive world of human beings; on the other, the regimented world of code.

  I had tried to make sense of the real world, but couldn’t. Many programmers can. They navigate relationships, research politics, and engage with works of art as analytically and surgically as they do code. But I could not determine the algorithms that ran the human world. Programming computers from a young age taught me to organize thoughts, break down problems, and build systems. But I couldn’t find any algorithms sufficient to capture the complexities of human psychology and sociology.

  Computer algorithms are sets of exact instructions. Imagine describing how to perform a task precisely, whether it’s cooking or dancing or assembling furniture, and you’ll quickly realize how much is left implicit and how many details we all take for granted without giving it a second thought. Computers don’t possess that knowledge, yet computer systems today have evolved imperfect pictures of ourselves and our world. There is a gap between those pictures and reality. The smaller the gap, the more useful computers become to us. A self-driving car that can only distinguish between empty space and solid objects operates using a primitive image of the world. A car that can distinguish between human and nonhuman objects possesses a more sophisticated picture, which makes it better able to avoid deadly errors. As the gap closes, we can better trust computers to know our world. Computers can even trick us into thinking the gap is smaller than it really is. This book is about that gap, how it is closing, and how we are changing as it closes. Computers mark the latest stage of the industrial revolution, the next relocation of our experience from the natural world to an artificial and man-made one. This computed world is as different from the “real” world as the factory town is from the rural landscape.

  Above all, this book is the story of my own attempt to close that gap. I was born into a world where the personal computer did not yet exist. By the time I was old enough to program, it did, and I embraced technology. In college, I gained access to the internet and the nascent “World Wide Web,” back in the days when AOL was better known than the internet itself. I studied literature, philosophy, and computer science, but only the latter field offered a secure future. So after college I took a job as a software engineer at Microsoft before moving to Google’s then-tiny New York office. I took graduate classes in literature and philosophy on the side, and I continued to write, even as the internet ballooned and our lives gradually transitioned to being online all the time. As a coder and a writer, I always kept a foot in each world. For years, I did not understand how they could possibly converge. But neither made sense in isolation. I studied the humanities to understand logic and programming, and I studied the sciences to understand language and literature.

  A “bitwise operator” is a computer instruction that operates on a sequence of bits (a sequence of 1s and 0s, “bit” being short for “binary digit”), manipulating the individual bits of data rather than whatever those bits might represent (which could be anything). To look at something bitwise is to say, “I don’t care what it means, just crunch the data.” But I also think of it as signifying an understanding of the hidden layers of data structures and algorithms beneath the surface of the worldly data that computers store. It’s not enough to be worldwise if computers are representing the world. We must be bitwise as well—and be able to translate our ideas between the two realms.

  This book traces an outward path—outward from myself and my own history, to the social realm of human psychology, and then to human populations and their digital lives. Computers and the internet have flattened our local, regional, and global communities. Technology shapes our politics: in my lifetime, we have gone from Ronald Reagan, the movie star president, to Donald Trump, the tweeting president. We are bombarded with worldwide news that informs our daily lives. We form virtual groups with people halfway around the world, and these groups coordinate and act in real time. Our mechanisms of reason and emotion cannot process all this information in a systematic and rational way. We evolved as mostly nomadic creatures living in small communities, not urban-dwelling residents connected in a loose but extensive mesh to every other being on the planet. It’s nothing short of astounding that the human mind copes with this drastic change in living. But we don’t think quite right for our world today, and we are attempting to off-load that work to computers, to mixed results.

  Computers paradoxically both mitigate and amplify
our own limitations. They give us the tools to gain a greater perspective on the world. Yet if we feed them our prejudices, computers will happily recite those prejudices back to us in quantitative and apparently objective form. Computers can’t know us—not yet, anyway—but we think they do. We see ourselves differently in their reflections.

  We are also, in philosopher Hans Blumenberg’s term, “creatures of deficiency.” We are cursed to be aware of our poverty of understanding and the gaps between our constructions of the world and the world itself, but we can learn to constrain and quantify our lack of understanding. Computers may either help us understand the gaps in our knowledge of the world and ourselves, or they may exacerbate those gaps so thoroughly that we forget that they are even there. Today they do both.

  PART I

  1

  LOGO AND LOVE

  The Turtle

  I found particular pleasure in such systems as the differential gear….I fell in love with the gears.

  —SEYMOUR PAPERT

  WE ARE DRIVEN TO DISCOVER how things work, but I was often disappointed to find out that one thing or another didn’t work more neatly. The television, the automobile, and the human body seemed like they could be more organized, more elegant. Computers, however, did not disappoint me.

  Like so many software engineers, I was a shy and awkward child, and I understood computers long before I understood people. The precision, clarity, and reliability that computers promised, particularly in the 1980s when they were so much simpler than they are today, provided a refuge for many children who did not easily integrate into the social fabric of their peers. But a computer was not merely something that I could play with; it was something I could program and control, and with which I could create a new world. Computers are now moving toward virtual reality and photorealistic games, but back then computers displayed only a screen of text and primitive monochrome graphics, which were nonetheless enough to support something that remains more fundamentally powerful than the sharpest graphics: code.

  My first computer language was Logo, a graphical language developed in 1967 by Wally Feurzeig, Seymour Papert, and Cynthia Solomon and intended as an educational tool. I learned it at a computer class for kids at our local rec center in the suburbs of Los Angeles when I was seven. Armed with Logo, I could write instructions (in the form of a program) for a triangular “turtle” on the screen, which would then draw lines and shapes based on those instructions. The screen was monochrome, green text and lines on a black background.

  The first “program” I wrote was a single line of code: drawing a square.

  repeat 4 [forward 50 right 90]

  That is, go forward 50 pixels, turn right by 90 degrees, and then repeat those two steps a total of four times. At the end of it, the turtle would be back where it started, having drawn out a square. By changing the angle and the number of repeats, I could draw a variety of polygons. A triangle:

  repeat 3 [forward 50 right 120]

  An octagon:

  repeat 8 [forward 50 right 45]

  A pentagram:

  repeat 5 [forward 50 right 144]

  I could not draw a pentagram by hand, at least not well. The turtle drew it perfectly. The 144-degree angle felt like secret knowledge to me. I hadn’t realized that the program did not need to be any more complex than that for a square or an octagon. Sometimes I boosted the number of repeats so that the turtle would continue to zip along the pentagram’s lines like a bullet train.

  These single-line programs are all algorithms. The word “algorithm” is a derivation of the name of ninth-century Persian mathematician Muhammad ibn Mūsā al-Khwārizmī. An algorithm is, informally speaking, the set of rules or instructions specifying the path from a specified problem (“Draw a pentagram with sides of length 50”) to the solution to that problem (the visual display of the pentagram itself). Algorithms can become increasingly general, specified with variables rather than constants (“Draw a polygon with n sides of length m”).

  Algorithms hooked me. My own experience suggests that some people’s brains are more tuned in to this way of thinking, just as some people are more attuned to mathematics or languages. I am not a visual or a verbal person: I was rejected from kindergarten because I couldn’t draw. But these kinds of assemblages of instructions made intuitive sense, and I thought they were beautiful. Instead of just having the thing itself, I had the recipe for the thing and, moreover, could make the recipe increasingly general so that reams of problems could be solved by twiddling the dials on a single recipe. That, in essence, is computer programming.

  * * *

  —

  Simple algorithms can produce beautifully complex results. Here is a Logo program of half a dozen lines, sierpinskiTriangle, which draws a fractal triangle.

  to sierpinskiTriangle :length :depth

  if :depth < 1 [ stop ]

  repeat 3 [

  sierpinskiTriangle :length/2 :depth-1

  forward :length

  right 120

  ]

  end

  Invoking the program with the command sierpinskiTriangle 500 7 will cause the turtle to draw the following graphic:

  You can get this fractal pattern out of six lines of code because sierpinskiTriangle is doing one thing over and over again: drawing a triangle made out of three triangles. But every time it draws one of those triangles, it first draws three smaller triangles inside that triangle—in other words, it does the same thing, just smaller. So the code calls itself, in a process called recursion.

  Here is another example of recursion, a program to draw a tree:

  to tree :level :size :scale :angle

  if :level > 0 [

  fd :size

  lt :angle

  tree :level - 2 :size * :scale * :scale :scale :angle

  rt :angle

  rt :angle

  tree :level - 1 :size * :scale :scale :angle

  lt :angle

  bk :size

  ]

  end

  Invoking this program with tree 18 100 .9 20 produces this graphic:

  This amazed me. It seemed impossible. How could a dozen lines of code produce such a beautiful and complex pattern? How had I instructed this computer to draw more capably and more beautifully than my hand could? I wanted to understand how such a great effect could stem from such a small set of instructions, and I wanted to author the programs that created such effects. My confusion led to my desire to understand. My wonder led to my desire to create.

  Many people find their calling in a moment of sheer awe. The awe stems from not just the beauty and elegance but the sheer seeming impossibility of a past creation or discovery. For a writer, this could occur on reading a particular line of Shakespeare or Zhuangzi. For a mathematician, it may be found when studying the proof of the irrationality of the square root of 2 or the supremely elegant unity of Euler’s equation, which joins five fundamental mathematical constants through addition, multiplication, and exponentiation:

  eiπ + 1 = 0

  I was impressed and perplexed by this equation when I first saw it. The relation of the constants isn’t obvious. I found it beautiful, yet it did not impel me to devour books of mathematics. I could appreciate the elegance of Euler’s equation without wishing to dissolve my identity in the world of mathematics. Not so with the world of computers.

  Plato believed that the core impulse to philosophizing lies in aporia, the point at which, in struggling to understand a phenomenon or answer a question, we come up against a seemingly irresolvable contradiction. The force of this contradiction can make us reassess the totality of what we thought we knew and reformulate it in a revolutionary way—for example, by saying, as Copernicus did in 1543, “Yet at rest in the middle of all
things is the Sun.”

  Elsewhere, in the Theaetetus, Plato writes that philosophy begins in wonder (thaumazein), the awe-inspiring excitement that I felt on seeing the turtle-drawn tree. Aristotle, Plato’s stolid successor, played down aporia. Perhaps this helped him to generate answers far more readily than Plato did. Aristotle produced systems of earthly and celestial motion, attempts at basic biology, and classifications of the various peoples and humors of the world.*1 Plato’s works, instead, tend to dwell more on how easily our minds are misled, and ask how we can be certain of anything. We care and work hard to understand and master a discipline through a combination of wonder and confusion. In his 1938 book Experience and Prediction, the philosopher of science Hans Reichenbach described the human condition as one not just of profound ignorance, but also illusion:

  We walk through the world as the spectator walks through a great factory: he does not see the details of machines and working operations, or the comprehensive connections between the different departments which determine the working processes on a large scale….We see the polished surface of our table as a smooth plane; but we know that it is a network of atoms with interstices much larger than the mass particles, and the microscope already shows not the atoms but the fact that the apparent smoothness is not better than the “smoothness” of the peel of a shriveled apple. We see the iron stove before us as a model of rigidity, solidity, immovability; but we know that its particles perform a violent dance, and that it resembles a swarm of dancing gnats more than the picture of solidity we attribute to it. We see the moon as a silvery disk in the celestial vault, but we know it is an enormous ball suspended in open space. We hear the voice coming from the mouth of a singing girl as a soft and continuous tone, but we know that this sound is composed of hundreds of impacts a second bombarding our ears like a machine gun….We do not see the things, not even the concreta, as they are but in a distorted form; we see a substitute world—not the world as it is, objectively speaking.