r/cpp • • Aug 26 '19

Why are tutorial videos so long?

Recently I had to learn some C++ for a project, and took to my favorite learning resource, youtube.

I've been programming for years, so i'd like to watch a quick video that tells me about the syntax and special cases of c++. But i was shocked that the top results were 4 hour or 9 hour videos teaching c++. Those videos could be great for students, but the content-creators really do waste a lot of time talking about useless stuff.

Maybe my attention span is too short and i've run out of patience, but i learned what i needed about c++ in a few minutes by flying through the 4 hour tutorial.

Are there any youtube channels out there that post fast-pace guides that teach a language in minutes without spending hours talking into a webcam? If not i'd like to start a youtube channel and make that kind of content. i think it'll be fun.

Also is anyone else in the same boat as me that would benefit from videos like that? Is it worth creating?

0 Upvotes

39 comments sorted by

View all comments

Show parent comments

0

u/m-in Aug 26 '19

TMP is on its way out really in every but the most rudimentary forms. Guess what: running pure functional code on what amounts to a syntax-tree-driven interpreter is hard, never mind running it at anything but a snail’s pace. If you’re doing the sort of MP that, say, permeates boost, you’re doing it most likely very wrong. The whole purpose of a good chunk of C++11/14/17/20 was to make this nonsense obsolete. Yes, the language allowed it and still does; yes, clever people explored it and forced compiler vendors to squash the bugs and make it at least usable without crashing the compiler, but it was an evolutionary dead end for the language. If you’re doing something that modern constexpr with very light MP can’t do, it belongs in an external tool. Until recently I have had trouble understanding why people dislike code generators, but I had a need to use Visual Studio (the IDE), and now I know: the idiots at MS made it two orders of magnitude harder to use code generators than 30-year-old Sun make would. And Sun-Unix-anything makes modern Linux command line seem like a paragon of UX perfection.

1

u/UnicycleBloke Aug 27 '19

Interesting. Hadn't thought of it that way. I've always liked code generators, and still use them. Didn't realise others dislike them. I have wondered where using templates crosses the line into TMP. It seems ill defined. Maybe even the simplest template function should be considered meta.

1

u/m-in Aug 27 '19

It’s arbitrary, but I draw the line where you do a loop (recursion, really) in TMP. constexpr if got there for a reason, and all that. The reason being that TMP was a hack, and nobody really wanted it as a supported part of the language. It’s an ugly feature, kinda like trigraphs. I wish it got deprecated and eventually dropped, just like trigraphs were. And yeah, there are ways of making TMP impossible without damaging what templates were meant to do.

1

u/UnicycleBloke Aug 27 '19

And here I was trying to silence my inner grumpy dinosaur, learn to stop worrying and love TMP... :)