Hacker News new | ask | show | jobs
by jpgvm 339 days ago
I think going as far as assembly up front is probably not worth it, also it's hard to keep people engaged at that level as it's difficult to make the computer do exciting things with assembler.

However I strongly believe it's good to start with C. You can still rather quickly do interesting stuff, C is a small language so learning the language itself isn't a huge barrier.

A big benefit of the small language is that it leaves more time available to explore important concepts, not just the super low level ones (memory/pointers, etc) but really important parts of the stack that are infectious to everything else. Specifically things like syscalls and the libc interface that most other languages are essentially built on top of. Working with building blocks like pthreads directly is also very important IMO, both to get a handle on parallelism and concurrency primitives but also to learn why high level languages are so valuable. Similarly for stuff like important socket APIs ala select/epoll and implementing your own event loop.

I was lucky enough to learn all of this early in my career and luckier still to have been able to pass on this knowledge to many mentees over the years.

If there are any aspiring programmers here that want to build from a solid foundation then yeah, ignore the haters, write some C.

man pages and ironically ChatGPT are your friend, use them to explore the foundations of (most) modern code so when you start writing modern code in earnest/for money you will be substantially ahead of your peers in actual understanding.

2 comments

No, go down to assembler, just pick a smaller machine like a microcontroller where simpler programs can do more things more easily.

When you know assembler you can always see what compiled programs run as no matter what language that program was written in, if you start with C you won't have that ability.

Assembler is much better approach, one gets to learn how the machines actually work (ignoring the microcoded part), and reach for something like a 8/16 bit computer emulator (ZX, C64, NES), or an Arduino like device with ARM/RISC-V.

Also the realization, C isn't that special, plenty of ways to play around with pointers.