Well, that’s a wrap! CppCon 2019 is pretty much over for me; I’ve done my pre-conference weekend class and my four “Back to Basics” talks and my one non-B2B talk (based on this blog post from February)… and also the perhaps-inaugural “C++ Pub Quiz.”
What is C++ Pub Quiz, I hear you ask? Well, I got the idea after hearing that they do a “pub quiz” at the ACCU conference. Turns out that their idea of “pub quiz” is vastly different from mine, but I didn’t find that out until later. Mine was a straightforward trivia night — five rounds, ten questions per round, write down your team’s answers on a sheet of paper and turn it in at the end of the round. High score after five rounds wins the game. (I had prepared ten rounds’ worth of questions, so we played two games with a refueling break in the middle.)
It took all week for me to figure out if I should try to do this Open-Content-ish event. But I’m very glad I did! (We did have some snafus finding a suitable space. Pro tip: Late night after the closing keynote is a good time to organize a casual event, but also a bad time to find empty rooms that we’re still technically allowed to use.)
Four teams participated in Pub Quiz. Thanks to (from left to right) Team Unknown Behavior, Team Undefined Behavior, Julio Iglesias, and Team Jan! Thanks also to Katrina Siegfried for helping organize and for taking the much higher-quality original of this photo.
Our winning team of the night was Team Undefined Behavior — which over the course of the night I learned contained both a Princeton classmate of Raymond Chen’s and the Swedish national Mahjong champion!
A sample round of C++ Pub Quiz might look something like this:
In C++17, what is the type of the expression
L""? [SAY: “capital ell, double-quote, double-quote.”]
True or false: When
xis of type
int, the compiler may assume that
What C++ feature did Sean Parent once call “the base class of evil”?
Which of the following is not an access control specifier in C++?
There are two ways to write a type alias: old-school
typedefsyntax and modern
usingsyntax. Using either of the two syntaxes, write a single declaration that defines
PAas a type alias for “pointer to array of function pointers, each taking
The standard types
shared_ptrare commonly known as what kind of pointers?
The standard function objects for addition and subtraction are called
std::minus, respectively. What is the standard function object for multiplication?
The dawn of template metaprogramming was in 1994, when a German member of the ISO Committee wrote a program that printed the prime numbers as an infinite sequence of compiler error messages. Name the author of that first prime-printing metaprogram.
What is the base-10 representation of two to the thirty-first power?
Bjarne Stroustrup’s 1985 book The C++ Programming Language was consciously modeled on a 1978 book titled The C Programming Language and popularly known as “K&R,” after its two authors. For one point, name both authors of “K&R.” First and last names, please. For one extra bonus point, give the middle initials of both authors.
Round 3 of each game was the brainstorm round. For example:
The current C++ standard, C++17, defines 11 core language keywords beginning with the letter “C”. Name as many of these keywords as you can. Your score for this round will be the number of keywords you name correctly, minus the number you name incorrectly (if any).
We even worked in a “music round” with surprisingly few technical difficulties. I’d cue up a YouTube video of a conference talk at some pre-selected point, play a snippet of the audio, and ask teams to write down — for one point each — the presenter and the title of the talk. (Example.) Team Undefined Behavior did ridiculously well on this round, by the way!
In short, C++ Pub Quiz was a great success, and I think it just might become a recurring event at future CppCons.
If you run a local C++ user group — send me an email with 10 pub quiz questions of your own making, and I’ll send you the complete ten-round question set that I used at CppCon 2019.