Hacker News new | ask | show | jobs
by AnyTimeTraveler 1064 days ago
Is that why I find embedded programming the most fun?

I have been diagnosed with ADHD and had a really bad score on working memory. With embedded programming, there are usually few to no libraries and all I have to do is write certain values into certain hardware register addresses to get stuff done. All the relevant information is always on my screens, allowing my working memory to be occupied only by the problem or task I am working on.

I also find myself building everything in little modules that have interfaces that make it hard to misuse them, because I WILL forget how to use them and just let my IDE remind me of what functions a module has.

1 comments

What ide are you using? Also what are you using for the build? Cmake? Just curious. I found in general most ides don't work well for embedded. There's always some really annoying flaw.
Not OP, but I write in C for embedded platforms.

I use Vim and I write my build scripts in Python. Of the half-dozen dependencies I'm working with at the moment, half use GNU Autotools and the other half use CMake.

I know my targets and their respective toolchains in advance, so the automatic feature & quirks discovery of e.g. autoconf doesn't help all that much for the code I write myself. Plus, the targets I work with nowadays all have a compiler that's C11 and GCC-compatible to some degree, so my approach is generally to target ANSI C89/ISO C90 to the greatest extent possible; pulling in C99, C11, and GNU extensions only when necessary. I find myself reaching for <stdatomic.h> more and more nowadays, FWIW.