Ask HN: Best way to learn modern C++?
686 pointsDo you have some good advice or know any useful resources to learn in a proper way how to code in C++? For the context, I know some C, but C++ seems a different kind of beast, and it's easy to get lost in the huge variety of features and libraries it offers.
Comments (173) 47 threads
- Principles and Practice Using C++ (http://www.stroustrup.com/programming.html)
- From Mathematics to Generic Programming (http://www.fm2gp.com/)
- The Scott Meyers books
Some of the Bjarne Stroustrup videos,
"Learning and Teaching Modern C++" - https://www.youtube.com/watch?v=fX2W3nNjJIo
Some of the Herb Sutter videos,
"Writing Good C++14... By Default" - https://www.youtube.com/watch?v=hEx5DNLWGgA
"Back to the Basics! Essentials of Modern C++ Style" - https://www.youtube.com/watch?v=xnqTKD8uD64
Some of the Kate Gregory videos,
"Stop Teaching C" - https://www.youtube.com/watch?v=YnWhqhNdYyk
"10 Core Guidelines You Need to Start Using Now" - https://www.youtube.com/watch?v=XkDEzfpdcSg
"It's Complicated" - https://www.youtube.com/watch?v=tTexD26jIN4
It's a lot of the content in the above but crowdsourced, open for PRs, searchable, and readable from the browser.
I would also like to add that it helps to read "The Design and Evolution of C++".
I found that I plateaued early in my C++ journey. However, I was always reading from the experts and it really helped to read material from Dr. Stroustrup. Once I began to see the common thread behind what he was saying and understood why some things were the way they were, it helped understand when it's a good time to use/not-use certain things. This helped break past that barrier and to improve my skill further.
Also, it helped to write a _lot_ of c++ code and think about how that could be better.
I'm afraid I didn't read a tonne of good C++ code in that period but somehow, I managed to keep growing and at some point, it became my "go to" language and I really started to like it.
Long story, short: Read books from the experts, esp. Dr. Stroustrup.
I think that book is worth reading even to people who have no intention of going anywhere near C++, as long as they are interested in programming language design and evolution. I wish there were more books like this one to explain the kind of thinking that went into the design of a language and to tell its history.
I had commented on the book on HN about a month ago:
https://news.ycombinator.com/item?id=16275341
Excerpt from it:
"I found that book very interesting in many regards. I had bought and read it several years ago (out of interest, though I have not worked on C++ professionally).
Stroustrup goes into a lot of details about the reasons for many design decisions in the language."
That's one of the reasons that make the book interesting. He even goes into human and cultural aspects of programming.
Continue this thread — 4 replies
They are truly great.
For books I’d like to add to the current top comment (may go away) API Design for C++. It’s a great reference on exactly what it sounds like.
If you get interested on rendering Matt Pharr & Co's Oscar winning "Physically based rendering" is a didactic masterpiece. https://www.amazon.com/Physically-Based-Rendering-Third-Impl...
The book is one of the best examples of how to combine high quality code and academic exposition together.
https://isocpp.org/faq (what Marshall Cline's excellent C++ FAQ has become)
and here:
https://herbsutter.com/gotw/ (Not as organized, but Herb Sutter wrestles with the essential questions of how to deal with the tricky bits of C++)
If you've got the cash, read Effective Modern C++ by Scott Meyers.
Finally, if you're ready to snark at all you've learned, read the C++ FQA:
http://yosefk.com/c++fqa/
All comments shown.
Couldn't load more comments. Check your connection and try again.