Lurker News
Tired of the hype on the web/js (every week new library to learn about), I am thinking to switch career in the next 1-2 years, and move lower in the stack. I am into Rust in the last 3-4 months and I really enjoy it, but I would like to learn more, what would you consider essential books/papers/resources that a system's programmer should know?

Comments (226) 63 threads

Earlier comments
ninjakeyboard1 reply#
I am somewhat of a systems engineer but more in the distributed systems space rather than embedded systems. I guess:

- runtime/space complexity and general algorithmic heuristics to know how the system will perform, or to be able to fix scale issues in the code.
- network characteristic (eg fallacies of distributed computing)
- CAP theorem and applying it to real world designs
- A co-ordination tool like zookeeper
- Understanding of the technological lay of the land (eg compression like snappy, different tools and approaches for communication like zeroMq, kafka
- Metrics and alerting - eg get how to instrument with statsd and know how and where to alert.
- Concurrency concerns and scheduling - you can get away with understanding futures and the actor model and can steer away from threading fortunately. (eg elixir/OTP or Akka)

jschwartzi1 reply#
It's important to realize that algorithms which scale very well on high performance and distributed systems are frequently not the best algorithms to use in an embedded system. For example scanning an array for each lookup instead of using a hash is usually good enough when your array size is relatively small(10 items to several-thousand). And it can mean the difference between spending a week or two coding a hash map versus solving the really important problem of building whatever product you need to build.

Embedded programming is all about forgetting all the really complicated algorithms you might have learned in school, because they usually don't matter, and when they do it's more important to be able to gather performance data than it is to do something fancy.
Traditional concurrency is still a very real concern because DMA engines, specialized coprocessors like the TI N2HET, and offload engines like modern audio codecs all have their own internal firmware that your system must interact with. Even getting the system to boot and to transition to low power states requires you to understand clock trees, clock gating, power supply states, and how to interact with any PMICs. Getting a real-time clock working is a similar story.
Raspberry Pis are good for dipping your feet into a Linux system that uses a specialized bootloader, but if you want to do anything truly embedded you're going to have to go deeper than that and work with a system like the PIC32 or even the RTUs on the Beaglebone Black.
If you're not using a JTAG at least occasionally then you're probably not close enough to the hardware to be considered "embedded."

antirez1 reply#
There are good general rules in a few comments here, but I think it's ok to say that in 2018 the specialization arrived to a point where system/low-level is too large to reply in a good way? One thing is to write games engines, another is to write networking code, yet another embedded systems, device drivers and so forth. There are certain common aspects, but the details of what you need to know change significantly.
senorsmile1 reply#
This 1000x. The field is huge. Get the common basics down, then pick a specialization that seems interesting or useful.
tracker1#
On that, unless you ABSOLUTELY love games and game engine design... the field is relatively flooded and comparative pay may not be great. Not to discourage, but making a decent living isn't a bad thing.
mlazos#
I think for low level systems it’s important to be knowledgeable about the design of OSes. For example, how memory works, caching and paging, how programs are executed, how threads and processes are managed, how communication with peripherals is typically done ... a good way of learning this could be implementing a cpu emulator of some kind in rust, which will probably give you a good idea of what areas you need to explore further. There have been a few floating around on HN lately.
fizwhiz3 replies#
Genuinely curious how useful this has been to you, personally.
m00dy2 replies#
well, I'm the guy asking weird questions in interviews :)
59nadir#
So it's only useful for figuring out what irrelevant question to ask people to make them not want to work at your company? :D

Jokes aside, the guy asked how it's been useful and it's not terribly convincing that your first (and only?) thought was interview questions.

dplavery92#
That's an extremely unsatisfying answer.
nf05papsjfVbc#
I've read through part of it and I find it quite useful when I try to reason about how something ought to perform. I try to do this before measuring and checking if I'm right. Then I try to see where I went wrong (I'm seldom right) and again having an understanding of how the computer works really helps here.

I, honestly, don't know if it will help me in terms of my career because at my current job, it's not something I can put to use. However, I want to learn this because it is fun (for me) to understand things close-to-the-metal.

keldaris#
I only found Drepper's paper 4-5 years ago, but it would have been a godsend back when I learned how modern computers work. It took a lot of inefficient effort to scrounge together the basics, having a single source that covers most of the essentials is immensely valuable as a starting point. Agner Fog's manuals are another piece of essential reading and reference that I recommend everyone go through at least once.

And yes, the title isn't hyperbole. You can skim the parts describing specific tooling, but the fact that the description of the memory hierarchy and how it works hasn't been internalized by every programmer is a travesty.

Load more comments