by markus_zhang · 3y ago · 0 comments
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
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.
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."
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.
I don’t have these issue with programming because it doesn’t use my logical memory, it uses visual/spatial memory. I see function calls as a series of lines creating decision trees.
You may be surprised how little math matters in practice.
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.
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.”
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.
That's what code is made of.
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.