HN Academy

The best online courses of Hacker News.

Hacker News Comments on
coursera.org/learn/nand2tetris2

Coursera · Offered by Hebrew University of Jerusalem · 154 HN points · 10 HN comments

HN Academy has aggregated all Hacker News stories and comments that mention Coursera's "" from Offered by Hebrew University of Jerusalem.
Course Description

In this project-centered course you will build a modern software hierarchy, designed to enable the translation and execution of object-based, high-level languages on a bare-bone computer hardware platform. In particular, you will implement a virtual machine and a compiler for a simple, Java-like programming language, and you will develop a basic operating system that closes gaps between the high-level language and the underlying hardware platform. In the process, you will gain a deep, hands-on understanding of numerous topics in applied computer science, e.g. stack processing, parsing, code generation, and classical algorithms and data structures for memory management, vector graphics, input-output handling, and various other topics that lie at the very core of every modern computer system.

This is a self-contained course: all the knowledge necessary to succeed in the course and build the various systems will be given as part of the learning experience. The only prerequisite is knowledge of programming at the level acquired in introduction to computer science courses. All the software tools and materials that are necessary to complete the course will be supplied freely after you enrol in the course.

This course is accompanied by the textbook "The Elements of Computing Systems" (Nisan and Schocken, MIT Press). While not required for taking the course, the book provides a convenient coverage of all the course topics. The book is available in either hardcopy or ebook form, and MIT Press is offering a 30% discount off the cover price by using the discount code MNTT30 at https://mitpress.mit.edu/books/elements-computing-systems.

The course consists of six modules, each comprising a series of video lectures, and a project. You will need about 2-3 hours to watch each module's lectures, and about 15 hours to complete each one of the six projects. The course can be completed in six weeks, but you are welcome to take it at your own pace. You can watch a TED talk about this course by Googling "nand2tetris TED talk".

*About Project-Centered Courses: Project-centered courses are designed to help you complete a personally meaningful real-world project, with your instructor and a community of learners with similar goals providing guidance and suggestions along the way. By actively applying new concepts as you learn, you’ll master the course content more efficiently; you’ll also get a head start on using the skills you gain to make positive changes in your life and career. When you complete the course, you’ll have a finished project that you’ll be proud to use and share.

HN Academy Rankings
  • Ranked #7 this year (2024) · view
  • Ranked #15 all time · view
Provider Info
This course is offered by Offered by Hebrew University of Jerusalem on the Coursera platform.
HN Academy may receive a referral commission when you make purchases on sites after clicking through links on this page. Most courses are available for free with the option to purchase a completion certificate.
See also: all Reddit discussions that mention this course at reddsera.com.

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this url.
> Thus, I am interested in some resources to learn/re-learn more about CS, everything from foundational concepts to more practical (e.g. how does a computer work at the hardware level).

For information on how the computer works at hardware level and how software interacts with it, following two free courses will help:

https://www.coursera.org/learn/build-a-computer

https://www.coursera.org/learn/nand2tetris2

As you have background in mathematics, any book on algorithms will be an easy read for you. For data-structures the free https://opendatastructures.org book should suffice.

For languages, if you have mathematics background, then start with functional programming e.g. Haskell, Clojure. And also start with Python.

That is all it is to CS ;)

For domain specific, then you will have to look at specific text or courses e.g. machine learning, graphics, databases, distributed systems, operating systems etc.

* How to Code: Simple Data and How to Code: Complex Data on edX. Taught by Gregor Kiczales, of Common Lisp and CLOS fame. Uses Racket and graphical programs to teach.

https://www.edx.org/course/how-to-code-simple-data

https://www.edx.org/course/how-to-code-complex-data

* The From Nand to Teris project, The Elements of Computing Systems: Building a Modern Computer from First Principles book, and/or Coursera course. Builds a hardware stack for a CPU and then a software stack (assembler, VM, high-level language).

https://www.nand2tetris.org/

https://www.coursera.org/learn/build-a-computer

https://www.coursera.org/learn/nand2tetris2

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

* The How to Design Programs book. What the edX course above is based upon.

https://htdp.org/

https://www.amazon.com/How-Design-Programs-Introduction-Prog...

* Structure and Interpretation of Computer Programs (SICP). Uses Scheme. One can use Racket with the `#lang sicp` language.

https://mitpress.mit.edu/sites/default/files/sicp/index.html

https://www.amazon.com/Structure-Interpretation-Computer-Pro...

YouTube playlist of the course by the authors: https://youtube.com/playlist?list=PLE18841CABEA24090

* Thinking as Computation: A First Course. Uses Prolog to solve problems of thinking.

https://www.amazon.com/Thinking-Computation-First-Course-Pre...

https://www.cs.toronto.edu/~hector/PublicTCSlides.pdf

* Turtle Geometry: The Computer as a Medium for Exploring Mathematics (shares an author with SICP). Uses Logo to explore turtle geometry/graphics. Can use any modern Logo implementation.

https://www.amazon.com/Turtle-Geometry-Mathematics-Artificia...

https://direct.mit.edu/books/book/4663/Turtle-GeometryThe-Co...

* Starting Forth. Uses Forth.

https://www.forth.com/starting-forth/

https://www.amazon.com/Starting-Forth-Leo-Brodie-ebook/dp/B0...

* Learning Processing: A Beginner's Guide to Programming Images, Animation, and Interaction and also The Nature of Code: Simulating Natural Systems with Processing. Uses Processing and p5.js (the JavaScript version of Processing).

http://learningprocessing.com/

https://natureofcode.com/

https://www.amazon.com/Learning-Processing-Beginners-Program...

https://www.amazon.com/Nature-Code-Simulating-Natural-Proces...

The author's YouTube channel: https://youtube.com/c/TheCodingTrain

https://processing.org/

If you want pacing & support for Nand2Tetris, Coursera has it split into two courses. I've done the first from NAND gates to a working CUP & assembler and can testify it's worthy. Coursera loves to have content sales, so if you're not in a rush you can pick it up for cheap and have their (petty yet ego boosting) certificate of completion to read over one morning with you Cheerios (and then put away in a drawer to be forgotten). Here's the two links:

Part I - https://www.coursera.org/learn/build-a-computer Part II - https://www.coursera.org/learn/nand2tetris2

Some day I hope to pick up Part II, but Part I was still a lot of fun!

Course is available for free on Coursera:

Part 1 - https://www.coursera.org/learn/build-a-computer (hardware projects/chapters 1-6)

Part 2 - https://www.coursera.org/learn/nand2tetris2 (software projects/chapters 7-12)

mikevm
Do the lectures offer anything on top of just reading the book?
bmitc
The downside is that part two is the software stack and the software grader only supports Python and Java.
rbanffy
It's reasonable to support one great programming language along with Java, which is kind of a market standard.
bmitc
I didn’t say it wasn’t reasonable, but it is a downside for those wanting to do something different.

I’d prefer they tested emitted code, that way you can use anything you want.

rbanffy
They'd need to maintain trusted sandboxed environments for every supported compiler/interpreter. That's a lot of work.
fantod
Not when I took it! I did most of those assignments in Haskell (a choice I came to regret). Double-checking and it seems the grader supports the following languages: C, C++, C#, Elixir, Erlang, Go, Haskell, Java, Lua, Node.js, Perl, PHP, Python 2.7, Python 3, Ruby, Rust, Scala, Swift.
bmitc
Oh really? I was going off their own FAQ since the graded items requiring paying, and I didn’t want to do it if I couldn’t use the languages I wanted, namely F# and Racket.

From the FAQ:

> > Which programming language do I have to use in order to complete the assignments in this course?

> We expect learners to submit assignments in any version of Java, or Python. We will assume that you have basic programming ability in these languages, including a basic ability to understand and write simple object-based programs.

So is their FAQ out of date I guess?

fantod
Yeah, I guess the FAQ is out of date. Think you should be to sign up for free if you want to check for yourself. I highly recommend it! And F# would be a pretty great language for this course, I think. Looks like no Racket (or any Lisp) support, though.
bmitc
Yea, I have already done the first course part and then the assembler, which is in F# and linked in one of my other comments.

Thanks for letting me know about the extended grader support.

Build a Modern Computer from First Principles: From Nand to Tetris (Project-Centered Course) https://www.coursera.org/learn/build-a-computer

and then part 2: https://www.coursera.org/learn/nand2tetris2

[Both courses are free]

These are fantastic courses, by far the best MOOCs I have ever taken. I went into them knowing nothing about computer architecture, and by the end of the first course I was able to design a fully-working digital computer in Logisim.

While other courses consist of lectures + text content, with Nand2Tetris the course is practical. The authors have developed a complete software system to allow you to complete the course:

* A simplified hardware programming language to design the ALU, CPU, clock, RAM, etc..

* A hardware simulator and debugger to allow you to test the hardware that you develop

* An assembler for the assembly programs you write for the computer

* A compiler for the higher-level programs you write for the computer

I'm probably banging-on about this course more than I reasonably should, but that's just because I enjoyed the course so much!

zerr
Oh, I was hoping the development of an assembler and a compiler was a part of the course.

How useful would that course be for someone who knows about computer architecture, has coded in assembly, understands how compilers work, etc...?

Alternatively, would this course be useful/accessible for complete beginners, e.g. mid/high schoolers?

hawkjo
I have to also mention nandgame.com here. Similar idea, but all presented as an interactive, browser-based game. Start with nand gates and build up to a functioning computer. You never get to tetris, but it's great and super easy to start playing/learning. Delightful.
polycaster
http://nandgame.com/ You‘re welcome.
credit_guy
Oh man, a big Thank You. I kind of know where I'll be spending 10-12 hours in the next few days.
Thanks for your recommendation !I am pretty interested in web security partly because I want to start my own start up in two years, and I want to make sure my customer's data is safe. I am also interested in compilers but just can't bear C++, so I plan to take this course :https://www.coursera.org/learn/nand2tetris2. It doesn't limit languages you can use .So I plan to write the compiler by Racket(which can also sharpen my functional programming skill).
Another great resource is NAND to Tetris (currently auditable on Coursera for free):

https://www.coursera.org/learn/nand2tetris2

clSTophEjUdRanu
This was huge for me. +1
opnitro
NAND 2 Tetris is great, I don't want to knock it at all, just want to emphasize a difference between it and Ben Eater's content. NAND 2 Tetris explicitly considers most electrical concepts out of scope, and abstracts them away. Eater on the other hand, dives right into them. This isn't a complaint, and it allows NAND 2 Tetris to focus on higher level concerns (such as writing a compiler), but I thought it should be brought up.
dinofacedude
I did Nand2Tetris for my computer architecture class. Learned a lot! Definitely recommended. It actually got me into assembly programming as a hobby
This might seem like a roundabout way to start, but I'd recommend Code by Charles Petzold[0].

It starts out with just wires, switches, and relays, and as the book progresses he goes through the process of building up a simple CPU and RAM one step at a time. The book even walks you through coming up with opcodes and assembly language.

Even if you already know this stuff, I found the book was helpful in developing an intuitive feel for how everything works and fits together.

After reading it, you'd probably have a good mental model of how you'd want to approach writing an emulator.

The Nand to Tetris courses and their accompanying textbook would probably be helpful here too[1][2].

[0] https://www.amazon.com/Code-Language-Computer-Hardware-Softw... [1] https://www.coursera.org/learn/build-a-computer [2] https://www.coursera.org/learn/nand2tetris2

Nand 2 Tetris[1] is a good starting place. You should get a good view of how the different level interact. Coursera have two cources [2][3] that cover the same material as the book

[1] http://nand2tetris.org/ [2] https://www.coursera.org/learn/build-a-computer [3] https://www.coursera.org/learn/nand2tetris2

indigochill
I second this course. It's awesome. The next step from there is probably Coursera's VLSI course, starting with https://www.coursera.org/learn/vlsi-cad-logic. It's all about how real-world VLSI CADs work.
fstephany
Thanks! I finished Nand2Tetris and was wondering where to look for a good next step.
Jun 10, 2017 · 154 points, 35 comments · submitted by mkeyhani
bjelkeman-again
Does anyone have a recommendation for an electronics course that starts from the basics, with real hardware, for some who did electronics at highschool, but has forgotten essentially everything but some abstract knowledge. I'd really want to be able to design simple stuff on a breadboard. I know there is a ton of stuff out there, but where to start?
nickpsecurity
This looked promising:

https://contextualelectronics.com

Also, get some edition of Malvino's Electronic Principles. Easiest to understand book I saw looking into electronics.

bjelkeman-again
Appreciated.
kchr
Same here. Please share if you find anything fruitful!
failsafe
6.002.1x "Circuits and Electronics 1: Basic Circuit Analysis" Based on 6.002 MIT Course https://courses.edx.org/courses/course-v1:MITx+6.002.1x_1+2T... 1 of 3 part series
bjelkeman-again
Thank you
raz32dust
Highly recommend this course. I am a self-taught programmer with experience in building infrastructure backends. But I had not done formal courses like OS, computer architecture, networks etc. I was able to finish part 1 in a couple of months with just 3-4 hours per week, and came out with a deeper understanding of what goes within a computer. It also inspired me to do more formal courses in some areas that I am more interested in. It is also a nice ramp up if you want to do heavier courses while still working full-time because almost everyone can afford 4 hours per week, but following a full, formal course online (e.g, MIT OCW etc.) requires a lot more time and discipline to be able to keep momentum and finish the course in good time.
lamby
My problem would be that as soon as my computer could play Tetris I wouldn't do anything else...
xiaoma
This would be so good if it were available off of Coursera, which is essentially a shake-down for certificate fees at this point. Nand2Tetris is a fantastic course.

Back in its heyday 3 years ago, I did a ton of courses on Coursera. They weren't perfect, of course. There was no higher-level coordination that could lead to covering an entire 4-year degree's worth of material and it was hard to match up courses from different institutions with different prereqs. It was hard to find advanced courses in general and the enforced speed at which content was expected to be completed sucked.

But the automated graders were great. I went through parts of many, many courses before having to abandon them due to work pressures and I finished a few, like the scala course and the fantastic automata course and some stuff from Berkeley before they bailed and moved to edX. It wasn't ideal for adult independent learners, but Coursera used to provide real value, especially for introducing niche topics that wouldn't be available via OCW.

It's a pity they never figured out a business model that would fit what its learners really wanted and just threw up a paywall instead.

chibolo
You could apply for financial aid. It's pretty easy I got it right away.
coaxial
What paywall are you talking about? Unless I'm missing something, every course I did on Coursera had the option of buying a certificate. But if I didn't want to pay, I could follow and complete the course all the same; I just didn't get the certification in the end. The contents were the same, the exercises were the same, and the knowledge gained was the same.
xiaoma
That's how it used to be. How long ago was your last course?

They still let you watch the videos but generally don't let you take the quizzes or submit assignments to the auto-grader anymore.

http://cyrilandersontraining.com/2017/02/18/coursera-pay-gra...

JHonaker
You could just buy the book. It's what I worked off of.
bogomipz
Does anyone know if part 2 is a new Coursera offering then? I looked through the FAQ and didn't see any mention of that, only that that part 1 and 2 are stand alone courses.
droithomme
The content Part II has always been part of both the original college course and the accompanying book and website. The coursera lectures for Part II were released this year.
dang
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. The big question is: do they actually take you all the way to Tetris? Surely it is their duty to deliver on the best course title of all time!

The book, btw, is a masterpiece for anyone unfamiliar with the material it covers—particularly for programmers like me who are comfortable with the language layers and up, but to whom the hardware and lower programming layers were a mystery. Getting a simple, but rich enough to be demystifying, understanding of the those layers by actually building them myself was (no exaggeration) a healing experience for me, and made me want to fly to Israel just to hug those guys.

For any programmer who never took courses like this or tinkered at the hardware level, and thus has that alienated feeling of skating on a frozen mystery their whole career, this book is the antidote. It's a classic of economy, given how short it is and how much it covers. Of course it gets through it all by oversimplifying, which you realize the moment you get to a chapter whose topic you already know. But it does get through it all, which is astonishing.

nickpsecurity
I was considering it based on positive feedback for a bootstrapping project where cleanslate hardware, software, compiler, and/or interpreter are done simple as possible to mske root of trust. Far as hardware, I was looking at Forth, JOP (Java) or Wirth's RISC as lowest layer with simple language targeted to it.

You're endorsement adds extra corroboration it might be useful for that. Also, if they keep it simple, might be able to use the FOSS tools like Qflow and ABC.

droithomme
"The big question is: do they actually take you all the way to Tetris?"

In Part II, when they introduce the java like programming language, the assignment is to write a game. One can write whatever game they wish. Tetris is one possibility. I myself wrote Tetris so I know it is possible, and it is possible to implement using the architecture developed in the class. However, not everyone is forced to implement Tetris at that point. They have the freedom to choose other classic games, or even new games if they wish.

After this assignment comes both the full compiler and the implementation of the operating system.

qubex
Skating on a frozen mystery” is a wonderful turn of phrase. Is it yours or is it an idiom I haven't (yet) come across?
dang
I wouldn't say it's 'mine' but it just popped into my head.
bogomipz
>"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:

https://www.amazon.com/Elements-Computing-Systems-Building-P...

theoutlander
This is a very exciting course. I would highly encourage some of us in software who take everything for granted to take this course (incl. part 1).
hellbanner
NAND refers to NAND gates right -- does this course start from Hardware?
detaro
Pretty sure that's part of the first course (https://www.coursera.org/learn/build-a-computer), and this one starts above the hardware.
rkachowski
the hardware is simulated, but you do actually start from NAND gates to build primitive logic gates, then forward to a half adder, full adder, ALU, CPU and ram memory
signa11
> NAND refers to NAND gates right -- does this course start from Hardware?

NAND does refer to NAND gates. no the course doesn't start from hardware. a (java based) simulator is used to simulate the most fundamental building block.

and then things go from there.

take a look at the following: http://www.nand2tetris.org/ for more information.

liegroup
Just finished this course on Coursera; highly recommended.
madengr
Is it built with discrete logic or an FPGA?
Graziano_M
Part 2 is all software. Part 1 is built in a simulator, starting rom nand gates, writing their own simple HDL.
droithomme
The class focuses on CPU design using NAND gates. These are simulated in software logic simulators. However, there are people who have built working architectures from the class using FPGAs. No word on whether anyone has rebuilt everything using discrete 7400 gates.
khedoros1
I think you start by building the hardware inside a simulator. From the description in the first part of the course, you build things from the gate level using an HDL, working up to designing and building a CPU+RAM, programmable using "Hack" machine language, and an assembler so that you aren't stuck writing opcodes directly.

Part 2 starts from that assembly and goes into developing a higher-level object-oriented language called "Jack", then a compiler and operating system.

amelius
I'd like to see a course where they build alternative computers. I.e. not the ones we are using now. I feel we are living too much in a monoculture.
qubex
What do you mean by ”alternative computers”? Analogue computers? Quantum computers? Balanced ternary computers? Binary decimal computers? Non-Von Neumann architecture computers? Harvard architecture computers? Parallel computers? Single instruction set computers?
qubex
This course seems to be by the authors (and based upon) The Elements of Computing Systems, a truly marvellous introduction to computer architecture that holds the readers' hand as they construct a system from the hardware up. I cannot recommend it enough.
moolcool
My university's assembly course was based on this book. It was fantastic, the most I've learned in any class
None
None
HN Academy is an independent project and is not operated by Y Combinator, Coursera, edX, or any of the universities and other institutions providing courses.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.