Hacker News Re-Imagined

“Code” 2nd Edition

  • 1036 points
  • 25 days ago

  • @emme
  • Created a post

“Code” 2nd Edition


@muh_gradle 25 days

Replying to @emme 🎙

I am beyond excited. I have my worn out copy of the first edition perched near me. Petzold's Code is by far my favorite computer science and programming related book.

Reply


@wly_cdgr 25 days

Replying to @emme 🎙

Hell yeah. An absolute classic

Reply


@animesh 25 days

Replying to @emme 🎙

I majored in electronics (more than a decade ago) but always worked in software development. Does it still make sense to purchase it? I am eager to buy it, just need the push. :)

Reply


@mypastself 25 days

Replying to @emme 🎙

Great book. It might be time to replace my first edition hardcover. Looking forward to the follow-up blog post with the more detailed info on the updated content.

Reply


@Shorn 25 days

Replying to @emme 🎙

Charles Petzold has a blog? With an actual RSS feed?

I swear this is the first new blog I've added to my RSS feed reader in over a year.

Reply


@donohoe 24 days

Replying to @emme 🎙

If you'd like to support local independent book stores then you can pre-order it here:

https://bookshop.org/books/code-the-hidden-language-of-compu...

Its definitely a bit more more expensive (~$37 vs $32) than ordering it via links in post.

Reply


@bombcar 25 days

Replying to @emme 🎙

https://www.codehiddenlanguage.com/Chapter06/ is pretty cool - interactive diagrams including a kitten selector.

Reply


@systemvoltage 25 days

Replying to @emme 🎙

We need more people like Petzold in this world. The layers of abstraction are stacked so high that we need to provide a generalist view of what's going on. Some of these Jenga bricks need realignment and people to maintain them, sometimes to re-engineer those bricks to be stronger.

We can't just all sit at the top of the tower and wonder why is it behaving irratically! Please support by purchasing the book.

Reply


@destructuredObj 24 days

Replying to @emme 🎙

Happy to see a new edition! Great book, really helped remove a lot of the "well it's just dark magic" parts of how a computer works for me. Really can't recommend this enough to anyone who wants to truly understand how computer hardware and software works from bottom to top.

Reply


@stevoski 25 days

Replying to @emme 🎙

This book (1st edition, at least) is astonishing. Perhaps the best book for coders that I’ve ever read. I recommend it to all the HN crowd.

Reading it, I felt like I actually understood how computers worked, right down to the “electricity going through wires” level and lower, and how that builds up to if-then statements, etc, in a high-level language.

Reply


@halotrope 25 days

Replying to @emme 🎙

I got the first edition and it was transformative. Finally the connection between electricity, computers and modern communication was made. This all while being a fun-easy read. If it was not for this book I would never have started going down the rabbit hole of dabbling with ICs, Arduinos and (basic) electric circuitry.

As Alan Kay famously said "People who are really serious about software should make their own hardware". No need to develop a whole computer, just getting your hands dirty with more basic electronics than consumer hardware will make you a much more complete technician.

Reply


@jljljl 25 days

Replying to @emme 🎙

Love this book. Recommend pairing it with Nand2Tetris to get a good understanding of how Computers work:

https://www.nand2tetris.org/

Reply


@kristopolous 25 days

Replying to @emme 🎙

Great to see petzold still at it

Reply


@planckscnst 25 days

Replying to @emme 🎙

I recommend this to anyone learning about programming or computers. That's usually kids. Last year, I went back to ready it again and it started with a story about trying to communicate with your friend next door. I thought "oh, this story isn't really relatable to kids today - they all have phones".

So I'm really glad there is a second edition and I'm wondering if there is a new story.

Reply


@eterm 25 days

Replying to @emme 🎙

This is by far the best book I've read that really made computers click for me.

I think it's especially good for people like me who work in software development but don't have a computer science degree or background. Going from scratch and the very foundations of telegraphy all the way through to what opcodes really are and how code actually works in memory was an eye opener for better understanding what coding really is.

Reply


@peterkelly 25 days

Replying to @emme 🎙

One of the best computing books I've ever read. Looking forward to checking out the new edition.

Reply


@uwagar 25 days

Replying to @emme 🎙

the book that showed me what a pointer is.

there is a hair rising line in that book in italics! almost like in a horror book like exorcist or dracula.

'turn the book on its side. can you see it?, its counting'

hair raising stuff. thanks mr petzold.

Reply


@bluedino 25 days

Replying to @emme 🎙

My favorite Petzold book is 'Programming Windows 95'

Reply


@ultrasounder 25 days

Replying to @emme 🎙

Great. There goes my summer.:-) Essentially read this book with my 14 old Aspie and help him understand and appreciate Software and the hardware it runs on it. Thanks for posting this here.

Reply


@mtoddsmith 25 days

Replying to @emme 🎙

I love the antiquated ordering process. Wish I could just click buy from my iPhone or send crypto.

Reply


@scop 25 days

Replying to @emme 🎙

This book was absolutely essential when I was first sinking my teeth into software programming. Things that seemed either arbitrary or completely mysterious suddenly made sense now that I had a contextual understanding of how computers worked. Without having that knowledge, I think my career would have been vastly more difficult and frustrating.

While I understand many “get started programming” books/tutorials put an emphasis on getting coding asap, I really had to stop and learn about computers before I could start coding in a well rounded way (and that’s coming from a WebDev, who doesn’t even have to deal with low-level stuff too often!).

Thank you Mr. Petzold!!!

Reply


@kerv 25 days

Replying to @emme 🎙

I took a course like 10 years from Charles. He was amazing and I'm sure this book is just as amazing.

Reply


@bloppe 25 days

Replying to @emme 🎙

Lol "the hidden language of computer hardware and software" imagine calling Chinese a "hidden language" on an intro text book just because it's not immediately obvious how to speak it.

Reply


@scrollaway 25 days

Replying to @emme 🎙

Any suggestions on where to preorder this from Europe (Belgium)?

Reply


@ctur 25 days

Replying to @emme 🎙

The 1st edition of this book was very influential for a generation (or more) of engineers. I can't wait to see how it's evolved and what I learn reading a new edition through again.

Reply


@ryanar 25 days

Replying to @emme 🎙

Dangit I just got the first edition

Reply


@elnatro 24 days

Replying to @emme 🎙

Is this book useful for a 10-year-old-experience software engineer (I also studied Computer Science)? I usually see this book named as “worth it” but I don’t know if it is an introduction to computer science or it is really interesting for an experienced developer.

Reply


@tetek 24 days

Replying to @emme 🎙

One of my fav books about Computer Science, I always recommand it for begginers!

Reply


@fire 25 days

Replying to @emme 🎙

Is the microsoft press site actually decent? Is there anywhere else y'all would recommend picking this up from? Seems like Amazon doesn't offer a combination ebook+physical the way the microsoft site does.

Reply


@no-dr-onboard 25 days

Replying to @emme 🎙

My wife bought me this book when I was in college and I never found time to read it. The comments here make me want to crack it open and give it another swing. Thank you all.

Reply


@the_watcher 24 days

Replying to @emme 🎙

I’m definitely going to buy the new edition and excitedly re-read it, but it would have been deeply enjoyable if the second edition _only_ updated itself to dark mode. Could have been one of the rare actually funny April Fools Day announcements.

Reply


@layer8 25 days

Replying to @emme 🎙

From the TOC it reminds me of The Cartoon Guide to Computer Science, which I would still recommend: https://archive.org/details/TheCartoonGuideToComputerScience

Reply


@bmitc 25 days

Replying to @emme 🎙

I still need to get to the first edition copy I have, but now I think I'll wait to read it with the expanded bits on CPU architecture.

Reply


@jmconfuzeus 25 days

Replying to @emme 🎙

This is the book I used to teach myself basic CS back in 2010.

Reply


@user3939382 25 days

Replying to @emme 🎙

This is a very respected book. Famous. I’ve had my copy for several years. Never did read it.

Reply


@RcouF1uZ4gsC 25 days

Replying to @emme 🎙

>The iconic graphic still displays the letters CODE in Braille, Morse code, and ASCII.

All you have to do is add a '0' to the front of each ASCII sequence to make them 8 bits instead of 7 bits, and then they will be UTF-8 encoded.

Reply


@localhost 25 days

Replying to @emme 🎙

Code is my favorite technical book of all time [1]. Charles does an amazing job of building a computer up from basic principles "two young boys who want to communicate after their parents tell them to go to bed at night" all the way to modern (for 1999) computers. He layers abstraction on top of abstraction all the way to a working computer. My only (slight) disappointment in the book is that he tries to cover operating systems -> object oriented programming in a couple of chapters at the end. That could have been a multi-volume series in its own right.

It goes really well with Elements of Computing Systems (2nd ed) [2] which I kind of think of as a "lab manual" where you get to build a computer from first principles.

[1] https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

[2] https://www.amazon.com/Elements-Computing-Systems-second-Pri...

Reply


@toma_caliente 25 days

Replying to @emme 🎙

I have this book and have never read it. I may just wait for the second edition to release at this point

Reply


@netr0ute 25 days

Replying to @emme 🎙

Any way to get this on the Internet as a web page? It's ironic how this book covers some of the most advanced technologies in our age, yet gatekeeps it all behind plain old printed pages or a "watermarked ebook."

Reply


@dmitryminkovsky 25 days

Replying to @emme 🎙

Wow this is awesome. Code was an eye-opening book for me as a child. I have a 2 year old, and have been wondering whether he could possibly appreciate camera film ISO codes (an early example of "a code" in the book), given that he'll likely never see a roll of film, or other things like that. An updated edition is great news.

Reply


@srvmshr 24 days

Replying to @emme 🎙

Charles Petzold's other book, The Annotated Turing is also a great read.

Reply


@WalterBright 25 days

Replying to @emme 🎙

I suppose I came to understanding programming in an unusual way. I first knew a bit of BASIC and could write simple programs in it, how the computer actually worked was a baffling mystery.

My first semester in college, I took a class in semiconductor physics. That started with the PN junction, to diodes, to transistors, to gates, to flip-flops, to clocking, to registers, adders, etc.

Later on, this made learning microprocessors straightforward, then assembler, then C, etc.

I suppose it would have been faster to go straight to programming, but I am happier knowing how it works all the way down.

Reply


@endofreach 25 days

Replying to @emme 🎙

I have no idea how i ended up buying this book last year (haven‘t heard of it from anyone)… the best book i have read in recent years. Definitely the best tech book i have or will ever read (haven‘t even finished „code“ fully yet, lol).

Also: i found a book i always was too scared of starting to read (because i didn‘t want to feel like the biggest idiot trying to read it): „The Annotated Turing“. When i looked at it again after having read „Code“, i saw it was also written by Petzold. The way he wrote „code“ i know, that this will be great. I am very excited to read it when i have a few hours to fully block for it.

Reply


@jgwil2 25 days

Replying to @emme 🎙

Haha I like how the cover shifted to dark mode...

Reply


@Minor49er 25 days

Replying to @emme 🎙

This is great news. This book has been highly regarded for being able to explain the magic behind what makes a computer actually work. The new edition has about 70 pages of additional material.

There is also a companion website that is under construction that already has a delightful amount of interactivity, showing how binary switches, relays, and gates work:

https://www.codehiddenlanguage.com/

Reply


@morninglight 25 days

Replying to @emme 🎙

"Programming Windows" exposed the simplicity behind the Windows architecture. If you had even a smattering of C experience, Petzold could get you writing Windows applications the same day you opened his book. He triggered an explosion of software development.

There are excellent books for novice Linux programmers, but unfortunately, nothing compared to Petzold's clear and direct presentation.

.

Reply


@antiverse 25 days

Replying to @emme 🎙

Looking back it's really strange that nowhere in our CS/Soft Eng. curriculum is it covered exactly what is meant by the term "abstraction" when it comes to how a computer works. That it's all, after all, shuffling of electrons (underlying MOSFET chemistry notwithstanding) and signals is the missing link.

There's other books out there, and Ben Eater's website, that indepth show how to construct processor, gates, store "memory", and so on.

Reply


@xt00 25 days

Replying to @emme 🎙

Great book -- read it when I was a teenager -- but one thing that I think makes the book a bit harder to explain to smaller kids these days is the use of relays for explaining lots of things. Its a great concept to explain things but it does tend to cause a bit of confusing for younger kids who may not have played with electromagnets as much as kids from 20-30 years ago. Not sure what to replace relays with but maybe having kids watch a super easy to understand video about how relays work would help make the book easier to understand for say like an 8 year old reading the book.

Reply


@yumaikas 25 days

Replying to @emme 🎙

The first edition of this book was my introduction into how computers worked at a lower level. It gave me enough of a grounding in various concepts that I was able to understand much of a Digital Systems class.

It also partly inspired my first efforts at building a scientific calculator (which would never be quite finished).

I definitely recommend it for folks who want to build context on the lower levels of computers, as a start into understanding CPUs, binary/hex, and other parts of how we tricked sand into thinking with lighting.

Reply


@rramadass 22 days

Replying to @emme 🎙

Having read (and own) Charles Petzold's Programming Windows, Code and The Annotated Turing books, i can unequivocally state that he is a Master of Technical Writing. No fluff, precise but detailed and straight to the point. Modern authors can learn more than a lesson or two from his style of writing.

He needs to write more books, that is his Gift and Calling.

PS: Andrew Tanenbaum's Structured Computer Organization makes a very good followup to Code.

Reply


@benjaminclauss 25 days

Replying to @emme 🎙

would love a similar book for Networking up to the modern Internet

Reply


@yardie 25 days

Replying to @emme 🎙

I bought Code and Code Complete around the same time. And started reading Code before switching to Complete. And now I'm reminded I have the 1st Edition still sitting on my bookcase read about 1/3 the way through.

Reply


@runevault 24 days

Replying to @emme 🎙

I never did read this book, one of the bigger holes in my technology reading. I should use this as an excuse to finally pick it up and dive in, once the new edition arrives.

Reply


@kris-s 25 days

Replying to @emme 🎙

One of my all-time favorite works of non-fiction. Essential reading for software engineers.

Reply


@JonD23 25 days

Replying to @emme 🎙

I read the 1st edition while I was in high school. I knew I wanted to get into tech after reading that book. Many years later, I worked with Charles at Xamarin. For weeks after I joined, I thought of ways to get him to sign my book. One day I heard he was doing a book signing at an event, and I volunteered to go. He signed my book, "from bits to mobile", and now it lives on the top of my bookshelf.

Reply


@nightski 25 days

Replying to @emme 🎙

Bought it! I own the first one and it's just a fantastic book. I've shared it with family members to help them understand how computers work (more tech savvy ones at least). But yeah love this one.

Reply


@cyanf 25 days

Replying to @emme 🎙

I’m currently using the first edition to teach my young brother about computers.

We would read the book create a “clean room” implementation of a computer with Minecraft redstone.

It’s great fun! He was overjoyed when we got our first 1-bit memory cell.

Reply


About Us

site design / logo © 2022 Box Piper