TDD for Embedded C
2018-05-25 12:49:25 UTC
Most useful learnings:
The FAIL-PASS process and the fact we only write production code to make unit test pass. I already knew unit tests but I wasn't conscious of the difference with TDD.
Concepts v exercises:
Presentation v discussion:
There could be a part about pieces that we often consider untestable (UI, state machines). It was briefly discussed during the training but not in detail. (But it's less important that what we saw during the training, so it could be part of a 3rd day)
There are often instruction both in the test file and instruction file, which is confusing. I've missed some of them because I forgot to pay attention to the other file. Maybe they could be all at the same place.
Excellent, very nice and knowledgeable, provided advice even on side-topics (e.g., C++, dynamic allocation). Always on-topic and accurate in his answers, and motivating.
I can start to write better tests on legacy code, but not to perform TDD since we first have to get rid of legacy code. It'll take a while and I guess TDD will come little by little with time.
Challenges to applying:
Refactoring legacy code, at this point we'd just like to make a fresh restart with TDD applied, but we know it's not possible so we have to add tests and refactor.
The use of the cyber dojo is awesome. We've had previous training where installing the tools and making them work was at least half of the training time.
Legacy code workshop:
Recommend to others: