Charles Petzold is perhaps best known for his books on programming Windows applications. I have not read those, but I can’t imagine they will age nearly as well as Code has. With Code, Petzold sets out to inform a general audience about the inner workings of computers. I think he succeeds here in a way that few others ever have.
Code is a unique book with a conversational tone that leads a general audience of readers through a mix of expository writing, imaginative fictional scenarios, and history, to learn about the inner workings of computer hardware and software. It provides an unparalleled depth of understanding for how little it requires from readers in the way of prior knowledge. Petzold maintains a good balance: the pace is comfortable, and the tone is informal while at the same time incorporating the appropriate technical terminology to accurately convey the subject matter without obscuring it by unnecessarily avoiding precision out of fear that the reader will be turned off by too much jargon.
…someone once asked me: “Why can’t you run Macintosh programs under Windows?” My mouth opened to begin an answer when I realized that it involved many more technical issues than I’m sure my questioner was prepared to deal with in one sitting.
I want Code to be a book that makes you understand these things, not in some abstract way, but with a depth that just might even rival that of electrical engineers and programmers. I also hope that you might recognize the computer to be one of the crowning achievements of twentieth century technology and appreciate it as a beautiful thing in itself without metaphors and similes getting in the way.
Beginning with simple explanations of flashlights, telegraph relays, Morse code, and Braille, Petzold lays the groundwork for the rest of the book. He alternates between lessons in basic electronics and explanations of how humans use various languages and codes to represent and communicate information. In chapter ten these narratives converge with a brief history of Boolean logic, and in chapter twelve Petzold begins in earnest to construct the basic circuitry of a simple computer in the imaginations of his readers. By chapter seventeen the reader’s mental model contains a bona-fide Von Neumann machine, complete with a processor, an instructions set, and memory banks. The remainder of the book builds on this understanding and traces a path through the history of innovations in computing technology that includes “classic microprocessors” (the 8080 and 6800) , video displays, operating systems, and high and low level programming languages (the earlier chapters make extensive use of assembly language to describe the imagined machine’s hypothetical machine code instructions).
There are a few weak points (notably the end of the book which reads as a futile attempt to touch as many aspects of the late 90s technology zeitgeist as possible—this is one of the few parts of the book that actually seems dated now), but because I have never encountered another book like it, I would still recommend it to anyone who wanted to know more about computers. One glaring omission (in my mind) is that Petzold does not show how to construct the logic gates necessary for instructions to be interpreted and executed by his imaginary Von Neumann machine. He builds all of the circuitry to do the work, but fails to show how the op-codes themselves might bring about that activity. While some readers have complained that this central chapter is confusing because it is too detailed, I find that I get a little lost at this point for the opposite reason.
Overall, I think Code is an excellent book, and I wish there were more books like it. It has aged surprisingly well for a book that deals with computer technology. I would recommend it to anyone who wants to learn how computers work. I would caution that it could take a little patience and perserverence to comprehend if many of the concepts presented are new to you, but it is definitely worth the effort.