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

Perhaps the C course is supposed to fill this role, but I'd vote for including a course in assembler/assembly. Not because many students would use it, but because it teaches how a CPU actually functions without abstraction. I've used it only once, and even for that, I was mainly transcribing from a textbook. But understanding assembly was key for me to solve many computing problems over my career.

In other programming activities, understanding computing at the assembly level enabled me to realize that the bug I was chasing was actually in a library or, god forbid, the compiler.



I absolutely agree that asm should be taught for computer fundamentals but I really LOL'd at assembly teaching how CPU works without abstraction. There is tons of abstraction below assembly -- see Microcode. It's this mistake in thinking that lets things like spectre/meltdown sit in computers for decades. But for the most part you're right, going down past assembly has not helped me understand __software__.


There are at least three levels of indirection between memory and registers and there is no language that allows you to access that directly.

It lets you see more of the stack but not all of it.

Before I coded in assembly for example I had no idea why string operations in C were so lacking compared to everything else. When you realize that you are literally dealing with bytes in an array of variable length the limitations make a lot more sense.


You also need to know how the machine actually executes the code. It's not that complicated, but it trains your intuition for where the real optimisations are.

C, and assembly as we know it on most architectures, is a fairly high-level abstraction compared to what most CPU cores are actually doing these days.


When I was in school, that course was called Computer Organization.




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

Search: