TDD for Embedded C
2016-06-10 15:47:31 UTC
Most useful learnings:
Getting experience on how to actually write the test cases and using mocks. I already know the theory but I need to actually start using it.
Concepts v exercises:
Not enough exercises
Presentation v discussion:
Skip the general theory about refactoring at the end. I know that it is related to TDD, but if you want to talk about refactoring describe exactly what kind of refactoring that helps you get a code design that you can test, like decoupling, dependency injection etc. Skip talking about code comments and function names etc.
Talk more on how a testable code is designed. give concrete examples.
Exercise 1 and 3 are he very good.
Exercise 2 is both vague and to similar to exercise 1 in they way you presented it. I see the big difference is that exercise 2 is not a leaf-object and thus needs the spy. But we never wrote any of the spy-code, we got it for free. This makes exercise 2 almost the same as the first. We should have at least spend half the time improving the spy part of the code.
Also the design the code of exercise 2 is vague. Change to problem that is concrete, familiar and already well known for embedded developers so we do not have to spend so much time trying to figure out what design is and how you envisioned how to solve it. Exercise 1 and 3 are excellent at this, everyone knows a linked list and how a memory mapped device works, there is no ambiguity.
I would have to start with setting up a X86 compiler and make files for building the test binaries.
Challenges to applying:
Build system. Our code is also very monolithic.
Show the time in UTC. This would have helped us a lot.
I am not an expert on US time zones etc. But you specified the time as 7 CST, but I think it was 7 CDT (daylight savings).
The cyber-dojo thing worked excellent. I have used it some myself previously so I knew how it worked.
Calling in to get the audio over telephone did not work on the second day. So we used a the PC-sound instead.
Legacy code workshop:
Recommend to others: