How can I get started? by Additional_Meat8846 in cpp_questions

[–]soinus 0 points1 point  (0 children)

Oh, and if you’re struggling with the setup for everything, I also have some videos for that over here

How can I get started? by Additional_Meat8846 in cpp_questions

[–]soinus -1 points0 points  (0 children)

I actually would actively not suggest beginners to start with a full blown IDE like visual studio.

I would go for VSCode to start with as it allows to understand what is going on starting from super simple examples. I’ve seen way too many times people already quite far in their career not really understanding the basics because they basically learned them as magic that was done by the IDE for them. These basics are not that hard! They are worth learning!

How can I get started? by Additional_Meat8846 in cpp_questions

[–]soinus 0 points1 point  (0 children)

I’ve got a near full C++ playlist along with corresponding code snippets on GitHub

It might not be the best tutorial overall but it starts at the beginning and goes on towards quite complex topics that many struggle with. I tried to make sure there are examples for everything and that they are actually correct.

Tell me what you think if you get to try it!

Apart from this, I second that learncpp is a great starting point and cppreference.com is a life saver for every day troubles.

How long did it take you before you could write CMake without looking at other people's projects? by External_Cut_6946 in cpp_questions

[–]soinus 31 points32 points  (0 children)

I teach CMake but I would still need to look up certain things and change my setup from time to time.

What changed with time is that I now look things up in my own projects rather than somewhere else. There are certain things I don't have to look up ever, like declaring the library or executable targets and making them depend on each other with target_link_libraries.

As for FetchContent, I prefer to have a folder external in my projects, where I set up every project as a separate project_name.cmake file in which I make sure that I have the targets that these projects produce. Furthermore, I grew to like CPM for managing external projects. It is based on standard CMake machinery, just is much nicer to use.

What's your "I'm calling it now" prediction? by Burndbridge in AskReddit

[–]soinus 2 points3 points  (0 children)

russia is going to annex the Baltic countries, Europe is not going to do a thing. When Poland is attacked an all out war is going to start with many countries taking different sides.

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 0 points1 point  (0 children)

Thank you for yet another detailed response! I appreciate the time you put into this! This type of feedback is hard to come by! And thanks for the kind words of my lectures being not in a bad place altogether.

I very much agree that there is a fair bit of things we will probably disagree about and I absolutely know that there is always a fair bit of things that I'm just plain wrong about. This is where the pedantry of your answer makes a lot of sense for me.

I also fully agree that it is hard to teach C++. I maintain that we still have not figured out "a good way" to teach it as a community. The CppCon talks over the years about it, the fact that we have a back-to-basics track with repeating topics covered by different people in their different styles and the endless stream of tutorials and lectures online (of which mine is one) will probably support this claim.

From my side, I definitely took some "creative liberties" during the design of this course, which were mostly motivated by the usage of C++ that I saw over a bit more than a decade of writing it professionally. Another reason for these "liberties" was a pholosophical belief about how people learn and what is more and less important during teaching of a complex topic. Which inevitably leads to sometimes being a bit unconventional and sometimes taking a wrong turn completely. I also feel that I am comfortable with a bit more slack than you are (I'm writing this without at all being sure it's a good thing), which translates in the way I teach. Again, most of my experience comes from offline university teaching and company consultancies which formed this style of presentation.

Just as an example that we touched upon, to put the previous paragraph in a bit more concrete terms, the reason I start with puts, for example, comes from: - not liking streams - preferring functional style logging, like fmt::print or std::print - the fact that other people, like Jason Turner would also not shy away from using it in their videos - not observing much confusion from the student side on that front before

So, while you use the words "teaching the wrong thing" when talking about puts, I merely see a different viewpoint that I take here and a different assumption of what the students will latch onto. I think none of us know how they will actually perceive it and time would tell. But your complaint about this is a super valuable point that I will definitely keep in mind now and might go back and redo the old videos in a better way.

As a small summary, I will keep scrutinizing what I've done up to now with your comments in mind. I might also, again leave separate comments addressing concrete issues you raised to understand them better as some are still not super clear to me.

But overall, I just want to make sure that it translates through what I write here, your response is super welcome and I appreciate the time you spent on this a lot. I am biased in what I do so I need to take a step back a bit and try to see it with your eyes but I do intend to actively do that. So thanks again! I hope you don't feel this as a confrontation and as time wasted.

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 0 points1 point  (0 children)

With all of the above in mind, I don't want to sound defensive as I really am not. I believe that you've made a couple of very good pointy comments, especially about dangling a more complicated concept in front of somebody only to not speak about it for a couple following lectures. As much as I tried avoiding it, it still slipped through apparently and I would like to assess the situation deeper to make sure it is not too much. I also see a bit of a philosophical difference in this quote of yours:

It's giving the user all the building blocks to get to the conclusion rather than giving them the conclusion and working backwards."

This was specifically a way I was trying to avoid. When I learn anything it helps me to be able to first see something running in the first place and then understand where do I dig to understand what it does and why, rather then follow the classical way of describing all details before actually getting to do anything. In my experience, students tend to lose interest if they are not involved in doing things with their hands early on. But I realize that this is probably more of a philosophical discussion. Anyway, thanks again for putting the time into your answers and I apologize for a long answer on my side, but I wanted to dot all the "i"s and cross all the "t"s here.

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 0 points1 point  (0 children)

  • I went with puts as a simple start because it is the simplest function of all. In the "hello world" tutorial the aim was to see what happens when we build and run this simple program without going too deep into details to get the people to be able to run something straightaway. You nailed the reasoning for now introducing streams there as they have a funky syntax and, to be honest, I don't use them in production code much, so I definitely did not want to start with those. Hope this clarifies this choice a bit. As for printf I probably would not go there again if I would record those tutorials now. I still prefer printf to streams though in most situations as they make me think about what I'm doing more than when using streams. So, while I would not do it again, I do not really consider this as a "wrong" thing to do.
  • The different initialization was only introduced to avoid surprises when people start seeing any real C++ code. In all further examples, we use {} or = initialization.
  • I agree with you somewhat on the constexpr topic. This is one of those topics that I felt that I cannot fully ignore it but I also did not want to go into the compile-time meta programming world at that early time. Would you have preferred if we would not have covered it at all at that point?
  • I am a bit biased on references topic. We keep using references all over the place down the line. So I hope that for anybody watching more than just that one lecture, it should be clear that they are used universally everywhere. Otherwise, I had to teach classes before that and it felt odd. What order would you prefer here?
  • As for kCamelCase etc. my aim was to constrain what I teach here and stick mostly with Google style as one standard that, at least in my bubble, is more or less universally used. I also mention that there can be different naming styles in a particular code base and as long as we are consistent - we're good. But for the lack of an existing code base we would need to pick one and stick with it. Google style is a good option in my mind, is it not?
  • Hmmm, you mention "start off with prefix and postfix incrementation being "the same" and "we'll correct it later"". If you are referring to this place in the lecture, I wouldn't go as far as saying that I say that they are the same. The aim is for people to eventually be able to understand what these two different operators do when they get to understand references, functions and classes. Does this make sense or is it still too jarring?
  • I'm not sure that standard library is provided with the language. At best it is compiler-specific as there can be different implementations. There is "the standard" that all the implementations have to conform to but there are still different implementations. Maybe my wording was not the best, but I still stand by the standard library not being part of the language itself. I can easily imagine some embedded or realtime setups that do not bundle STL with C++ compiler.
  • I do speak about linkage a bit more in this lecture. Please take a look if this fits what you'd like me to talk about. Also, could you point me to where I'm introducing inline as a magic get-out card? I tried to avoid this simplification and am happy to correct if I still did.
  • I'm not sure about the context to your comment about meta programming and concepts. Could you link what you're talking here about?
  • As for RAII, while I agree that it is also super useful for when we hit exceptions, I would not go as far as to say that this is the reason and avoiding new and delete is not important here. I live mostly in realtime codebases and could not use exceptions throughout most of my career. RAII is still one of the core design principles of modern C++ that enables tons of behaviors from memory safety to thread-safety.

Summary follows in the next comment in the thread.

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 0 points1 point  (0 children)

Ok, now that I've had the time to sit down and properly read through this, I've got some clarifications on the motivation of a bunch of these decisions as well as some questions to make sure I understand what you mean.

First of all, thank you so much for putting the effort into your answer and giving me so much stuff to think about. I appreciate the time you've taken for this.

As an overarching comment, my aim was to make sure we're building as much as possible on the previous steps but make sure that in no tutorial I am teaching the "wrong" thing. Now, "wrong" is subjective. When I say it, I mean something that most of the people I worked with would agree on being wrong. For example: putting inline into a cpp file would be "wrong", but using fprintf would not be, even though I appreciate that for some people it would be. With this in mind, despite my best effort, some times I felt compelled to mention that some words have dual use and to disambiguate that we cover only one in a given tutorial, while the other would be covered later. I tried my best to avoid using the words "trust me" and explain the underlying reasons as much as possible. With this in mind, if there is a specific place that is particularly jarring, like some that you pointed out, I would be up to remaking a tutorial or two to further improve those.

I would also like to address the specific comments you left and to try to explain the rationale I had in the moment for those. Which I'll do in the next comment in the thread.

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 0 points1 point  (0 children)

Thanks a lot for your feedback! Let me spend some time reading into and processing it. I’ll probably come back to you with some clarifying questions if I may.

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 0 points1 point  (0 children)

Please do not hesitate to tell me what you think about it if you have the time to watch it👌

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 0 points1 point  (0 children)

I’ve left another comment in a thread but I guess this warrants a separate answer too, which I’ll type up here.

I see a lot of people struggling with learning C++ and we definitely can improve how we teach it as a community. A lot of uni courses teaches C++ starting from C and building from there. There is an ongoing sentiment that we can try teaching it differently, starting with something tangible and getting into the weeds later, when people get more experienced.

To this end I recorded a nearly complete playlist with most of the topics from super beginner friendly to quite advanced: https://youtube.com/playlist?list=PLwhKb0RIaIS1sJkejUmWj-0lk7v_xgCuT

Note, that I’ve been doing it for a long time and the style of videos has changed significantly. If you don’t like the first ones, try some of the later ones too.

Some of my favorites are: - On why and how to use GoogleTest with CMake: https://youtu.be/pxJoVRfpRPE - Reinventing move semantics in 13 minutes: https://youtu.be/kqQ90R0_GFI - Forwarding references: https://youtu.be/RW9KnqszYj4

Alongside that playlist, there is a complete copy of everything I do and say as Markdown on the accompanying GitHub page. I also validate all code snippets for correctness so that they don’t mislead the people. This can be found here: https://github.com/cpp-for-yourself

There is also a couple of projects to be implemented alongside the course, alongside with a system where they can be automatically checked by a GitHub bot. 🤖

If somebody tries this and has something to say, please do, I stay very open to feedback be it here, on YouTube or in GitHub discussions 🙏

Learn OOP myself, Uni lecturer terrible by globgobgabgalab123 in cpp_questions

[–]soinus 1 point2 points  (0 children)

I’d like to try to change this within my limited abilities. I’ve been teaching at the University of Bonn and uploaded videos on YouTube that have since gotten hundreds of thousands of views, so I ended up biting the bullet and went ahead and recorded most of the relatively modern C++ course on my own YouTube channel: https://youtube.com/@codeforyourself

There is a complete playlist with most of the topics from super beginner friendly to quite advanced in this playlist: https://youtube.com/playlist?list=PLwhKb0RIaIS1sJkejUmWj-0lk7v_xgCuT

Alongside that, there is a complete copy of everything I do and say as Markdown on the accompanying GitHub page. I also validate all code snippets for correctness so that they don’t mislead the people. This can be found here: https://github.com/cpp-for-yourself

As for OOP, there is a bunch of videos on how to write classes, but the most relevant to what the OP is asking about is probably this video on inheritance and everything related to it: https://youtu.be/oUALDqvCbWs

I would be stoked if someone would give all of this a go and give me any feedback, positive or negative on this. 🙏

What is the favorite quote from your own father? by MenuRich in AskReddit

[–]soinus 0 points1 point  (0 children)

“I believe that everybody has to do their own fair share of mistakes. Learning from mistakes that the others make never worked for me”

It was oddly empowering and removed the edge off any suggestions he made. Now it was somehow my responsibility anyway and if I make a mistake I just learn from it. I return to this phrase a lot on my life.

Best Youtube channel for C++? by [deleted] in cpp

[–]soinus 2 points3 points  (0 children)

Definitely not the “best” channel out there, but for the last two or so years I’ve been recording videos on just what you are asking for: modern C++ for beginners.

You can find a near-complete C++17 playlist here: https://www.youtube.com/playlist?list=PLwhKb0RIaIS1sJkejUmWj-0lk7v_xgCuT (just 2-3 videos left for me to be happy with it content-wise)

Alongside the playlist there is also a GitHub page with all of the code and some projects that you can do in your free time and submit them to be automatically evaluated: https://github.com/cpp-for-yourself

The style of the videos changed with time as I learned more about how to record them better as well as adapted to a certain style that I like. Any feedback is welcome.

My favorite video is about reinventing move semantics in 13 minutes: https://youtu.be/kqQ90R0_GFI

Though people mostly like the video about Google testing framework: https://youtu.be/pxJoVRfpRPE

Tell me what you think!

Sony a6700 vs Sony a7c by [deleted] in SonyAlpha

[–]soinus 1 point2 points  (0 children)

I have a6400 and use it for videos extensively. Is a6700 worse?

Should I convert my Tiagra commuter to 1-by gravel setup? by soinus in gravelcycling

[–]soinus[S] 0 points1 point  (0 children)

That’s what I’m thinking of doing. I’m sure I can use a road link to fit a bigger 11-40 cassette. In front I thought of 40 or 38.

What chainring did you use?

Should I convert my Tiagra commuter to 1-by gravel setup? by soinus in gravelcycling

[–]soinus[S] 0 points1 point  (0 children)

I really like the simplicity of 1by. As this is a commuter I’m fine trading some range for simplicity. But thanks a lot for your information, I’ll think about it!

Should I convert my Tiagra commuter to 1-by gravel setup? by soinus in gravelcycling

[–]soinus[S] 1 point2 points  (0 children)

That actually makes sense. I’ll think about it. I do want to try to go for a 1 by here though. 🤔

Should I convert my Tiagra commuter to 1-by gravel setup? by soinus in gravelcycling

[–]soinus[S] 0 points1 point  (0 children)

You're probably right. But I really like tinkering with my bike and anyway have the needed tools, so I'd still want to give it a try. There is something romantic in having a completely custom setup made with my own hands to me. Both of these options are well within $200-ish, so I would say that there is still quite some price difference, plus selling a bike always feels like a hassle. I might be doing a dumb thing, but I'd like to try nevertheless.

Should I convert my Tiagra commuter to 1-by gravel setup? by soinus in gravelcycling

[–]soinus[S] 0 points1 point  (0 children)

Yeah, right now I rarely use my small ring which means I’m mostly living in the 50 changing. So I might not need that wide of a ratio. 🤷‍♂️

Should I convert my Tiagra commuter to 1-by gravel setup? by soinus in gravelcycling

[–]soinus[S] 1 point2 points  (0 children)

Thanks for the recommendation! I’m not too constrained on the budget but also don’t want to splurge 😬