One of my favorite books of all time. It taught me how computers work from the ground up. Somewhat similar to nand2tetris: https://www.nand2tetris.org/book
I did the nand2tetris on Coursea, it's what started my passion for software, I was just tinkering and hacking before that, did that course and knew without a doubt it's what I want I want to dedicate myself to.
Sometimes I'm wondering whether this is the future, or whether we (as an industry teaching the next generation) are taking shortcuts that will hurt us in the long run.
Honest question. I don't have the answer or am insinuating anything.
What do I mean? Well, I also acquired all that knowledge, but through a formal university CS degree. Before starting my degree, I was also "just" tinkering and hacking. I had been "programming" for like a decade before that, different languages, solving some problems that I found interesting or practically useful. During my degree though, I got all the details. I had full courses on hardware (transistors and upwards, all the way to CPU architecture), on mathematical logic, on compilers, on programming language paradigms, on algorithms, on complexity theory, on formal methods, in-depth on C++, Java, Prolog, computer networks, databases, cryptography, real-time systems, statistics, and a few more. This also allows me to in-depth describe a "nand to tetris" process, but obviously my education has been much broader than that.
Was it necessary to take that 6-year degree? Would that have been equally well covered by a bunch of Coursera online classes and then a few years of work experience? I really don't know.
I have a small sample set of colleagues who are self-taught and though ambitious are sometimes lacking broader perspective and in-depth understanding of CS foundations (that includes my boss), and of colleagues who went through a similar degree and do have a similar perspective as me, some of them not really remembering what was taught (or not caring), so those samples go both ways. I don't really know anybody without a formal degree who has the full fundamentals groked though. That would let me to conclude that the degree is a good thing, but frankly my sample is too small to tell.
Just remember everything that has been formalized and condensed down into a course structure was an outcome on tinkering and hacking over longer timescale. Courses and curriculum gives you a condensed outlook that might give you an initial uplift, but in the longer run, its the true hacking spirit that in my opinion differentiates good software engineers from the rest.
If you want to say that on average a degree will give you stronger fundamentals, well, you are saying something obvious and clear as water.
But I don't think that having a degree implies that much either, that really depends on how one studies (to understand vs passing an exam). I've seen way too many software engineers who were absolutely clueless about software and engineering and even more computer science. In fact all of the worse devs I know have a degree, I came to the conclusion they signed up for whatever would give them the easiest good paying job.
Conversely the world has a lot of brilliant computer scientists and brilliant engineers who never entered university. Some are famous like Carmack, most you never heard about.
Having already obtained another degree (philosphy) and wanting to apply computer technologies to the humanities (which I later deviated from), I thought it would take too much time to do another degree in computer science. Nevertheless, I knew from my previous education, how important the fundamentals are. So over the years, I worked myself through many of the most important fundamental textbooks. Sometimes it was quite a rush (the textbook on Turing machines and Lambda calculus I read in 3 days); but here my goal was not to memorize everything, but to just understand each step in the thought process. There are still some areas I have not covered, because they have never been of much importance for my work and have not caught my interest otherwise (for example hardware beyond the bare basics). And some others, where I have some basic knowledge, but feel that I should learn more about (for example some mathematical concepts such as category theory or fuzzy sets). However, I have no idea how I would compare to you and your colleagues. I would reckon that it might be difficult to come to a definitive conclusion, because there are obviously some areas (as already mentioned), in which I lack the fundamentals, but others were I have deeper knowledge due to my philosophical training (in which I took a particular interest in logic, semiotics and the philosophy of language, among other things).
So yes: I agree that the fundamentels are extremly important. Not necessarily on the level of the individual (depending on her or his role), but for the field as a whole. For me personally the motivation to learn the fundamentals is not so much the need of a foundation to built on. Rather the opposite: When I want to do something, I start doing it and try to refine what I am doing in the process by going deeper and deeper.
> There are still some areas I have not covered, because they have never been of much importance for my work
I think that's a main difference. With a degree you tend to learn / get taught things upfront of which you don't know whether you'd ever need them, and you may not. You kind of trust, or hope, that what they teach you has some relevance and is useful.
Many subjects from courses I took during my degree I'd never have picked up "on the side" during my jobs that came after. But I can actually also confidently say that each and every course I took left some impressions/concepts in my head that later became useful in one way or the other. So for each course I took, had I not taken it, I'd be missing something. Of course there is opportunity cost: could I have used that time in some better way, i.e., even more efficiently? Not sure. There is also the question about the courses that I did not take because, well, there is only so much space you can cram courses into within 6 years :) but maybe there are diminishing returns as well, since many things tend to overlap.
I would say that the difference for me was that I already had a more specific plan of what I wanted to achieve, so it was easier to focus on the more useful fundamentals. And even in computer sience itself, it is not set in stone what the fundamentals are that should be covered in 6 years. The field has become so specialised that many new courses have emerged in recent years, such as bioinformatics or humanities computing. The latter is now branching out into subfields, because what an archeologist needs (digital maps, 3D models, image processing) is very different from what a philologist or archivist needs (text encoding, long term storage, information management). And wat makes humanities computing particularly difficult is that it requires a deep understanding of fields that are very far appart and hardly overlap. Think of it like this: Normally you train an historian for 6 years and a computer scientist for 6 years. What should a curricilum for both look like in a time frame of 6 years?
I think the most important benefit of a university degree is not so much what specific fundamentals you are trained in, but that you get an idea of what it really means to know the fundamentals of a subject and how to get there. Later in your career, you can then use these strategies to deepen your understanding of everything that comes your way. Of course, it is easier if your education roughly matches what you will find on the job. But you never know what aspects of your training might help you later on. In my case, I would say that the many difficult debates and deep essays in philosophy prepared me much better than probably computer science might when it came to working out a plan for a software module with others and writing an accurate specification.
As a self taught dev, I can confirm that observation. I did not spend six years of my life studying all those details that, though not crucial to my day job building a JS Frontend, might sometimes help with the big picture decisions. And I am fully aware of all the things I don’t know.
Would I like to study those details? You bet. But I came to that realization in my late thirties, after having changed careers twice, kids, marriage, the whole nine yards. I have responsibilities and am lacking the time and free headspace to sit down and study.
So a course on coursera or Udemy or whatever it is. And little by little I am patching my CS knowledge. Will it ever be as complete as that of someone who started programming in their teens and went straight for the degree? Definitely not. So I agree, if you have the luck and the opportunity to be in the situation to have a chance for a degree and take it, it’s a good thing.
At the same time, I think that it is a good thing that software development/ working with computers in some shape or form is open to people from many backgrounds, similar to the creative fields, because kn the end it is important that you can do your job, not necessarily how you acquired those skills.
Because it enriches the industry. Bringing all kinds of life experiences to the table is a good thing. It is a team sport after all. And T-shaped isn’t limited to software skills.
E.g. I might not have studied CS, but having taught adults in foreign languages for years gives me presentational and pedagogical skills that help me explain the things I do know to our junior devs, because I know how learning processes work.
So I would encourage a more optimistic view on the situation. Not asking what are your colleagues lacking, but asking what else do they know? What did they do, while you were studying CS.
I think CS degree is good but such courses are also great and more affordable when it comes to time required and accessible to younger audience. I would love to know this book existed when I was 12 years old.
Most programming doesn't require that much math. I had all that you mention in my 3.5 year degree but most of it was math that is not needed/practical for most of work and individuals.
Really really don't worry about it. One is not a precondition for the other.
"Code" is fascinating for talking about the history and the "Why", while N2T is excellent for giving you the hands-on practice at building one yourself.
I am hoping someone here can recall the name of the book that got me interested in computers and Computer Science. It was a Microsoft Press book that taught fundamentals of computing. The book started with discussing relay switches, and progressed to how one could build computational units using them. This book was available at my local public library in the mid 90’s.
I had a very similar experience. I read the book from the library as a kid. I originally thought it was to do with ciphers, as I was into codes then. It introduced me to the programming section of the library, and I expanded to the math section from there. A couple of STEM degrees later and here I am.
Sounds amazing. Big fan of his writing style, have two of his books: "Code" and "The Annotated Turing".
I'd be curious to learn about his work habits - have they changed over the years? Has he experienced any procrastination during his career and how he dealt with it? Any advice to those who got bored by the challenges of the modern software industry?
I'm really interested about his work habits as well - added your questions to my list. Right now I'm procrastinating editing my podcast by reading HN :)
Do you have any questions about The Annotated Turing? For me, I'm really interested in the story behind why he wrote it. As he writes in the introduction:
"Turing's original motivation in writing this paper was to solve a problem formulated by German mathematician David Hilbert ..."
I want to know Petzold's motivation for writing this. I know there's a story behind there somewhere especially given how long it took him to write the book :)
Given how old is Turing's paper and how much it was 'dissected' for the book, I would ask the following:
* Any other top papers that inspired Charles (or he found them worthy of serious deep dive)?
* Does he still read modern papers?
The latter is particularly interesting. I don't have academic background, but some of the people I spoke to claimed that there's lots of subpar papers produced nowadays. Obviously, amount produced in every field significantly increased lately, so it would be interesting to learn how someone with decades of experience is able to filter that out.
Yes, his book Programming Windows was what took me from hopeless newbie to half decent self taught dev while I was still in my teens. Taught me loads that I still find use for to this day in my career (which involves a lot of Windows development).
I wonder if he gets nostalgic for that era of programming, and what stack he would choose if he was writing a Windows app today.
Sadly, that's an area that he doesn't want to talk about. Not really sure why, but it makes me wonder what the story behind that stance is, and if I can get him to talk about it.
Ah, that's unfortunate. My (wild, speculative) guess is that he's left that part of his career behind, after he was burned by the Windows team dropping the ball on native development multiple times.
Not sure if asking about his take on AI will lead anywhere though as that's not really his thing. But I'll explore the area when we talk about Turing (his other book is the Annotated Turing) a bit to see if there's something on the other side that I didn't know about.
Similarly: is an audiobook planned? Frequently on reddit people ask for recommendations of audiobooks to listen to while commuting, and I realize this one is rather image-heavy, but I do believe a lot of it could be conveyed in an audio format, and it would make for fantastic listening.
How he sees the current dictomy of Windows development, where we kind of have two worlds (.NET and C++), where not every business unit seems to drive into the same direction, many of which even competing on the same space with different stacks.
To a large extent, I'd be interested in his thoughts about being open with Code. I'm an immigrant, and I'd love to do it with my kid. I'd need to have access to text, and run it through a translator to do that. I'm glad to pay the purchase fee, but a DRM'ed book is less than helpful.
There are a lot of tools like nandgame which would integrate well....
Same thing for adaptations for school curricula, afterschool clubs, etc....
I'm not sure the right solution here, but it'd be awesome if there were some way to build from his work for specific contexts.
I don't know about other stores (like the Microsoft Press store), but Code is DRM-free on InformIT, in Epub, PDF, and MOBI-- I actually don't think they sell any DRMed eBooks (they personalize and watermark each copy to discourage sharing, but are otherwise unprotected).
This is a really interesting area to explore - thanks for suggesting it! I think that there are quite a few authors who have shown that there is a market for the book as well as for an open source "edition" of the book. My favorite from the past was Philip and Alex's Guide to Web Publishing [1] and perhaps more recent is the very complimentary NAND To Tetris [2]
I would imagine that the hard part is dealing with the publisher and getting them on board with it as well. Added to my list!
Thanks for that example. I had no idea that SICP was now available for free on the web! Do you remember where you heard the story about convincing MIT Press and the outcome? I took a look but couldn't find it.
That might come in handy if this winds up going somewhere.
I can guarantee the author will not be offended with either a phone call or by someone dropping by. On the other hand, he's less often in the office post-COVID, so it might take a few tries.
Hal probably knows the story better, but he's a bit less drop-in-able. Jerry is super-friendly. (Hal is friendly too, but more random contacts go to /dev/null)
Dropping by would be harder to do, but a dream interview would be to put him in a room with Guido van Rossum to talk about Python and SICP.
I now need to get over my irrational fear of cold calling someone I don't know already (heck, I don't even do that with people that I do know - it's always "what's a good time to call"?)
Jerry and Guido? I think the conversation might be less interesting than you might hope for. SICP is 1984, almost four decades ago now.
If you wanted to talk about robust programming, quantum gravity, differential geometry, education, or a slew of other topics....
As a footnote, I love Python, but someone like Jerry outclasses Guido intellectually. Guido really only did one thing, which is Python. Jerry has done dozens of things.
It's a great thing that Guido has managed to do that one thing - the world would be poorer without it. It's also a great thing that Jerry has done dozens of things - the world would be poorer without them. I see those accomplishments as complementary.
I think you misunderstand my motivations for putting the two of them in the same room. If there's one thing that I've learned over my years in this world, it's that the magic happens between people, not within any one person's mind. There are three "people" in my scenario - Guido, Jerry, and the audience. Somewhere in that conversation, an idea might be sparked.
... well, it has to be the right people. Perhaps it's worth a try, but I'm not sure there would be a spark like that.
If you put Isaac Newton in the same room as George Washington, it'd be two brilliant people, but I'm not sure they'd have much to talk about. They think about different problems.
What might be interesting, come to think of it, would be a Chat Roulette, but populated with these sorts of folks.
I understand what you're trying to go for, but you're treating people like the equivalent of a particle accelerator hoping that by smashing them together at sufficient velocity... that something will come of it.
In practice I find this rarely to be the case unless you as the facilitator are also commensurately cognitively capable (say that three times fast), otherwise you're sort of placing an excessively undue amount of pressure on them.
I see there's a website for Code with interactive examples (in another thread), I wonder if he has a perspective on using interactive games for teaching this kind of "build a computer from logic gates" material. Examples are the recent "Turing Complete", goes back at least to Rocky's Boots on the Apple II.
Has he seen any of these he thought were effective, does he think it's a useful approach?
Turing Complete is quite rough around the edges (still in early access), but it's very ambitious. In my opinion these don't tend to succeed well as games, even puzzle games. The steps they need to take you through can feel very arbitrary and dull, they tend to bog down in wire routing, and they can be very difficult if you don't know the relevant digital logic already (and boring if you do, or if the game tutorializes it heavily). I'd prefer something that more rapidly ascends in abstraction, embedded in a context where it's natural for players to puzzle out the solutions themselves, e.g. how embodied and gamelike Rocky's Boots was, even if it didn't go far in building up anything complex.
I’d like to know how did he get such deep knowledge of the foundations of computing and how he developed the talent for explaining complex topics in a simple way.
This will be a core part of what we'll be talking about. I continue to be amazed by people who can explain complex topics simply and Charles is near the top of my list of people who can do this well. Feynmann and Dave Cutler (if you can, find a copy of his NT kernel spec doc) are on that list too.
That's cool! Do you mind sharing the course/school? It would be a nice thing to share with Charles to show the impact that his work has on the world (even though I'm pretty sure he knows - it's always nice to be reminded of it!)
> What decides whether a follow-up counts as same-ish? Whether or not it contains significant new information (SNI), meaning whether or not there is enough new information to support an interestingly different discussion.
Prior post was the announcement of the upcoming release, this is the announcement of the release. So not quite a dupe, and probably worth noting now that it is actually available (and available earlier than anticipated).
Well, a major difference here is that 2 months ago this edition was not available. Today it is and people can go online and purchase it and read it (I'm already through chapter 3 of it). Without this post, I, for one, would not have known that I could go online now to read it and would have been waiting for my preorder. And since it's a rainy Sunday this is a great time for me to get some reading in since yard work is out.
a major difference here is that 2 months ago this edition was not available.
That doesn't change the kind of discussion that takes place which is why it's usually the pre-announcements that get downweighted.
Without this post, I, for one, would not have known that I could go online now to read it
Sure but that is at best, a tertiary purpose of HN. Something is always new to someone, relevant to someone, etc. The dupiness or most other on-topic-ness criteria can't really work on that basis.
What is going on with Amazon's listing for the preorder? Seems like it's been hijacked by a vendor with terrible ratings offering the unreleased book at a high markup, with no way to preorder from Amazon at the correct price.
Same. Although I nearly thought I was scammed when I saw the charge on my credit card because I had completely forgotten about it. That and the charge comes from AWL*PEARSON. But then I got an email telling me it shipped, I put 2 and 2 together, then the book arrived a whole day earlier than estimated.
I pre-ordered using MS Press as well - you get the ebooks/PDF for free (instant download while you wait for the dead tree version to arrive) when you order the hard copy and ebook bundle.
I received the same thing. I cancelled it and ordered on the Microsoft Press store, where there's currently a discount that makes the book cheaper than Amazon. Somewhat unusual, that.
I enrolled in a computer graphics sequence in my last year of college. It was a graduate level course and didn't meet the minimum requirements. I talked to the professor and he said I could try the course and gave me some topics to brush up on.
One topic was Windows programming. I got Petzold's Programing Windows book and nearly read it cover to cover on my break, going page by page and running and reviewing the sample programs provided. I learned a lot about Windows programming and really enjoyed the read.
Topics like this can be written in a dull way, but Petzold managed to present it in a way that was enjoyable to read and easy to understand. I think that says a lot about the quality of the writing because some Windows programming details are pretty arcane!
> One topic was Windows programming. I got Petzold's Programing Windows book and nearly read it cover to cover on my break, going page by page and running and reviewing the sample programs provided. I learned a lot about Windows programming and really enjoyed the read.
I stopped writing Windows programs when Petzold stopped doing new editions of "Programming Windows". I'm not actually sure whether or not what was covered in his last one, Windows 8 using C# and XAML, still works on Windows 10 and 11, or if it does whether or not that is all you need.
It makes sense why he would write a book about C#/XAML because these days, it's probably the tool that most developers are going to be using. Back with the 5th edition came out, writing in C or C++ was really the only option for many kinds of apps.
A lot of the fundamentals covered in 5th edition is still relevant today, but it's probably easier just to look it up online.
Are there any forums entirely dedicated to this book or at least 1st ed of this book? Where users could answer each other's technical questions, ask them, get help from other users or smth? If there are none, it would be cool to create something like it. I believe that the information contained in this book is almost unparalleled, the author has done a tremendous job.
One of my favorite computer books of all time, along with Stephenson's "In the Beginning... Was the Command Line." Happy to see a second edition, bought a copy for my kids to read and also to support Petzold.
This is really awesome, especially as I’m a visual learner this is really my style. I’m going to read the available chapters before opening up Computer Networking a Top Down Approach. I’d love to follow along for updates so I’ll be putting my email in. I will gladly buy a print copy when that’s available.
I've always wanted to write a book and this would be an interesting idea ;) There's definitely a lot of cool history to cover (donno if Code covers a lot of history, haven't read it)
I just purchased this and downloaded the accompanying Wireshark labs. Looking forward to diving in although I’ll probably want to read Code first. Maybe I can do them side by side?
Does it make sense to read this book if I have taken the whole Bachelors course in computer science? I mean does it offer anything new if you gave read about transistors, logic gates, microprocessors and all that stuff? Who is it geared for?
I found it very engaging and entertaining and it really tied together how we get from the very basic building blocks to a computer that can do something useful. As to whether it will be actually educational, it sounds like maybe it won't be for you, but it might be a nice refresher depending on when you were last in school.
Many CS programs just barely touch on the lower level stuff so this is widely relevant to many in the industry. Its also an easy enough read that even if you have no background, you can follow along and get an understanding of how a computer works.
I’m much less of a read than I wanted to, but this was a book I read from cover to cover almost nonstop on a xmas/new year holiday. Remarkably accessible and dense.
“I’ll discuss the differences between the two editions in detail in a future blog entry. The short explanation is that I go much deeper into the workings of a CPU using the Intel 8080 as a simple example”
I’ll buy for the 70 pages or so on the 8080, for sure.
I woke up this morning to an email from Amazon asking me to confirm if I still wanted this book because it's been delayed in shipping. Weird I got this the day it was officially released considering I preordered it beginning of June...
Code is more of a pop-sci book. It's in-depth, but suitable for a motivated layperson. It covers a bit of information theoretic content on code (encoding) and the physical layer of digital logic, in particular. CS:APP is a programming textbook complete with programming exercises. They aren't directly comparable.
If someone buys the Kindle version, can you let us know how the formatting looks with all of its diagrams and code?
To get the PDF version I tried buying the e-book collection from InformIT, but Pearson (that runs the InformIT and Microsoft stores) no longer takes orders from people using a "@fastmail.com" e-mail.
> Those problems would probably have been easy to fix, but there existed another aspect of the first edition that continued to bother me. I wanted to show the workings of an actual CPU—the central processing unit that forms the brain, heart, and soul of a computer—but the first edition didn’t quite make it. I felt that I had gotten close to this crucial breakthrough but then I had given up. Readers didn’t seem to complain, but to me it was a glaring flaw.
> That deficiency has been corrected in this second edition. That’s why it’s some 70 pages longer. Yes, it’s a longer journey, but if you come along with me through the pages of this second edition, we shall dive much deeper into the internals of the CPU. Whether this will be a more pleasurable experience for you or not, I do not know. If you feel like you’re going to drown, please come up for air. But if you make it through Chapter 24, you should feel quite proud, and you’ll be pleased to know that the remainder of the book is a breeze.
So yes, some significant difference there, but maybe not worth a repurchase unless you just want it for your library or specifically want to read his take on that material.
I just pre-ordered a copy. The first edition was on my reading list for some time now, but there was always something else to read. Now seems like a good opportunity to change that :)
You know it’s funny how you can buy the previous edition of most university textbooks for $5 on eBay but the latest edition often with an annoying introduction costs you a cool Grant. I built myself a huge library of about 70 textbooks sitting in my closet, most of them totally unused. Often I’ll search for the most expensive book on a topic on Amazon and go get it on eBay w free shipping for five bucks
Sell prior editions of textbooks using Amazon FBA. Surprisingly a lot of Prime members buy them at decent prices - - even in some cases two editions prior. For a few years every time my library had a book sale, I'd find plenty of them for about $4 each. The hope was to sell them for $20 or more.
Figuring out which ones would sell was a bit of an art, though.
that name stroke a few chords for me as his "programming windows fifth edition" was what I used to create essentially an oscilloscope in a windows app getting the data from a ISA data acquisition card with analog and digital inputs, 20something years ago...
Fair warning to all: the watermark on the epub purchased from the publisher is pretty obnoxious. On Apple Books it floats over every page and in some cases covers actual text.
I’m sure this is software related, and I’m on the iPadOS 16 beta, so it may be less of an issue for others. On my phone it folds into the header and truncates, but on the iPad it is super obnoxious.
I'll buy an ebook but read a copy from LibGen because that version doesn't have my email address as the first sentence of every page. It's hard to read books instead of doing something more entertaining, this minor annoyance doesn't help.
Update: the most recent iPadOS beta has improved this drastically. The watermark now sits in the notification area at the top of the screen and is relatively unobtrusive.
Wait for someone to give it to you for some holiday?
If you're fine with a digital option, Archive.org often has scans of books you can either download locally or temporarily "check out" to read on their site like a library (they back it with a physical copy). Seems like they have a scanned version of the first edition.
I also think everyone should know about Sci-Hub/LibGen/MagzDB whether they use those sites or not; most everyone on the internet is seconds away from a resurrected Library of Alexandria and can access tons of scientific papers, books (and textbooks), and magazines, and this is a great thing. They don't have everything, but still there's tons. Looks like the epub for this version is already up.
If your employer or school offers the O'Reilly Library (or is willing to pay for it as part of your training budget), it's located there. Which is where I've started reading it while I wait for my preorder to arrive.
If you drop me your email, i'll contact you to mail you my first edition when the new edition arrives. I don't need both, and don't want you to miss out. Easily my favorite CompSci related book.
Looks like you can get the first edition for ~$20 on Ebay and ThriftBooks. Not sure if that's still out of your price range, but it's an option if it is. Books are a lot like cars in terms of deprecation in my experience. Not always, but you can usually get a nice big discount buying used. Not as much with software books, but still a decent discount.