Jump to ratings and reviews
Rate this book

C++ Best Practices

Rate this book
Level up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!

122 pages, ebook

Published September 24, 2020

60 people want to read

About the author

Jason Turner

14 books4 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
14 (33%)
4 stars
18 (42%)
3 stars
8 (19%)
2 stars
2 (4%)
1 star
0 (0%)
Displaying 1 - 11 of 11 reviews
Profile Image for Alejandro Sierra.
210 reviews4 followers
December 20, 2023
Excelente referencia sobre las prácticas modernas de programación en C++. Es de consulta pero se puede leer de corrido. En esta versión vienen recomendaciones hasta del estándar C++20.
Profile Image for Jacek.
6 reviews2 followers
March 3, 2025
It's not really a fully fledged book. More like a list of guidelines with short descriptions and links to external resources if you want to learn more
73 reviews4 followers
Read
May 7, 2021
Difficult to rate.

An interesting book, but more of a study aid than a straight read. I'll have to go back and watch the youtube videos and maybe even try out some of the exercises.
Profile Image for Yuri Karabatov.
Author 1 book24 followers
February 8, 2022
I’m sure this is the most practical and immediately useful C++ book you will ever read. There are 46 (45 and a bonus one) rules, almost each one with an exercise (or several exercises) that urge you to go and apply the rule to your own projects. These rules are not meant to be read once, but to be practised, which is why the book is called “C++ Best Practices” (I just made this up but it sounds plausible).

Since C++ makes it easy to shoot both of your feet off, the author encourages readers to make their own small experiments, poke at them in Compiler Explorer and store them for later. You know the brainteasers that are supposed to gauge how well you know the language? This practice of answering your own questions is much better because it puts you in the mode of discovery, rather than ignoring how exactly something works and hoping for the best. Every programmer is supposed to do it, but do we? This is a gentle reminder that we should, and how to do it in a low-key and useful way.

I like that one of the first rules is “Slow Down.” You can use it for any programming, not just C++. The key points are: don’t pick the first solution that comes to mind, and implement what you’re happy with. Spending extra time thinking up front is usually the difference between a solution that “works,” and a truly elegant solution. Of course, there is the other end of the spectrum (architecture astronautics), but if you read this book, you probably care about code efficiency and aren’t at risk of going that way.

The book has a lot of links to other resources that explain and expound on the rules, so if you don’t understand something or want to learn more, there is additional information to look at.

If you’re fairly new to C++ (like me), some rules may be surpising: “You can do that?” I mean that question in a good way—it turns out, you can do something you thought you couldn’t.

I have implemented some of the advice before (adding a full set of warnings, clang-format, clang-tidy) and it certainly has made my code much better—and safer. I’m looking forward to using these rules and coming back to the book often. It’s just 130 pages so you can quickly flip through it to jog your memory.
Profile Image for Adam Getchell.
42 reviews1 follower
January 5, 2021
Short, sweet, and to the point.

I’ll have to re-read it in more detail, because the exercises are worth doing and the references are worth reviewing.

Many of the initial practices like automated tests, continuous builds, enabling (and eliminating) compiler warnings, using sanitizers, and building with multiple compilers on multiple operating systems I was already doing, so I raced ahead eagerly to look at the others I missed.

I ran smack into “Slow Down” and “Discuss with others”, and the book is chock full of links to useful presentations, articles, podcasts, forums, and so on illustrating the various recommendations. These I’ll have to peruse again at leisure.

Highly recommended, especially if you don’t have a lot of fellow C++ programmers nearby to bounce ideas off of.
Profile Image for Nikita Skiba.
11 reviews
March 30, 2021
Very strict and useful guide on the most important C++ language features. Most of the c++ learners have a lot of possibilities and possible language constructs in mind, but most of them (for novice) is erroneous and lead to UB, performance losses or just simple compiler errors. Such a guide could provide a right path for a learners and professionals to the efficient code, clean design and absence of common errors. Strongly recommended for everybody using c++ in work or hobby projects.
Profile Image for Gry M..
58 reviews
April 16, 2021
The book is written in an entertaining manner and covers many important topics to anyone working with C++. I liked that the book to a large extent encourages you to experiment with the language and try out the advice given. I think you have to have some experience with the language to really benefit from the book, but as soon as you have had your hands on some code and gotten an understanding of the basics, I think this is a good book to read and follow.
Profile Image for Julian Onions.
288 reviews4 followers
January 23, 2021
Some good tips in here, but it is a very short book as it notes. It could really have done with a few more examples and explanations. Some terms and new features are not really explained very well, and there are a lot of links to follow for more details. Probably the ebook version is more useful.
67 reviews2 followers
November 13, 2020
A quick and informative read. If you have worked with C++ for a time you know most of the tips, but probably have let them slip from your memory. The few you have not encountered are worth the read.
Profile Image for Martin Winter.
69 reviews
January 19, 2021
It is a short and quick read with some good tips, but quite simple and more aimed towards C++ beginners! Read it through in less than an hour.
Profile Image for Vineeth Kartha.
63 reviews3 followers
February 20, 2021
If I had this in the size of a pocket book would have always carried it around.
Some sections actually made me take a look at my code
Displaying 1 - 11 of 11 reviews

Can't find what you're looking for?

Get help and learn more about the design.