C++ Coding Standards and over one million other books are available for Amazon Kindle . Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime free trial required. Sign up when you check out. Learn more
More Buying Choices
Have one to sell? Sell yours here
or
Get a £10.75 Amazon.co.uk Gift Card
C++ Coding Standards : Rules, Guidelines, and Best Practices
 
 
Start reading C++ Coding Standards on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

C++ Coding Standards : Rules, Guidelines, and Best Practices [Paperback]

Herb Sutter , Andrei Alexandrescu
3.5 out of 5 stars  See all reviews (2 customer reviews)
RRP: £33.99
Price: £28.89 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £5.10 (15%)
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.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.
Want guaranteed delivery by Wednesday, May 30? Choose Express delivery at checkout. See Details

Formats

Amazon Price New from Used from
Kindle Edition £20.84  
Paperback £28.89  
Trade In this Item for up to £10.75
Trade in C++ Coding Standards : Rules, Guidelines, and Best Practices for an Amazon.co.uk gift card of up to £10.75, which you can then spend on millions of items across the site. Plus, get an extra £5 when you trade in books worth £10 or more until June 30, 2012. Trade-in values may vary (terms apply). Find more products eligible for trade-in.

Frequently Bought Together

C++ Coding Standards : Rules, Guidelines, and Best Practices + Effective C++: 55 Specific Ways to Improve Your Programs and Designs (Addison-Wesley Professional Computing Series) + Exceptional C++
Price For All Three: £84.32

Show availability and delivery details

Buy the selected items together


Product details

  • Paperback: 240 pages
  • Publisher: Addison Wesley; 1 edition (25 Oct 2004)
  • Language English
  • ISBN-10: 0321113586
  • ISBN-13: 978-0321113580
  • Product Dimensions: 23.7 x 18.7 x 1.5 cm
  • Average Customer Review: 3.5 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon Bestsellers Rank: 246,597 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Authors

Discover books, learn about writers, and more.

Product Description

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



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.




Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

Tags Customers Associate with This Product

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

Your tags: Add your first tag
 


Customer Reviews

5 star
0
2 star
0
1 star
0
Most Helpful Customer Reviews
12 of 12 people found the following review helpful
Format:Paperback
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.

Yes, another book of best practices. Some readers may therefore be a tad disappointed that the combined fruits of the authors' labours will not be shattering their puny human minds with the sort of C++ that cause lesser compilers to accidentally create black holes that destroy the entire universe.

But let's evaluate the book on what it sets out to do, which is to give 100 bite-sized pieces of advice on C++ coding. And it's very good. You might prefer to see it as an annotated guide to the state of the art in intermediate C++ programming, in particular to Sutter's Exceptional C++ trilogy, which has become sufficiently sprawling that a reorganisation of the material, plus pointers to which book said what, has become quite welcome.

Yes, it's true that C++ is hardly short of books telling you when to pass by value. But take a look at the bibliography - it's a synthesis of all those other tomes (the Effective series, Sutter's own Exceptional series of course, and older books like C++ Strategy and Tactics) plus magazine articles, into a neat and compact whole.

Few of the items are longer than one or two pages. This is good because the advice stays simple, clear and direct. On the other hand, some of the items feel a bit squeezed into the available space, with discussion deferred to the books in the references, which is a little frustrating on occasion. After all, a lot of the best parts of the Exceptional C++ and Effective C++ series and their ilk is not so much what to do (or not to do), but the why behind it. There's plenty of the former, but not so much of the latter.

If you've read any other coding convention books (like those in Steve McConnell's Code Complete) then the first quarter of the book may feel like the same old same old. And of course with there being exactly 100 items, some are more heavyweight than others. But there's definite C++ meat here, in particular with the items on Exceptions and the STL.

C++ Coding Standards is as well-written as you'd expect from the authors - their friendly, slightly conversational writing styles mesh nicely and I couldn't tell who wrote which bits. And it's a great summary and unification of C++ best practices that someone just starting out could easily refer to in their initial forays. Perhaps even more experienced hands will discover a few tips, implications or issues that they hadn't considered before. It could also be a good way to ensure that a team are all up to date on best practices.

Essential for those with a large C++ library? Probably not, but it does the job it sets out to do very well.
Comment | 
Was this review helpful to you?
By J. Bond VINE™ VOICE
Format:Paperback|Amazon Verified Purchase
I wanted to love this book, I wanted it to be a fantastic insight and to spur me to improve my own coding standards and drive document production to improve team productivity my end... I got it... I read it... And... Though some, few, items did come straight out of the text and input into my work many more of the items seemed very preachy, "thou shalt do it this way", when really there could be good arguments to the contrary.

The biggest problem with these preaching items was the general lack of code examples with them, and the generic descriptions given of a potential situation deemed requiring whatever the "standard" they are specifying, without any example code these items really came across as quite obtuse and without as much merit as those with code examples.

This is not to detract from those good items inside, and there are some, they usually have clear code examples are explained concisely without seeming to preach the author(s) ideals upon you. Many of these I identified with easily and will note them down for inclusion in my own work - this does make the book worth reading.

However, with a choice between this text or perhaps one from Scott Meyers, I would take Mr Meyer's books over this, even his older books eclipse this text with their given examples and concise presentation.

Another surprise with this book was its lightness, it is actually very thin, I had expected a rather more weighty tome. I don't know why I had this impression, perhaps because other AW products are weighty, but when this appeared and was a quite thin, smaller than A4 profile, floppy back (its not even soft back, its a floppy book) I was surprised.

I would have liked to perhaps give the book 3.5 stars, its more than just "ok" as it has input into my working practices, but its not worth the full "good" 4 stars rating due to the quality and the incessant nagging of some of the items.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com:  31 reviews
31 of 31 people found the following review helpful
Finally, a coding standard that programmers can accept. 22 Nov 2004
By G. Wade Johnson - Published on Amazon.com
Format:Paperback
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.
45 of 49 people found the following review helpful
Higher level than Effective C++ 19 Nov 2004
By Jack D. Herrington - Published on Amazon.com
Format:Paperback
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.
44 of 50 people found the following review helpful
A Thirty Five Dollar Index of Classic C++ Books 1 May 2005
By Karl Rosaen - Published on Amazon.com
Format:Paperback
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.
Search Customer Reviews
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
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


Look for similar items by category


Look for similar items by subject


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges