To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
E-mails, chatgroups, instant messages, and the Web have one thing in common: they are all electronic interactions where the subject-matter comprises – apart from the occasional aberration – real things in the real world. This chapter examines a very different scenario: electronic interaction where the subject-matter is totally imaginary. All communication between participants takes place with reference to the characters, events, and environments of a virtual world. These virtual worlds go by various names, but their most common generic designation is with the acronym: MUDs.
The term MUD has had two glosses, over the years. It originally stood for ‘multi-user dungeon’, in the popular mind reflecting the name of the leading role-play fantasy game devised in the 1970s, and still widely played, ‘Dungeons and Dragons’™. Since then, hundreds of such D&D games have been published, extending the concept from fantasy worlds to horror, science fiction, history, and other domains. All have the same orientation. They are played by groups of two or more people. One player, usually known as the ‘Game Master’, defines an imaginary environment in which the players will move and interact, the kinds of obstacles they will encounter, and the kind of powers they have. Each player creates a character and defines its attributes – size, shape, race, clothing, weapons, and so on. Adventures deal with age-old themes, such as a hunt for treasure, a battle between good and evil, or the rescuing of a person in distress.
These quotations illustrate widely held anxieties about the effect of the Internet on language and languages. The first is the subheading of a magazine article on millennial issues. The second is the headline of an article on the rise of new forms of impoliteness in communication among people using the short messaging service on their mobile phones. The third is a remark from the President of France, Jacques Chirac, commenting on the impact of the Internet on language, and especially on French. My collection of press clippings has dozens more in similar vein, all with a focus on language. The authors are always ready to acknowledge the immense technological achievement, communicative power, and social potential of the Internet; but within a few lines their tone changes, as they express their concerns. It is a distinctive genre of worry. But unlike sociologists, political commentators, economists, and others who draw attention to the dangers of the Internet with respect to such matters as pornography, intellectual property rights, privacy, security, libel, and crime, these authors are worried primarily about linguistic issues. For them, it is language in general, and individual languages in particular, which are going to end up as Internet casualties, and their specific questions raise a profusion of spectres.
In his book A brief history of the future: the origins of the Internet, John Naughton comments:
The Internet is one of the most remarkable things human beings have ever made. In terms of its impact on society, it ranks with print, the railways, the telegraph, the automobile, electric power and television. Some would equate it with print and television, the two earlier technologies which most transformed the communications environment in which people live. Yet it is potentially more powerful than both because it harnesses the intellectual leverage which print gave to mankind without being hobbled by the one-to-many nature of broadcast television.
In Weaving the Web, the World Wide Web's inventor, Tim Berners-Lee, quotes a speech made by the South African president, Thabo Mbeki:
on how people should seize the new technology to empower themselves; to keep themselves informed about the truth of their own economic, political and cultural circumstances; and to give themselves a voice that all the world could hear.
And he adds: ‘I could not have written a better mission statement for the World Wide Web.’ Later he comments:
The Web is more a social creation than a technical one.
And again:
the dream of people-to-people communication through shared knowledge must be possible for groups of all sizes, interacting electronically with as much ease as they do now in person.
The Internet allows people to engage in a multi-party conversation online, either synchronously, in real time, or asynchronously, in postponed time (chapter 1). The situations in which such interactions take place have been referred to in various ways, partly reflecting the period in Internet history when they were introduced, and partly reflecting the orientation and subject-matter of the group involved, such as chatgroups, newsgroups, usergroups, chatrooms, mailing lists, discussion lists, e-conferences, and bulletin boards. In this book, I have used chatgroups as a generic term for worldwide multi-participant electronic discourse, whether real-time or not. There is a technical overlap with e-mailing: a mailing list is essentially an e-mail address which redirects a message to a set of other addresses. It is also possible for pairs of chatgroup members to arrange to communicate privately by e-mail or using some other messaging facility. However, from a linguistic point of view it is important to distinguish the chatgroup from the e-mail situation (chapter 4), in that the latter is typically between a pair of named individuals (or institutions), with message-exchanges often limited to a single transaction, and relating to a specific, pre-planned question. Chatgroups, by contrast, typically involve several people, with message-exchanges often anonymous, continuing indefinitely, and dealing with a wide and unpredictable range of issues. Although there are several points of linguistic similarity between the two situations, the linguistic features and strategies taken up by chatgroup participants are very different from those typically employed by e-mail users.
Computers are changing almost every aspect of our lives. They're changing how we relate to one another and even changing how we think of ourselves. The very idea that my brain is a biological computer that could be, in some fundamental mathematical sense, no more powerful than the laptop on which I'm typing these words is mind-boggling. The fact that I can program a computer to control a robot, play chess, or find a cure for disease is tremendously empowering.
This book is organized as a series of essays that explore interesting and fundamental topics in computer science with the aim of showing how computers and computer programs work and how the various aspects of computer science are connected. Along the way I hope to convey to you some of my fascination with computers and my enthusiasm for working in a field whose explosive growth is fueled in no small measure by the ability of computers to support collaboration and information sharing.
While not meant to be exhaustive, this book examines a wide range of topics, from digital logic and machine language to artificial intelligence and searching the World Wide Web. These topics are explored by interacting with programs and experimenting with short fragments of code while considering such questions as:
How can a computer learn to recognize junk email?
What happens when you click on a link in a browser?
It's difficult to work with computers for long without thinking about the brain as a computer and the mind as a program. The very idea of explaining mental phenomena in computational terms is obvious and exciting to some and outrageous and disturbing to others. For those of us working in artificial intelligence, it's easy to get carried away and extrapolate from current technology to highly capable, intelligent and even emotional robots. These extrapolations may turn out to be fantasies and our robots may never exhibit more than rudimentary intelligence and sham emotions, but I think not.
Scientific knowledge about brains and cognition has expanded dramatically in recent years and scholars interested in the nature of mind are scrambling to make sense of mountains of data. Computer software is surpassing human ability in strategic planning, mathematical reasoning and medical diagnosis. Computer-controlled robots are cleaning offices, conducting guided tours in museums, and delivering meals in hospitals. However, a lot more is at stake here than solving engineering problems or unraveling scientific puzzles.
The various claims concerning the nature of mind are complicated and hotly contested. Many of them date back thousands of years. Some are believed to threaten the moral, religious and social fabric of society. It's feared by some that if individuals believe certain claims – whether or not they are true – they will no longer be bound by prevailing social and moral contracts.
The technology supporting the World Wide Web enables computations and data to be distributed over networks of computers, and this lets you use programs that you don't have to install or maintain and gain access to information that you don't have store or worry about backing up. The World Wide Web is essentially a global computer with a world-wide file system.
Many of the documents in this huge file system are accessible to anyone with a browser and a network connection. Indeed, their authors really want you to take a look at what they have to offer in the terms of advice, information, merchandise and services. Some of these documents, we tell ourselves, contain exactly what we're looking for, but it isn't always easy to find them.
It's difficult enough to search through files full of your own personal stuff – now there are billions of files generated by millions of authors. Some of those authors are likely to be somewhat misleading in promoting whatever they're offering, others may be downright devious, and some will just be clueless, ignorant about whatever they're talking about. How can we sift through this morass of data and find what we're looking for?
SPIDERS IN THE WEB
Billions of files are stored on web servers all over the world and you don't need a browser to access them.
In Daniel Dennett's Darwin's Dangerous Idea: Evolution and the Meanings of Life, the dangerous idea is natural selection, Charles Darwin's name for the mechanism governing the evolution of species that he codiscovered with Alfred Russel Wallace. Natural selection is the “process by which individual characteristics that are more favorable to reproductive success are ‘chosen,’ because they are passed on from one generation to the next, over characteristics that are less favorable”.
Natural selection explains how characteristics that promote reproductive success persist and under certain circumstances can come to dominate less favorable characteristics, but it doesn't explain how those characteristics are passed on or how new characteristics come into being. It was Gregor Mendel, living around Darwin's time, who suggested that heritable characteristics are packaged in the discrete units we now call genes and that offspring inherit a combination of their parents' genes.
When you combine Darwin's and Mendel's ideas, you have the basis for genetic algorithms, an interesting class of algorithms generally attributed to John Holland that take their inspiration from evolutionary biology. These algorithms simulate some aspects of biological evolution – while ignoring others – to tackle a wide range of problems from designing circuits to scheduling trains. Genetic algorithms allow the algorithm designer to specify the criterion for reproductive success by supplying a fitness function, alluding to the idea that in a competitive environment only the fittest survive to reproduce.
On the morning I began this chapter, I was driving into work and passed a sign near a grade school advertising a “Bug Safari”. When I got to work, I found out from the Web that “Butterfly Walks”, “Spider Safaris”, “Pond Dips” and similar excursions are regular fare at summer camps and neighborhood activity centers. This intrigued me: who would lead these tours? I initially thought that the most likely candidates would be trained entomologists or specialists such as lepidopterists. An entomologist studies bugs, beetles, butterflies, spiders and the like (not to be confused – as I usually do – with the similar-sounding etymologist, someone who studies the derivation of words), while lepidopterists specialize in lepidoptera, butterflies and moths.
But then I realized that it's a rare specialist who can resist being distracted by his or her own specialty. I thought about what this tendency might portend for my attempt to speak to a general audience about concepts in computer science. By most accounts, I'm an expert in computer science and a specialist in artificial intelligence. But just as a trained and practicing physicist is not an expert in all matters spanning the length and breadth of physics, from quantum electrodynamics to cosmology, so I'm not an expert in all areas of computer science.
In this chapter, I'll be talking about programming languages, an area of computer science about which I know a fair bit but certainly am not an expert.
Have you ever wondered what's going on when you click your mouse on some underlined text in a browser window and suddenly the screen fills with text and graphics that clearly come from some other faraway place? It's as if you've been transported to another location, as if a window has opened up on another world. If you're on a fast cable or DSL (“digital subscriber line”, the first of many acronyms in this chapter) connection, the transformation is almost instantaneous; if you're using a slow modem, then updating the screen can take several seconds or even minutes, but in any case the behind-the-scenes machinations making this transformation possible leave little evidence. Occasionally, however, you'll catch fleeting glimpses of the machinery through little cracks in the user interface.
If you use a dial-up connection and modem to connect with your Internet service provider, you may hear an awful squawking as your modem and the service provider's modem initiate two-way communication. Similar noisy exchanges can occur when one fax machine attempts to communicate with a second. In both cases, computer programs at each end of a telephone connection are validating, handshaking, synchronizing and otherwise handling the transmission of information. As smarter modems and fax machines replace older technology, these noisy accompaniments are being silenced, since a human need no longer overhear them to check that things are proceeding as desired.
There is a reason I liken computations to evanescent spirits. They are called into being with obscure incantations, spin filaments of data into complex webs of information, and then vanish with little trace of their ephemeral calculations. Of course, there are observable side effects, say when a computation activates a physical device or causes output to be sent to a printer, displayed on a screen or stored in a file. But the computations themselves are difficult to observe in much the way your thoughts are difficult to observe.
I'm exaggerating somewhat; after all, unlike our brains, computers are designed by human beings. We can trace every signal and change that occurs in a computer. The problem is that a complete description of all those signals and changes does not help much in understanding what's going on during a complex computation; in particular, it doesn't help figure out what went wrong when the results of a computation don't match our expectations.
An abstraction is a way of thinking about problems or complex phenomena that ignores some aspects in order to simplify thinking about others. The idea of a digital computer is itself an abstraction. The computers we work with are electrical devices whose circuits propagate continuously varying signals; they don't operate with discrete integers 0, 1, 2, …, or for that matter with binary digits 0 and 1.
Often when you're trying to solve a problem, you pull out a pen or pencil and grab a handy piece of paper to write down a column of numbers, draw a diagram, or make a list. In solving the problem, you might sum the numbers, trace lines in the diagram, or match items of the list with items of a second list. These auxiliary scribblings are used to organize information – as with the list or column of numbers – or represent objects so they can be easily manipulated – as with the diagram. Data structures are the algorithmic analog of these handy pieces of paper.
In Chapter 11 we saw that browsers and web servers in a computer network exchange information by bouncing small packages of data from one computer to another until they arrive at their final destination. How can we represent a computer network so that an algorithm can figure out what sequence of computers to use in transferring a data package? For that matter, how do we represent airline schedules, circuit diagrams, computer file systems, road maps and medical records so that they can be manipulated algorithmically?
Many algorithms use special data structures to represent their inputs and outputs or to perform intermediate calculations. In Chapter 7 we used lists and vectors to keep track of journal entries.
Hardly a day goes by that I don't write at least one short computer program: a few lines of code to explore an idea or help organize my thoughts. I think of it as simply talking with my computer, and more and more often there is a computer available to talk with, often several of them joining in the conversation simultaneously. Each time you click on a link in a browser, you cause a sequence of computations involving dozens if not hundreds of computers scattered all over the world.
Making a computation happen is not, however, the same thing as programming. There are lots of powerful programs written by talented programmers that you can call up with a click of a mouse or few keystrokes. These programs animate computers, breathing life and spirit into lumps of metal and plastic. Even if you know what's going on inside computers and computer programs, it's easy to imagine that programs are spells and the programmers who create them are sorcerers. When you click on the icon for a program, you invoke these spells and the spells conjure up spirits in the machine. But this book isn't about invoking the spells of others; it's about creating your own spells and conjuring spirits of your own design.
This is not to say I won't encourage you to use code written by other programmers. Quite the contrary: an important part of the power of computing is that good spells can be reused as often as needed.
When I use the term “hacker” I mean someone who enjoys programming and is good at it. Hackers in my experience tend to be an opinionated and individualistic lot and they tend to appreciate strong opinions and independence of thought in others. The slogan of the Perl language is “There's more than one way to do it”, and most hackers are motivated to exploring different ways of doing the same job. That said, if adopting a standard way of doing something provides leverage for building better software, then most hackers will agree to adopt the standard (after much dickering about the details, of course).
If you write code because you want other people to use it, it behooves you to use a language that others are familiar with, adopt standard conventions for input and output so that others can interact with your code without learning some new set of conventions, and provide your code in a format so that others can use it as a component of a larger project without having to understand all the details of your implementation. The struggle to meet these basic criteria requires the hacker to negotiate, make concessions and, generally, work within a community of potential users to produce, adopt and adhere to reasonable standards.
Building great software requires a great deal of discipline and interpersonal skill – in sharp contrast with the stereotype of a hacker as an unkempt, uncommunicative obsessive compulsive lacking basic hygiene and addicted to highly caffeinated drinks.
Most physicists believe that the speed of light is a fundamental limit on how quickly we can move through space. This claim is based on the predictions of mathematical theories and the results of experiments that appear to support them. According to theory, it doesn't matter whether you move through space with a pogo stick or an anti-matter drive, you're still subject to the rules governing all matter in the universe and thus unable to exceed the speed of light.
What if there are limits on what you can compute? Pharmaceutical companies simulate interactions at the atomic level in searching for molecules to cure diseases. There could be viruses for which it will take years to find a vaccine – there is simply no way to speed up the necessary computations. Software developers who write the programs that keep airplanes flying and emergency rooms functioning would like to prove that their code won't malfunction and put lives at risk. But maybe it's impossible to provide such assurances.
In some cases, computational limitations can work to our advantage. Some programs exploit the difficulty of computing answers to particular problems; for example, the most popular encryption schemes for transferring information securely on the World Wide Web rely on the difficulty of computing the prime factors of large composite integers. Of course, if someone figures out how to factor large numbers efficiently, our privacy will be seriously threatened.