C++ Coding Standards: 101 Rules, Guidelines, and Best Practices |  | Authors: Herb Sutter, Andrei Alexandrescu Publisher: Addison-Wesley Professional
List Price: $49.99 Buy New: $33.70 as of 11/23/2009 00:43 CST details You Save: $16.29 (33%)
New (30) Used (21) from $22.49
Seller: pbshop Rating: 27 reviews Sales Rank: 150187
Media: Paperback Pages: 240 Number Of Items: 1 Shipping Weight (lbs): 1.1 Dimensions (in): 9.1 x 7.3 x 0.6
ISBN: 0321113586 Dewey Decimal Number: 005.133 UPC: 076092018117 EAN: 9780321113580 ASIN: 0321113586
Publication Date: November 4, 2004 Availability: Usually ships in 1-2 business days
| |
| Similar Items:
| |
| 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.
|
| Customer Reviews:
Showing reviews 1-5 of 27
Excellent catalogue of best practices January 19, 2008 Johan Kotlinski (Stockholm, Sweden) 2 out of 2 found this review helpful
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 will be a discussion about which is the best way to implement something. That is the time to when this book shines:
1) You can show your co-workers the page for the related item, and the explanation for the underlying rationale will be so concise, they can read it while standing.
2) Every item is backed with heavy references to standard works by the top names in C++.
Basically it is a tool for effectively ending discussions in the most constructive way possible.
It's the supreme index into the world of collected C++ knowledge.
Disappointing May 9, 2007 Olivier Langlois (Montreal, Quebec Canada) 2 out of 4 found this review helpful
I had high expectations about the fruit of the association of 2 authors that I appreciate but the result did not meet these expectations. Basically this book provides 101 rules or guidelines that you can get for free by looking at the table of content. Each of these rules is then followed by a very short explanation (1 or 2 pages usually). In my opinion, most of them are common wisdom that you can get from other sources. This is it. That is all you will get from this book. For that reason, I recommend to skip this one except if a convenient and compact collection of common knowledge is something that you are looking for.
It is just a brief repeating of other books from the same Author April 23, 2007 Ke Liu (NY USA) 2 out of 3 found this review helpful
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. Typically, if you are familiar with the content of this book, it works as a quick reference manual or pocket book.
Readable, pithy, sensible, 'greatest hits' round up of advice on C++ March 2, 2007 Thing with a hook 7 out of 7 found this review helpful
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.
Coding rules explained October 24, 2006 T. Harris 5 out of 5 found this review helpful
This book is a very readable reference book. The authors have read several books and condensed the best coding rules to prevent many errors. If you code in any language other than C++, read this book because many of the hints are useful. (If you code C++, then all of the hints apply.) And if you don't like rules and guidelines, then just read the "exception" section provided in each entry to be sure that your code meets the exception.
Showing reviews 1-5 of 27
|
|
|
|