2021-05-24
Code by Charles Petzold was the third title we tackled in our “technical book club” at work. After Designing Data-Intensive Applications, the idea was to pick something a little more easily digestible—plus, Code had been on my list for quite a while, so I was more than happy with the choice.
Throughout reading, I had the impression that this was written by somebody who is so passionate about a topic that they want everybody else to be able to understand and appreciate said topic. The book aims to be understandable by everybody, regardless of any background in computing, and I think it probably achieves that goal—but I suspect somebody truly unfamiliar with everything covered would have to put in a substantial amount of work while reading.
Going through the book was a very pleasant experience. There was barely a chapter where I didn’t either
In other words: many, many “A-ha!” moments.
Not too long ago, I’ve read The Idea Factory about the history of Bell Labs, so the whole build-up around telegraphs and relays was a nice recap of the early parts of that book.
I particularly liked the relay computer with all the “selective lying” (or maybe just “omissions”) for pedagogic reasons: for example, Petzold shows how to build memory using relays, based on circuitry previously introduced—only to reveal in the end that that would be entirely unpractical to actually do. But the principles carry over without a problem when using transistors instead of relays, so all the understanding gained until the reveal is not lost.
The part about the popular microchips and their instruction sets had me dig through manuals online, and I can only imagine how much fun it must have been to tinker with that stuff at the time. In fact, being inspired to do something hands-on based on the book was a very common theme among the participants in the book club.
While researching a bit more about relay computers, I’ve found that a few people have built amazing machines and produced excellent documentation for them:
My main takeaway is the actual feeling of understanding how a computer works from the bottom up. While the technology described doesn’t get much more sophisticated than what PCs did in the early 80s, the principles haven’t fundamentally changed and still make a good foundation when taking a closer look at more recent developments. I often feel I get more out of what I read because of Code: articles describing the architecture of the M1 CPU make a lot more sense to me now, or reading about the boot sequence in the sysadmin tome I’m currently going through is much more understandable.
Apart from building physical stuff, I also feel like working with assembly code might be interesting. Now to find a useful project to do just that!
And for follow-up reading, Computer Systems: A Programmer’s Perspective is often recommended as a more in-depth treatise.