Hacker News new | ask | show | jobs
by keithnz 1884 days ago
I did embedded systems for 20 years before moving towards backend/web development. However, I still do a bit of embedded development. One thing I found is a "hobbyist" approach to writing embedded code is fine for home made projects, but tends to turn into disasters in commercial projects. Beyond simplistic embedded systems (quite a few projects I work on have multiple embedded devices, but often have code that do one very specific thing) you need to create a well designed "engine" which is like a mini custom OS with very modular and adaptable micro "services". Where everything is built from the ground up to be traceable and observable for easy debugging. This has to be done really efficiently where there often isn't much wiggle room. Everything has to be done very robustly where things can be easily tested and simulated. It's quite fun to build systems like that, but they do require quite a specific set of design skills.
1 comments

That does sound fun. Formal systems approaches and automata always seemed more applicable to embedded development. State machines, statecharts, etc always seemed like something I was using on my projects. However, I also felt like I was always writing loops and tests for why some bit wasn’t flipping or some event didn’t occur. That’s the frustrating part... reading and rereading manuals and scratching your head.
Yup, exactly what you said. If you can define the system as a finite state machine do so, then define it. Much easier to reason about and if your state is correct you can have a high level of confidence on the robustness of your code.