HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Effective C++: 55 Specific Ways to Improve Your Programs and Designs

Scott Meyers · 7 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Effective C++: 55 Specific Ways to Improve Your Programs and Designs" by Scott Meyers.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
“Every C++ professional needs a copy of Effective C++. It is an absolute must-read for anyone thinking of doing serious C++ development. If you’ve never read Effective C++ and you think you know everything about C++, think again.” ― Steve Schirripa, Software Engineer, Google “C++ and the C++ community have grown up in the last fifteen years, and the third edition of Effective C++ reflects this. The clear and precise style of the book is evidence of Scott’s deep insight and distinctive ability to impart knowledge.” ― Gerhard Kreuzer, Research and Development Engineer, Siemens AG The first two editions of Effective C++ were embraced by hundreds of thousands of programmers worldwide. The reason is clear: Scott Meyers’ practical approach to C++ describes the rules of thumb used by the experts ― the things they almost always do or almost always avoid doing ― to produce clear, correct, efficient code. The book is organized around 55 specific guidelines, each of which describes a way to write better C++. Each is backed by concrete examples. For this third edition, more than half the content is new, including added chapters on managing resources and using templates. Topics from the second edition have been extensively revised to reflect modern design considerations, including exceptions, design patterns, and multithreading. Important features of Effective C++ include: Expert guidance on the design of effective classes, functions, templates, and inheritance hierarchies. Applications of new “TR1” standard library functionality, along with comparisons to existing standard library components. Insights into differences between C++ and other languages (e.g., Java, C#, C) that help developers from those languages assimilate “the C++ way” of doing things.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I'm not sure how C++ for DL is different from regular C++ so take my advice with a grain of salt.

I took a class under Bjarne Stroustrup and he highly recommended Tour of C++ [0] as the best way to learn modern C++ for someone who already has some programming experience. That and of course, Effective C++[1] by Scott Meyers.

[0] - https://www.amazon.com/Tour-C-Depth/dp/0321958314

[1] - https://www.amazon.com/Effective-Specific-Improve-Programs-D...

saagarjha
These days, you want Effective Modern C++. It's a lot newer and goes over recent features.
randcraw
I'd agree with the shout out for Tour of C++ as a good first book. Unlike most C++ intros, it's concise (192 pages) and up-to-date enough to exemplify C++'s standard forms (esp. 98 and 03). If you plan to develop in C++ you'll want other books with more examples and reference, but these will shift the focus more onto trees than forest (at ~1000 ppg).

Accelerated C++ by Koenig and Moo is another nice short overview of C++, but assumes more familiarity with C and OOP principles.

Jan 01, 2016 · yati on } // good to go
I second petke here. I was in a similar situation once (although I was much younger and came from Python), and "Accelerated C++"[1] along with Meyers' "Effective C++"[2] helped me immensely.

The first couple chapters in the first book might bore you a bit since you are an experienced programmer, but hang on tight :)

[1]: http://www.amazon.com/Accelerated-C-Practical-Programming-Ex...

[2]: http://www.amazon.com/gp/product/0321334876?ie=UTF8&tag=aris...

Good C++ isn't that far from high-level languages. Look at the bullet points here:

http://msdn.microsoft.com/en-us/library/hh279654.aspx

If you primarily use value and reference semantics, RAII, smart pointers, STL containers and algorithms, etc, C++ looks a lot like a really powerful high-level language, because that's what it is. Things only start to get ugly and/or low-level when you are trying to heavily optimize things.

Stroustrop (mentioned in other comments) is a great way to get started, and Effective C++ (http://www.amazon.com/Effective-Specific-Improve-Programs-De...) and its cousins will help you not shoot yourself in the foot.

C is a whole different beast. If you've coded in Java, you have a basic idea of how to do encapsulation in C++. Encapsulation in C is nearly impossible to guarantee. Really, a lot of C programming relies heavily on negotiated conventions and design by contract. Learning the C language is pretty easy (read K&R some weekend), but learning to program well in C is a completely different thing.

There are a number of programming books that I use to prepare for technical interviews. These are

1. Programming pearls, http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/...

2. Effective C++, http://www.amazon.com/Effective-Specific-Improve-Programs-De...

3. Programming Problems, http://www.amazon.com/Programming-Problems-Primer-Technical-...

The reason for these texts is not because they are overtly insightful or well written, it is because they have a large number of problems with completely coded solutions. After working through these basics, programming interviews are much more enjoyable.

Oct 11, 2011 · mathias_10gen on ISO C++11 Published
I think Effective C++ by Scott Meyers[1] is the gold standard when it comes to books on writing good clean C++. It assumes that you already know the basic syntax though and already know how to program. This allow him to skip the intro stuff that take up the most space in many books and get strait to telling you what you need to know to write better code.

[1] http://www.amazon.com/Effective-Specific-Improve-Programs-De... (Make sure you get the latest edition, a lot has changed for the better)

cageface
Meyers book has been the book I'd recommend to anybody moving beyond the beginner stage in C++, but there's so much critical stuff in the new standard that the last edition of his book doesn't cover that I'd hesitate to recommend it now. I think you're better off studying some of the resources available online, like the videos at http://channel9.msdn.com/

That is, of course, only until a new edition of Meyers' book comes out.

Avoid this book and get Scott Meyer's Effective C++: 55 Specific Ways to Improve Your Programs and Designs instead:

http://www.amazon.com/Effective-Specific-Improve-Programs-De...

HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.