Related: Any good websites to practice C++ with challenges? I've heard some things about CodeWars, but are there any other?
Ask HN: Best way to learn modern C++?
91–100 of 184 posts
Re: Ask HN: Best way to learn modern C++?
#92Use it. Not being a smart@$$ here. Any language you want to learn will only become natural when you've used it for a significant project or set of exercises. Either clone or port something non trivial, or use it for your latest pet project, or get permission to use it at work.
That's a pretty useless answer. It's easy to use C++, but in a non-idiomatic or C-style way. I think the OP is aware of this problem and is looking for concrete examples of modern C++.
It's similar to why university lectures work best if the audience has already done its assigned reading. The people in the audience have better questions in mind while listening, so they can better intuit when a gap is filled in or if some part of the explanation doesn't make sense.
Re: Ask HN: Best way to learn modern C++?
#93One of the trickier things about C++ for me (in terms of “getting lost”) when I first started was that there’s no standard C++ project structure. It varies based on the build system you use, whether what you’re building is just an API or something else, and personal preference. I recommend looking at some open source C++ projects like Tensorflow (Google), LevelDB (also Google), folly (Facebook), MongoDB, and Thrill (…
Re: Ask HN: Best way to learn modern C++?
#94- Tour of C++ ( http://www.stroustrup.com/Tour.html ) - 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" - ht…
I agree with this completely :) 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…
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.
Re: Ask HN: Best way to learn modern C++?
#95Google's C++ course at https://developers.google.com/edu/c++/ looks useful to start with.
Don’t forget SFINAE. It’s what most of the modern type traits rely on and something you’d have to understand, at least conceptually, to fully understand how to effectively use things like std::enable_if.
[1] https://en.wikipedia.org/wiki/Substitution_failure_is_not_an...
Re: Ask HN: Best way to learn modern C++?
#96Re: Ask HN: Best way to learn modern C++?
#97If you want fun miniproject may I suggest Peter Shirley's excellent mini-raytracing bookseries: Ray Tracing In One Weekend, Ray tracing the next week, and Ray Tracing, the Rest of Your Life: https://www.amazon.com/Ray-Tracing-Weekend-Minibooks-Book-eb... 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-Re…
Re: Ask HN: Best way to learn modern C++?
#98Re: Ask HN: Best way to learn modern C++?
#99https://www.amazon.com/Primer-5th-Stanley-B-Lippman/dp/03217...
Re: Ask HN: Best way to learn modern C++?
#100IMO, the classic C++ book/author is still the best: Effective C++. Don't forget about the sequels, including the mostly overlooked Effective STL (which I happen to like better than the first two books). And to address the modern part of this question, I'll add that Scott Meyers has written Effective Modern C++ as well, but I'd read that last after getting the hang of C++03. No matter what people say, I tend to believ…
As someone who programmed in "classic C++" for decades, I feel like modern C++ is pretty different, and that it's not just syntactic sugar to make some ugly things easier. The biggest example is that my natural inclination to use raw pointers everywhere and manage all memory myself, while idiomatic modern C++ is full of unique_ptrs and shared_ptrs everywhere, and raw pointers seem to be regarded as a code smell. Conv…