Thursday, June 23, 2005 |
|
|
Imperfect C++, by Matthew Wilson, is an outstanding book that provides “practical solutions for real-life programming” in C++. It presents a wide variety of useful material that I haven’t found in any other book on C++. If you’re an experienced C++ programmer, you’ll have learned much of this material the hard way, but you’ll still find plenty of information that will hopefully come in handy down the road.
As I read, I like to jot down items of interest so that I can come back to them later. There was no shortage of interesting items in this book; here are some highlights.
- 1: Mechanisms for implementing constraints, contracts, and assertions.
- 2.3: Using
const to track down uninitialized member variables.
- 2.3.1: Calling private static methods from member initialization lists.
- 10.2.2: Using spin mutexes for synchronization with low contention.
- 10.3.3: Critical sections are as slow as mutexes on multi-processor Windows machines.
- 11.3.2: Using a spin mutex to guard local statics.
- 12.2-12.4: Visual C++ 7.1 optimization. (It supports Return Value Optimization, but not Named RVO. It supports almost every case of Empty Base Optimization, and every case of Empty Derived Optimization.)
- 15.1: Creating a good
null pseudo-keyword.
- 18.1: Using the
const keyword after the type. (I should really start doing that; old habits are hard to break, e.g. char const * instead of const char *.)
- 18.4: Implementing
true_typedef.
- 18.5.3: Using a
LocalClass typedef in implementation files to reduce differences between similar class implementations.
- 20. The power of shims.
- 24.6: The best way to implement a safe conversion-to-Boolean for a class.
One of my favorites quotes is in the introduction to chapter 6: “You get all that functionality just by typing a }.”
If it’s not clear already, I highly recommend this book to anyone using C++ to write “real-life” programs. |
6/23/2005 10:53:28 AM (Pacific Daylight Time, UTC-07:00) | | Books
|
|
|
|
Tuesday, June 07, 2005 |
|
|
As you may have noticed, I'm in the midst of a serious blogging lull. On the business front, we're pushing hard to ship the next version of our flagship product; on a personal front, I'm in the complex process of buying a new home, selling an old one, and moving all of our stuff from one to the other, not to mention wrapping up loose ends with the people and places we're leaving behind. We've got a busy summer ahead as well, but I do hope to get back into the blogging pattern again soon. I've still got books to review and plenty of JavaScript stuff to talk about... |
6/7/2005 10:57:38 AM (Pacific Daylight Time, UTC-07:00) | | Misc
|
|
|
|
|
|
|
| Archive |
| March, 2008 (1) |
| January, 2008 (1) |
| September, 2007 (1) |
| July, 2007 (1) |
| June, 2007 (3) |
| May, 2007 (2) |
| January, 2007 (2) |
| December, 2006 (1) |
| November, 2006 (2) |
| August, 2006 (6) |
| July, 2006 (3) |
| May, 2006 (4) |
| April, 2006 (2) |
| March, 2006 (1) |
| February, 2006 (1) |
| January, 2006 (1) |
| December, 2005 (2) |
| November, 2005 (5) |
| October, 2005 (11) |
| September, 2005 (7) |
| August, 2005 (1) |
| July, 2005 (2) |
| June, 2005 (2) |
| April, 2005 (5) |
| March, 2005 (11) |
| February, 2005 (6) |
| January, 2005 (2) |
| December, 2004 (1) |
| November, 2004 (1) |
| October, 2004 (3) |
| September, 2004 (1) |
| August, 2004 (5) |
| July, 2004 (10) |
| June, 2004 (3) |
| May, 2004 (5) |
| April, 2004 (3) |
| March, 2004 (10) |
| February, 2004 (10) |
| January, 2004 (15) |
| December, 2003 (1) |
| November, 2003 (2) |
| October, 2003 (13) |
| September, 2003 (20) |
| August, 2003 (24) |
|
|
|
|