Live data from Hacker News

“Code” 2nd Edition

charlespetzold.com

91–100 of 176 posts

Re: “Code” 2nd Edition

#91
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.

Re: “Code” 2nd Edition

#92

"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. .

This brings back fond memories. Charles thanked me in the Acknowledgements section of the first edition of Programming Windows as "the indefatigable Michael Geary."

I had spent many hours on BIX and CompuServe and maybe GEnie helping other Windows programmers get their start.

So I like to think that in a small way I contributed to Charles' success in educating a generation of Windows programmers.

Remember, friends, always pass it forward.

Re: “Code” 2nd Edition

#93

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 micr…

I also learned electronics first, but in a much more amateurish way. As a kid I loved electronics magazines and building projects from them. My dream was a Z-80 kit, but even much simpler kits were too expensive for me. I ended up making a make-believe computer with a few logic gates, decade counters and flip flops. That was my "computer", which taught me digital logic. Not a lot of power, but for a 10-11 old it could compute the stuff I wanted, and I eventually learned digital logic.

I never got the Z-80 kit but I eventually got a computer with DOS, which had QBasic, where I learned to code by modding GORILLA.BAS and NIBBLES.BAS. What a weird language, there was AND and OR, but not NOR, XOR, NAND and others...

Re: “Code” 2nd Edition

#94

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…

Right. Imagine a car. Now consider how it is abstracted to you. The wheel, the controls, the pedals. That's an abstraction of the complex system that is a car.

Re: “Code” 2nd Edition

#95
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.

Re: “Code” 2nd Edition

#96
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.

Re: “Code” 2nd Edition

#97

Earlier quoted context omitted.

The content is something we learn in universities, even deeper. I think it's good for self taught programmers

I can't tell whether I had an unusually good CS education, or if I'm missing something, but everything I see discussed in this thread as crucial insights taken from this book are things I recall being covered at least once in university, yeah. Perhaps it's just especially effective in its organization and ordering of fundamentals. Still, the praise it's getting makes me want to pick up a copy just to see if it can fi…

I think the difference is that this book in about 200 pages or so, starts from two boys using flashlights to attempt to "communicate" with each and goes through simple circuits to logic gates to CPU, ALU, volatile memory, rudiments of assembly language to a high level language. That's the difference, hand holding you through the explanations with the emphasis on pedagogy rather than being a dry theory book.

Re: “Code” 2nd Edition

#98

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 operat…

When the book “builds” a computer, I’m assuming that’s a virtual computer? If so, what language does it use?

If you're actually looking for something that does build to a virtual computer, Nand2Tetris (second edition of the book The Elements of Computing Systems that goes with it is now out) is a great companion to Code: https://www.nand2tetris.org/.

Code is more high level, Nand2Tetris and Elements is project based but covers some similar territory.

Re: “Code” 2nd Edition

#99
post #96

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.

I mean, if we somehow used Chinese every day without realizing it, then yeah that would be a fair analogy. Code is literally hidden from users.

Re: “Code” 2nd Edition

#100
post #68
post #22

Earlier quoted context omitted.

Uh, as someone with too many years of programming behind me to imagine that, can you mention some concrete things that you found arbitrary or completely mysterious, and that the booked cleared up for you? Thanks.

I often wonder: for someone with no understanding of how computers work; no idea about electricity and transistors, no idea about CPUs executing instructions, no idea about software and abstraction: what do they think about when they click a ‘play’ button in a music player, and the interface updates and music starts? Do they think about what is happening ‘inside’ the box? I think I do. I suspect I have a completely d…

I've asked very young students what they think a computer is and how it works. There's always at least one student who correctly replies: "It's a machine that does what someone told it to do".

Of course modern computing devices are absurdly complex and intricate machines all the way from silicon to software, but the basic mechanism is easily grasped by children. For all their complexity, computers are still just programmable calculators.

Post reply on HN