TDD for Embedded C++
2023-01-11 21:04:38 UTC
Most useful learnings:
importance of small[er] steps
Concepts v exercises:
Presentation v discussion:
I spent hours working on exercises after each day's sessions, and never got through all of them.
Challenges to applying:
No safety net of existing unit tests for 99% of the codebase.
A couple of products use an embedded environment without any OS where nearly every piece of code interacts with hardware in non-portable, non-emulatable ways (even writing text to the screen buffer), and the production code only just barely fits available memory due to repeated refactorings focused upon reduced compiled code size.
Utility modules, which seem like the most amenable to TDD, are also sometimes the most tedious since they often need to implement a long list of standard interfaces to increase their usability, and so it would be nice to have a canned set of tests to ensure that the dusky corners of those interfaces get implemented properly.
Having 3 separate environments or web sites to track took a lot of getting used to and raised the cognitive overhead (attendee page[s], gather for the virtual meetings for audio/camera/screen sharing with entire-group and sub-groups, dojo studio for code work). Increasing the integration between these (and making it obvious and readily navigated) would be helpful. And to better explain some other responses, let me say that I took an excellent TDD class well over a decade ago that did everything very well *except* for group and sub-group discussion/interaction, so it's not as though there is an excellent choice that manages everything really well, but I think it can probably be done better.
Legacy code workshop:
Recommend to others: