My Notes from Cpp Europe Conference June 2020

by Jan Gabriel | 22 Jan 2021

last edited: 22 Jan 2021

CppEurope Conference C++ SOLID ApprovalTests std::move


I decided to post my notes from the CppEurope online conference held on 23 June 2020. It was the first C++ conference I've attended and for me a milestone in my development as a C++ software engineer. I hope to attend the next one on 23 February 2021. Thus, without further ado here are my notes and lessons learned from the conference.

Further information for the talks held at the conference can be found at CppEurope.

Summary

The CPP Europe’s 4th edition was a digital conference on the 23rd of June 2020. The conference was attended by people from over 7 different countries and this one-day event featured 6 talks by experts in the C++ field. The goal was to share knowledge on the new features of the C++20 version as well as some techniques to improve one’s own programming work. Below are the highlights of all the sessions.

Session 1 – Rainer Grimm (Keynote)

C++20 - Concepts

Rainer Grimm is a senior software developer with over 20 years of experience in the field. His session focused on the new C++20 feature called Concepts. A concept is a type of constrained placeholder which was removed from the C++11 release in 2009 and again before the C++17 release. It was deemed too light for the previous releases but has now been implemented in the C++20 release. A concept (constrained placeholder) functions in contrast to auto (unconstrained placeholder). It is used as a compile-time if-statement. This is extremely helpful to catch type-related issues when using template classes at compile-time, which would normally not be caught. Further details and examples of the concepts can be seen here.

Session 2 – Klaus Iglberger

Back to basics: The SOLID Principles

Klaus has a PhD in computer science and has been focusing on large-scale C++ software design for 10+ years. In his session, he elaborated on the well-known SOLID principles for software design. He presented practical examples on each of the 5 principles and have shown in great detail their importance and relevance even in today’s programming. He also showed how it is better to use dependency injection in a class rather than inheritance.

Session 3 – Alex Bolboaca

Challenges and techniques for dealing with C++ legacy code

Alex has over 20 years of experience in software development. He currently trains teams at companies in dealing with various software challenges. His presentation showed the techniques he has found most useful during the years when working with and understanding legacy code. He proposed the following 4 techniques:

  • Using a strangler pattern;
  • Injecting a “.cpp”;
  • Creating a custom compilation unit when compilation is slow; and
  • Utilizing dependency injection through a constructor (best to inject an interface).

He also stretched the importance of getting info from everyone, writing tests, using pair programming and even having high-level discussions with the relevant software architects.

Session 4 – Claire Macrae

How to use approval tests for C++ effectively.

Claire has a significant 30+ years of C++ experience with speciality in using Qt. She has recently co-authored the new version of approval tests. The approval test framework works on top of most unit test frameworks and provides an efficient way to faster create high-coverage tests. She performed a live demo session in CLion and showed its ease-of-use and effectiveness. In my opinion, this was the best and most implementable session of the day.

You can find her talk on youtube.

Session 5 – Gordon Brown

GPU programming in C++ with SYCL.

Gordon is a principal software engineer at Codeplay Software specializing in heterogenous programming models for C++. His session focused on the extended use of C++ in GPU programming on top of the SYCL framework (comparable to OpenCL). His talk was quite in-depth into the architecture of most modern GPUs and how the SYCL framework enables GPU programming in C++. This talk focused on the significance of the C++ language to perform hardware-level processes at high speeds.

Session 6 – Nicolai Josuttis (Keynote)

Let’s Move – The hidden feature and traps of C++ move semantics.

Nicolai is well-known in the programming community for his 25+ years as part of the C++ standards community, his multiple publications in this domain and his influence in the language itself. His talk focused on the features and usages of std::move. This was quite a practical session and he made a significant effort in contrasting the different methods of passing by value and reference. He also showed some hidden traps in the language when using, for example, a range-based loop on a moved object and the implications due to its lifetime limitations in certain scenarios. In the end, the practical lessons taken from his talk was priceless and measurable.

Conclusion

The CppEurope conference brought together Software Gurus from different countries and industries to focus on relevant C++ topics. The amount of knowledge shared during the presentations and the QA session would be difficult to summarize on one page but it does fall into the following points:

  • The C++20 Concept’s compile-time type checking should be considered to prevent runtime errors when using STL template classes.
  • The SOLID principles stay relevant even today and enable clean code, extendibility, maintainability and legacy code refactoring.
  • The basics of working with legacy code lies in breaking it up into smaller, more digestible chunks.
  • Approval tests are the way to go to achieve higher test coverage in less time.
  • The use of C++ also extends to GPU level when utilized in combination with the correct framework.
  • Measure your performance and make use of std::move, the right way, for efficient and powerful C++ programs.