Take a look at how the standard library does things, and particularly anything for which it is not clear to you how one might implement it, or the use of anything whose purpose you don't really understand.
Ask HN: Best way to learn modern C++?
71–80 of 184 posts
Re: Ask HN: Best way to learn modern C++?
#72Use 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.
I'd still argue that there's a lot of value in some form of teaching (via book or video or whatever). If left to their own devices, novices will often come up with messy, non-idiomatic ways to do things.
Not learning from books/teaching can make it hard to improve. I love reading other peoples code and thought processes because it often reveals how I'm missing something in my toolbox.
Studies have shown that one of the best ways to remember is to take a stab at a problem before learning the solution. So even quizzes on using libraries has helped me learn methods and concepts I would have not learned on my own if left to my own way of coding. I try a simple problem on my own before learning that there is a cleaner, more efficient solution. It's easier and more approachable to do that with small problems than trying to revise an entire document of code.
Lastly, I think a lot of experts underestimate the gap between novice and intermediate, where it's really hard and frustrating to attempt things that are a bit more complicated, requiring more background knowledge than just whats shown on the surface.
Re: Ask HN: Best way to learn modern C++?
#73Do you mind asking 'Why C++'? I know that doesn't answer your question and to be honest, I am curious about the resources which come up here too, but C++ can be so painful to learn that I wanted to know what drives you into that direction. I mean, there are alternatives like Rust. Do you have a specific project in mind, need it to fulfill some résumé requirements or something completely different?
Any complex or high-performance computing relies on C/C++ pretty heavily still.
It's also a good tool to have in your box for building well-performing cross-platform native apps with Qt.
I say this as one who's probably at the same stage as OP. Know some C, and reasonably comfortable with the basics. Application of C++ is a little more widespread outside of strict embedded environments, however. (Another space I personally want to immerse myself in)
Re: Ask HN: Best way to learn modern C++?
#74Use 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.
Re: Ask HN: Best way to learn modern C++?
#75Re: Ask HN: Best way to learn modern C++?
#76Re: Ask HN: Best way to learn modern C++?
#77For 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.
Re: Ask HN: Best way to learn modern C++?
#78Earlier quoted context omitted.
Only in a very strict interpretation that everything that is still used somewhere didn't get replaced. Perl was more or less replaced, for example, and I like that. The only kind of originality that is good in programming is "surprisingly simple". "Surprisingly weird" is terrible.
You're going to get at least 1 angry Perl programmer explaining that Perl is actually thriving and it's never been better to be a Perl programmer :p Which is actually partially true... the long tail of programming languages today is very, very big. There's probably 10-50x more programmers now than there were back in 1995. The programming world can probably sustain 10-20 mainstream languages these days, if not more.
Don't know about that. But only yesterday afternoon I spent like 2 hours writing a Perl script to heavy lift some Unix file work, Which I factored would take a week at-least to do in any other language.
Perl is still largely a very useful language without any replacements. So are awk and sed.
Web development world seems to have moved on to something else now.
Re: Ask HN: Best way to learn modern C++?
#79Take a look at how the standard library does things, and particularly anything for which it is not clear to you how one might implement it, or the use of anything whose purpose you don't really understand.
Large parts of the standard library are designed badly. E.g. io streams are horrible, allocators are questionable.
Re: Ask HN: Best way to learn modern C++?
#80IMO, 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…
IMO, Effective C++ is just a collection of warnings about pitfalls, something that is unfortunately needed for C++ programming, so do read it. But it is neither an introduction nor a collection of big picture advice.