The Book That Every Programmer Should Read

No, it’s not Knuth’s “The Art of Programming”. I’m talking about quite an easy-to-read (compared to TAoP) book, which, in fact, does not require any engineering or mathematical background from the reader.

I am talking about C. Petzold’s “CODE”. It is a truly remarkable book about how computers work. Let me explain why I think this book is so awesome.

The book starts from the very beginning, from explaining what code is, bringing several examples, like Morse code and Braille’s system. It then goes on to explain how electricity works and how it can be used to represent information with binary codes.

In later chapters, Boolean algebra is explained and the author shows us how to build basic components of circuits (logic gates) with battery, wires and simple relays. Those are used later to build an 8-bit adder circuit and a RAM array. Eventually, the author describes a computer with a simple instruction set and random-access memory.

This book is so amazing because it shows how simple principles can be combined to create the basis of the complex modern technology. You should read it to (at least approximately) understand what really goes on behind all the loops, pointers, variables, jumps and complex data structures. It won’t give you insights about the inner workings of Intel’s processors, but you will understand the basic things which make that pile of plastic and metal do math, display pretty moving pictures and download pr0n from the internets. Which is very important.

P.S.

During my second year at the university we were taught a course which was called “Computer Architecture”. What we really did during that course can be summarized as (painful) memorization of 8086′s instructions and writing a few programs in freaking Turbo Assembler (the year was 2008, by the way).

If only instead of all that crap we were taught what was written in Petzold’s book, it would’ve been one of the most useful courses ever, because:

  • It would really be about computer architecture and not about memorizing instructions or writing programs for a painfully outdated compiler;
  • I would actually learn something.

That is all.

28 thoughts on “The Book That Every Programmer Should Read

  1. LiorZ

    Check out From “NAND to Tetris”, it’s a book that is actually a workshop in computer construction (a virtual env is supplied..) from simple AND/OR/NOT gates through a simple and very basic assembler, High level compiler and even Operating system and a game as a final project.

    Everything is implemented on top of the supplied virtual environment.

    Reply
    1. lewax00

      Funny, I had a class where both Code and that book were the required materials. Both great books by the way.

      Reply
  2. mjankowski

    well, maybe you should have attended frigging polish technical university ;)
    not only you’d learn how to drink like polish, but you’d also learn the very difference between risc and cisc architectures, code them both and see why risc is so cool. you’d learn how all those funky pieces work together, CPU, memory, kernel (and why mach is great).
    so when you pick a school for your kids consider sending them to Poland ;)

    Reply
    1. Andrew

      You don’t have to go to Poland for that. I learned all this stuff by not getting a CS degree. Instead study in the engineering department, my degree is in Computer Engineering, but the EE and Micro E courses taught it a well.

      Reply
    2. JB

      OR, you can come to an American university, and learn why the distinction between CISC and RISC architectures in increasingly meaningless, and how the whole issue is complicated both by the growth of size of traditionally RISC instruction sets and CISC internal instruction decoders/microcodings, and how the issue of pushing complexity into the compilers affects thing, and learn precisely how the Mach microkernel approach while interesting has important problems in real-world applications (user-facing operating systems, say, with interactive performance), and what compromises are likely to make it work in which applications (including why iOS/OS X no longer use pure microkernels architectures).

      Just kidding I am Polish too we rule (but I did go to an American university).

      Reply
  3. Relequestual

    If you find yourself with time to listen but not able to read (due to driving or train etc.), there is a fantastic series on how computers work (From the ground up, electronics level) and their evolution on a podcast called Security Now. I’m sure you can find it =]

    Reply
  4. Jake Speed

    These are are great books for understanding the technical aspects of what we do, but the mindset is as important I think.
    I remember reading “Hackers” by Steven Levy back in the early 80s.

    Reply
  5. Mike

    njankowski, but a lot of stuff you learn there is also terribly outdated and not relevant to current industry requirements. I bet half of the stuff you learn there, you won’t even remember after you graduate.

    I agree some of this stuff is important and very interesting, but also in some cases completely useless if you look from the perspective of working in the industry.

    Mixing basics of computing theory inclusing risc, sisc architectures (theory only, maybe very simple assembly) and focusing on current technologies that actually are used in the industry is a winning combination imho.

    Reply
  6. Pingback: Apps Are The New Channels « V E X E D

  7. Cal

    Never mind Polish universities… this was all first year stuff in my Scottish university CS education, so it’s appalling to hear that some students aren’t being taught this kind of thing until second year, if ever.

    Reply
  8. Thomas

    We also had a Computer Architecture course in University (Switzerland), where we used the Tanenbaum books (Structured Computer Organization, and Computer Networks, Operating Systems: Design and Implementation). They are awsome too!

    Reply
  9. Lekan

    This is the book I randomly stumbled upon in the library when I was young, and turned me on to working with computers. Hadn’t found anyone else who had ever read this until now. I fully endorse the recommendation!

    Reply
  10. Paul W. Homer

    Yes, it’s a great book that is well written. I read it a few years back and found it enlightening. It helped refresh issues I hadn’t thought about in years (decades :-) . My sense is that it was targeted at my generation (gen X), but I think it would be excellent for younger programmers to read to help fill in their understanding of what is happening underneath the current technologies.

    Out of curiosity, why were they teaching Turbo assembler in 2008? That was current tech at the end of the 80s, isn’t there something newer for assembler?

    Paul.

    Reply
    1. 10098 Post author

      Probably because the teacher was some 70-year old man, to whom TASM was apparently something “new”.

      Reply
  11. ambert ho

    It all depends on what you want in life.

    Like for example how engineers hate sales/marketing people, but at the end of the day sales guys are bringing in the money that pays the engineers’ salaries.

    If you need to work low level this is cool. Otherwise, up to you. Me – I like another poster come from a EE background and then went into software later so all this was just in my EE undergrad/grad curriculum.

    Reply
  12. fsilber

    I dislike the use of the word “code” to describe computer programs. To me, code is what you use to keep something secret — to record information in a manner that prevents other people from reading it, and what code-breakers try to defeat. This is indeed a good description of many computer programs, but I think programs written like that are bad programs.

    Reply
  13. Oscar Funes

    In my university (Guatemala), we are also taught Computer Architecture and we used a book written by M. Morris Mano. I enjoyed the book, but I’m considering reading this one.

    Reply
  14. Pingback: Living Cosmos » Blog Archive » The Book That Every Programmer Should Read � Online Hut

  15. Schwabe

    Huge thanks for the headsup on CODE. As a UI designer with an aspiration to make my designs functional software, I have been looking for material like this to help build a foundation for programming.

    Reply
  16. apothegmatically

    I blog quite often and I genuinely appreciate your information.

    This great article has really peaked my interest. I’m going to book mark your blog and keep checking for new information about once a week. I opted in for your RSS feed too.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>