1,075 karma · joined November 29, 2010
Bookmarking that comment. Will totally quote that whenever the need arises.
I have a list of the structure members. I generate an assert for each member being a certain value. The python script builds/runs the C code. On failure, I parse the assertion failure, get the actual value, change the C assert string, rebuild-rerun. Continue until the program succeeds.
I've visually verified the decode is correct once. I want to keep the decoder tested if I change the code again so I'm generating complete test coverage.
However, when I'm carefully using C++, I don't have to fiddle around with memory management and still get fast performance and better type checking.
Yesterday I wrote a Python script to generate C code test cases. String manipulation in Python is very easy.
The right tool for the right job, I suppose.
From there, can decide where your interests might be. To continue with Arduino hardware but without the IDE, I'd recommend _AVR Programming_ https://www.oreilly.com/library/view/make-avr-programming/97...
For other low level programming, Atmel's AVR Studio and their dev boards are incredibley newcomer friendly. Their source level debugger (with the debug coprocessor) is a miracle.
If you'd like to get into "big iron", Embedded Linux is amazing. Raspberry Pi is a great start (lots of GPIOS programmable from userspace). To get into embedded linux kernel programming, start with a loadable module on the Ras-Pi. Also, build/load your own Ras-Pi kernel.
Other folks suggested the ESP8266 which is also great fun to use.
Edit: Learn C. Lots and lots of C. Embedded dev is almost all C. A teeny bit of ASM, sometimes C++. But almost all of it will be in C.
Edit: I should explain a bit. C has had the concept of cross compiling baked into it for decades. It's a well established, easy path. By dint of C, C++ comes along for the ride. Lots of linker is magic required for bare metal C programming. Weird flags required for arch-linux-gnueabi cross compiling. Rust is very new and just doesn't have that history yet. It's an opportunity for someone who has a lot more spare time than myself. :-)
Aside from the reboot problem, I'm happy Linux at least comes with up-to-date tools. Apple's GPLv3 phobia meant I had to continually install Brew and Continuum (Python3) to have modern tools.
That's a good description!
To me, being able to see an interviewee's code is like being able to see an artist's portfolio. Alternatively, if an interviewee can point to mailing lists, code repos, etc, for open source contributions, that also is very valuable.
Some other folks in the comments are saying they use Github, etc, as a dumping ground for projects. Still valuable. In my opinion, that means you're interested enough in the project to at least save the code. Plus, even quick and dirty code can have valuable information. Does this person understand, for example, the common idioms in C, C++, Python, etc? (Specific example, using malloc/free/printf correctly, new[]/delete[], not using for i in range(len(foo)). Simple stuff like that.)
Note a repo containing "this is code where I'm learning this language, this library, etc" won't have the best use of the language, obviously, but will be a good sign this person is learning something new. It's another signal.
Just my opinion.