Christopher Di Bella Christopher Di Bella's Personal Website

SG20 Education and Recommended Videos for Teaching C++

Abstract

In today’s blog, we look at both the newly minted Study Group for education in the C++ Standard Committee. We also look at a small number of conference videos that I recommend teachers consider while they’re waiting for this Study Group to produce usable materials.

Introducing SG20 Education

WG21, the C++ Standards Committee, has just approved a new Study Group for education. This study group is called SG20 Education, demonstrates that they indeed care about ensuring that C++ is both beginner friendly and expert friendly.

History

I’ve been teaching C++ since 2013, and ever since the C++ Core Guidelines came out, I’ve wanted to see a set of guidelines emerge for teaching C++. I didn’t know how to go about this, so I kept to myself. I’ve been publicly trying to innovate education in the C++ world since 2016. This was motivated, in part, thanks to Kate Gregory and Sergey Zubkov. I eventually amassed enough experience and feedback that I felt it was time to deliver a talk at the C++ Edinburgh user-group. When I was asked to review a draft of the Direction Group proposal, I made an almost off-hand suggestion to Michael Wong that a Study Group for education would be a nice addition to the Standards Committee. I certainly didn’t expect the idea to fly.

Apparently, the Direction Group liked my suggestion so much that they commissioned JC van Winkel and me to write ‘P1231 Proposal for Study Group: C++ Education’, which asks the committee to officially form a Study Group for education. At the same time as this, I was working on my CppCon 2018 talk about teaching programming using C++, and that helped JC and me work out that we have compatible ideas when it comes to teaching C++. P1231 was so well-received at the C++ Standards meeting in San Diego that the Committee Convener, Herb Sutter, established SG20 as the Study Group for Education, with JC van Winkel as its first chair. Congratulations, JC!

Introducing JC van Winkel

JC has been teaching C++ since 1992, working for AT Computing, a small courseware spin-off of the University of Nijmegen, the Netherlands. He’s been a part of the Netherlands programming languages committee that represents the Netherlands at the WG21. JC joined Google’s Site Reliability Engineering team in 2010, and is a both a founding member and lead educator of the SRE education team, SRE EDU.

P1231 was a joint effort between JC and me. Neither of us are able to individually attend all three WG21 meetings each year. Given JC’s long term experience in WG21, JC was appointed as the chair for SG20. I’ll be acting as a lieutenant, and will step in on organisational matters when he’s unable to attend, but all statements with a sense of finality will come from JC.

What is a Study Group?

A Study Group is an official part of the Standards Committee that focuses on a single particular area of interest. These Study Groups review proposals for additions to C++ that are related to that area of interest. The most famous two are SG1 Concurrency and SG14 Game Development & Low-latency. It is my hope that SG20 will also become a household Study Group.

What does SG20 aim to achieve?

Curriculum guidelines

As articulated in P1231, the goal of SG20 is not to provide normative curricula for teaching C++, but rather to provide teaching and curriculum guidelines. Although this was once a dream of mine, full credit goes to JC for suggesting guidelines in favour of normative curricula. The benefit of this approach is that it lets teachers pick-and-choose which recommendations are fit for them so that they can build their own curriculum.

If you’re thinking that there should be prescribed materials, I’d ask if there’s any style guide that you’ve followed, but have disagreed with a particular rule (and possibly disregard it). Teaching is no different, and we fear that prescriptive curricula may be too rigid, which will cause disgruntled teachers to build their own curricula anyway, but without the recommendations of teaching experts.

Tutorials for new C++ features

The C++ Standards Committee releases a new International Standard for C++ every three years, and also releases Technical Specifications when necessary. The problem is that the teaching material for these new features is often lagging and that makes it difficult to adopt new features when a new release comes out right off the bat. This is extremely problematic for Technical Specifications, which are released specifically to get feedback from the community!

Another goal of SG20 is to get teaching material out the door when features are added to either the C++ International Standard or any C++ Technical Specifications. The exact specifics of how this process works remain to be discussed.

Rationale to be added to the C++ Standard

During the discussion that birthed SG20, it became apparent that some members of the C++ Standards Committee would like to see rationale introduced into the Standard. At present, the rationale on new features is lost between the feature’s design and its inclusion into the Standard.

Bjarne has noted that this has been a problem in C++ for a long time: even before C++98. There were attempts to incorporate rationale, but it seems that a lack of time and motivation whittled these attempts to naught. In his opinion, The Design and Evolution of C++ (D&E) and the ACM History of Programming Languages (HOPL) papers address some of the lacking rationale. You can find more in the the C++ papaers for HOPL II and HOPL III.

JC has praised the rationale found in C89, and agrees that both D&E and HOPL are good movements to preserve some of the rationale for design decisions in C++. I’m also in agreement on D&E; I haven’t read the HOPL papers yet (but I trust their opinions).

Finally, Shafik Yaghmour has praised the C99 rationale, saying that it is “an invaluable tool for understanding C99 choice”. Shafik frequently uses this document when he answers questions on StackOverflow.

How often will SG20 meet?

Monthly.

I want to learn or help! How do I join? Do I need to be a member of the C++ Standards Committee?

You don’t need to be a member of the C++ Standards Committee, nor do you ever need to be. In fact, it’s best that we have some input from outside of the committee altogether to keep us true to our mission. If you’re interested in joining, please email either JC van Winkel or me, and we’ll add you to the mailing list.

I expect this process to become automatic at some point, but this is the state of the union at present.

SG20 is still in its infancy; I need stuff now!

Yes, SG20 is still starting out. So much so, that at the time of writing, we haven’t even had our first meeting yet. Below are a list of conference videos that I’ve compiled for teachers to watch (and will update if recommendations come in). There’s well over a day’s worth of videos below, but these aren’t a random assortment of my favourite conference videos. Rather, they are sessions that communicate values about:

teaching people how to write programs using C++, or

writing C++ programs using approaches the community agrees produce better code.

Most of the videos listed are not videos on how to facilitate teaching C++, but rather content that every teacher should know, or a demonstration of how a particular topic has been taught well. I have grouped the ‘teaching C++’ videos at the top of the list, and everything else is sorted into various groups.

Some videos should be watched in a particular order: those videos are grouped together and have an ordering to their left. Most videos also have an intended audience for that video. You should still watch all the videos, even if your main student demographic doesn’t fall into the specified level. The intended audience column is designed to give you a bit of a heads up on what level of rigour you ought to expect while watching that video. It’ll then be up to you to adapt that material so that it’s appropriate for your audience.

Please remember that this is a list of videos that I recommend teachers watch, not an exhaustive list of C++ conference and usergroup videos. If you think your talk or your favourite talk should be considered by teachers, please send me an email to discuss.

Strictly on teaching

Diversity and inclusion

Event Speaker Title Audience Length - Meeting C++ 2017 Guy Davidson Diversity and Inclusion Lightning Talk 15 min - NDC Oslo 2018 Patricia Aas Deconstructing Privilege Everyone 60 min

Critical talks

The following talks are talks that all programmers should watch as soon as possible. As programming teachers are a subset of programmers, this includes you.

History

You might think that videos covering the history of C++ or the history of programming in general aren’t suited for a list on teaching. History is something that teachers need to understand in order to teach effectively: it helps to answer questions or opinions that you might have. Why are things the way they are today? What does this term actually mean? What problems are that feature meant to help solve? What can we learn from the past that will help us write better software in the future? Not all of the knowledge that is imparted by these videos is suitable for students to learn from, but it will help to answer some of the tougher questions that students will eventually ask.

Event Speaker Title Audience Length - Pacific++ 2018 Sean Parent Generic Programming Keynote 90 min

Good programming habits

Benchmarking

I’ve often seen people claiming that C++ is this programming language that you only use if you’re after high performance, or are wanting to “squeeze every last cycle out of the CPU” as one person put it. This isn’t true: a lot of programmers use C++ for its lightweight abstraction model and its ability to let us expressively write code.

The only time a C++ programmer cares about performance or efficiency is when we benchmark the code that we want to claim is ‘efficient’.

What’s next?

SG20 meets, writes papers, and advises. In the meantime, I plan to blog about some books (maybe book reviews) at some point. Stay tuned.

I haven’t yet set up Disqus for this site. If you’d like to discuss what you’ve read here, please head to this GitHub issue. I’m always open to feedback!

If you’d like to find out when I blog next, please use my RSS feed.

Acknowledgements

Thanks to JC van Winkel, Simon Brand, Kate Gregory, Nicole Mazzuca, Matt Stark, Bjarne Stroustrup, Titus Winters, Michael Wong, and Shafik Yaghmour for reviewing.