By Arne Mertz
Due to the complexity of the language and the presence of some low-level language features, "Clean C++" seems to be an oxymoron for many developers. Especially in enterprise land, C++ applications tend to have large code bases grown over several years. Those legacy code bases tend to suffer from underdeveloped or missing unit and integration tests. Development teams maintaining such code bases resign over time and adopt "don’t touch it, you’ll break it" policies.
Nevertheless, it is possible to write clean C++, to refactor even large code bases as needed and cover critical parts with automated tests. The key elements to successfully regain control over code quality are a dedicated team and a set of properly sized and prioritized steps towards that goal.
In this talk, we’ll touch a few important topics about cleaning up a code base. This includes knowing when and where to do the refactoring, what strategies to use, and to bring the team on the same page.
In the end, there is the question of tooling or its absence. Especially when a C++ code base is tied to an old compiler and IDE for some reason, there still are ways to let the compiler and other tools help us.