Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is bottom-up:

http://www.charlespetzold.com/code/

http://www.nand2tetris.org/

I've only read a little bit of the 2nd book (IIRC I stopped reading and lost interest when I found a very obvious and repeated error), but all of the 1st one. The 1st one is highly recommended.

IMHO the trend of teaching things in CS top-down doesn't encourage understanding of how computers actually work, which turns out to be quite important in many situations, especially debugging and knowing the limitations of what computers can and cannot do. I believe that a lot of the problems with software today (bugs, inefficiency, overcomplexity) can be eliminated or at least reduced greatly via a deeper understanding of these basic concepts, since the majority of programmers seem to have only a very vague idea of e.g. memory, number representation, CPU operation, etc.

I think CS should start at the lowest level above EE, with binary representation of data and basic digital circuits (without e.g. going into the physics of how transistors work.) Have students build basic CPUs and write/enter programs for them and run them manually to see computation happening at this level. Then proceed up to Asm, C, and higher-level languages to write more complex programs, maybe even a simple operating system, accompanied by some of the more theoretical material (e.g. algorithmic complexity), continuing to keep the theme that there is a practical use for learning these things.



(Author of the linked book)

Funny you mention that Petzold book; I read that as an IT student doing airy courses about software requirements and design and realized I had to get across to the electrical engineering building. I didn't have the prereqs for the OS course, so I did the first assignment from the previous year and sent it to Gernot and begged to be let in. He ended up my thesis supervisor.

(The other person I remember not being totally thrilled with the IT courses was Scott Farquhar, of billionaire Atlassian fame)

So that book can change your life, and is the first thing I tell people to read who show an interest in the systems area


Well, people could easily lose interest if they come into the field wanting to be able to make computers do cool stuff, and they're stuck with circuits and binary for a while before even being able to do that. Those are fine coming later after learning at least some amount of higher-level code in which you can explore the potential of what you can make happen with programming. Being able to see some of your code make a simple game work or something; I feel like that's an important step. It's easy for us, already fully immersed, to say that beginners should or would be interested to know all of the logic gate-level mechanisms, but it's going to be off-putting for most.


I consider it a "learning to walk before running" type of thing. It may not be interesting to a lot of beginners, many of which probably want to immediately start doing something "interesting", but these are the fundamental basics that anyone claiming to have a CS degree should know.

Starting with higher-level languages tends to breed more misconceptions, because the students get used to seeing things "seem to work like this", and having only a vague, superficial understanding, it is much harder to unlearn these than to learn the truth in the beginning.

It's also not as if things like logic, data representation, and the sequential nature of programs don't matter at higher levels --- whenever one uses conditional statements and loops, a good grasp of boolean logic is essential. Why numbers have a finite range, floating point values aren't exact, etc. all depend on knowing how data is represented. Not knowing these things will at best make it difficult to reason about code, and increase the chance of introducing bugs; at worst, it can lead to security flaws.


It's like making someone learn music theory on paper before getting to try out an instrument


+1 for CODE, I can't recommend that book enough to... and when you start talking about Morris code, telegrams, braille, OHMs, and binary math as your build up... well, it really just connects a lot of mental dots.




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

Search: