TDD for Embedded C++
2019-08-23 06:52:43 UTC
Most useful learnings:
The TDD practice. Before I learned this, when I developed stuffs, I kind of just hoped my codes work. I did do some tests, but usually incomplete. For the functions that were not tested, I just prayed that I did not make mistakes, my reviewer could help me find it, or it could be tested out early. Now I have a good way to ensure it is correct. I have started practicing it when writing some new features in our production code base, and I feel reassured and confident.
Concepts v exercises:
Presentation v discussion:
Probably speak louder, or prepare a microphone.
It would be great if the exercise part for mocking has the same amount of instructions in comments as the CircularBuffer exercise.
And I think it would be better to switch to GTest and Google Mocking, if the company of the trainees are using them in their code base. There are some advantages using CPPUTest, but it is infeasible to have both CPPUtest and GTest within the same code base, so trainees will still need to learn how to use GTest and Google Mocking for TDD after the course, although it might be similar.
Friendly, instructive and helpful!
I've already started!
Challenges to applying:
Some existing classes are messy. If I need to add some features to a cumbersome class, it may be hard to practise TDD without a big refactorization.
Left a lot of work behind, but learned a lot, and I believe it worths the time!
Legacy code workshop:
Recommend to others: