Giadzy - Shop now

These promotions will be applied to this item:

Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.

eBook features:
  • Highlight, take notes, and search in the book
You've subscribed to ! We will preorder your items within 24 hours of when they become available. When new books are released, we'll charge your default payment method for the lowest price available during the pre-order period.
Update your device or payment method, cancel individual pre-orders or your subscription at
Your Memberships & Subscriptions
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the authors

Something went wrong. Please try your request again later.

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (C++ In-Depth) 1st Edition, Kindle Edition

4.6 4.6 out of 5 stars 125 ratings

Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ community into a set of coding standards that every developer and development team can understand and use as a basis for their own coding standards.

The authors cover virtually every facet of C++ programming: design and coding style, functions, operators, class design, inheritance, construction/destruction, copying, assignment, namespaces, modules, templates, genericity, exceptions, STL containers and algorithms, and more. Each standard is described concisely, with practical examples. From type definition to error handling, this book presents C++ best practices, including some that have only recently been identified and standardized-techniques you may not know even if you've used C++ for years. Along the way, you'll find answers to questions like

  • What's worth standardizing--and what isn't?
  • What are the best ways to code for scalability?
  • What are the elements of a rational error handling policy?
  • How (and why) do you avoid unnecessary initialization, cyclic, and definitional dependencies?
  • When (and how) should you use static and dynamic polymorphism together?
  • How do you practice "safe" overriding?
  • When should you provide a no-fail swap?
  • Why and how should you prevent exceptions from propagating across module boundaries?
  • Why shouldn't you write namespace declarations or directives in a header file?
  • Why should you use STL vector and string instead of arrays?
  • How do you choose the right STL search or sort algorithm?
  • What rules should you follow to ensure type-safe code?

Whether you're working alone or with others, C++ Coding Standards will help you write cleaner code--and write it faster, with fewer hassles and less frustration.



Shop this series

See full series
See included books
4 unreleased or unavailable books are excluded.
Shop this series
There are 8 books in this series.
Bundle price: Kindle price
Bundle price: Kindle price
By clicking the above button, you agree to the Kindle Store Terms of Use

This option includes 3 books.

This option includes 4 books.

Something went wrong.
Bundle price: Kindle price
Bundle price: Kindle price
By clicking the above button, you agree to the Kindle Store Terms of Use

Customers also bought or read

Loading...

Editorial Reviews

From the Back Cover

Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ community into a set of coding standards that every developer and development team can understand and use as a basis for their own coding standards.

The authors cover virtually every facet of C++ programming: design and coding style, functions, operators, class design, inheritance, construction/destruction, copying, assignment, namespaces, modules, templates, genericity, exceptions, STL containers and algorithms, and more. Each standard is described concisely, with practical examples. From type definition to error handling, this book presents C++ best practices, including some that have only recently been identified and standardized-techniques you may not know even if you've used C++ for years. Along the way, you'll find answers to questions like

  • What's worth standardizing--and what isn't?
  • What are the best ways to code for scalability?
  • What are the elements of a rational error handling policy?
  • How (and why) do you avoid unnecessary initialization, cyclic, and definitional dependencies?
  • When (and how) should you use static and dynamic polymorphism together?
  • How do you practice "safe" overriding?
  • When should you provide a no-fail swap?
  • Why and how should you prevent exceptions from propagating across module boundaries?
  • Why shouldn't you write namespace declarations or directives in a header file?
  • Why should you use STL vector and string instead of arrays?
  • How do you choose the right STL search or sort algorithm?
  • What rules should you follow to ensure type-safe code?

Whether you're working alone or with others, C++ Coding Standards will help you write cleaner code--and write it faster, with fewer hassles and less frustration.



About the Author

Herb Sutter is the author of three highly acclaimed books, Exceptional C++ Style, Exceptional C++, and More Exceptional C++ (Addison-Wesley). He chairs the ISO C++ standards committee, and is contributing editor and columnist for C/C++ Users Journal. As a software architect for Microsoft, Sutter leads the design of C++ language extensions for .NET programming.

Andrei Alexandrescu is the author of the award-winning book Modern C++ Design (Addison-Wesley, 2001) and is a columnist for C/C++ Users Journal.



Product details

  • ASIN ‏ : ‎ B004ISL6I0
  • Publisher ‏ : ‎ Addison-Wesley Professional; 1st edition (October 25, 2004)
  • Publication date ‏ : ‎ October 25, 2004
  • Language ‏ : ‎ English
  • File size ‏ : ‎ 7620 KB
  • Simultaneous device usage ‏ : ‎ Up to 5 simultaneous devices, per publisher limits
  • Text-to-Speech ‏ : ‎ Enabled
  • Screen Reader ‏ : ‎ Supported
  • Enhanced typesetting ‏ : ‎ Enabled
  • X-Ray ‏ : ‎ Not Enabled
  • Word Wise ‏ : ‎ Not Enabled
  • Print length ‏ : ‎ 418 pages
  • Customer Reviews:
    4.6 4.6 out of 5 stars 125 ratings

About the authors

Follow authors to get new release updates, plus improved recommendations.

Customer reviews

4.6 out of 5 stars
125 global ratings

Customers say

Customers find the book useful, excellent, and a good set of best practices. They also say it's readable, concise, and easy to appreciate the authors' collective expertise.

AI-generated from the text of customer reviews

Select to learn more
13 customers mention "Knowledge"13 positive0 negative

Customers find the book useful, excellent, and packed with time-tested great advice. They say it's good for tutoring and a fantastic resource for C++ developers of all skill levels.

"...a clean and well focused reasoning on every single rule, good for tutoring and nice nuts of knowledge.A must have." Read more

"...The book's proofreaders are very good but I believe they missed one error on Item 61, page 112, near the bottom: "Do not definite..." I'm assuming..." Read more

"...This book is not that at all, but rather an awesome collection of C++ wisdom that should be useful to anyone using the language...." Read more

"Such a great book to pick up, flip to a random page, and read. I’ve learned so many good practices." Read more

6 customers mention "Readability"6 positive0 negative

Customers find the book quite readable. They appreciate the authors' collective expertise and common sense. Readers say the book provides clean, well-focused reasoning on every single rule.

"...One of the book's strengths is its conciseness, which makes it easier to read without getting tied up in a lot of details...." Read more

"...101 rules, mostly described in one or 2 pages make it a good reading before fall asleep, a good reminder of best practices that should not be..." Read more

"...My Customers need to read this book.Great to have easy to read practical lessons learned documented all in one place." Read more

"...On the whole, however, the book is quite readable, and the code examples hit the sweet spot of demonstrating the topic of discussion without being..." Read more

Top reviews from the United States

Reviewed in the United States on November 28, 2004
This is a must read for intermediate level and higher programmers. One of the book's strengths is its conciseness, which makes it easier to read without getting tied up in a lot of details. Because of this, the reader must take it upon himself/herself to check the readings in the supplied references (given for each rule) to completely understand the terms/idioms/ideas mentioned in the rule. This is not at all a weakness in the book, as it's purpose is to summarize the rule/guideline/practice, so they can put it to use, while leaving it up to the reader to refer to readings in the given references, to obtain a greater understanding of the ideas used in that rule. Most of the references can be found in the authors' previous works. The book also makes reference to standard time tested design patterns and ideas, so it would be good to have the text "Design Patterns" read, or close by.
7 people found this helpful
Report
Reviewed in the United States on September 30, 2016
I've been a programmer since the earliest 90's, a professional software engineer since the 2000, and I would say that book contains many of the things you learn through your carrier, exposed in a very pleasant way.
101 rules, mostly described in one or 2 pages make it a good reading before fall asleep, a good reminder of best practices that should not be forgotten. In these times, where code reviews are part of our daily activity, being aligned and focused makes the job more easy.
For novice it's for sure a good set of best-practices to be learned. For intermediate-expert it provides a clean and well focused reasoning on every single rule, good for tutoring and nice nuts of knowledge.

A must have.
4 people found this helpful
Report
Reviewed in the United States on November 16, 2004
I have great respect for both authors from reading their other books/articles, and there are many good ideas in this book, but I was expecting to agree with the authors here much more than I do.

Item 0: Don't sweat the small stuff. The authors say not to overlegislate naming and bracing standards, but they also say "do be consistent" and don't mix styles. From personal experience, I can say the only way to get a group of programmers to be consistent is by "sweating the small stuff" and having well-defined policies that are strictly enforced.

Item 1: Zero tolerance of warnings. Eliminating Level 4 warnings (in Visual C++) from a complex application (as opposed to a library intended for third-party use) is more trouble than it's worth. The authors' suggestion to decrease code readability (Examples 2 and 3) to get around these warnings is quite a bad idea, in my opinion.

Item 59: I wish somehow there could be a better answer to the C++ namespace issue. Giving many symbols (but not all, like preprocessor macros, classes not in a namespace, etc.) two names (the qualified and the unqualified) based on where that symbol appears seems so wrong and at the very least makes searching and cut-and-pasting more difficult.

The authors clearly prefer use of stl over custom containers (although they have not always followed their own advice), but they don't address many issues related to this, like are teams using stl supposed to use the peculiar stl naming practices across the board in all code, so stl dictates naming and all projects would use naming like some_stl_vector.push_back()? Or would code like m_object.DoSomething() be mixed together with the above statement so there really is no standard? What are programmers to do when the stl containers don't cut it and a custom container is needed? Should they write it in the stl idiom or consistent with their own naming standard?

Many of the examples refer to std::string, and even a few use const char *, in a book like this I would prefer not to see uses of these types that are not localization-friendly, since it is a best practices type of book, after all.

The book's proofreaders are very good but I believe they missed one error on Item 61, page 112, near the bottom: "Do not definite..." I'm assuming should be "Do not define..."

Anyway, I do recommend this book, and I do agree with most of the items, the authors raise many good points to consider when a team is deciding on its own coding standard.
92 people found this helpful
Report
Reviewed in the United States on September 3, 2010
C++ Coding Standards is one of the best books about C++ that I have read, although I feel the title can be somewhat misleading. When the average programmer thinks "coding standard", their mind probably thinks of a crusty old document on their company wiki somewhere that tells them exactly how to lay out their curly brackets. This book is not that at all, but rather an awesome collection of C++ wisdom that should be useful to anyone using the language. Sutter and Alexandrescu write in a wonderful conversational style that reading this book is almost like sitting down for a chat with these two masters of C++ and software development.

I've learned a lot from this book, and it's a fantastic resource for C++ developers of all skill levels. Highly recommended!
2 people found this helpful
Report
Reviewed in the United States on May 19, 2013
Very easy to read. Much is advice each of us have already learned through experience. Many suggestions that we have not thought of but can relate to because of on the job learning. Some of the standards are violated by several of my customers and having worked in those environments it is clear how impotent the standard is. My Customers need to read this book.

Great to have easy to read practical lessons learned documented all in one place.
Reviewed in the United States on November 20, 2021
Such a great book to pick up, flip to a random page, and read. I’ve learned so many good practices.
One person found this helpful
Report
Reviewed in the United States on February 4, 2011
You know it's a book for geeks if there are 101 tips but the numbering starts at zero. That said, this book is outstanding. It was everything I had hoped the new edition of Meyers's "Effective C++". In particular, if you learned C++ a while ago but need to get up to speed with the latest developments in RAII, templates, etc., then I can't imagine a better book.

The only reason I did not give it 5 stars is that now and then the language is just too clunky. In particular, I had to read "...the name lookup for that operator function might reach out into the name space...Whether it reaches out into N..." a few times before I understood that "reaching out into" is meant to be a synonym for "reach into".

On the whole, however, the book is quite readable, and the code examples hit the sweet spot of demonstrating the topic of discussion without being overly long.
2 people found this helpful
Report

Top reviews from other countries

Translate all reviews to English
Amazon カスタマー
5.0 out of 5 stars かなり良い
Reviewed in Japan on March 8, 2018
Scott MeyersがEffectiveシリーズで詳しく説明してくれてはいるが少し冗長になってしまっているC++のベストプラクティスの指針をコンパクトにまとめてくれていると感じた。
この本とEffectiveシリーズ、ISOCppのCppCoreGuideline、あとGoogleのC++ Style Guideを読んでその作法に従っていれば、そのうちBjarne Stroustrupが言う「エレガントでシンプルな」コードに近づける気がする。
日本での参考書はただの「文法の羅列」であり、言語の物知りしか生み出さないような構成になっているが、本書のような本を読まなければ良いプログラマーにはなれないのだと読み進めていくうちにますます実感した
Trevor Brenham
2.0 out of 5 stars Still good stuff in there but you have to be aware ...
Reviewed in Canada on May 3, 2016
I really should have looked at the publication date (2005). Much of the information is out of date given C++11. Still good stuff in there but you have to be aware that not all things apply for C++11. It is not the authoritative source I was looking for.
Oriol
5.0 out of 5 stars Indispensable
Reviewed in Spain on June 4, 2015
Éste es uno de los libros indispensables para cualquiera que quiera programar correctamente en c++.
Hay que tener en cuenta que no es un manual de programación, sinó que cita y argumenta las reglas esenciales para poder programar correctamente en c++.
Vikram
5.0 out of 5 stars Five Stars
Reviewed in India on March 28, 2015
Simple and Easy language. Clear Understandings.
Alec
5.0 out of 5 stars Great book - but there's a perfect time to read it
Reviewed in the United Kingdom on November 24, 2014
This is a great book, it's not a reference book though.

Many C++ books are crap, they don't cross what I call "the Hello World gulf" this is the huge gap between examples and whatnot and actual programs and useful stuff.

This book helps the crossing. You should be okay on the Hello World stuff and just starting to write programs that do stuff (by this I mean have an IDE and GUI programs that respond to input, you know actual stuff - Eclipse CDT and WxWidgets FTW!) you'll pick this book up and find some of them are things you already do, or have already picked up without being told they are worthy of report.

The ones you don't know will be explained so well you can see why you'd want to do it that way.

There are other reviews praising this book already and I don't want to re-iterate those again (consider me in chorus with them though) this book is one of the best C++ books out there because it's actually useful in crossing that gulf.

Alec

Report an issue


Does this item contain inappropriate content?
Do you believe that this item violates a copyright?
Does this item contain quality or formatting issues?