Clean C++


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 software, Pattern-Oriented Software Architecture, Clean Code, Working 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 Meyers, Herb 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.



Thanks a lot to my Patreon Supporters: Eric Pederson, Paul Baxter, and Carlos Gomes Martinho.


Get your e-book at leanpub:

The C++ Standard Library


Concurrency With Modern C++


Get Both as one Bundle

cover   ConcurrencyCoverFrame   bundle
With C++11, C++14, and C++17 we got a lot of new C++ libraries. In addition, the existing ones are greatly improved. The key idea of my book is to give you the necessary information to the current C++ libraries in about 200 pages.  

C++11 is the first C++ standard that deals with concurrency. The story goes on with C++17 and will continue with C++20.

I'll give you a detailed insight in the current and the upcoming concurrency in C++. This insight includes the theory and a lot of practice with more the 100 source files.


Get my books "The C++ Standard Library" (including C++17) and "Concurrency with Modern C++" in a bundle.

In sum, you get more than 550 pages full of modern C++ and more than 100 source files presenting concurrency in practice.



-1 #1 kỳ nghỉ đông dương 2018-03-08 02:48
That is really fascinating, You are a very professional blogger.
I've joined your feed and look ahead to in the hunt for more
of your fantastic post. Additionally, I've shared your website in my social networks

Add comment

My Newest E-Books

Latest comments

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code


Today 1296

All 698331

Currently are 408 guests and no members online