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.
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.
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.
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.
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.
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.
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.
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.