Designing and writing explicit state machines. They seem to come up more in low-level code than high-level code. I prefer to generate them, so I would add to that "tools for generating C code and state machines". (Tangent: A guy who worked on Verilog and FPGAs told me that the "whole idea" is state machines... and they are hard to get right.)
Ask HN: What should a systems/low-level software engineer know?
11–20 of 231 posts
Re: Ask HN: What should a systems/low-level software engineer know?
#12When is it appropriate to allocate memory from the heap? If you're in a rendering or audio processing routine in realtime context, avoid it at all cost.
Think about which parts of the code could profit from optimization. Does learning an assembler for a specific platform pay off or can the compiler do a sufficiently good job with -O3? Use profilers to identify performance bottlenecks.
Think about portability. Does the code have to compile with ancient C89 compatible compilers [Mine has to, and I would be excited to see a Rust to C transpiler]? Can you choose your compilers by yourself? Are they provided by your customers?
Re: Ask HN: What should a systems/low-level software engineer know?
#13Only reason to go lower in stack is if you really ~like~ love hardware and exploring nitty gritty of how things work. In that case, pick any OS book and get ready to go down the rabbit hole :)
Re: Ask HN: What should a systems/low-level software engineer know?
#14What is your definition of system programmer? If you mean closer to hardware, i’d recommend its worth the switch. Jobs are moving higher in stack and lower layers are more and more stable and abstracted away. Most companies dont need low layer developers off the shelf software is good enough for them. Exception being embedded system teams or customized hardware (network, storage, server) teams. Majority of things the…
Re: Ask HN: What should a systems/low-level software engineer know?
#15Earlier quoted context omitted.
Genuinely curious how useful this has been to you, personally.
well, I'm the guy asking weird questions in interviews :)
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.
Re: Ask HN: What should a systems/low-level software engineer know?
#16In embedded and systems-level programming, something I find indispensable is knowing what values fit in what types (for example, an 8-bit type can represent a maximum of 256 values; a 16-bit type can represent 65536 values). This comes up incredibly frequently, and having it be second nature will benefit you. A lot of the time, this gives you a starting place for how your inputs and outputs should look, what your met…
I'm an ME who went into embedded systems, so I'm not sure what qualifies as low level for a web developer and if checking timing using an oscilloscope or saleae is feasible for the type of work OP wants to do. But even just looking at the assembly would have made things obvious in my example.
EDIT- This made me realize that a rudimentary understanding of the assembly language for your architecture will be very valuable. Doesn't have to be enough to actually write any code in it, but it's great to be able to take a look at what was generated when things are acting weird.
Re: Ask HN: What should a systems/low-level software engineer know?
#17I would like to start by Ulrich Drepper' famous paper What Every Programmer Should Know About Memory [0] [0]: https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
Genuinely curious how useful this has been to you, personally.
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.
Re: Ask HN: What should a systems/low-level software engineer know?
#18- Understanding how to write purely event-based programs using e.g. epoll since that will avoid lots of complexity and potential problems compared to throwing threads at everything.
- Floating point representation and gotchas ("What Every Computer Scientist Should Know About Floating-Point").
- Unit-testing as part of designing interfaces to get low coupling, sane ergonomics, and forcing some thought to error handling instead of just working in the happy-path case.
- Interrupt- and thread-safety (races, mutexes, deadlocks, orderings etc.)
- Storing state in maintainable ways (i.e. not just dumping C-structs to disk).
- Understanding basic computer architecture concepts like virtual memory, caches, and pipelines.
- Know what can be achieved with OpenMP and GPU programming using OpenCL/CUDA etc.
- Write great commit messages (What is the problem being solved, why this way, etc.)
- Basics of database and distributed systems theory like ACID properties and Lamport timestamps.
- Using regular expressions instead of lots of a complicated set of if-statements.
- Understanding networks regarding error sources and latencies.
Re: Ask HN: What should a systems/low-level software engineer know?
#19What is your definition of system programmer? If you mean closer to hardware, i’d recommend its worth the switch. Jobs are moving higher in stack and lower layers are more and more stable and abstracted away. Most companies dont need low layer developers off the shelf software is good enough for them. Exception being embedded system teams or customized hardware (network, storage, server) teams. Majority of things the…
Not able to edit! But i meant NOT worth the switch.
Re: Ask HN: What should a systems/low-level software engineer know?
#20If you go that path, bear in mind that you will not be involved in creating clever algorithm. When safety is involved, you need to program very simple and easy code. The complexity lies in how all the parts and ECUs are interacting with each other. On the upside, you do not need to constantly learn new languages and library, and you accumulate expert knowledge which is interesting for companies.