How can one use the latest and greatest features of C++ to create an API
which can be used easily and intuitively? Or write a complex algorithm
which is still easy to understand and requires just minimal documentation?
In this talk we take a look at various code snippets and collect some questions
you could ask yourself to increase the code quality. Questions like
"Can this API be misused easily?", "How can it be tested?" or "Can the error
handling be reduced with another design?".
With every question we will show a bad code snippet and introduce a
design pattern to improve the code. With
ideas like "design by contract" in combination with the "builder", "factory"
or "visitor" pattern (and more) we will demonstrate how a different design
pattern leads to a clean and sustainable implementation.
One source of our code snippets will be our next-gen open source communication
middleware for POSIX-based operating systems called iceoryx
[https://github.com/eclipse/iceoryx]. This allows us to examine the design patterns
in production code which runs on autonomous vehicles and robots.
In this talk the audience will get equipped with the design principles which will
guide it through
- code reviews
- software designs and UML reviews
- testing your software