Effective C++: 55 Specific Ways to Improve Your Programs and Designs 3rd Edition by Scott Meyers – Ebook PDF Instant Download/Delivery. 0321334876, 9780321334879
Full download Effective C++: 55 Specific Ways to Improve Your Programs and Designs 3rd Edition after payment
Product details:
ISBN 10: 0321334876
ISBN 13: 9780321334879
Author: Scott Meyers
“Every C++ professional needs a copy of Effective C++. It is an absolute must-read for anyone thinking of doing serious C++ development. If you’ve never read Effective C++ and you think you know everything about C++, think again.”
― Steve Schirripa, Software Engineer, Google “C++ and the C++ community have grown up in the last fifteen years, and the third edition of Effective C++ reflects this. The clear and precise style of the book is evidence of Scott’s deep insight and distinctive ability to impart knowledge.”
― Gerhard Kreuzer, Research and Development Engineer, Siemens AG
The first two editions of Effective C++ were embraced by hundreds of thousands of programmers worldwide. The reason is clear: Scott Meyers’ practical approach to C++ describes the rules of thumb used by the experts ― the things they almost always do or almost always avoid doing ― to produce clear, correct, efficient code.
The book is organized around 55 specific guidelines, each of which describes a way to write better C++. Each is backed by concrete examples. For this third edition, more than half the content is new, including added chapters on managing resources and using templates. Topics from the second edition have been extensively revised to reflect modern design considerations, including exceptions, design patterns, and multithreading.
Important features of Effective C++ include:
- Expert guidance on the design of effective classes, functions, templates, and inheritance hierarchies.
- Applications of new “TR1” standard library functionality, along with comparisons to existing standard library components.
- Insights into differences between C++ and other languages (e.g., Java, C#, C) that help developers from those languages assimilate “the C++ way” of doing things.
Effective C++: 55 Specific Ways to Improve Your Programs and Designs 3rd Table of contents:
Part I: General Guidelines
-
Accentuate the Positive
- Prefer using positive logic to improve readability and maintainability.
-
Prefer Automatic Initialization to Assignment
- Discusses the advantages of initializing variables at the point of declaration.
-
Use Explicit Constructors to Prevent Implicit Conversions
- The importance of marking constructors as
explicit
to avoid unintended implicit type conversions.
- The importance of marking constructors as
-
Declare Data Members
private
andmutable
for Optimization- Discusses encapsulation and the usage of the
mutable
keyword for optimizing code without breaking encapsulation.
- Discusses encapsulation and the usage of the
Part II: C++ Idioms
-
Know and Use the C++ Standard Library
- Benefits of leveraging the rich C++ standard library to avoid reinventing the wheel.
-
Avoid Casting
- Why type casting should be avoided and the alternatives that provide safer and more readable code.
-
Use
const
Correctly- Discusses when and how to use
const
for better code clarity and optimization.
- Discusses when and how to use
-
Avoid Using
new
anddelete
in Your Code- Why manual memory management with
new
anddelete
can be error-prone and how smart pointers can help.
- Why manual memory management with
-
Prefer
std::vector
to Arrays- Explains the benefits of using
std::vector
over raw arrays for dynamic memory management.
- Explains the benefits of using
-
Use
auto
for Type Deduction- How using
auto
can improve code readability and maintainability by eliminating redundancy in type declarations.
- How using
Part III: Design and Performance
-
Optimize for Clarity, Not Cleverness
- Focus on writing clear and maintainable code rather than writing clever and difficult-to-understand code.
-
Use Member Functions to Overload Operators
- Best practices for overloading operators in C++.
-
Consider the Rule of Three
- The Rule of Three (destructor, copy constructor, and assignment operator) and its importance in class design.
-
Use
std::string
Rather thanchar*
- Why
std::string
is preferred over C-style strings (char*
).
- Why
-
Use
std::map
for Associative Arrays- Why
std::map
is a better choice than raw arrays orstd::vector
for associative data structures.
- Why
-
Avoid Memory Leaks
- Techniques and tools to avoid memory leaks in C++ programs.
Part IV: Concurrency and Multithreading
-
Write Thread-Safe Code
- How to make your code thread-safe when using concurrency or multithreading.
-
Avoid Unnecessary Concurrency
- The performance costs and complexities of introducing concurrency, and when to avoid it.
-
Be Careful with Shared Data in Multi-Threaded Programs
- Best practices for handling shared data in multi-threaded applications.
Part V: Templates and Generic Programming
-
Use Templates to Make Code More Generic
- The benefits of using templates in C++ to create reusable and type-independent code.
-
Use Template Specialization with Caution
- Discusses the trade-offs of using template specialization and when to avoid it.
-
Understand the
typename
Keyword- Explanation of the
typename
keyword and its role in template programming.
- Explanation of the
-
Avoid Multiple Inheritance in Templates
- The potential pitfalls of using multiple inheritance with templates in C++.
Part VI: Debugging and Testing
-
Use Assertions and Assertions Testing
- The role of assertions in ensuring program correctness during development.
-
Be Prepared for and Handle Errors Gracefully
- Strategies for effective error handling in C++ programs.
-
Write Tests to Ensure Correctness
- Importance of writing unit tests to ensure code correctness and maintainability.
Part VII: C++ Specific Features
-
Use
nullptr
Instead ofNULL
- The advantages of
nullptr
over the oldNULL
pointer constant.
- The advantages of
-
Know the
std::move
andstd::forward
Features- Introduction to move semantics and how
std::move
andstd::forward
improve performance.
- Introduction to move semantics and how
-
Use
std::unique_ptr
andstd::shared_ptr
for Smart Pointer Management- The use of smart pointers in C++ for automatic memory management.
-
Understand
explicit
in Function and Constructor Definitions- Why and how
explicit
is used to prevent unintended type conversions.
- Why and how
Part VIII: Performance Considerations
-
Understand Compiler Optimizations
- How modern C++ compilers optimize code and how to take advantage of these optimizations.
-
Avoid Premature Optimization
- The dangers of optimizing code prematurely without considering the actual performance needs.
-
Choose the Right Data Structure
- Selecting the appropriate data structure for the problem at hand to improve performance.
-
Pay Attention to Cache Locality
- How to write code that is optimized for memory cache locality, improving performance.
Part IX: Advanced Topics
-
Master the Art of Resource Management
- Best practices for managing resources (memory, file handles, etc.) efficiently in C++.
-
Understand the “Big O” Complexity of Your Algorithms
- Understanding algorithm complexity (Big O notation) to ensure scalable performance.
People also search for Effective C++: 55 Specific Ways to Improve Your Programs and Designs 3rd:
effective c++ third edition 55 specific ways
effective c++ third edition
effective c++ 3rd edition
effective c++ series
effective c++ book