Hacker News Comments on
The Elements of Computing Systems: Building a Modern Computer from First Principles
Hacker News Stories and CommentsAll the comments and stories posted to Hacker News that reference this book.
EoCS is a modern classic in computer science and engineering, I am very excited to see a second edition.
First edition on amazon: https://www.amazon.com/Elements-Computing-Systems-Building-P...
Second edition pre-order on amazon: https://www.amazon.com/Elements-Computing-Systems-second-Pri...
I don't think there's an easy answer to this question. Software engineers still don't know how to exactly or even efficiently communicate with each other. It's still an evolving field and process. In general, it is helpful to understand software development as a sub-field of systems theory and design, so any book that discusses systems should help one better understand software development.
In general, I do also echo some of the other comments. If you are helping to design the app, you shouldn't necessarily need to understand the implementation details. In my experience, clients, whether they be external or internal or colleagues, getting too involved into what they think the implementation should be is usually a disaster. It puts pressure on the system to conform to how they think it should be, which is usually not necessarily how it should be, and it basically adds unnecessary constraints. The real constraints should be what the software should do and specifications on that, including how the software is intended to be maintained and extended.
Some thoughts on some specific courses and books that I think would be helpful to better understand the goals of software development and design and ways to think about it all:
Programming for Everyone - An Introduction to Visual Programming Languages: https://www.edx.org/course/programming-for-everyone-an-intro...
I think this course should be taken by managers, designers, and even software engineers. The primary result is that you'll come out of it knowing state charts, which are an extension to state machines, and this will be very useful for thinking about software and organizing what the software should do. Handling state is one of the primary problems in software, and you might notice that all of the various paradigms (OOP, functional, imperative, actors, etc.) in computer programming relate to the various ways people think about handling state in a computing system.
How to Code: Simple Data and Complex Data:
These courses are taught by a designer of the Common Lisp language and based upon the excellent book How to Design Programs. It is essentially a language agnostic course that uses Racket to build up design paradigms that teaches you how to sort out your domain problem and designs into data and functions that operate on that data. The courses are part of a MicroMasters program, so if you really want to get into Java, that is taught in the follow-on courses.
Based upon your last comment, here are some book suggestions on how computers work:
Code: The Hidden Language of Computer Hardware and Software: https://www.amazon.com/Code-Language-Computer-Hardware-Softw...
The Pattern On The Stone: The Simple Ideas That Make Computers Work: https://www.amazon.com/Pattern-Stone-Computers-Science-Maste...
But How Do It Know? - The Basic Principles of Computers for Everyone: https://www.amazon.com/But-How-Know-Principles-Computers/dp/...
The Elements of Computing Systems: Building a Modern Computer from First Principles: https://www.amazon.com/Elements-Computing-Systems-Building-P...
If you want to do the lite version of this there is a book called “From NAND to Tetris” that is an instructional book for a similar class and walks through doing much of the same thing. It helped me connect the dots between “I know how a transistor works” and “I know how assembly language works” that I have never learned otherwise. Even if you just skim the book without doing the project you will likely learn some things.
The Elements of Computing Systems: Building a Modern Computer from First Principles https://www.amazon.com/dp/0262640686/ref=cm_sw_r_cp_api_i_yH...
⬐ amcvittyI’m doing this right now and it’s a lot of fun and very accessible.
I saw there’s a highly rated Coursera version too (I prefer books to videos so I haven’t looked at it)
Yeah, I guess it depends on what legacy you're willing to part from.
Something like https://www.amazon.com/Elements-Computing-Systems-Building-P... is not hard, but it's arguably a toy system.
IMO Project Oberon starts from the same principles and builds up to a productive enironment including text processing, a compiler, very basic hypertext, basic networking and hardware to run it on.
I'm also self taught, some books I feel have been really helpful to me:
Elements of Computing Systems
Writing and Interpreter in Go
One of my favorite books on subject is The Elements of Computing Systems: Building a Modern Computer from First Principles by Noam Nisan https://www.amazon.com/Elements-Computing-Systems-Building-P...
⬐ djangovmWould you say that this book is still relevant, now that it is 15 years old?⬐ jambutters⬐ dbishyes, its structured in a way that's very hands on⬐ dangIt's wonderfully relevant because it takes you through the basics and those are all still the same. Their simulator software was already old when I went through the book a few years ago, but I'm sure it still works fine.Agreed. I read through this on a recent vacation and even though i have a computer engineering degree, it was nice to get through the basics again and they have some fun exercises.
Check out the following:
The Elements of Computing Systems: Building a Modern Computer from First Principles
There is a book "The Elements of Computing Systems: Building a Modern Computer from First Principles" that is often called "From NAND to Tetris". This has you building a computer simulator from the ground up (NAND to Tetris). There is a website and a Cousera course. And a TED talk.
I highly recommend http://www.nand2tetris.org/ and the The Elements of Computing Systems book https://www.amazon.com/Elements-Computing-Systems-Building-P...
⬐ O_H_EThanks :)
This is really neat! Also if you want to learn to build a computer from scratch without hardware, just to learn how computers work, The Elements of Computing Systems is a great book to check out. It's used as a text in some CS programs but it is very readable and easy to follow and the software is free and online.
http://www.nand2tetris.org/ is the website for it.
⬐ 2OEH8eoCRoWorking through it as we speak. Computer is finished, doing assembler now.⬐ userbinatorI'd recommend Petzold's https://www.amazon.com/Code-Language-Computer-Hardware-Softw... too.⬐ Elissa343My mothers neighbour is working part time and averaging $9000 a month. I'm a single mum and just got my first paycheck for $6546! I still can't believe it. I tried it out cause I got really desperate and now I couldn't be happier. Heres what I do, •••••••••>> http://www.joinmate2.com
>"Part 2 didn't exist when I worked through the book and watched the Part 1 lectures a couple years ago, so presumably this is new."
Thanks for the confirmaton, I didn't remember seeing this either.
"The book, btw, is a masterpiece ..."
Agreed. The paper back is a nice format and reasonably priced for a technical book as well:
I think Implementing a 6502 is a good example for an architecture implementation. Since it has already been done in numerous NES emulation projects, A lot of us have a good understanding of the CPU. Plus it is the part of a history which many kids could relate to. The video game era and genesis of personal computing era was almost entirely based off of this single CPU. It isnt small but definitely a stepping stone towards understanding a modern CPU. anything lesser makes it just a toy. For a toy, I like the one described in "Elements of Computign systems" here https://www.amazon.com/Elements-Computing-Systems-Building-P...
⬐ RetricI would go with the Intel 4004 for historic reasons https://en.m.wikipedia.org/wiki/Intel_4004 or other 4bit CPU for simplicity. Latency is going to force any large scale CPU into toy category, but you can still do a lot even at a few kHz with a 4 bit CPU.⬐ tonyRobinson8 bit and 4 bit CPUs are horrible things to teach. By being 16 bits throughout you can do many high level things in one instruction. It also makes for an efficient FORTH implementation.
My choice for bottom-up book: The Elements of Computing Systems: Building a Modern Computer from First Principles https://www.amazon.com/Elements-Computing-Systems-Building-P...
⬐ impapplThis is also known as the "nand2tetris" course: http://www.nand2tetris.org/
Interesting. Anyone know if it's updated from ? Wonder if it'll just use the same Software. The book  was interesting.
⬐ iosephLooks like it's still the same course although with video lectures added⬐ guiambrosI finished it a couple of months ago. It uses the exact same structure and software as described in the book (HACK language, etc).
The included hands-on projects made it more fun and interesting. Basically you'll build a simple computer from the ground up, starting with flip-flops and going all the up up to ALU, memory and CPU.
The grader works well, so you can submit your code and it'll grade you in realtime. You can finish it in less than a month, if you have experience with electronics and Boolean logic.⬐ Patrick_DevineI've gone through the book and got as far as building the computer, writing the assembler and running some programs on it. Does the course go beyond this? I haven't built the virtual machine or written the compiler, but it looked like from the description of the course, they didn't do that either.⬐ dan1234According to the Nand2Tetris site, this is just part 1 and only covers chapters 1-6. Part 2 will cover chapters 7-12 but looks to be still in development.
I recommend the associated book to everyone who asks me about programming book recommendations. The book arrives, and you are shocked at how small it is, just a few hundred pages. If you follow all of the exercises, you get an understanding of how logic works inside of processors (logic gates, adders, etc.), how machine code drives them, how assembly maps to machine code, how a basic virtual machine language (like the JVM) can compile to assembly, then how a higher level language is designed and compiled to the VM.
After doing all of this, you make Tetris in the high level language. It's a badass book, super well-written, and what I consider an essential text.
⬐ anton_gogolevHaven't read the book you're recommending, but I feel it's more or less close to Code by Charles Petzold, which in itself is a fascinating read.⬐ lukeck⬐ mavelikaraI read both books a long time ago. My recollection is that Code spends more time building context and explaining why something works as it does. "Elements of Computing Systems" gives more detail on how to implement many of the same concepts in a simple way. Both are great books.⬐ GrumpyYoungManThe two are not at all similar. Petzold's "Code" is good but is aimed at non-technical readers while "The Elements of Computing Systems" is more or less a textbook that encapsulates a longitudinal slice of a 4-year computer engineering program, complete with exercises. It's really quite impressive in what it manages to cover (although the massive amount of material glossed over or omitted does make me wince).+1. This is also my default recommendation for people from other disciplines who want to get in to professional programing. This is a great intro to understanding how everything hangs together, before going on to learn the framework flavor of this month.⬐ josh-wraleThanks! I bought the book earlier today and am looking forward to it. One of the things I'm interested in is how to construct gate-level emulation in software. I saw a video about 6502 hardware emulation where the guy said his was half-cycle complete. Looking forward to understanding all of that.⬐ clevernickname⬐ Animats> I saw a video about 6502 hardware emulation where the guy said his was half-cycle complete. Looking forward to understanding all of that.
To give you a little head start on that, where many digital circuits are clocked (or make one step) on just the rising edge of a clock cycle (where it transitions from low-to-high), the 6502 clocks on both the rising and falling edges; certain parts (like the hardware that initiates a memory access) will fire on the rising edge, then the part that needed that information will fire on the rising edge half a cycle later (like making the ALU start adding the value that was just fetched from memory to the accumulator).
If you've ever heard someone say that a 6502 of one speed is roughly equivalent to a Z80 clocked at twice the speed, now you know why: the internal logic is essentially clocked twice as fast as the input clock.
 IIRC this isn't completely correct, and external memory is allowed to take up to 3/4ths of a cycle to perform a memory access to accommodate slower ROMs, but you get the idea.⬐ NarishmaIs the 6502 unique in working that way? If so, why didn't other processors use the same technique?⬐ vardump> If you've ever heard someone say that a 6502 of one speed is roughly equivalent to a Z80 clocked at twice the speed, now you know why: the internal logic is essentially clocked twice as fast as the input clock.
1 MHz 6502 is about as fast as 3 MHz Z80. Although your mileage my vary, some say up to 4 MHz Z80.Note that the book is from 2005.⬐ seibelj⬐ bhrgunathaThat makes absolutely no difference. Nothing about the fundamentals of computer systems has changed significantly in 30 years let alone 11The authors also created a course on Coursera  which is also worth a look. Although it only covers the first half of the book (up to Assembler Language.) The authors have promised part 2 but it hasn't been released yet.
>> "no one has time to learn everything" - especially at the beginning of their career.
I wish I had this book at the beginning of my career. http://www.amazon.com/Elements-Computing-Systems-Building-Pr.... Makes you design the hardware, then the software for that hardware.
Should not take more than 8 - 12 weeks with school work/day job.
Why not learn just one of these: - programming languages with different paradigms (Functional, Imperative, Logic etc) - Data structures and algorithms (implement a few in each paradigm) - Compilers - Digital electronics - Operating systems - Networking - Math for CS - Orthogonal: Art of debugging, collaboration, technical writing for documentation
Learning the fundamentals, becoming better at these will help one see through the 'stack of tons of languages, tools, frameworks' and yet be able to handle all of these with relative ease.
I wish 'Elements of Computing systems' were there when I started as a programmer.
Are you thinking of "The Elements of Computing Systems: Building a Modern Computer from First Principles" <http://www.amazon.com/Elements-Computing-Systems-Building-Pr... by Noam Nisan and Shimon Schocken?
⬐ johan_larsonThat's the one. Thanks!
This sounds similar to another book/course/project I've seen that was quite interesting to work through:
From NAND to TetrisBuilding a Modern Computer From First Principles
If this is something that tickle's your fancy, you should check out 'The Elements of Computing Systems' http://www.amazon.com/The-Elements-Computing-Systems-Princip....
it's free online and great, but I also enjoy my hard copy(it was like $20, so so so cheap for what it is)
edit: $30 I guess, still worth it.
⬐ AlupisGood free ebook for learning how a computer does what it does:
"Programming From The Ground Up"
Building a Modern Computer from First Principles: http://www.amazon.com/The-Elements-Computing-Systems-Princip...
good idea, I would buy two kinds of books 1) one which aggregates all the "How do I write an OS from scratch" info under links below into one coherent whole. and 2) a tutorial on how to build a domain-specific OS, say OS that only knows to run a web-server, or OS for FPGA or Raspberry Pi, or a mobile OS that knows messaging and nothing else
An adder in functional Verilog:
a + b
Best go with structural if you want to actually learn something. This book ( http://www.amazon.com/The-Elements-Computing-Systems-Princip... ) is very good and I think still stands as the best introduction to this type of stuff I've seen. It's also presented in a straight forward enough way that it's good enough self-study for anyone with some programming experience.
⬐ p1eskHere's a link to the course based on that book: http://www.nand2tetris.org/course.php
Note, however, that it does not use actual hardware, nor a real hardware description language - it's just a hardware simulator (this might be important for someone who's interested in FPGA per se).
I would also recommend The Elements of Computing Systems: Building a Modern Computer from First Principles
Not sure if this is the right direction or not. In different ways they are all, essentially, about programming...
⬐ dlfDitto on "Code." As a non-programmer learning to program, it was everything I needed to know to wrap my head around how everything actually works.⬐ syedkarimThis is absolutely the right direction--thanks! The one book on the list that might get kicked back is "Structure and Interpretation of Computer Programs". Too bad, since it's probably the most concrete. This is a great starting point, thanks again.
Look through this book, I graduated with a degree in ECE 5 years ago, and this book blew me away: http://www.amazon.com/Elements-Computing-Systems-Building-Pr...
The Elements of Computing Systems: Building a Modern Computer from First Principles
⬐ shawndumasOffical Site
----⬐ thisrodNote that "building" is used in a loose sense: the transistors and wires are simulated. It sounds good anyway.
It would be interesting to compare this to the last chapter of SICP, which also builds a simulated computer and compiler. Around 1980, the authors swapped their typewriters for soldering irons and built it for real.
> ... working knowledge of the inner workings of computers ...
I'm a big fan of 'The Elements of Computing Systems' - takes you from NAND gates to pong.
Get a copy of "The Elements of Computing Systems"
which will seriously take you from logic gate/chip design all the way to scripting languages and an implementation of tetris on a java-esque language/vm. Totally awesome!
You can download the simulation software which is used in the book here if you want to play w/ logic gates/HDL etc. more http://www1.idc.ac.il/tecs/
⬐ shawndumasfound a nice online one
A little known gem: The Elements of Computing Systems
This book takes you from logic gates to writing your own (extremely simple) virtual machine, programming language, etc. It's a bit fast paced and project based, but it'll run you through a very high level overview of the whole gamut.
I've heard good reports about "The elements of computing systems"
Theres a tech talk about the book:
A job that needs breadth: CIO.
If you want to develop knowledge in depth, this is a good place to start:
Buy the book, download the courseware for free, and learn how computers work from NAND gates up. Implement your own OO language on the hardware you've built and write your own OS in it. Then write games for the resulting system. This will put you ahead of most coders out there.
⬐ BushyMarkThe book looks awesome! Just ordered from Amazon! Thanks!