Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)

Rating:
  • Highly Recommend

The Effective Software Development Series is quite possibly my favorite book series on software engineering. I commend Scott Meyers for his inception of the series and continued eye for quality as Consulting Editor.

I would also go as far as to say that the publisher Addison Wesley is my favorite publisher in the space. Sure, I have found several gems published by O’Reilly, The MIT Press, Charles River Media, and many others, but I have found Addison Wesley to consistently impress me with quality works.

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition) has been a fantastic edition to my library for many years now and I feel it is a great product to kick off my Review category.

What I like

The Effective Series is not only a great read cover to cover, but the format lends itself to be particularly useful as a reference.

Each Chapter of Effective C++ focuses on a particular topic relevant to the language and is further broken down into ‘Items’. Items are pretty well self contained and give a clear indication of purpose, example code, references where necessary, as well as finishing up with a quick summary of what to take away.

Chapter 1

The theme of this chapter is familiarizing oneself with some high level concepts of the language. Scott gives a great explanation of what he refers to as the “federation of languages” in which C++ development is broken into. He brings attention to semantic constraints, the safety of using the compiler over the preprocessor, and the importance of initializing objects before they are used in OOP design.

Chapter 2

The focus here is on what is affectionately known as the “Big Three” or Rule of three in C++. It is actually a bit broader then that in the sense that he covers constructors and assignment operators in general and not just the copy variety, but it is a good term to be aware of as a C++ developer (although it has been extended as of C++11 with move semantics as mentioned in the previously linked Wikipedia entry).

This is a great example of the care that must be taken when developing new types in C++.

Chapter 3

The topic of chapter 3 is resource management. There is great coverage of the importance of RAII practices and some useful advice on how to design such types.

Chapter 4

In this chapter Scott covers some general design guidelines for more robust code. I often find myself quoting the title of Item 18:

Make interfaces easy to use correctly and hard to use incorrectly.

It is amazing how powerful a concept this is and how often it is neglected. He then gives advice on type design and type conversion and even includes a discussion of the utility (and complexities) of adding a non-throwing swap method to some types.

Chapter 5

Chapter 5 covers many useful implementation details. This includes optimizations, both in terms of runtime and compile time, as well as exception safety and maintainability.

Chapter 6

The focus here is on Object-Oriented design and inheritance in C++. OOP is definitely not the only kid on the block as far as design paradigms go, but the coverage here is fantastic for those situations where it is employed. The coverage includes “is-a”, “has-a”, and “is-implemented-in-terms-of” relationships, interface and implementation inheritance combinations, and several other best practices for C++.

Chapter 7

Chapter 7 introduces the reader to the abstract world of generic programming. This only begins the touch the surface of the power of compile time programming practices in C++, but it is a great primer for future reading on the subject.

Chapter 8

This chapter explores the powerful concept of customizing new and delete in C++. Scott discusses when it makes sense to do so, as well as what needs to be done to do it effectively.

Chapter 9

Chapter 9 is focused on a few miscellaneous topics that didn’t fit into the umbrella of the previous chapters. There is a discussion on compiler warns, the STL and TR1, as well as what is probably the most popular library of reusable open source C++ goodness… Boost.

What I Don't

There honestly isn’t very much at all I dislike about Effective C++. If I was to get really nit picky I could note the lack of differentiation when naming member variables as I normally prefer them to stand out from local variables or parameters. This, however, is obviously a choice of style and hardly a valid fault.

I happen to own the paperback version, so I can’t speak to the formatting of code snippets on the Kindle edition, but I suppose this is something to take into consideration if purchasing for eReaders. I have seen a few reviews on Amazon that seem to suggest this as a reason for giving lower marks.

What I Recommend

If you are a C++ developer and you have not already purchased this book, I say to you… What are you waiting for?

Even with the further development of the language and Scott’s more recent release Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14 1st Edition (published this time by O’Reilly), Effective C++ remains relevant and is indeed worth the investment. You can check out this topic on Stack Overflow if you need further convincing.