12 ms·
The C++ and programming books I recommend
- twoodfin 13y agoIf you can handle some abstract theory, the design of the STL is put into a useful context by Stepanov's Elements of Programming. Stroustrup's The Design and Evolution of C++ is another great "why" book, and I hope that Bjarne will decide to update it for C++11 or 14. It's older, but reading Lippman's Inside the C++ Object Model is what finally made the language click for me.
- Rusky 13y ago+1 for Inside the C++ Object Model. Understanding the mechanics of abstractions like virtual methods (along with stack/heap, pointers, but those are less C++-specific) makes you much more confident in what your code is doing (and why you might do it that way).
- yeukhon 13y agoC++ FAQ Lite is not a book, but a great reference; this is useful the night before an interview. It's helpful. It certainly did help with my interview. http://www.parashift.com/c++-faq/ http://www.parashift.com/c++-faq/ A book I like is C++ Primer. In any case, this list on SO is pretty cool. http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list http://stackoverflow.com/questions/388242/the-definitive-c-b...
- DerKommissar 13y agoC++ FAQ Lite is actually the "lite" version of the C++ FAQs (http://www.amazon.com/FAQs-2nd-Edition-Marshall-Cline/dp/0201309831 http://www.amazon.com/FAQs-2nd-Edition-Marshall-Cline/dp/020...) which is great.
- yeukhon 13y agoCool! Do they have a more-up-to-date version of C++ FAQ? Lite gets update when needed.
- donniezazen 13y agoWould it be counter productive to learn C++ using Stanford School of Engineering Introduction to Computer Science Programming Abstractions[1] CS106b considering it was taught in 2008? [1]http://see.stanford.edu/see/courseinfo.aspx?coll=11f4f422-5670-4b4c-889c-008262e09e4e http://see.stanford.edu/see/courseinfo.aspx?coll=11f4f422-56...
- pmr_ 13y agoI cannot judge on the quality of the course, but there are a lot of horrible C++ resources (including books) out there and over the years the community has come to a kind of consent which resources are likely produce C++ programmers which shouldn't be shot on sight. http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list http://stackoverflow.com/questions/388242/the-definitive-c-b... is probably the most comprehensive list right now.
- kasperset 13y agoI have been through few lectures and found it ok. Some people complain that it does not use standard library.
- donniezazen 13y agoI am about to finish CS106a which is designed in similar fashion. It uses ACM libraries. It was my first programming course and I think I did great[1]. Mehran Sahami is a great teacher and he presented lectures in a very digestible fashion. Also assignments are designed in a very doable way. It all turned out to be a very pleasing experience. There is no end to learning so I will have to spend some time learning the main Java class. It also only supports Mac(Xcode) and Windows(VB) but I would like to use something like Qt-Creator on Linux. [1] https://github.com/donniezazen/Stanford-CS106a https://github.com/donniezazen/Stanford-CS106a
- nikbackm 13y agoI haven't read Lakos' book sad to say. Since it's a little old now, can anyone tell how well it still stands up today? Are there any rules/guidelines from the book that are outdated?
- apaprocki 13y agoLakos works at Bloomberg and his design principles from the book have been in use there for over a decade. The book content might seem strange for someone coding on their own, but when you have a staggering amount of C++, the order it brings to the chaos is welcome. If you wind up reading it you can see the concepts in practice in our GH repo (bloomberg/bde), which might make it an easier read.
- IvyMike 13y agoModern compilers have made external (or "redundant") include guards unnecessary. http://c2.com/cgi/wiki?RedundantIncludeGuards http://c2.com/cgi/wiki?RedundantIncludeGuards
- Jare 13y agoLakos is the most influential (to me) programming book I've ever read. It came out perfectly timed, as I was moving from lone coder to lead coder, and the videogames industry was growing from 1-2 coder teams into 5+ teams, from thousands to millions of LOC and from C to C++.
- jbeja 13y agoI just want a book about only c++11/14, that teach me how to grasp everything form scratch with best practices in mind.
- Tiktaalik 13y agoI haven't read it yet, but Scott Meyers (Effective C++) has released a PDF that covers just the additions of C++11/14. http://www.artima.com/shop/overview_of_the_new_cpp http://www.artima.com/shop/overview_of_the_new_cpp
- ekm2 13y agoI was asked this question,but could not come up with a good answer:Assuming someone has never programmed before,but has the (mis)fortune of using C++(e.g that is what the school he/she is enrolled in uses) what would be the best book to start with?
- papaf 13y agoI like the C++ Primer (I actually prefer it to Stroudstrup) and this book does start from a basic example - describing what a function is. I think that using the Primer to learn programming would be a hellish experience but then learning C++ as a first language is never going to be fun.
- kasperset 13y agoI like this book especially if you are new to programming: Jumping into C++
- alexallain 13y agoThank you, I'm glad you like it :)
- dfkf 13y agoNo mention of C++ Primer? A rather thorough (if a bit overwhelming) introduction to the language. And it teaches idiomatic C++, not just C with classes.
- idbfs 13y agoSeconding the C++ Primer! I've been slowly working through it over the past year, and have found it to be outstanding.
- banachtarski 13y agoThis is what I recommend to all my friends who want to learn C++. It's a little terse on some of the more advanced concepts but gets the job done very well.
- pjmlp 13y agoPlease don't touch "The C Programming Language" if you care about modern C++, as you will learn lots of idioms that are good in C, but the WRONG THING in C++. Better learning path: - A Tour of C++, Bjarne Stroustrup - The C++ Programming Language, 4th Edition, Bjarne Stroustrup - Programming: Principles and Practice Using C++, Bjarne Stroustrup - The Design and Evolution of C++, Bjarne Stroustrup (how C compatibility got to influence C++'s design) Additionally read everything you can from Andrei Alexandrescu and Scott Meyers. Then maybe, read The C Programming Language.
- stormbrew 13y agoThe best introductory text to modern C++ is, in my opinion, Accelerated C++ by Moo and Koenig. It's concise and teaches the language instead of spending 6 chapters teaching fundamental algorithms (yet another broken linked list class!) or OO principles (which often results in terrible C++).
- kupo 13y agoThough I also recommend this book, their example code teaches bad habits (such as assignment within conditionals and horrendous compound statements) which should be avoided in any sort of production code.
- city41 13y agoDo you have any examples? I just flipped through the book and couldn't find any. Accelerated C++ was my first ever programming book. It was quite a doozy to get through at the time, but I feel like I'm forever indebted to it. Koenig's attention to detail and ability to explain what the machine is actually doing and the consequences in your code is still unmatched as far as I can tell.
- kupo 13y agomedian = size % 2 == 0 ? (homework[mid] + homework[mid-1]) / 2 : homework[mid]; In my opinion the ternary operator is misused here when an if/else would have been clearer.
- city41 13y agoAh yeah, that is one beefy line of code. I can agree with that.
- banachtarski 13y agoWell, you omitted the all important const qualifier which would be a decent reason to use the ternary operator.
- 13y ago
- deleted 13y ago[deleted]
- Tiktaalik 13y agoI'm a really big fan of Effective C++ and More Effective C++. The syntax of a language is fairly easy to grasp, and I think the more important thing is to learn how people use the language, what are the pitfalls you're likely to encounter, and how to code around them. Essentially a "best practices" guide. It's great that C++ has these books. With some other languages its not obvious what the "best practices" books are or there don't seem to be any.
- DerKommissar 13y agoYes, also Effective STL. These books turned me from a C++ coder into the "the C++ guy" at work.
- barrkel 13y agoC++ provides many more ways to shoot yourself in the foot than most other languages, so it is in more need of such books. For coding in C#, Framework Design Guidelines[1] is an excellent book. I'd argue that with a little adjustment for conventions, it applies to Java too - and IMHO Java is in more need of the advice, as test-oriented code can lead to unwieldy, overcomplex APIs, a tendency that needs tempering. [1] http://www.amazon.com/Framework-Design-Guidelines-Conventions-Libraries/dp/0321246756 http://www.amazon.com/Framework-Design-Guidelines-Convention...
- Tiktaalik 13y agoHaha yeah I agree completely with that reasoning for why C++ gets two books on how to write C++ programs properly. Maybe some languages would only need a pamphlet.
- pjmlp 13y agoJava also has its share, specially with books like the Java Puzzles ones, which show some gotchas of the language. I think that any language that reaches the enterprise mainstream, suffers from the "creativity" of enterprise architects.
- zaphoyd 13y agoI've been looking for a good book that teaches idiomatic C++11 programming from scratch. Something like Accelerated C++ or Programming: Principles and Practice Using C++ but using C++11/14 only. Lots of the C++11 books I've found have assumed you know C++98 and say what the differences are. Anyone have any suggestions?
- pmr_ 13y agoThe 4th edition of "The C++ Programming Language" has been updated to cover C++11. Contrary to the article I think the book is very well suited to learn C++ (although not to learn programming). It takes a bottom-up approach making it suitable for people that have no previous exposure to a similar language.
- tbirdz 13y agoDoes anyone know of any books they would recommend about the new C++11 threading model?
- babbage141 13y agoCheck this one out: http://www.manning.com/williams/ http://www.manning.com/williams/
- nisa 13y agoI've read C++ Concurrency in Action and found it very helpful in understanding these concepts: http://www.manning.com/williams/ http://www.manning.com/williams/
- IvyMike 13y agoA lot of the key C++ books in my library are outdated as far as C++11 or 14, but still are pretty valuable especially for legacy code bases. Here are a few good ones that I haven't seen mentioned elsewhere in the thread. - Sutter's Exceptional C++ books - Dewhurst's C++ Common Knowledge and C++ Gotchas are useful. - Sutter/Alexandrescu's "C++ Coding Standards" is good, too.
- BatFastard 13y agoI second many of the books, but in particular "Sutter/Alexandrescu's C++ Coding Standards" the "coding standards" is misleading, its more like a "Code Complete" for hardcore C++.
- justin66 13y ago> This book isn't about C++, but, everything relevant to C is also relevant to C++. Wow, that's bad advice.
- curiousDog 13y agoWould you recommend that a novice programmer learn C++ these days? Just seems like the ROI is too little in terms of new concepts that'll be learned. I mostly suggest C -> Java/C# -> Some functional language and also Python/JS on the side.
- pesnk 13y agoI would. C++ is still really important for low level algorithms. One can always do some low level programming with Java or C#. But is not as effective when it's done with Java/C#.
- bratsche 13y agoThis is pretty far from an introductory C++ book, but I'd like to mention "Modern C++ Design" by Andrei Alexandrescu. Back when I was writing C++ code, this was the book that really opened my eyes to what you could do with the language.
- lukaszg 13y agoThinking in C++ vol 1 & 2
- reality_czech 13y agoYou forgot the best, and most informative, C++ reference: http://yosefk.com/c++fqa/ http://yosefk.com/c++fqa/