Hacker News new | past | comments | ask | show | jobs | submit login
Online course: Build your own simulated computer, assembler, lang, OS, & game (diycomputerscience.com)
190 points by adaptives on Aug 26, 2011 | hide | past | favorite | 29 comments



For the people who have read the book / taken the course:

I can see how a simple assembler and a simple game can be built quickly, but Computer Architecture, Compilers and Operating Systems are usually separate, semester-length courses. (And not among the simplest.) So what is he giving up on, in order to compress all this into a single course?


Read the book, finished it a few months ago.

Each chapter is usually covered by one course in a CS degree(more or less), but each one has a very specific goal and so focuses only on that.

As an example, the OS chapter doesn't actually build an OS. Just a few basic functions that allows you to build more meaningful programs in jack(the lang you build a compiler for). So a simple memory allocator, some basic math functions, a string class and so on.

The compiler chapter hardly mentions any theory about grammars and instead focuses on why a certain step is needed and how it fits in with the overall plan of building the project.

Even with a CS degree, I found it useful and, more importantly, enjoyable.


I haven't read it, but from skimming it looks like the tactic is to follow consistent rules for the entire course. The system being built is entirely self-contained, just complete. This makes it a lot easier to build on what you've already done.

In a typical csci curriculum each class will start with its own set of assumptions about which systems are being dealt with and what tools you need to learn. You might take a compilers class that uses yacc, a languages class that uses Common Lisp, an OS class that uses Java and an architecture class that uses x86 assembly. For each class you'll need to spend some time reviewing the tools and systems specific to that class, in addition to spending time on theory that isn't relevant to the focused goal of building a working computer system from scratch.


This is a great book, but each of the sections are very short introductions to the topics. You dig in and actually build something, but not anywhere the same depth you would in a course dedicated to the topic. (And I didn't feel like the operating systems section was really worth it - so cursory.)


He is using a lot of abstractions, and is focusing on building something which will introduce the main concepts of 'Computer Architecture', 'Compilers', and 'OS'.

A student taking this course will be building something very simple, but grasping the main concepts in the process.

I think the real beauty of this book is that the simple implementations can be a segue into exploring those concepts in greater detail (if one gets interested in them) ...


I actually took this course in person when Professor Schocken visited Harvard. It is a fantastic course that is extremely valuable for everyone from those who only have basic programming skills to advanced CS students (I took it as a senior after already having taken classes on operating system design and programming languages). In the class we did jump around a bit in the later chapters, and so I feel like one could probably approach the material in many different ways.

The exercises are very straight-forward and will not be extremely time-consuming for those who are already skilled at CS, but the course is best treated like a tour through CS rather than an in-depth study of any particular area.


I acquired this book when it was published in 2008, and I firmly believe my CS education would have been better for having had it several years before that. It's a very well-constructed course that can be completed by an amateur at a casual pace, or by a hardcore student in a couple of weeks of dedicated work.


This book is great.

This book certiantly is not a crash course. I have been working through it in my spare time since I got it a couple of years ago. I have been taking my time because I was going through school when I got it and couldn't make time for it. Now seeing this article I should pick it back up again.

I suggest though that everybody resist the urge to find the answers rather than doing them yourself. It's quite rewarding when you figure things out. There isn't one way to do it.

The only complaint I have is that when you start getting into higher functions they recommend you not use the pieces you built up for performance reasons. Personally I would like to figure these out but perhaps that should be left for a later day.


Using the pieces you built as you move along is a great idea, and an opportunity to understand the optimizations required to make them performant.

I think one reason, why they may insist is because, the basic pieces you built will be in HDL, while if you use the ones provided by the software, they will be in the form of compiled Java code. Perhaps that is one of the reasons why the books pieces will be faster/


I finished the book a few months ago, and yes that is the main reason.

I wanted to test the whole finished stack using only my components so I did run it using only what I built. It ran but was around 10x slower, mainly the graphics tests. I did optimise the performance of the basic drawing algorithms using faster ones but, naturally, it was still much slower than the java implementation.

Another advantage of using your built components is that it helped me uncover some bugs which I only noticed when you ran something as complex as the pong example.


This reminds me a lot of "Code" by Charles Petzold, but framed in the context of actually building the pieces rather than just reading/thinking about them.

I wish there were more hours in the day...


Thanks to everyone for your great comments, and for enrolling in the course. I have been looking to learn something like this from a long time, but lacked the community to be able to learn with peers.

That, and a desire to make a little contribution to the state of learning & education prompted me to create diycomputerscience.com

There were over a 100 registrations in the past day.

Thanks to everyone... you guys really made my day !


Got a print copy of the book two days ago. Worked through most of the first chapter, and really loving it so far.

No CS background and a little (~1 year off and on) programming experience. Though having taken a symbolic logic course in college is definitely making the first chapter easier! :-)


I've been looking for such a course/material since I've started learning CS. This loks like a great way of introducing my friends to CS and explaining what the Computer Science is all about. From NAND gates -> to games in one course? YES!


We teach this class formally in one semester at the Colorado School of Mines, where it is now a required part of the CS curriculum.

I use both Code and TECS books together. It is an incredibly effective class. I've found many students in CS curricula "drift" through the topics without really grasping anything, only to graduate feeling they haven't really learned much.

This material takes the essence of numerous CS topics and educates the reader by doing and building, rather than only reading and theorizing.

If you are a developer and don't know what happens when you execute a program, you really need this book (and CODE by Petzold).


Well there goes my weekend... I've been looking for something to help me step through this sequence, trying to read OSDev and the TinyVM source and the x86 handbook all at once trying to create an idea of how my computer actually works has just created a fried brain!


This book is great, and finally available in Kindle format too.


It's been in PDF format since it's been online.


The actual link to chapters and pdf files http://www1.idc.ac.il/tecs/plan.html



There is a major problem with this teaching approach: every module is a pre-requisite for the next one. Therefore, if a student fails one module, he will have to spend time fixing it instead of moving forward.


This not a problem with the teaching approach, it is the problem with "crash course" mentality.

The whole point of this entire course is to acquaint the reader with the foundations of the computer system. If reader does not understand a layer of the course, he SHOULD spend more time in learning that layer, rather than moving forward with half-cooked knowledge.


How is this a problem of the teaching approach? I haven't read the book, but my guess is that it is basically unavoidable, short of providing working code. No OS without a computer, and no game without OS, right?. Plus, it is probably easier to use something you actually built.

Anyway, if you really want to learn this stuff (well, any stuff), you have to "work his ass off until you figure it out"[1]. No pre-set time limit. Someone who is stuck will just take her time, go for help, rest, or whatever.

On a final note, I fail every single program that I write. Several times. Then I fix them. Every single one. And for several failures, I have nothing more than one success. It may sounds gloomy, but it feels good, actually.

[1]: Dr Tae, here: http://vimeo.com/5513063


They address this by supplying implementations. In principle you could do most of the course backwards, though I haven't heard of anyone doing it that way.


And, in fact, they even say so.

> The lectures, book chapters and projects are highly modular and one can pursue subsets of them in any order and scope.

From the course's site's about page: http://www1.idc.ac.il/tecs/about.html


How would one understand calculus without understanding algebra? How would one understand algebra without understanding arithmetic? This isn't a major problem, it's the nature of learning interconnected things. The "major problem" is if the teacher forces the class to the next module without ensuring the students understand the previous one fully. Since this is a book the reader follows, that problem is eliminated.


I can't decide if you genuinely view this as a "major problem" or if you're making a wry commentary on the current state of education in some places?

That is, I would argue that you should have to pass prerequisite modules before moving forward. Right?


thanks, i watched the google tech talk video about course, this course is really helpful for cs students


This is great! Thanks for the link!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: