View on GitHub

C-plus-plus-software-engineering

Material for a training session on C++ software engineering

C++ is widely used in many contexts. This training focusses on software engineering aspects of C++ such as building software, linting, testing libraries and applications, and so on. Also, best practices are discussed such as design patterns.

Learning outcomes

When you complete this training you will be able to

Schedule

Total duration: 4 hours

Subject Duration
introduction and motivation 5 min.
coding best practices 20 min.
exception handling 10 min.
basic usage of CMake 20 min.
linking to libraries using CMake 10 min.
building OpenMP and MPI applications using CMake 5 min.
hands-on session 20 min.
coffee break 10 min.
static code analysis using Clang-tidy/cppcheck 20 min.
writing unit tests with Catch2 20 min.
behavior-driven development with Catch2 10 min.
hands-on session 20 min.
package management with Conan/vcpkg 10 min.
design pattern examples 20 min.
functional programming using ranges 15 min.
hands-on session 20 min.
wrap up 5 min.

Training materials

Slides and source code are available in the GitHub repository, as well as example code and hands-on material.

Target audience

This training is for you if you already use C++ and want to develop production-quality software more effectively.

Prerequisites

You will need experience programming in C++. This is not a training that teaches you how to program in C++ from scratch.

You also need to be familiar with the Bash command line.

More concretely, participants should already be comfortable with the following:

You do not need prior experience with CMake, Catch2, CTest, clang-tidy, cppcheck, Conan, vcpkg, or design patterns. Those are part of the training itself.

Quick self-assessment

If you can do most of the tasks below without looking up basic C++ syntax, you are likely ready for this training.

If several of these items still feel difficult, the training will probably move too fast. In that case, it is better to first take a short introductory C++ course or refresh the basics.

Software and access requirements

To follow hands-on, you need a computer with a C++ development environment installed. You can of course use an HPC system you have access to as well.

Level of the Material

For participants who already have basic to intermediate C++ programming experience, the material in this training is approximately

These percentages describe the level of the software engineering topics covered in the training, not the required entry level in C++ itself.

Trainer(s)