Code

I finished Code: The Hidden Language of Computer Hardware and Software by Charles Petzold this morning. I’ve been reading a chapter or two each morning for a while now. It does a great job of breaking down how a computer works, by explaining conceptually why humans created things like morse code, braille, binary, boolean logic, electromagnetic gates, the Jacquard loom (!), until we ended up combining a lot of those concepts and creating computers. Some of the middle chapters hurt my brain a bit: the jump from sending a signal down a diverted wire to light up a light bulb, to storing state in a loop, to computer RAM... it’s well explained, but if there was some planet-wide disaster tomorrow don’t expect me to start the first fabrication plant.

As someone who writes software but doesn’t have a CS or EE degree, and as someone who grew up mostly using computers with GUIs, this book filled in some of the gaps in my brain, like why hex values use the colors they use, how memory addresses work, how CPU frequency is determined and what it means, why the computers I used growing up gave you a choice between number of colors and resolution, why JavaScript is bad at math, the list goes on. There’s a one line note about Java, a language I generally despise, but after an entire chapter on languages communicating with machine code and operating systems communicating with hardware, I can appreciate Java and the JVM considerably more.

The book was published in 2000, and the later chapters move from the general to the specifics of the early days of Intel/Motorola and IBM/Windows/Macintosh, and it feels a little like opening a time capsule because of that. Petzold references Radio Shack as a place to buy computer parts, which made me intensely miss the feeling of browsing the bins at a Radio Shack. Steve Jobs and the Macintosh are mentioned in the context of managing hardware requirements to provide an entirely graphical operating system, an oft repeated story about the philosophical differences between Windows and Macs, but it’s interesting to think that in 2000 I had a Windows PC, and today my watch, phone, TV, the speaker closest to me, the tablet I’m writing this on, and the computer upstairs all run on variations of Apple operating systems built for Apple hardware.

Speaking of the, speaker, Petzold mentions the idea of virtual assistants late in the book, although not by that name:

Everybody knows from science fiction movies and television shows that computers of the future converse with their users in spoken English. Once a computer is equipped with hardware to digitally record and play back sound, everything else involved in this goal is a software problem.

The book ends on the theme that once you have the capacity to digitize things (numbers, text, music, movies, photos), everything becomes a software problem. There’s probably another book to be written here that once everything becomes a software problem, all software becomes a social problem. There’s exactly one paragraph on the internet, which serves to nicely tie the end of the book to the beginning (I won’t ruin it, read it yourself).

Also of note — the pronunciation of GIF: