This advanced C++ training is a course on good software design with the C++ programming language. The focus of the training is on the essential and C++-specific software development principles, concepts, idioms, and best practices, which enable programmers to create professional, high-quality code. The course aims at understanding the core of the C++ programming language, teaches guidelines to develop mature, robust, maintainable, and efficient C++ software with a minimum of dependencies, and helps to avoid the most common pitfalls.
There is no requirement on the operating system. The programming exercises work on Windows, Linux or MacOS. For the programming exercises, participants must be provided with a C++11/14/17 compiler. It is recommended to at least provide Microsoft Visual Studio 2015, GNU 4.8, Clang 3.6, or Intel 15.0. Additionally, for Windows with Visual Studio CMake is required to generate the according VS solutions.
Participants are either required to bring their own laptops or the training room must be equipped with appropriate desktop machines. In the optimal case each participant has his own machine and can solve the programming exercises individually, but pairs of two are also possible.
Participants are required to have at least one to two years of C++ experience. The course expects that all participants are familiar with the syntax of the language and have used inheritance and templates before. It assumes that the most common standard library components are familiar (for instance std::vector).
Chapter 1: The SOLID Principles
The SOLID principles represent the fundamental design principles. Adherence to these principles is fundamental for successful software development. This chapter explains what’s behind these principles and why they are essential.
Chapter 2: Concepts and the STL
The Standard Template Library (STL) has proven to be a breakthrough in efficient and flexible library design. This chapter explains how to use the STL properly to increase productivity, performance and to significantly reduce bugs.
Chapter 3: Class Design
Designing good classes can be a real challenge. This chapter explores the most important aspects about class design: It teaches how classes must be designed to minimize coupling, summarizes the details about the compiler generated functions, and gives guidelines on how to deal with data members, member functions and virtual functions. It also explains how C++ code can become 100% robust, even in the presence of failure.
Chapter 4: Dynamic Polymorphism
“Inheritance is the Base Class of Evil” (Sean Parent). This chapter explains why in C++ value semantics based designs are favored to inheritance-based dynamic polymorphism. It goes into detail about how this is achieved in “Modern C++” (e.g. Type Erasure) and demonstrates several modern C++ design patterns. It also shows how to implement inheritance hierarchies properly and how to avoid the problems and the abuse of inheritance.