Book Review: Code by Charles Petzold
When programmers talk about the timeless books that will always be relevant, certain classics always come up: The Mythical Man Month, Structure and Interpretation of Computer Programs, Design Patterns, Refactoring, Code Complete, and others. Code is never mentioned in that group, and for good reason. This is not a book about programming, and it is not a book about software development.
Nevertheless, it is a book of importance to software developers. Code is a book about how computers are built to understand data and logic, and how the combination of data and logic allows for automation and computation.
Code starts with systems of encoding data, Morse code, Braille, and the first system for transmitting encoded data, the telegraph. Petzold then carefully details how logic gates can be built out of telegraph relays, and then how a binary adding machine can be built out of logic gates. He goes on to build a clock and RAM arrays, then turn the adding machine into a computer capable of responding to an assembly language, and detail the bus and a basic OS. Along the way, the reader is introduced to, and sees the application of, bits and bytes, binary and hex numbers, boolean algebra, and ASCII, and given a thorough tour of the history of computing devices, and introduced to the microprocessors that changed the world.
Code was written in 1999, but I don’t believe that it will become dated in any important way any time soon. While microprocessors have changed much in the last 12 years, the additional complexity doesn’t make for a better introduction to the computer. The coverage of Unicode isn’t as thorough as it might have been today, but a deep understanding of Unicode wouldn’t really be in the scope of the book anyway. Really, much of what made code fascinating for me to read could have been written in 1989 or 1979.
While this book is intended as introductory, it is written for a somewhat sophisticated novice. The first few chapters are easily understood by a bright ten-year-old, as the material isn’t terribly complex and Petzold writes in a fun, storytelling fashion. But I expect that the multiple levels of abstraction that occur later on could discourage some that were hoping for easier sailing.
I view this book as a must read for anyone that realizes that their computer is a mystery to them, and doesn’t like that, or for anyone that hopes to go into a technological vocation. To but a finer point on it, I expect that I will require that all four of my sons to read this book as part of their high school education. This book will not prepare you to do any specific thing better, but your mind will be better oriented to think about what the machine is doing, which has value whether your goals are to tell machines what to do, or to have a better appreciation for the decades or work that have made such amazing machines possible.