5 ms·
Maybe I'm not smart enough, but I consider building CPU from NAND gates, writing a simple OS for the machine and writing a complier for a C subset for it can do
by markus_zhang 4y ago
Maybe I'm not smart enough, but I consider building CPU from NAND gates, writing a simple OS for the machine and writing a complier for a C subset for it can do a lot more about de-mystifying computing. I tried twice to read SICP but I don't get the hype. I guess it's fine to not read it after all.
Disclaimer: I still consider nand2tetris too trivial for the de-mystify work. A full project on the same scale of UTokyo's CPU project [1] is a lot better.
Disclaimer: I only completed the hardware part of nand2tetris so I don't claim that I have done the CPU+OS+compiler stuff. But I do find it a lot more interesting than SICP.
[1] https://www.is.s.u-tokyo.ac.jp/isnavi/practice01-01.html https://www.is.s.u-tokyo.ac.jp/isnavi/practice01-01.html
- ekidd 4y agoThe approach you describe is excellent, but it builds upwards from the physical foundations of computing. SICP builds from the mathematical foundations of computing (sort of). The end game is to take students from zero through: 1. Understanding several styles of programming (though most often in terms of "what fundamental operations does this language provide?"). 2. Being able to build an interpreter. 3. Being able to build a compiler. For a two term intro course, it's extremely agressive. I encountered it much too late to benefit much—I'd already been working on compilers at Lisp companies for a couple of years. But as an introductory text, it's a bit like the Feynman Lectures are for physics: probably too hard for almost everyone. But the right people, at the right time, will really love it.
- kayodelycaon 4y agoThat would explain why I never got SICP. I can’t follow the math.
- User23 4y agoDon't sell yourself short. The traditional mathematical guild has put religionists to shame with their penchant for obfuscation and ambiguity. Computing science math on the other hand is rigorous, concrete, and accessible to anyone who can, well, write a program.
- naikrovek 4y ago> Computing science math ... is ... accessible to anyone who can, well, write a program. it most definitely is not. maybe it's the notation or the sudden appearance of it on the page, or something I don't know about, but math on a page becomes a literal wall that I can't overcome when reading. I can explain any concept I understand well enough to teach others, via analogy, metaphor, or demonstrative example, including algorithms I use when I write software. I can't even understand software I write on a mathematical level; forget describing it or teaching it with math. math is just out of reach for me. it has been since high school and it will be for the rest of my life. if I have to describe an algorithm I am using in a program by using math, then it will never be described by me, except via the program source code. if you try to share an algorithm with me and you use math to define it, you might as well just save your time because you are as likely to extinguish the Sun with a single eyedropper of water as you are likely to communicate with me in any way using math. I loved math when I was young. I would spend time on weekends making up numbers and then calculating their square and cube roots on paper for fun. My high school math teacher hated calculus and he taught us all to hate math in toto when we were in that class. he sucked the enjoyment of math out of everyone effortlessly and completely. I will not be rejoining the mathematically literate in this lifetime, and it is something that I desperately want to learn. to say that math is simply accessible to any given person is just plain incorrect.
- inimino 4y agoYou protest too much. You surely know it is not out of reach, but you would have to find your own way back into the joy of it and no-one else can tell you what to read or where to start.
- smitty1e 4y agoIn particular, while I can visualize code executing in my head, I cannot just look at a formula and do the same: the formula is too static. Formulae are a beautiful top-down model of some narrow, idealized slice of reality. Understanding is built bottom-up. For example, the raw torment of differential equations could have been clarified if the Prof. said something like: "Your car going down the street is a differential equation. Your position, x, your speedometer velocity is dx/dt, and the accelerator pedal position d/dx(dx/dt). We will now set about abstracting this past all casual understanding."
- wrycoder 4y agoAnd then you learn that most differential equations are not explicitly solvable, and the world is actually coded in partial differential equations, anyway.
- consilient 4y ago> In particular, while I can visualize code executing in my head, I cannot just look at a formula and do the same: the formula is too static. The right lesson to learn from this isn't that math is too hard, it's that you're using the wrong tools. The usual target architecture of math (so to speak) is a rewrite engine, not a register machine. You should almost never be "executing" anything.
- markus_zhang 4y agoI forgot to include, that the last part of SCIP is indeed very interesting, and that's the only part that I completed when studying the course in Python. Compiling theory is always interesting and that's part of the syllabus I'm looking forward to drill a bit deeper into in the future.
- userbinator 4y agoPetzold's Code book is also a highly recommended bottom-up, although it focuses more on hardware than software.
- markus_zhang 4y agoYeah that's also a good one, but I think whoever completed nand2tetris needs to go for some university level textbook + lab material for the next level? Like a proper book for computer architecture, some reading for FPGA and HDL, and two books, one for OS and one for compiler.
- wrycoder 4y agoNand2tetris is much more advanced than Petzold. But yes, there’s a lot more to learn after that.
- olalonde 4y agoI recently finished reading it and highly recommend. I was unable to put it down and read half of it in one sitting. The title is indeed a bit misleading though, it's really about electronics and hardware.
- hgsgm 4y ago> The title is indeed a bit misleading though, it's really about electronics and hardware. That's what code is made of.
- elgenie 4y agoThe process you’re describing is demystifying computers, not computing. It’s the path of: “Here are basic building blocks, here’s the machine from them, here’s simple things you can do with it, here’s a bare metal language for it, here’s a more advanced language. OK, you’re ready for a course about doing something non-trivial.” It’s a totally valid approach, but the approach of computing first goes: “Here’s data, here’s operations on data, here’s more advanced composition of those operations, here are some languages created out of those operations, we can finally do compelling stuff. OK, you’re ready for a course about the details of how machines enabled this process.”
- taneq 4y agoAnd that's why you get computing graduates who are still baffled by concepts like pointers, arrays, and sequential execution of statements. They can cargo-cult their way through some basic coding exercises and they can talk about computers, without really understanding what's happening when you type "x = y + z;"
- wrycoder 4y agoThe software part of nand2tetris is quite a bit harder than the hardware part. I didn’t bother to buy the book for the first part, but I needed it for the second part. SICP doesn’t really teach hardware, and it teaches you a sophisticated functional compiler, rather than the imperative toy Java of nand2tetris. They are both important.
- muyuu 4y agoI've spent considerable time studying both approaches [SICP-like, nand2tetris like, and I'd include a third OS-centric approach as in MIT's Xv6 courses] (SICP and SICP-adjacent I would also include programmes based on Forth and self-bootstrapping Smalltalk), one is the bottom-up approach from the CompSci point of view and the other one from the ElEng point of view. The general bottom-up approach is dead or moribund, as it's the concept that an educated professional should know more or less all the relevant aspects of his or her discipline to a decent standard.