top | item 16806821

Ask HN: What is the best Modern C++ MOOC?

228 points| senatorobama | 8 years ago

50 comments

order
[+] ssvss|8 years ago|reply
I am thinking about going through the below course from Alexander Stepanov at Amazon A9. Anyone has experience with this course.

https://www.youtube.com/watch?v=aIHAEYyoTUc&list=PLHxtyCq_WD...

[+] mattnewport|8 years ago|reply
I worked through one of his lecture series, I think it was this one but it was a while ago so I'm not 100% sure looking at the link. The focus was on algorithms which is why the "components" in the title is throwing me off a bit.

The series I watched was excellent though! Highly recommended, it's a lot of the same material as his book Elements of Programming but I found it more accessible in the lecture format.

[+] Suncho|8 years ago|reply
Yes! Alexander Stepanov is fantastic. He's the designer of the Standard Template Library (STL) for C++, which is C++'s core library of generic algorithms. It's part of the standard libary.

If you can understand how to use the STL properly, you're well on your way to becoming a profiicent C++ programmer.

His books are fantastic too.

Elements of Programming:

https://www.amazon.com/Elements-Programming-Alexander-Stepan...

and From Mathematics to Generic Programming:

https://www.amazon.com/Mathematics-Generic-Programming-Alexa...

If you prefer video lectures, his second book is based off his lecture series Four (three) Algorithmic Journeys:

https://www.youtube.com/playlist?list=PLHxtyCq_WDLV5N5zUCBCD...

https://www.youtube.com/playlist?list=PLHxtyCq_WDLW0NqZCcrrQ...

https://www.youtube.com/playlist?list=PLHxtyCq_WDLXrHwcaay14...

https://www.youtube.com/playlist?list=PLHxtyCq_WDLVQPzEm3igP...

It's a combination of history and math/algorithms and programming (using C++). If you're just looking for a straight intro to C++ course this isn't it. But it's a ton of fun and the generic programming/STL mindset is very powerful.

Programming Conversations is another great lecture series by Alexander Stepanov:

https://www.youtube.com/playlist?list=PLHxtyCq_WDLXFAEA-lYoR...

I would also recommend searching YouTube for videos by Sean Parent. This one in particular is very enlightening:

https://www.youtube.com/watch?v=qH6sSOr-yk8

Sean Parent is very good at getting you in the STL mindset and showing off the expressive power of using the standard STL algorithms in your code. Except in the simplest cases, you should try to use them instead of writing your own loops.

Here are some random tips if you're coming from C or Java:

"new" is not the way to create objects in C++. new and delete should almost never be used by serious programmers in C++. Never use new and delete (or malloc and free). If you want a dynamically-allocated array, use the standard vector.

It's much easier to write C++ than it is to read it. This is because you can always write using a simple clear subset of C++ that you understand. Try to pick a style that you think as many people as possible will understand. Programming languages are for humans to read. I try to write code that I think C programmers can read.

Edit -- Another tip:

Exception safety isn't about C++'s exception-handling language feature. Exceptions still happen in C. There's just not a language feature that directly expresses them.

Writing exception-safe code is nearly impossible in C. RAII and C++'s built-in exceptions make it possible. If you're careful to always use RAII by default, you can get the basic exception safety guarantee automatically without thinking about it. And you can get the strong exception safety guarantee whenever you need it.

Good luck!

[+] adamnemecek|8 years ago|reply
Not familiar with the course but I’m a big fan of him, he’s a beast.
[+] zerr|8 years ago|reply
As a long-time C++ dev, I don't think a video/lectures is a good format for learning it. I'd suggest to read books.
[+] stevefan1999|8 years ago|reply
I agreed. Online lectures don't offer exercises (unless you count pop quizes), books do, and they are pretty intense, varying from level to level. For me, C++ Primer is still relavent, but the thickness and difficulty to start reading the book might cast people off.

Anyway, what are the other better books for C++ that is compact, easy to read while keeping a simple structure?

[+] nf05papsjfVbc|8 years ago|reply
I spent a long time with C++ and my learning was primarily through books. However, I also think that not everyone learns best by reading. Some learn better by listening, some by doing and some by observing others do something. For someone of such disposition, it might be more beneficial to follow a MOOC than to solely study the subject from a book.
[+] zengid|8 years ago|reply
The CppCon videos [1] are a great resource, but you'll have to thread your way through the wide variety of topics.

The videos from Herb Sutter [2] will usually emphasize best practices and give great examples, although he expects the audience to have a good bit of familiarity in regards to 'modern' c++ elements (C++11 and beyond).

[1] https://www.youtube.com/channel/UCMlGfpWw-RUdWX_JbLCukXg

[2] https://herbsutter.com/

[+] 72deluxe|8 years ago|reply
Herb Sutter is very good. His "almost always auto" idea is crazy though - who on earth thinks this is a good idea instead of being explicit??

auto main(int argc, char* argv[]) -> int

Madness!

[+] jsgoller1|8 years ago|reply
I watched part of Udacity's "C++ for Programmers" course and was surprisingly unimpressed - their content is typically great (in my experience, like with their 3D graphics course). Udemy looks like they have some good courses - haven't tried them myself.

Honestly, I have had success with reading Stroustrup's book and doing the exercises. YMMV.

[+] greenpizza13|8 years ago|reply
Having gone through most of Udacity's "C++ for Programmers," I agree with you. I don't feel like the exercises were helpful at all a lot of the instructions were outdated and didn't match with the content.
[+] veganjay|8 years ago|reply
I only looked at one: C++ for C programmers on coursera. It was helpful to get up to speed with the STL and the new features in C++11. Some of the programming assignments included implementing the min max algorithm and using Monte Carlo.
[+] senatorobama|8 years ago|reply
Great.. this should help me transition from an embedded C role to a C++ role which is the natural transition.
[+] kr1m|8 years ago|reply
Google has some C++ content. It's on my to-do list right now

https://developers.google.com/edu/c++/

[+] RcouF1uZ4gsC|8 years ago|reply
I would be very wary of any Google material on C++.

Their C++ style has a heavy emphasis on pointers. In addition, their banning of exceptions warps their code in other ways (for example a heavy use of out parameters).

Also, they have a tendency to use their own alternatives to stuff in the standard library.

If you already know modern C++ you can discern the good advice from the bad/archaic advice, but if you are learning Modern C++, you would be best served by avoiding it.

[+] prachisara|8 years ago|reply
Another great, and free place to get C++ tutorials is the Virtual Studio software websites. As long as you aren't afraid of reading your lesson, there is a ton of coverage from simple tasks, ranging all the way to super advanced. For me reading is a little less convenient because you... have to read, but it's also more convenient because it's at your own pace without have to hit the pause button while you follow along with a video and try to code at the same time. https://www.besanttechnologies.com/training-courses/data-war...
[+] nurettin|8 years ago|reply
IRC was the best online course you could have had back in early 2000s, provided you could come up with the right questions, read the right books and did your own research first.

Maybe this is still the case?

[+] SiempreViernes|8 years ago|reply
Do you mean you read a book and then asked people when you got stuck?
[+] sharcerer|8 years ago|reply
MITOCW has C++ courses. Not sure about Modern,tho