Wednesday, 22 July 2009

C++ Book Poll

I conducted a straw poll around our office today to isolate the C++ Books we dip into with regularity. I fancied creating a little bit of dedicated shelf space for the books that we regularly need to lay our hands on. (In doing this, I'm trying to apply the first two Ss of Kaizen 5S to our office: Seiri - to sort and Seiton - to straighten).

Want to know what came out on top? No? Tough.

Joint 1st: Effective C++ (Scott Meyers)
Joint 1st: More Effective C++ (Scott Meyers)
3rd: The C++ Programming Language (Bjarne Stroustrup)
4th: Effective STL (Scott Meyers)
Joint 5th: Exceptional C++ (Herb Sutter)
Joint 5th: More Exceptional C++ (Herb Sutter)
Joint 5th: The C++ Standard Library (Nicolai Josuttis)
8th: The C++ Standard (BSI)

Bumbling around with one and two votes were Modern C++ Design (Andrei Alexandrescu), Beyond the C++ Standard Template Library (Bjorne Karlsson) and Agile Software Development (Bob Martin).

The surprise loser with a score resembling last place on Qi was the "Gang of Four" patterns book!

So, what does this say about developer habits, at least at Vicon?

Firstly, it says we regularly turn to the books that tell us about the traps and pitfalls and essentially how to use C++ correctly and efficiently. Scott Meyers' books rightly deserve their place at the top of any poll about how to write (and how not to write) C++. Stroustrup's up there for most people too (naturally), with Herb Sutter's books being favoured only by those willing to open the closet on C++ and reveal the full horror of its intricacies! I reckon there's probarbly a correlation between the "exceptions, what are they?" crowd and a no-vote or negative vote for Sutter.

An interesting point raised about the Meyers books (and the Sutter books to some degree) was that we can never remember which important item is in which! Can you remember which books "catch exceptions by reference" or "make non-leaf classes abstract" are in? Me neither.

The surprising thing for me was that very few people reach for The Standard. Perhaps it's just easier to go straight to F1 for a given function or look up the standard function on the internet.

The books with just a few votes do show that us Viconites are at least moving forward: Alexandrescu's book may be a few years old now, but it's still very relevant if you want to learn about how to write powerful generic code, the Boost Book shows how much boost is used and Uncle Bob's Agile Book illustrates a desire to move practices on, together with a healthy attitude towards patterns.

Or does it?! Design Patterns received only negative votes! Perhaps the patterns in GoF are just looking a bit old now. The book is definitely not complete any more, nor is any. In fact the best reference source for patterns is probably the Wikipedia page: it has all of the GoF patterns in, additional ones from Code Complete (Steve McConnell) and a few more besides, not to mention the slew of concurrency patterns referred to in neither text. There is a decent text out there for concurrency patterns (apparently) called Pattern Oriented Software Architecture vol 2 (Douglas Schmidt et al.), but the Wikipedia page still outstrips it by a factor of well over 2!

No comments:

Post a Comment