Book Review – Clean C++

Time has passed since my last review in VitoshAcademy and thus I have requested a new great book from for a review.

Although I am not a C++ developer (and I have never been paid to develop on anything else but VBA & SQL), I consider myself a somehow skilled C# developer, who understands other languages. C++ is one of them. Having said that, as far as I am pretty sure that a book titled “Clean VBA” would never ever appear on the market and because I wanted to refresh my C++ knowledge, I have requested a copy of the Clean C++ Book.

The book actually is a really neat and easy to read. It mentions some of the clean code books of Robert C. Martin quite a lot of times, but I hope it brings something new as well (I have not read those, thus I cannot compare).

In general, I liked the book, as far as it was somehow confirming some rules that I am using daily – thus I felt a bit better. E.g., after some time working with VBA, I have coined my own principle to use early binding whenever possible and I was happy to see the same rule written out as a guiding principle for working with C++ compiler – these were the three guiding principles for working with C++ compiler:

  • Everything that can be done at compile time should be done at compile time
  • Everything that can be checked at compile time should also be checked at compile time
  • Everything the compiler can know about a program should also be determined by the compiler

The book has 9 chapters, with lots of pictures and well-written code (this is what you expect in a book titled “Clean C++”. 🙂 The chapters fro Object Orientation and Functional Programming were of best use for me, because I saw once again the principles for good class design. One of those principles is elaborated as a Square-Rectangle Dilemma. When I have first studied OOP, I remember that one of the example for inheritance was indeed made with “Square is a rectangle and it inherits all of his properties and functions.” The book explains really well why we should not build up code like this and gives the correct way to do it – square and rectangle should be different classes, and square should not inherit rectangle.

In general, I am pretty happy with the book and I would recommend it. Taking a peek into the C++ world was really a new thing for me and I liked it!

My review in is available here.


Tagged with: , , ,