Hacker News new | ask | show | jobs
by coverclock 1431 days ago
I'm an embedded/real-time/systems software developer. The realms I work in tend to be either the very small or the very large. When I wanted to learn Rust and Go, I coded the same application in both of them, one that I had previously coded in Java, C++, and C: I implemented the Generic Cell Rate Algorithm using a virtual scheduler. The GCRA is a traffic shaping algorithm that takes as parameters a desired peak rate, sustained rate, and maximum burst size, to meter or police traffic. I coded it as a library function, and provided a unit test to convince myself that it worked. I can only learn by doing, and that's what I did. One of the reasons I like this approach is it requires a lot of stuff: threads, synchronization, modularization, etc. https://coverclock.blogspot.com/2018/11/vamoose-rustler.html
2 comments

same embedded developer here, my problem is that daily job only needs c/c++ so my skill about python or js or golang is always weak -- after a while I forgot many of their details due to lack of serious need...

my problem is: how to keep 3~4 language 'warm' at all times? write some code daily on each?

I found Python to be a great sidekick for embedded work. Parsing the captured logs, decoding memory sections, crafting specific hex sequences, building mock devices making desktop supporting tools... The syntax is different enough from C/C++ that I don't mix them up. Currently switching between 3 languages and I do notice a stray keyword from wrong language occasionally slips in.
Write a web UI interfacing with your embedded stuff?

Then you can swap out all the python/njs/js frameworks to your heart's content.

Nice example, good writeup, cheers for that.