‘Unembedding’ embedded systems with TDD

Last 10th of July I presented for the first time my talk named 'Unembedding embedded systems with TDD. Benefits of going beyond the Make It Work phase' as part of the First International Test-Driven Development Conference.

 

Test-Driven Development (TDD) is a development technique that facilitates software developers to face the 'Make It Right' development phase safely just after they've successfully completed the 'Make It Work' phase (that is, we have already gone from 'Red' to 'Green' TDD phases).

 

Once we are on the 'Make It Right' (TDD's 'Refactor' phase) is when we are able to focus all our energy on engineer our code right, iteratively and incrementally, to properly manage its dependencies. In other words, is when we drive our code to have the appropriate architecture to be portable, easy to change and evolve.

Portable Embedded Architecture guided by tests

Here you can see an schematic representation of the architectural layers we end up to have in order to accomplish the above mentioned objectives:

layered_embedded_architecture

To accomplish that we need to use, among other things, advanced programming language features. Doing this in embedded is orders of magnitude harder than in non embedded. TDD allows us to drive our code through them, step by step, while assuring both the cross compiler and the underlying processor keep working as expected (i.e., we do not enter undesirably into the 'Red' phase).

    1. Do we know how to apply TDD in order to develop your code unchained from undesirable dependencies
    1. If you are not an embedded developer, do you think you write some kind of firmware?. Spoiler: probably you do 😉  
    1. Are we aware that in order to succeed, our embedded application and its business logic should be able to be executed under any hardware and by any microprocessor? 
    1. Are we agile enough to easily overcome a hardware or processor change? How are we dealing with the semiconductors shortage?
    1. Are our vendors also our partners? 
    1. Is code coverage an useless or a harmful metric? 
    1. Do you know what mutation testing technique is about? 
    1. Does fulfilling sector's safety standards assure our business viability? 
    1. Which are the differences between External Quality and Internal Quality?
    1. Are Extreme Programming (XP) practices used inside the embedded sectors? 
    1. Is TDD a testing technique? Which benefits does TDD offer over other development approaches? 

You can find answers to these and other interesting questions inside the talk. Major roadblocks to overcome and how to remove them are presented. Somehow, it represents a kind of resume of all the topics covered during my 'Unembedding Embedded Systems' course.

 

Below you have a direct link to the talk and you can find its slides here.

 

Learn more