The C++ Core Guidelines

CppCon regrets that The C++ Core Guidelines will not be offered this year and we apologize for any inconvenience withdrawing this offering may have caused.

“The C++ Core Guidelines” is a two day training course taught by Kate Gregory of Gregory Consulting Limited. It is offered at the Meydenbauer from 9AM to 5PM on Saturday and Sunday, September 17th and 18th (immediately prior to the conference). Lunch is included.

The first keynote at CppCon 2105 was Bjarne Stroustrup announcing the C++ Core Guidelines. They are on GitHub and once he announced them they quickly became a trending topic across all languages. Here is a description of the guidelines from there:

The C++ Core Guidelines are a collaborative effort led by Bjarne Stroustrup, much like the C++ language itself. They are the result of many person-years of discussion and design across a number of organizations. Their design encourages general applicability and broad adoption but they can be freely copied and modified to meet your organization’s needs.

The aim of the guidelines is to help people to use modern C++ effectively. By “modern C++” we mean C++11 and C++14 (and soon C++17). In other words, what would you like your code to look like in 5 years’ time, given that you can start now? In 10 years’ time?

The guidelines are focused on relatively higher-level issues, such as interfaces, resource management, memory management, and concurrency. Such rules affect application architecture and library design. Following the rules will lead to code that is statically type safe, has no resource leaks, and catches many more programming logic errors than is common in code today. And it will run fast – you can afford to do things right.

Kate will cover the guidelines, a small helper library called GSL, and the tool support for the guidelines. She will also cover how the guidelines themselves are managed, the relationship to the standard, and how to contribute.

Course Description

C++ has a reputation for being a difficult and sometimes dangerous language. The C++ Core Guidelines is a set of rules designed to help you write modern, safe C++ – saving you time and effort as well as making your code more reliable. You can start to use them – and, more importantly, to use tools that check your code against them – today. In this course you will learn the philosophy behind the guidelines and see some examples of how following them can improve your code. You will learn how to check your code against the guidelines, how to use the helper library called GSL, and how to get involved in the project yourself. You will also be ready to show the rest of your team the Guidelines and tools and how they can improve everyone’s situation.

Prerequisites

This course is for you if:

  • You are relatively new to C++. The Guidelines will keep you away from the dangerous or challenging parts of the language and reassure you that you are using C++ properly.
  • Your C++ is a little rusty. You may have missed some new additions that will make your life much simpler. Many of the Guidelines encourage use of these new features in place of older, more difficult ones.
  • You are the “local expert” to whom people turn for advice and guidance. These guidelines can be an excellent source of wisdom for you to share. You might even want to help improve them.

Bring your own code and a laptop so that you can look for places that are not following the guidelines. Join a discussion about selected guidelines and how to apply them in your codebase. Make your code safer, easier to read and maintain, and as fast as ever (even faster in some cases.) Detailed instructions about preparation and installation will be sent after registration. If you can’t use your own code, some code will be provided for you to practice with.

Course Topics

  • What are the Core Guidelines? How can you get them? Who wrote them? Will they change? What are they for? Are you supposed to internalize them, or do they drive tools?
  • How the guidelines will help you – worked examples and their effect on your code
  • Tool Support
  • The Guidelines Support Library, GSL
  • The 16 core sections of the guidelines, with detailed discussion on selected guidelines including the effect on your code of following it, and how to apply it to an existing code base.
  • The 9 supporting sections of the guidelines
  • How you can get involved
  • Guideline profiles

In addition, there will be plenty of lab time for you to go through your code and try to apply these guidelines to it, with instructor support.

Course Instructor

Kate Gregory

Kate Gregory has been using C++ since before Microsoft had a C++ compiler, and has been paid to program since 1979. She loves C++ and believes that software should make our lives easier. That includes making the lives of developers easier! She’ll stay up late arguing about deterministic destruction or how modern C++ is not the C++ you remember.

Kate runs a small consulting firm in rural Ontario and provides mentoring and management consultant services, as well as writing code every week. She has spoken all over the world, written over a dozen books, and helped thousands of developers to be better at what they do. Kate is a Microsoft Regional Director, a Visual C++ MVP, an Imagine Cup judge and mentor, and an active contributor to StackOverflow and other StackExchange sites. She develops courses for Pluralsight, primarily on C++ and Visual Studio. In 2014 and 2015 she was Open Content Chair for CppCon, the largest C++ conference ever held, where she also delivered sessions.