Clean C++

Clean C++

This is a cross-post from www.ModernesCpp.com.

I want to make a short detour from my long serious of posts about the C++ Core Guidelines. I read the excellent book "Clean C++" in the last days and I cannot hesitate to write a review. Here is my review.

I hear often the question at the end of my seminars: What books should I read to become a better software developer? Here is one half of my answer: You should read Design Pattern: Elements of reusable object-oriented softwarePattern-Oriented Software ArchitectureClean CodeWorking effectively with legacy code, and  UML Distilled. Here is the other part of my answer: From the C++ perspective, you should read the books from Scott MeyersHerb Sutter, and the C++ Core Guidelines. In total there are more than 3000 pages full of very precious content. 

Now, my answer becomes quite easy. Read the book "Clean C++" by Stephan Roth. The book is the ideal fit for your breadth-first search. In your depth-first search read the classics, I mentioned before. Why?

The author achieved it in 300 pages to give a very good but not superficial overview of the topic we have to know as professional software developers. His book is based on C++11 but refers often to C++17. What I like in particular about the book is: It is not only about the Don't but also the Do's.

 But first things first. Clean C++ has 9 chapters and a short introduction to UML. The first two chapters are programming language agnostic. In the chapters to unit testing and key principles of software development such as (Keep It Simple and Stupid (KISS), You Aren't Gonna Need It (YAGNI), Don't Repeat Yourself (DRY), or Principle Of Least Astonishment (PLA), the author talks about evergreens that will hold for sustainable software. The remaining chapters are also about good software practices but more from a C++ perspective. This new point of view starts with the chapter basics. Stephan Roth presents the key principles to write good names, comments, and functions. What has modern C++ to offer? A question that will be answered by the author in the next chapter "Advances Concepts of Modern C++". C++ has its roots in object-orientation but the modern C++ becomes more and more dominant by functional concepts. What are pros and cons of this paradigms? Questions, to which the book provide answers in about 60 pages. Unit-Tests should be used as a basis for Test-Driven Development. This is his focus in the next chapter Test-Driven Development (TDD). He shows in an elaborate example, how you can use TDD to convert Arabic numbers into Roman numerals. The chapter on Design Pattern and Idioms completes the book. One design pattern is very close to Stephan Roth: dependency injection. Dependency injection is the cure to get rid of the heavily discussed singleton anti-pattern. Admittedly he is right.

What makes "Clean C++" to such a great book that I will use it as a general recommendation at the end of my seminars? Do not have the cited classics all the important information? Definitely! The book "Clean C++" is from my point of view the only and pragmatic introduction into to the topics for good software development in C++ which you can easily consume in one week. If you are done with this introduction, you should dive into more specific topics may they be general or C++ specific. This will keep you busy for the rest of your life as a software developer.



To view or add a comment, sign in

More articles by Rainer Grimm

  • Charity run for ALS

    Tomorrow, on the 28th, there will be a charity run for ALS in Rottenburg. The course is exactly 1 km long.

    2 Comments
  • Small Safety Improvements in the C++ 26 Core Language

    Safety is an important concern in C++26. Contracts are probably the most important feature for safety.

    1 Comment
  • My ALS Journey (30/n): Cippi at the CppCon

    This week was very exciting for Cippi. She visited CppCon in Aurora, near Denver.

    2 Comments
  • Contracts: Evaluation Semantic

    After briefly presenting the details of contracts in my last article, “Contracts: A Deep Dive“, I would like to take a…

  • My ALS Journey (29/n): I feel Good

    I often receive messages asking about my health and wishing me well. I am very happy to receive these messages and just…

    5 Comments
  • Contracts: A Deep Dive

    August 25, 2025/in C++26/by Rainer GrimmI already introduced contracts in the article “Contracts in C++26”. In this…

  • My ALS Journey (28/n): Bureaucracy – The German Disease

    Today I want to write about a sad topic. Bureaucracy in the German healthcare system is becoming increasingly absurd.

    2 Comments
  • Data-Parallel Types: Algorithms

    The data-parallel types library has four special algorithms for SIMD vectors. The four special algorithms are min, max,…

  • My ALS Journey (27/n): An Emergency Call

    Firstly, I would like to say that I am doing very well and have made a full recovery from my incident. However, I would…

    8 Comments
  • Data-Parallel Types: Reduction

    In this article, I will discuss reduction and mask reduction for data-parallel types. Reduction A reduction reduces the…

Others also viewed

Explore content categories