or
Sign in to turn on 1-Click ordering.
 
 
Express Checkout with PayPhrase
What's this? | Create PayPhrase
More Buying Choices
48 used & new from $25.05

Have one to sell? Sell yours here
 
   
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
 
See larger image
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get your Kindle here.
 
  

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (Paperback)

~ Herb Sutter (Author), Andrei Alexandrescu (Author)
4.3 out of 5 stars  See all reviews (27 customer reviews)

List Price: $49.99
Price: $35.55 & this item ships for FREE with Super Saver Shipping. Details
You Save: $14.44 (29%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Want it delivered Thursday, March 11? Choose One-Day Shipping at checkout. Details
29 new from $27.94 19 used from $25.05

Frequently Bought Together

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices + Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition) + Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library
Total List Price: $149.97
Price For All Three: $116.94

Show availability and shipping details


Customers Who Bought This Item Also Bought


Editorial Reviews

Product Description

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

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.




Product Details

  • Paperback: 240 pages
  • Publisher: Addison-Wesley Professional (November 4, 2004)
  • Language: English
  • ISBN-10: 0321113586
  • ISBN-13: 978-0321113580
  • Product Dimensions: 9.1 x 7.3 x 0.6 inches
  • Shipping Weight: 1.1 pounds (View shipping rates and policies)
  • Average Customer Review: 4.3 out of 5 stars  See all reviews (27 customer reviews)
  • Amazon.com Sales Rank: #164,135 in Books (See Bestsellers in Books)

    Popular in this category: (What's this?)

    #77 in  Books > Computers & Internet > Microsoft > Development > C & C++ Windows Programming

More About the Authors

Discover books, learn about writers, read author blogs, and more.

What Do Customers Ultimately Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(6)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

27 Reviews
5 star:
 (14)
4 star:
 (7)
3 star:
 (5)
2 star:
 (1)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.3 out of 5 stars (27 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
21 of 21 people found the following review helpful:
5.0 out of 5 stars Finally, a coding standard that programmers can accept., November 22, 2004
By G. Wade Johnson (Houston, Texas) - See all my reviews
(REAL NAME)   
For many programmers, the term "coding standard" generates a gut-level response. We all know that someone is going to be pushing the "one, true brace style" or the "proper" way to indent code. This subject is probably the best way to generate instantaneous rebellion among a group of programmers.

The first "standard" in "C++ Coding Standards" wipes all of that away with their first rule:

0. Don't sweat the small stuff. (Or: know what not to standardize.)

In one quick entry, Sutter and Alexandrescu sweep all of the indent-level, brace-placement, CamelCase/underscores holy wars into a single category and give a useful bit of advice: <em>Be consistent.</em> The authors point out that any professional programmer should be able to read and write in any of these styles. The differences are basically a matter of personal preference.

From this point on, we get to see a coding standard that is focused on "best practices" and proven techniques for improving code.

This is the only coding standard I've ever seen that would really help a group of programmers improve their work.
Help other customers find the most helpful reviews  
Was this review helpful to you? Yes No


 
39 of 43 people found the following review helpful:
5.0 out of 5 stars Higher level than Effective C++, November 19, 2004
I love both this book and Effective C++ for different reasons. The Effective C++ series is mainly very low level hints that help you avoid the pitfalls that C++ has in store for you. This book, while showing a lot of code, gives a higher level perspective of the areas it covers (e.g. templates, STL, class design, namespaces, etc.). That perspective grounds you in an understanding of the topic, then binds that to some real world code examples. Both approaches are very valuable. I would recommend getting both books. You can't live without the practical advice of Effective C++ or the architectural material in C++ Coding Standards.
Help other customers find the most helpful reviews  
Was this review helpful to you? Yes No


 
30 of 33 people found the following review helpful:
3.0 out of 5 stars A Thirty Five Dollar Index of Classic C++ Books, May 1, 2005
By Karl Rosaen (Saratoga, CA) - See all my reviews
(REAL NAME)   
Sutter and Alexandrescu are certified C++ gurus, and have each written classic works on C++ (Exceptional C++ series, and Modern C++ Design, respectively). So why does this book fall short? Because it doesn't go into the level of detail necessary to make every recommendation meaningful, and instead relies on citations of previous works. And those citations very often fall into a handful of books that every serious C++ programmer should own and understand anyway: Effective C++ series by Scott Meyers, The C++ Programming Language by Bjarne Strousup, and Exceptional C++ by Sutter.

One might argue that 5 books or more is too many, and that this book adds value by providing a one stop ultimate resource for best practices. The problem is that if proper justification isn't provided for each best practice, it's difficult for readers to internalize them. Even if these guys are experts, and a, "trust me" will suffice to believe what they say, it doesn't mean that everyone will understand what they say without diving into the other books that they so often reference. And that brings us back to my main point: you may as well just buy and read the original books in the first place.

Many of the items are complete repeats of items from Scott Meyers books with much less explanation. For example, number 81 of best practices, 'Prefer range operations to single-element operations', is the same as item 5 in 'Effective STL'. However, in Coding Standards, a page is devoted to the explanation; not sufficient if you don't already fully understand why this is a good practice. Meyers, on the other hand, spends 8 pages fully convincing you it is a good idea with several examples. After reading Meyers, I'm going to understand and remember the practice of preferring range member functions.

If you already own all of Scott Meyer's books, along with some of Sutter's and want a concise summary of coding practices, this book may be worth while. Otherwise, start with the original works.
Help other customers find the most helpful reviews  
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Excellent catalogue of best practices
I think this is one of the most useful C++ books one could have if working in a team. Most companies don't have a very large set of coding standards, and every now and then there... Read more
Published on January 19, 2008 by Johan Kotlinski

3.0 out of 5 stars Disappointing
I had high expectations about the fruit of the association of 2 authors that I appreciate but the result did not meet these expectations. Read more
Published on May 8, 2007 by Olivier Langlois

3.0 out of 5 stars It is just a brief repeating of other books from the same Author
If you own the 3 "Exception C++" books, do not buy this book. It is just a mirror copy of those. And the explanation in this book is brief. Read more
Published on April 23, 2007 by Ke Liu

4.0 out of 5 stars Readable, pithy, sensible, 'greatest hits' round up of advice on C++
It's Sutter! It's Alexandrescu! It's both of them together! And the dark lords of C++ have combined forces to produce... er, some coding standards. Read more
Published on March 1, 2007 by Thing with a hook

4.0 out of 5 stars Coding rules explained
This book is a very readable reference book. The authors have read several books and condensed the best coding rules to prevent many errors. Read more
Published on October 24, 2006 by T. Harris

4.0 out of 5 stars 101 rules, guidelines and best practices
The book clearly pushes forth a lot of pragmatic content that should be thoroughly adopted by the 80-percentile of all programmers "out there. Read more
Published on December 16, 2005 by Rob Wehrli

5.0 out of 5 stars Excellent resource for C++ Software Engineers
The book presents some excellent fodder for a developing a project's coding standards. As with Sutter's other books and columns things are very solid from a technical... Read more
Published on October 23, 2005 by C. Love

3.0 out of 5 stars Many good ideas but have some critical errors
I'm not knocking this book down. Book is good but you must know about errors and book must have bugtraq.
Published on July 31, 2005 by Nancy

3.0 out of 5 stars not bad, but very disappointed
This book is for newbies. If you read a lot about c++ effective, c++ whatever series, this is not the book for you. Read more
Published on July 26, 2005 by Fang Jin

5.0 out of 5 stars Great book of principles
Contains a vast number of very important advice.

Assuming you've already got Stroustrup's "The C++ Programming Language", you should buy this for the principles, buy... Read more
Published on June 18, 2005 by D.T.

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   


Listmania!


So You'd Like to...


Create a guide

Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.