logoalt Hacker News

unrented7977 • today at 3:57 PM • 1 reply • view on HN

If not embedded, there is still plenty of space for low level PC programming in C/Rust/etc. Try as we might, I don't think we will ever get rid of C as the native language of low level Win/Linux APIs. Someone has to write low level drivers.

But embedded is something else entirely that I'd argue is fundamentally incompatible with the perspective of a web dev. In embedded, you need to be aware at every moment of exactly what the CPU is doing and how many resources are being used. You generally don't have multiple CPUs or even threads. Multitasking means hardware interrupts instead of cooperative threads. You also likely need to be aware of assembly because sometimes you have to write a really hot function in raw assembly to get the required performance.

Embedded is all about resource optimization, and we dev is about throwing more and more resources at the problem. It will probably be a difficult transition to make because it's a fundamentally different way of looking at and thinking about programming.

I would recommend you find a problem, then buy the cheapest microcontroller you can find and spend a few weeks learning how to optimize your code to make maximal use of the hardware while still solving the problem in acceptable time. A big part of getting my current job was talking in my interview about how I solved a novel problem by using an obscure CPU feature in assembly that resulted in 30x fewer instructions than optimized C.

Find a problem, solve the hell out of it, and speak confidently about your solution.

One benefit that web dev does bring you is thinking about concurrency. Your CPU can only do one thing at a time, but microcontrollers have peripherals that run in parallel, and the embedded system usually consists of multiple chips talking to each other and doing independent work. Managing this concurrency efficiently with a single CPU thread is a large chunk of embedded engineering. Instead of IPC, you do things like set up a DMA pipe between SPI and RAM, trigger an interrupt on I2C bytes, use harhardware timers to simulate threads. You'd be shocked at just how much concurrent work can happen with only a single non-pipelined in-order CPU thread.

If you want to break into a new field, the advice is always the same: do the work in your own time, build a portfolio, show you know the job, and speak confidently about the hard problems you learn to solve.


Replies

zergrush • today at 5:09 PM

One problem I found while reading your argument is that it completely ignores the reality where LLMs are doing exactly what you described without the same level of human effort.

The "hard" stuff you described is already being done with LLMs