TDD for Embedded C
2019-06-05 18:00:35 UTC
Most useful learnings:
Test driving a driver was a useful experience. The hands-on exercises are what attracted me to this training to begin with. Also, learning about refactoring and how to deal with vendor-specific compiler extensions were also valuable experiences.
Concepts v exercises:
Presentation v discussion:
Creating some additional exercises (with an embedded focus) that can be downloaded and worked on after the course to get additional practice prior to diving into the deep end with real-world development would be good.
If there were a way in cyberdojo to show a file hierarchy instead of listing everything together, there would be less confusion with similarly named files (e.g. LightScheduler.c LightControllerSpy.c LightSchedulerTest.c). I did end up clicking on the wrong filename several times (more of an "ergonomic" issue than a problem with the exercises themselves).
I also wish there were some additional practice test driving device drivers, since they are traditionally tricky to get right and would benefit from automated testing
He conducted himself professionally and made an effort to address all of the questions people raised. He was also willing to provide feedback and guidance for attendees who got stuck on the exercises.
I probably will put this into practice when the next phase of development on our product starts. Right now, I think it is best for my team and I to get practice doing TDD on new code before we try introducing tests for older firmware modules. I think we will make it to that point eventually, though.
Challenges to applying:
There is a lot of code with very tangled structure/dependencies. It will take a long time to unravel things to the point where they are more easily tested. This is why I think it is better to start off with the new work first.
There are a number of advantages and disadvantages to working via cyberdojo. It does make it easy to quickly share code with others, and there is no special setup required, which made it easy to attend remotely. The main drawbacks I can see with the cyberdojo setup is the inability to practice setting up a fresh CppUTest project on your system and the inability to use familiar tools (i'm partial to vim, so the browser editing experience wasn't great for me). The ability to attend this course remotely made it convenient for my team to all attend, and made the training very affordable. I think this training is a good value for the price.
Legacy code workshop:
Recommend to others: