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?
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?
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 !
My answer would be "I'm not sure, I learned C++ without reading that book."
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 :).
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.
C++ gives you enough rope to hang yourself with. However, you can write solid code using it, if you follow these guidelines.