C++ Coding Standards, by Herb Sutter and Andrei Alexandrescu, provides “101 rules, guidelines, and best practices” for programmers that aim to write modern, high-quality C++ code. Every C++ programmer needs to read and understand this book.
Relatively inexperienced C++ programmers will have a hard time following some of the items in this book, many of which assume that this isn’t the first, or even the fifth, C++ book or article that you’ve read. Fortunately, each item comes with a handy list of references to follow until you achieve sufficient mastery.
It’s really hard to argue with most of the items in the book. Many of the items are about minimizing dependencies, which I consider to be the most important rule of software development (items 5, 6, 10, 11, 18, 21, 22, 32-44, etc.). I also love item 9, referenced by many of the other items: “Don’t pessimize prematurely.” (Don’t worry; it’s preceded by item 8, “Don’t optimize prematurely.”) There were a few items that were a bit surprising – item 58 seems to suggest defining far more namespaces than I’m accustomed to; I wish it would have given naming guidelines!
The book does an excellent job of bringing all of the little C++ rules that I’ve picked up here and there and putting them all in one short book. The authors did an excellent job of filling 220 pages with 101 items, while always starting each item at the top of a page! There’s also a handy summary of all 101 items in the back, right after the extensive list of references, and before what looks to be a thorough index. Be sure to review this material before any new C++ project to help correct the biggest challenge of C++ programming – it’s hard to remember all of this stuff!