Feeds

Exceptional C++ and More Exceptional C++

Two essential aids for the C++ Interviewee

Top three mobile application threats

Book review This pair of books brings together a variety of small but annoying puzzles mediated by Herb Sutter through the news:comp.lang.c++.moderated newsgroup.

However, any irritation is in a good cause. Each puzzle illustrates an important point in C++ that many of us still get wrong. An early example is exception safe programming, which most of us (OK, yes, me), have struggled against. Fortunately for my self esteem, these puzzles are given a difficulty score of between 7 and 9 out of 10.

This gives a clue as to what these books really are, they’re not just textbooks. Instead, they map out 100 or so interview questions. Hence their awkward nature; the questions are supposed to be tricky. As a pimp who used to be a C++ contractor, I can say with some confidence that if you can get through these books, you will pass more than 80% of C++ interviews. However, these are not “…For Dummies” books, you are required to think hard and there is no real common theme beyond that of shattering any wishful thinking about your being a C++ guru.

Sutter is a Microsoft lackey, but fortunately, these aren’t Visual C++ books. Even though VC++ is vastly more standards conformant than it used to be, it is rarely mentioned except in connection with issues where the compiler gets to make choices.

Although inheritance is a common playground for interviewers, the coverage is sparse, probably reflecting Sutter’s accurate belief that as an O-O technique it is over used and, rightly, in relative decline as a programming technique.

Large scale design issues are skipped over lightly and, in general, these are books about programming in the small rather than the large. The exception to this is some waffle about header files in big projects and how to make them faster, which is rarely a critical issue in these days of precompilation and fast processors.

The second book emphasises STL and templates rather more and brings in threads. This is an area you really do need to start thinking about. Multi-core architectures mean that bog standard single thread code will execute 50%, or even 75%, more slowly than multi-threaded code on the same hardware; and that ratio is increasing. This is part of the optimisation theme, and although many books talk of writing “good” code, the hardcore stuff of making your code faster is usually rather skipped over in other books. Later in the book, Sutter points out some of the horrors that await the unwary over-optimiser [that’s good – Ed].

There is yet more on exception safety, which is clearly important enough for Sutter to bring his notion of programming “morality” to the topic. More Exceptional C++ also gives rather good coverage of the ancient dark art of pre-processor macros, a topic skipped over lightly in most other books. The sparse style is great for focusing on each issue, and for such short books, there's an impressive amount that you'll learn from them, although this comes at a price: if you don’t understand the example, you simply have to stare at it until it makes sense, because there is only ever one. You can of course argue that this is a good thing.

Exceptional C++ and More Exceptional C++

Verdict: If you’re going to go to a C++ interview any time in the next year, read these books and halve your chance of failure.

Author: Herb Sutter

Publisher: Addison Wesley

ISBNs: Exceptional C++ 0201615622; More Exceptional C++ 020170434

Media: Book

Buy Exceptional C++ at Cash & Carrion!

Buy More Exceptional C++ at Cash & Carrion too!

Combat fraud and increase customer satisfaction

More from The Register

next story
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
prev story

Whitepapers

Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
SANS - Survey on application security programs
In this whitepaper learn about the state of application security programs and practices of 488 surveyed respondents, and discover how mature and effective these programs are.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.