Book Review: Code

Code

Author(s)

Charles Petzold


My Rating

star star star star star

I spend so much time programming computers, yet I don’t understand what the small black box under my desk is really doing. I’d love to know, and I was hoping the Open University would teach me at some point. Alas, their computing curriculum is not going to so it’s time for more self-education.

I looked on Amazon, checked out a few Stack Overflow questions, and if I picked any other book than Code by Charlese Petzold I would be like the British Government ignoring Professor Nut’s advice about drugs because it is not what I wanted to hear.

Fortunately I had no hidden agenda, and did pick up a copy of code…. Does this bad boy live up to the hype, then?

What will this book teach me?

Code is an engaging adventure that takes you on a journey from the most primitive of computers, and the most primitive codes to a modern-day computer and how it uses binary, hexadecimal and Unicode. With every small step in technology improvements a full explanation is given of how the new technology works and why the old one is replaced.

In fact, the book begins with something so primitive it can’t even be called a computer – it is a set of flashlights operated in specific patterns by two people to commute across a street. As the book builds up the technology stack, the gradual evolution passes through Morse code to simple circuits of relays and transistors that can barely perform AND or OR operations.  It is these simple electronic circuits that begin to grow and perform more complex operations like NAND, XOR and eventually mathematical operations.

Gradually, concepts like memory (RAM) are introduced into the simple electronic circuits. By the time all of these concepts are used to form a computer, registers, L1 and L2 cache and machine/assembler have all been introduced and explained in great depth. All of this incorporated in a fashion that is aligned with the history of computing.

Codes like binary and hexadecimal are introduced in parallel with the hardware technologies. Counting systems, like base ten, are used as precursors to binary in a logical way that an average 7 year old would be able to understand and follow. Hexadecimal comes a bit later, and towards the end of the book ASCII and Unicode are introduced – all in similar logical patterns.

Petzold explains other essential components of a computer like input and output devices. He goes into full detail how a computer will put binary data into specific area of a monitor’s memory so it can show pretty colours on your screen. He goes into equally-deep detail explaining how a keyboard causes an interrupt – instructing the processor to stop working and receive the incoming data.

You won’t find as much depth in the last few chapters of the book that talk about programming languages, operating systems and graphical user interfaces. Although you will get a history of them, and I’m sure everybody will learn one or two things that make reading these chapters worthwhile.

How would it be better?

Back in 1999 when this book came out I’d have one less reason to complain about it. But in 2012 the book lacks 13 years of technological advances. For instance, it would be nice to have sections devoted 64 bit computing and SSDs.

And, whilst the book does have plenty of diagrams, I still felt there were places where an illustration or two would have added massive value to the learning experience.

Hot or not?

Anyone could read this book and learn about how computers work. As someone who works with computers, or a waitress in a restaurant who finds herself wondering how her computer works, this book would suit all of you people.

Personally, this book has taught me a lot of things that aren’t on the Open University’s computing curriculum and the high-level programming books I generally tend to read. I have no doubt in my mind, that every programmer who does not understand how a computer works is lacking important knowledge that will be useful at times in their career.

I give a massive thumbs-up to Charles Petzold for writing a book about computers, in an informal manner, that goes from relays and morse code to modern computers and binary in simple progressive steps.

You may also like...

The Imposter's Handbook

Lean Analytics

Designing Data-Intensive Applications

My Books

Designing Autonomous Teams and Services
Patterns, Principles and Practices of Domain-Driven Design