views:

496

answers:

10

I was asked the following question at a recent job interview:

What do you think is the main theme / single word that sums up the Effective C++ series from Scott Meyers?

What would be your answer to this question?

+2  A: 

That C++ is an insanely complex language with lots of tricks, tips, idioms and odd constructions that you have to know by heart rather than being enforced by good language design?

Probably not going to get you the job at anywhere except MSFT though !

Martin Beckett
+12  A: 

In one word it's Advice

ardsrk
+10  A: 

My answer would be "I'm not sure, I learned C++ without reading that book."

Earlz
+3  A: 

Although a very strange question to ask in an interview (considering your candidate might not have read such an excellent book), I would say the main theme of Effective C++ is to take the path of a semi-expert C++ programmer and adjust his/her way of thinking (especially towards the internals of C++) on the path of becoming an expert.

One thing I learned a lot about is self checking of references (Page 71, Item 17). Better memory management. Preferring new/delete vs malloc and free (which is obvious but his reasonining was very well stated). Another good one was Item 29 on page 123, avoid returning "handles" to internal data.

It is not a simple read, and it is definitely not a beginner's book. It's the next leap for a C++ programmer looking to become a better C++ programmer.

It was a very good book and although it's a little dated it is one of the best books to become a proficient C++ programmer. I still read portions of it to this day, and I'm definitely NOT a C++ expert; it's a hobby.

To impress the person interviewing you mention that although you liked Effective C++ that the interviewer should take a gander at More Effective C++. Explain some of the pros to this book as well and ask he/she if they too have read it considering they've read Effective C++. That should stump the chump :).

JonH
@JonH: "...although it's a little dated..." Don't be fooled, there's a 3rd edition from, I think, 2005. It's not a face-lift, but a major overhaul with many new topics.
sbi
@sbi - aha you are right amazon does show a third edition...hmm now I'm contemplating on buying this as well:) but again I'm just a C++ hobbyist.
JonH
Probably a good question in that if a candidate says "I only read C++ for dummies" you probably don't want to hire them.
Martin Beckett
@Martin Beckett - I agree :)..most of those dummies books seem to be pretty basic, there are some where the reviews are pretty high but I don't remember one of them to be a C++ book.
JonH
@JonH - if a candidate learned C++ directly from the TR1 report and read no other books fine. But if they claimed to be an experienced C++ programmer and hadn't heard of Effective C++ I would worry.
Martin Beckett
@Martin Beckett - I agree with that 100%. That or at least "The C++ Programming Lanaguage".
JonH
A: 

Guidelines to write better C++.

Nick D
+1  A: 

Don't

{blah body too short blah}

sdg
Took me a second. :)
Mike Daniels
+4  A: 

The two older editions gathered advice especially helpful for people switching from C to C++. Using new/delete instead of malloc()/free() and OOP was all new back in 1991.

The 3rd edition is more targeting people switching from other languages (Java, C# etc.) to C++. It comes with advice on patterns, templates, exception safety, a much richer standard library, and many other topics people didn't think about in 1991.

Basically, Scott Meyers' goal has always been to write "the best second C++ book to buy" - not something to teach you the language, but to become a real professional. He wanted to list the "50 most important pieces of advice for practicing C++".

Oh, and something we shouldn't forget: He wanted it (and succeeded in doing so) to be a technical book that's fun to read.

sbi
A: 

Main (plagiarized) theme: "With great power comes great responsibility"

sdg
A: 

How to write effective C++?

Peter Alexander
A: 

C++ gives you enough rope to hang yourself with. However, you can write solid code using it, if you follow these guidelines.

Steven