Tuesday, February 16, 2016

Seminar Summary: "From Nand to Tetris"

This morning, I attended a fascinating seminar by Shimon Schocken about a CS course he co-developed called "Nand to Tetris". Over the course, students develop a full working computer system from the ground up, component by component from first principles.

There are some concessions though (if you could call them that) - instead of physically building these components, the students work through the exercises using a special software-based hardware simulator. As a result, students can through the course in a very modular way, and can experiment with how each of these components works.

Listening to this talk and seeing how students get guided through each layer of the computing stack was quite inspiring. It brought back many fond memories of a course I took in second year where we had to write a compiler-interpreter - I still remember the fun and excitement of learning how these things worked, then diving in myself, figuring out how to make a few small changes to add a new compiler feature which would require some new way of generating a virtual machine instruction set, and then seeing the thing working! (I'd strongly recommend that any serious about learning to develop software stuff spends at least some point in their coding career working with a form of machine instruction set - even if it is only down to the virtual machine level, as you really do learn to get an appreciation for what the machine is actually doing - executing a set of opcode/instructions one after the other, modifying what is stored in some memory buffers somewhere)

That these guys have taken the idea to the extreme, and sought to do this for the complete computing stack, right down to "constructing" your own logic gates out of the provided NAND gate, to building up "chips" from these logic gates (including arithmetic, RAM, etc.) all the way up to creating your own high level language which compiles down to machine language which can run on the machine you built yourself! It really is a nice concept for truly demonstrating that a computer is but layers upon layers of human creativity and ingenuity, as opposed to being this magical monolithic entity that exists pre-formed.

It also reminds me of how, when first learning how to set up dual booting for Linux, I came to a higher level of appreciation about the nature of how our standard computers work. That is, how the BIOS (or now UEFI) is kind of a mini computer ("Basic Input Output System") within what we typically think of as the "computer system" that starts first, and what the "boot loader" is and how it actually works (i.e. it is the set of instructions which the BIOS runs to load up the operation system - that is, the boot loader quite literally runs a sequence of commands initialising components - reading data off disk and into memory, etc.  starting subsystems, and finally loading up what we typically think of as "the OS"). Again, it's all just stuff that humans created... simple little piece-by-piece things that were clobbered together like a jigsaw puzzle in a logical way, and assembled to create the magnificent machines that we use everyday.

Anyways, I'm personally quite interested to give this a try myself, as it sounds like quite a lot of fun. Yes, it's a lot of work, but it's also the sort of thing that would be quite satisfying to work on. What about you? :)

No comments:

Post a Comment