CppCon 2015 trip report

Last week, I was lucky enough to attend CppCon 2015 in Bellevue, Seattle. CppCon is the largest C++ conference in the world, with over 700 attendees from industry, research institutes and universities, and 5-6 parallel tracks of talks. It was my first time attending and I also had to give a talk, so I was really excited!

The conference was really great, it had a fantastic programme and everything from the talks to the organisation was extremely high quality. Each day featured a programme from early in the morning until late afternoon, and most days there were additional evening sessions that lasted until 10. It was awesome and exhausting :-).

The conference kicked off with a keynote from Bjarne Stroustrup about Writing Good C++14. It starts with a bit of a progress report about where the language currently stands, and then focusses on coding rules, what’s (usually) bad about them, and how we can give good, useful guidelines to programmers. The talk highlights some typical gotchas like dangling pointers and how modern C++ can help a lot to produce better code and be more productive. He introduced a set of guidelines, the isocpp C++ Core Guidelines. They are an open and collaborative effort, hosted on GitHub, to provide a set of guidelines and supporting materials to help people to use modern C++ effectively, and supported by many of the “big names” in the C++ community. Quoting from their GitHub:

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.

Personally, I think the guidelines are a great effort and it’s good to see many of the leading C++ people agree and give a set of consistent guidelines. I am not entirely sure what to make of them in general though, there are quite a lot of guidelines, and that GitHub repository would possibly be quite overwhelming for a beginner or even an established programmer that is trying to get into modern C++. The document is huge, and there are so many things in there. It’s probably more of a reference, which is great, but it’s a bit of a shame to lose the less experienced C++ programmers as an audience. It’s also worth noting that the guidelines are far from finished (and probably never will be, as they will continuously evolve), and lots of people started contributing at and after CppCon.

The guidelines come accompanied with a very small header-only library called the GSL, guideline support library, that provides a few tools that help follow the guidelines and produce safer and better code; for example string_viewarray_view and owner<T>. An implementation of the GSL is available here and it runs on all major platforms.

Quite a few talks were centred around these guidelines, for example the second-day keynote from Herb Sutter, Writing Good C++14… By Default, which built upon the first keynote.

Another big topic of the conference was static code analysis tools, i.e. how these tools can help us catch more (potential) bugs, and many of the talks stretched the boundaries of how far these tools can go. Some of this is quite related to the GSL, as for example a type like owner<T> does not only make intentions of the code clearer, but can also serve as an annotation for these analysis tools. One good talk that I’ve attended was A few good types: Evolving array_view and string_view for safe C++ code.

On Tuesday morning, I gave my own talk, 3D Face Tracking and Reconstruction using Modern C++. It’s about my work in computer vision in the context of C++. I presented the work we’ve recently put on Github and some obstacles we encountered along the way, for example doing certain things in C++ like solving linear systems for which we’ve previously used Matlab. I was really happy with the attendance and from the feedback I got I think the talk was well received. I was quite surprised that half of the people or so had some experience with OpenCV, but that is great!

There were also two people from the Open Source Robotics Foundation attending my talk, Jackie and Louise, and they later gave their own talk. The OSRF is behind the Robot Operating System, ROS, and Gazebo, a robot simulator. Their talk was C++ in Open Source Robotics. I haven’t fully watched it yet, but it’s about the upcoming ROS 2, and the Gazebo simulator. A first alpha version of ROS 2 has been released recently and they’re extensively using C++11 and are now fully cross-platform. The biggest change is, according to their talk, “a major API change that targets new use cases for ROS, including embedded hardware, multi-robot systems, and real-time performance”. Modern C++11/14 is definitely coming to a lot of fields, including robotics!

After my talk, I was able to enjoy the conference even more, and on day 3, Wednesday, there was in my opinion one of the best keynotes: Sean Parent was talking about Better Code: Data Structures. The talk is in general about data structures in memory, object relationships, and STL containers and algorithms, and Sean Parent’s use of the STL is always just mind-blowing.

I also liked the keynote on Thursday from Chandler Carruth, Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!, but it was a very specific talk about performance micro-optimisation – what to be careful about when benchmarking and how to “trick” the optimiser. It thus wasn’t the most immediately useful talk for me but it was extremely entertaining and I learned a lot! The live coding was great :-).

The Friday keynote was also good, Eric Niebler talked about Ranges for the Standard Library. I’ve already seen his talk at C++Now in May, but it’s a really good talk and ranges are really cool and I hope there will be a stable, cross-platform range-v3 implementation soon! You can read a tiny little bit more about ranges in my earlier C++Now blog post.

One of the best talks of the conference was Kate Gregory talking about Stop Teaching C. As a fellow teacher I’ve waited for something like this, and the talk is absolutely brilliant. Kate talks about how we should teach idiomatic C++ from the beginning and not start with things like char*printf() or []-arrays. It’s a must-watch for anybody teaching C++.

Two other really brilliant talks were from Andrei Alexandrescu. His first talk was Declarative Control Flow and he presented an alternative, general approach to handling exceptional flow using more declarative syntax. The resulting code is quite simple and smaller. He is a brilliant speaker and the talk is extremely entertaining and fun to watch! I definitely recommend checking it out! His second talk is quite technical and very specific: std::allocator Is to Allocation what std::vector Is to Vexation. I’ve never had the need to use allocators so I don’t see any use for it for my current work, but the talk was certainly brilliant too.

If you’re using the likes of function pointers, function objects, std::bind or std::function, definitely check out STL’s talk functional: What’s New, And Proper Usage. His talk is very entertaining and he puts an end to a lot of myth floating around and gives practical guidelines on when to use std::function or lambdas.

Another interesting thing that happened at CppCon was an isocpp study group meeting about C++ in games, finance, embedded and other low-latency scenarios. The meeting took place on the whole Wednesday and was very well attended. I chose not to attend because there were so many good talks in parallel, but I was quite sad about it as I would’ve loved to join an isocpp meeting! The study group presented their findings in a talk later in the week though: The Birth of Study Group 14: Toward Improving C++ for Games & Low Latency.

There were so many talks in parallel, and there are a lot that I want to see because they sound really interesting or I’ve heard they were very good. Here’s a small selection:

Even though this blog post is already quite long, this is actually only a small selection of all the talks. There were so many other really good talks, and luckily they’re online on YouTube and the recordings are of really good quality. The whole week was extremely awesome, and I’m very glad that I was able to attend. It was great to see speakers like Bjarne Stroustrup talk live, and it was a very social event with lots of fruitful conversations and new people met. It was my second C++ conference this year, and I already knew a lot of people from C++Now in May, which made socialising much easier. CppCon is very different from C++Now – C++Now is a lot smaller, so you hang out with the same people all the time and really get to know them, which is great. CppCon on the other hand is a lot bigger, but the quality is as superb.

The excitement didn’t end for me there: On Friday I was flying over to Québec City to the next conference, ICIP, to present my latest publication. And my plan for 2016: Getting a better camera ;-).

Leave a comment