CppCon Program Highlights, 8 of N: C++ Tools

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.


Tool support is essential to modern software engineering techniques, including notably refactoring and the unit testing heavily popularized by TDD. Here are some of the CppCon talks related to such tooling. As always, the talks are by the people in the trenches, who are heavily using the tools or actively involved in developing them -- in some of the world's largest code bases and code repositories with O(10 billion) lines of preprocessed code.

In this post:

  • Large-Scale Refactoring @ Google
  • C++ Test-driven Development: Unit Testing, Code Assistance and Refactoring
  • Pragmatic Unit Testing in C++
  • A CTO's guide to Modern C++


Large-Scale Refactoring @ Google

Many organizations have significant investments in a large existing C++ codebase, and Google is no exception. Our code is intended to survive for decades, but continue to track new language standards as they emerge. To do so, we have developed tools and techniques which provide the ability to automatically refactor code to use new APIs as they become available.

In this talk, I'll discuss some of the reasons for doing migrations that impact hundreds of thousands of files, and how we do them at Google, using tools such as ClangMR. I'll give examples, such as our recent migration to the standardized std::unique_ptr and std::shared_ptr types and lessons we've learned from these experiences. Finally, I'll point out pitfalls others may face in doing similar work, and suggest ways that they can be avoided.

Speaker: Hyrum Wright, Software Engineer, Google. Hyrum Wright is a software engineer at Google, working on C++ library infrastructure. He is a member of the Apache Software Foundation, and a contributor to Apache Subversion. In a previous life, he was a grad student. He enjoys cycling. Twitter handle: @hyrumwright


C++ Test-driven Development: Unit Testing, Code Assistance and Refactoring

Unit Testing and TDD, if applied correctly, lead to high quality and simple code. If done by hand, both often require writing some boiler-plate code and can be slow and cumbersome. Especially refactoring without good tool support can be a burden. Java and C# developers are used to have good tool support for these tasks to be effective. Many C++ developers often aren't even aware of the need for the practices, because without tool support and training of the goals, they are hard to discover.

This talk introduces C++ Unit Testing, Test-driven Development, and Refactoring and demonstrates the tooling available for Eclipse CDT for free on www.cevelop.com that was inspired and implemented by the author and his team.

For example, when phrasing a unit test to use a to-be-defined class, the class is generated automatically from its name used as a type. Another tool feature is simplifying a function, by extracting a sub-function and placing a call in its place.

Speaker: Peter Sommerlad, Professor, Director IFS, FHO HSR Rapperswil - IFS Institute for Software. Prof. Peter Sommerlad is head of IFS Institute for Software at FHO HSR Rapperswil. Peter is co-author of the books POSA Vol.1 and Security Patterns. His goal is to make software simpler by Decremental Development: Refactoring software down to 10% its size with better architecture, testability and quality and functionality. Peter is a member of the C++ standardization committee, ACCU, ACM, SI and president of SWEN.Website: http://wiki.hsr.ch/PeterSommerladTwitter handle: @PeterSommerlad


Pragmatic Unit Testing in C++

Successful adoption of unit testing goes beyond picking a framework: The effectiveness of unit testing is dependent on run-time analysis, static analysis, and other tools to make up the "iron triangle" necessary to get profitable increases in feature velocity and MTBF in the field. We'll cover where to start in a legacy codebase get the most ROI on unit testing effort, the top 5 legacy design knots and refactoring steps to loosen those knots, and how to write tests that are easy to read *and* maintain. Intermediate knowledge of linkers and preprocessors are highly recommended.

A CTO's guide to Modern C++

It's a very exciting time for C++ programmers: multiple competitive, capable toolchains to choose from, a re-invigorated standard body, and great IDEs that even die-hard emacs/edlin users are flocking toward. On the flipside, there are practical aspects that are extremely frustrating: what vendor can I pay for support of my toolchain/debugger/IDE? how can I fund open source development to move the needle in areas I care about? what static analysis tools are available that actually work? These questions, and other operational aspects of maintaining a C++ engineering organization, are covered in detail so you can immediately start covering your bases without learning the hard way.

Speaker: Matt Hargett Matt Hargett is Chief Technology Officer at PacerPro, and lives in San Francisco with his husband of 14 years. His first programming was on a TI 99/4a with his mother, and his first reverse engineering was on an 8086 to make shareware games easier to finish. Matt co-authored Pragmatic Unit Testing in C#, and has spoken at conferences around the world on network security, reverse engineering, unit testing, and static analysis. His hobbies include world travel, playing video games, and writing/publishing indie pop songs under the moniker "the making of the making of".

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.