D is for Digital
What a well-informed person should know about computers and communications
Brian W. Kernighan
Paper edition:
ISBN-13: 978-1463733896,
ISBN-10: 1463733895
Copyright 2012 by Brian W. Kernighan
ALL RIGHTS RESERVED.
No part of this book may be reproduced or transmitted in any form or by any means, electronic, optical or mechanical, including photocopying or recording, or by any information storage and retrieval system, without express written permission from the copyright owner.
1202051148
Also by Brian Kernighan
The Elements of Programming Style (with P. J. Plauger)
Software Tools (with P. J. Plauger)
Software Tools in Pascal (with P. J. Plauger)
The C Programming Language (with D. M. Ritchie)
The AWK Programming Language (with A. V. Aho and P. J. Weinberger)
The Unix Programming Environment (with R. Pike)
AMPL: A Modeling Language for Mathematical Programming (with R. Fourer and D. M. Gay)
The Practice of Programming (with R. Pike)
Hello, World! Opinion Columns from The Daily Princetonian
For Meg
Contents
Preface
Since the fall of 1999, I have been teaching a Princeton course called Computers in Our World. The course title is embarrassingly vague, but I had to invent it in less than five minutes one day and then it became too hard to change. Teaching the course itself, however, has proven to be the most fun thing that I do, in a job that is almost all enjoyable.
The course is based on the observation that computers and computing are all around us. Some computing is highly visible: every student has a computer, each one of which is far more powerful than the single computer that cost several million dollars, occupied a very large room, and served the whole Princeton campus when I was a graduate student there in 1964. (The IBM 7094 had about 150KB of RAM, a clock speed of 500 KHz, and cost nearly $3 million: http://en.wikipedia.org/wiki/IBM_7090.) Indeed, a typical cell phone has much more computing power than that same computer. Every student has high speed Internet access, as does at least half the population of the United States in their homes. We search and shop online, and we use email, texting and social networks to keep in touch with friends and families.
But this is only part of a computing iceberg, much of which lies hidden below the surface. We don't see and usually don't think about the computers that lurk within appliances, cars, airplanes and the pervasive electronic gadgets that we take for granted cameras, video recorders, DVD players, tablets, GPS navigators, games. Sometimes their pluses and minuses come to the surface, almost accidentally, as in a newspaper article that quoted an executive of Hewlett-Packard as saying In essence, a digital camera is a computer with a lens. The same article also quoted an unhappy consumer: This isn't a camera, it's a computer, surely a comment on how hard it sometimes is to use computers.
Nor do we think much about the degree to which infrastructure depends on computing: the telephone network, television and cable, air traffic control, the power grid, and banking and financial services.
The pervasive nature of computing affects us in unexpected ways. Although we are from time to time reminded of the growth of surveillance systems, incursions into our privacy, and the perils of electronic voting, we perhaps do not realize the extent to which they are enabled by computing and communications.
Most people will not be directly involved in creating such systems, but everyone is strongly affected by them, and some will have to make important decisions about them. Wouldn't it be better if people had a better understanding of computers? An educated person ought to know at least the rudiments of computing: what computers can do and how they do it; what they can't do at all and what's merely extremely hard right now; how they talk to each other and what happens when they do; and the many ways that computing and communications influence the world around us.
The students in my course are not technical no engineers, physicists or mathematicians. Instead they are English and politics majors, historians, classicists, economists, musicians and artists, a wonderful slice through the humanities and social sciences. By the end of the course these bright people should be able to read and understand a newspaper article about computing, to learn more from it, and perhaps to spot places where it might not be accurate. More broadly, I want my students to be intelligently skeptical about technology, to know that it is often a good thing but not a panacea; conversely, though it sometimes has bad effects, technology is not an unmitigated evil.
A fine book by Richard Muller called Physics for Future Presidents (Richard Muller, Physics for Future Presidents , Norton, 2008. An excellent book, and one of the inspirations for this one.) attempts to explain the scientific and technical background underlying major issues that leaders have to grapple with nuclear threats, terrorists, energy, global warming, and the like. Well-informed citizens without aspirations to be president should know something of these topics as well. Although there are many differences between the scientific principles and reasoning that Muller is able to bring to bear on his topics, and what one should understand about computing, the approach is a good metaphor for what I would like to accomplish: Computing for Future Presidents.
What should the president know about computing? What should a well-informed person know about computing? Everyone will have their own ideas; here are mine. (Hal Abelson, Ken Ledeen, Harry Lewis, Blown to Bits: Your Life, Liberty, and Happiness After the Digital Explosion , Addison-Wesley, 2008. Touches on many important social and political topics, especially about the Internet. Bits and pieces, so to speak, would make good material for my Princeton course, and it derives from an analogous course at Harvard.)
There are three core technical areas hardware, software, and communications and the book is organized around them.
Hardware is the tangible part, the computers we can see and touch, that sit in our homes and offices, and that we carry around in our phones. What's inside a computer, how does it work, how is it built? How does it store and process information? What are bits and bytes, and how do we use them to represent music, movies, and everything else?
Software , the instructions that tell computers what to do, is by contrast hardly tangible at all. What can we compute, and how fast can we compute it? How do we tell computers what to do? Why is it so hard to make them work right? Why are they so often hard to use?
Communications means computers, phones, and other devices talking to each other on our behalf and letting us talk to each other: the Internet, the Web, email and social networks. How do these work? The rewards are obvious, but what are the risks, especially to our privacy and security, and how can they be mitigated?
To this trio one might add data , which is all the information that hardware and software collect, store and process, and which communications systems send round the world. Some of this is data we contribute voluntarily, whether prudently or not, by uploading pictures and videos. Some is personal information about us, usually gathered and shared without our knowledge, let alone agreement.
President or not, you should know about the world of computing because it affects you personally. No matter how non-technical your life and work, you're going to have to interact with technology and technical people. Knowing something of how devices and systems operate is a big advantage, even something as simple as recognizing when a salesperson or a help line is not telling you the whole truth. Indeed, ignorance can be directly harmful. If you don't understand viruses, phishing and similar threats, you become more susceptible to them. If you don't know how social networks leak, or even broadcast, information that you thought was private, you're likely to reveal much more than you realize. If you're not aware of the headlong rush by commercial interests to exploit what they have learned about your life, you're giving up privacy for little benefit. If you don't know why it's risky to do your personal banking in a coffee shop or an airport, you're vulnerable to theft of money and identity.