4 ms·
Assembler is arguably a better intro language than most. It makes it explicitly clear what each step of the programming does and how it executes. Once students
by taneq 8y ago
Assembler is arguably a better intro language than most. It makes it explicitly clear what each step of the programming does and how it executes. Once students have done a few projects the they'll be ready to appreciate a higher level language like C.
Throwing objects and lambdas and type inference at kids without giving them any grounding in what a computer actually is and does is unfair, and leaves them building castles in the sky.
- ohazi 8y agoI can't tell if this was meant to be serious of facetious, but I took this route. I learned 8088 assembly to make an ancient robot platform move, and then learned C a few months later. Assembly had a few weird architecturey things that you had to understand before things made any sense (e.g. registers, segment:offset addressing, stack pointers, calling conventions), but beyond that, all of the tasks were simple and self-contained. C was a breath of fresh air after that. Things like pointers, which have a reputation for being confusing, make perfect sense coming from assembly.
- renox 8y ago> Things like pointers, which have a reputation for being confusing, make perfect sense coming from assembly Agreed with the caveat that C pointers aren't just memory addresses they just behave like that 99% of the time which makes it especially confusing for the 1% where the optimiser can "play tricks"..
- taneq 8y agoSerious. I'm not saying you should stick with assembler for any great length of time, but understanding what instructions and registers and memory are is pretty important later on. In university I had fellow students who struggled with pointers because even at the end of first year they didn't really understand what memory was or how it worked.
- gdy 8y agohttps://stefansf.de/post/pointers-are-more-abstract-than-you-might-expect/ https://stefansf.de/post/pointers-are-more-abstract-than-you...
- Matumio 8y agoBy that logic, you'd have to start with vhdl. Which is a great place to start if you want to grok what a CPU actually is, what pipelining means, and how to write truly parallel code. Except that most people never need to know. That's progress: you can build most useful applications without ever having to learn that there is a distinction between virtual and physical memory.
- lihaoyi 8y agoMIT does have a required course 6.004 that starts you off computing doped semiconducter behavior, building circuits using a simple HDL (JSim when I did it, seems to be something else now). You build combinatorial logic, sequential logic, an ALU, your own CPU implementing a RISC machine code spec, making sure your circuit-simulated CPU can run basic machine code programs, optimizing the machine code programs running on your home-grown CPU. In the end you're spending all day/week/month optimizing your CPU by stripping out gates, pipelining, all at a circuit/gate/HDL level, with your final project score computed numerically from how fast your optimized machine code program is running on your optimized home-grown CPU. Probably one of the best classes I took when I was there. Doesn't really matter whether or not it was the first class or not I don't think.
- taneq 8y agoI think it's more like saying that to design CPUs, you should start by understanding what a transistor is.