Wonder Club world wonders pyramid logo
×

C++ Coding Standards: Rules, Guidelines, and Best Practices Book

C++ Coding Standards: Rules, Guidelines, and Best Practices
C++ Coding Standards: Rules, Guidelines, and Best Practices, , C++ Coding Standards: Rules, Guidelines, and Best Practices has a rating of 4 stars
   2 Ratings
X
C++ Coding Standards: Rules, Guidelines, and Best Practices, , C++ Coding Standards: Rules, Guidelines, and Best Practices
4 out of 5 stars based on 2 reviews
5
50 %
4
0 %
3
50 %
2
0 %
1
0 %
Digital Copy
PDF format
1 available   for $99.99
Original Magazine
Physical Format

Sold Out

  • C++ Coding Standards: Rules, Guidelines, and Best Practices
  • Written by author Herb Sutter
  • Published by Addison-Wesley, October 2004
  • 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 ric
Buy Digital  USD$99.99

WonderClub View Cart Button

WonderClub Add to Inventory Button
WonderClub Add to Wishlist Button
WonderClub Add to Collection Button

Book Categories

Authors

Don't sweat the small stuff : (or : know what not to standardize)2
1Compile cleanly at high warning levels4
2Use an automated build system7
3Use a version control system8
4Invest in code reviews9
5Give one entity one cohesive responsibility12
6Correctness, simplicity, and clarity come first13
7Know when and how to code for scalability14
8Don't optimize prematurely16
9Don't pessimize prematurely18
10Minimize global and shared data19
11Hide information20
12Know when and how to code for concurrency21
13Ensure resources are owned by objects : use explicit RAII and smart pointers24
14Prefer compile- and link-time errors to run-time errors28
15Use const proactively30
16Avoid macros32
17Avoid magic numbers34
18Declare variables as locally as possible35
19Always initialize variables36
20Avoid long functions : avoid deep nesting38
21Avoid initialization dependencies across compilation units39
22Minimize definitional dependencies : avoid cyclic dependencies40
23Make header files self-sufficient42
24Always write internal #include guards : never write external #include guards43
25Take parameters appropriately by value, (smart) pointer, or reference46
26Preserve natural semantics for overloaded operators47
27Prefer the canonical forms of arithmetic and assignment operators48
28Prefer the canonical form of ++ and -- : prefer calling the prefix forms50
29Consider overloading to avoid implicit type conversions51
30Avoid overloading &&, ||, or , (comma)52
31Don't write code that depends on the order of evaluation of function arguments54
32Be clear what kind of class you're writing56
33Prefer minimal classes to monolithic classes57
34Prefer composition to inheritance58
35Avoid inheriting from classes that were not designed to be base classes60
36Prefer providing abstract interfaces62
37Public inheritance is substitutability : inherit, not to reuse, but to be reused64
38Practice safe overriding66
39Consider making virtual functions nonpublic, and public functions nonvirtual68
40Avoid providing implicit conversions70
41Make data members private, except in behaviorless aggregates (C-style structs)72
42Don't give away your internals74
43Pimp1 judiciously76
44Prefer writing nonmember nonfriend functions79
45Always provide new and delete together80
46If you provide any class-specific new, provide all of the standard forms (plain, in-place, and nothrow)82
47Define and initialize member variables in the same order86
48Prefer initialization to assignment in constructors87
49Avoid calling virtual functions in constructors and destructors88
50Make base class destructors public and virtual, or protected and nonvirtual90
51Destructors, deallocation, and swap never fail92
52Copy and destroy consistently94
53Explicitly enable or disable copying95
54Avoid slicing : consider Clone instead of copying in base classes96
55Prefer the canonical form of assignment99
56Whenever it makes sense, provide a no-fail swap (and provide it correctly)100
57Keep a type and its nonmember function interface in the same namespace104
58Keep types and functions in separate namespaces unless they're specifically intended to work together106
59Don't write namespace usings in a header file or before an #include108
60Avoid allocating and deallocating memory in different modules111
61Don't define entities with linkage in a header file112
62Don't allow exceptions to propagate across module boundaries114
63Use sufficiently portable types in a module's interface116
64Blend static and dynamic polymorphism judiciously120
65Customize intentionally and explicitly122
66Don't specialize function templates126
67Don't write unintentionally nongeneric code128
68Assert liberally to document internal assumptions and invariants130
69Establish a rational error handling policy, and follow it strictly132
70Distinguish between errors and non-errors134
71Design and write error-safe code137
72Prefer to use exceptions to report errors140
73Throw by value, catch by reference144
74Report, handle, and translate errors appropriately145
75Avoid exception specifications146
76Use vector by default : otherwise, choose an appropriate container150
77Use vector and string instead of arrays152
78Use vector (and string::cöstr) to exchange data with non-C++ APIs153
79Store only values and smart pointers in containers154
80Prefer pushöback to other ways of expanding a sequence155
81Prefer range operations to single-element operations156
82Use the accepted idioms to really shrink capacity and really erase elements157
83Use a checked STL implementation160
84Prefer algorithm calls to handwritten loops162
85Use the right STL search algorithm165
86Use the right STL sort algorithm166
87Make predicates pure functions168
88Prefer function objects over functions as algorithm and comparer arguments170
89Write function objects correctly172
90Avoid type switching; prefer polymorphism174
91Rely on types, not on representations176
92Avoid using reinterpretöcast177
93Avoid using staticöcast on pointers178
94Avoid casting away const179
95Don't use C-style casts180
96Don't memcpy or memcmp non-PODs182
97Don't use unions to reinterpret representation183
98Don't use varargs (ellipsis)184
99Don't use invalid objects : don't use unsafe functions185
100Don't treat arrays polymorphically186


Login

  |  

Complaints

  |  

Blog

  |  

Games

  |  

Digital Media

  |  

Souls

  |  

Obituary

  |  

Contact Us

  |  

FAQ

CAN'T FIND WHAT YOU'RE LOOKING FOR? CLICK HERE!!!

X
WonderClub Home

This item is in your Wish List

C++ Coding Standards: Rules, Guidelines, and Best Practices, , C++ Coding Standards: Rules, Guidelines, and Best Practices

X
WonderClub Home

This item is in your Collection

C++ Coding Standards: Rules, Guidelines, and Best Practices, , C++ Coding Standards: Rules, Guidelines, and Best Practices

C++ Coding Standards: Rules, Guidelines, and Best Practices

X
WonderClub Home

This Item is in Your Inventory

C++ Coding Standards: Rules, Guidelines, and Best Practices, , C++ Coding Standards: Rules, Guidelines, and Best Practices

C++ Coding Standards: Rules, Guidelines, and Best Practices

WonderClub Home

You must be logged in to review the products

E-mail address:

Password: