Live data from Hacker News

Ask HN: What should a systems/low-level software engineer know?

news.ycombinator.com

131–140 of 231 posts

Re: Ask HN: What should a systems/low-level software engineer know?

#131
post #24
post #20

If by low level you mean embedded systems programming, you will definetly need to be proficient in C. The other knowledge depends on the product that you will make. For example I work in the automotive industry, where you need to be interested in cars and how the different parts work. Knowledge of electrical engineering and control theory is also valuable. There is a good book about it if you wat to learn how cars wo…

I don't do embedded systems, but as a self-respecting software engineer, I am intending to develop proficiency in C/C++ over this next year. Does anybody have any recommended books/courses/projects?

For the language, K&R is good, and Expert C Programming: Deep C Secrets by Peter van der Linden is a great second book.

But all the fun stuff happens when you start talking with your OS, so get a book about that too. If you are planning to develop on Linux, Michael Kerrisk's The Linux Programming Interface is excellent. Much of it will be familiar to someone used to shells and the terminal, but there will be plenty of new ideas too, and even the stuff you know will get a much deeper perspective.

Re: Ask HN: What should a systems/low-level software engineer know?

#132

I'm an embedded software engineer. Here's my $0.02 on how to get started: 1. Get a platform you can tinker around with, and recover quickly in case of disaster. Raspberry pi is a good example. 2. Learn how to find and read detailed register-level manuals of the underlying chip you're working on. 3. Learn what a programmer's memory-model is. 4. Learn what peripherals are, and what they do. You may have to dig a bit in…

Oddly there is a Raspberry Pi 3 sitting on my desk today. I find myself a little reluctant to setup the BTD loop for it (BTD = build test debug), because at the end of the day I'm going to have a (physically small) linux box. Which is fine because I plan on installing a network proxy on it that only needs wifi. But how is the Pi a gateway to embedded programming? It has pinouts you can attach an oscilloscope to?

The hardware is better documented and less complicated than a full intel PC, I think is the general goodness to it. It's designed specifically to 'tinker' with.

Re: Ask HN: What should a systems/low-level software engineer know?

#133

One important thing for an embedded engineer (just like any software engineer!) to know is how to select an appropriate solution for a given problem. This includes both hardware and software, and do it yourself vs off the shelf. I think it can be summed up with some questions to ask at different points in a project: - Should I use a microcontroller or a processor? If a microcontroller should I use a simple 8 bit or m…

In your opinion is 8-bit even a realistic choice anymore? Many ARM CPUs offer way more bang for your buck nowadays (unless i'm looking in the wrong place).

Re: Ask HN: What should a systems/low-level software engineer know?

#134

I'm an embedded software engineer. Here's my $0.02 on how to get started: 1. Get a platform you can tinker around with, and recover quickly in case of disaster. Raspberry pi is a good example. 2. Learn how to find and read detailed register-level manuals of the underlying chip you're working on. 3. Learn what a programmer's memory-model is. 4. Learn what peripherals are, and what they do. You may have to dig a bit in…

Great list. I would add, learn a little about a real-time OS, and become really good with a source code debugger.

Re: Ask HN: What should a systems/low-level software engineer know?

#135

I'm an embedded software engineer. Here's my $0.02 on how to get started: 1. Get a platform you can tinker around with, and recover quickly in case of disaster. Raspberry pi is a good example. 2. Learn how to find and read detailed register-level manuals of the underlying chip you're working on. 3. Learn what a programmer's memory-model is. 4. Learn what peripherals are, and what they do. You may have to dig a bit in…

> 1. Get a platform you can tinker around with, and recover quickly in case of disaster. Raspberry pi is a good example.

I'd recommend something cheaper and simpler like the STM32F4 discovery boards. You won't get linux and will have to program via JTAG but the documentation for the STM32F4 is not as overwhelming as Broadcom's.

Re: Ask HN: What should a systems/low-level software engineer know?

#136
A bit on the more unusual side, one thing my son and I found very instructive on "lower level" concepts is the fact that within PICO-8, which is already a very user friendly high-level environment, you can use peek(), poke(), memset(), memcpy and similar functions on any memory address that PICO-8 uses. Literally all the capabilities that PICO-8 gives you, it exposes memory for it and explains the conventions it uses to read/write that memory, so that you could do it yourself. We were able to make a simplistic "paint" program that draws a pre-drawn cursor sprite and changes pixels whenever you drag the mouse, all using memset(), peek() and poke(), and avoiding line(), spr() and doesn't use any Lua tables. It entirely does this by reading and writing memory. It was a fun experience in learning certain useful low-level memory concepts.

Re: Ask HN: What should a systems/low-level software engineer know?

#138

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 -…

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."

Re: Ask HN: What should a systems/low-level software engineer know?

#139
post #24

Earlier quoted context omitted.

I don't do embedded systems, but as a self-respecting software engineer, I am intending to develop proficiency in C/C++ over this next year. Does anybody have any recommended books/courses/projects?

For the language, K&R is good, and Expert C Programming: Deep C Secrets by Peter van der Linden is a great second book. But all the fun stuff happens when you start talking with your OS, so get a book about that too. If you are planning to develop on Linux, Michael Kerrisk's The Linux Programming Interface is excellent. Much of it will be familiar to someone used to shells and the terminal, but there will be plenty o…

The Linux Programming Interface is an excellent book. Beyond that, if you're looking to go deeper into the libc in Linux I would recommend taking a look at the man pages. They're very comprehensive, especially the pages in sections 7 and 8 which explain the operating system and administration tasks.

Re: Ask HN: What should a systems/low-level software engineer know?

#140

Take CS-61 taught by Eddie Kohler at Harvard

I don't know what's in the CS-61 course, but his UCLA-CS235 Advanced Operating Systems course was REALLY useful. You build the important bits of a multitasking OS.

http://read.seas.harvard.edu/~kohler/class/10f-aos/

Post reply on HN