Textbook

About the textbook.

Surveying the field of computing is a survey of techniques and results from computer science. The book surveys a number of areas, presenting a mix of important and interesting results, spanning the fundamentals of computer programming, game playing, and algorithm design. The book intentionally avoids much of the traditional early computer science curriculum, to complement these courses with a survey of things to come.

The edition we use is the fourth edition, new in 2002.

Errata

I'm very interested in hearing about any errors in the textbook! All known errors will be listed on this page.

p. 6, section 2.2, 4th paragraph: The last sentence in this paragraph should read:
We now know that none of the possibilities are divisors, and so we output true -- 7 is prime.

p. 7, figure 2.2, step 4: There is a misspelled word; the word meaning ``to mix dough'' is knead.

p. 11: Historical note: SmallTalk popularized the idea of an ``object'', but objects were actually first introduced in a language called Simula (invented in Norway in the 60s!), designed for simulating complex computer (and other) systems.

p. 12: The book says that the machine language of a PC is totally different from that of a Macintosh. Now that Macs have switched to Intel processors (Spring 2006) that might no longer be true, but it is still true for the computers inside many cell phones.

p. 12: The example of a logic error is so bad, I decided to list it as an error here. A better example: suppose you need to add two variables together at some point in your program, but you (mistakenly) write that they should be multiplied. The computer can't know what you're thinking, so it happily accepts this and does it. But the answers will be wrong, because you told it to do something different than what you really wanted.

p. 24, line 16: This line should read:
Assigns upper to cur; since upper currently refers to Robot A, so will cur.

p. 43, example program: The example program here uses a method called readString.
While this actually works, there is no such method documented, and readLine (which is documented) also works.
This is probably a typo, and readString is probably a method used inside the RobotWindow class.

p. 50, figure 8.3, line 7: The wrong variable name is used. This line should read:

	int to_test = io.readInt();

p. 54, end of section 9.1: The text states that we can now do things that we couldn't do before we knew about arrays. Technically speaking, if integers in Java were arbitrarily large, you could simulate an array with a single integer (and a lot of hard work). But since Java integers have a maximum size, this is technically correct.

p. 64, section 10.3, second sentence: This line should read:
The code within a method cannot see variables defined in other methods.

p. 85, figure 13.1: The numbers in this diagram are all one too big, compared to the text. That is, it should show the tree for Move-Tower(2,A,B,C), the bottom level of the tree should contain nodes starting with "0", etc.