hsf-training / cpluspluscourse

C++ Course Taught at CERN, from Sebastien Ponce (LHCb)
Apache License 2.0
169 stars 65 forks source link

Consider reordering the topics in the essentials class #482

Open sextonkennedy opened 1 year ago

sextonkennedy commented 1 year ago

Hi All, I was a mentor for 2 sessions this past spring, once on zoom and once in person at jLab. I think you should reconsider the order of the topics for the essentials class. I'll use the order on slide 5. 1. And 2. Are good where they are but then I would do:

  1. Useful tools so that they can debug their exercises.
  2. Core modern C++ so that they are not tired out by the time they reach what are in my opinion some of the most important topics, const correctness, RAII, and how to use the STL.
  3. Object orientation it's still great material and good to know the memory layout the compiler uses but it is lighter for the last day.
welcome[bot] commented 1 year ago

Thanks for opening your first issue here! If you have any questions, feel free to mention one of the conveners, previous contributors, or attend our weekly meeting (see https://hepsoftwarefoundation.org/workinggroups/training.html). Also, sometimes issues go unnoticed, so don't hesitate to @mention some of us, if we do not come back to you within a few days.

bernhardmgruber commented 1 year ago

We discussed this together at the JLab course, also including @hageboeck, and I remember we were all in favor of such a reorganization. Personally, I also consider the core modern C++ chapter far more important than object orientation. These techniques are also often lesser known, since large (and often old) code bases don't contain good examples of modern idioms and practices. They are (too) full of OOP though, so as long as we cover enough OOP for the students to get started on their code bases, they can "practice", or rather experience, more OOP on the job later.

@hageboeck and @sponce, please also share your opinions!

chavid commented 1 year ago

+1. Modern C++ users are exposed to STL long before any abstract base class, if ever.

sponce commented 1 year ago

Usual comments on this kind of topic :

The main issue you will face is "dependencies" in concepts which won't be fulfilled, which will lead to "we will see that later" type of explanations, which I personally hate as a student.

But worth a try if you find the time (although there is also a long list of issue if you do have time)

hageboeck commented 1 year ago

It's fine for me personally. I think it's more work than you think, though, so it would have to be distributed quite well.

Just going through the first few subsections of core modern, we use (without discussing):

I think we need a little OO, but maybe it can be shortened to objects/classes, inheritance basics, constructors/destructors? The rest of OO such as static, allocating, advanced OO, type casting, operator overloading, function objects, name lookup could be moved to a later stage.

sponce commented 1 year ago

The risk if you split too much is to break the linearity/logic of the presentation. you will come back 4 times to OO and present each time just a bit of it. Not so nice.

By the way, the usages without discussion you mention are mostly due to changes we've made later. So we are not far from over optimization again. Honestly it's simple to find out what is not so great, but it MUCH MUCH harder to really improve. I've spent hours and hours on this, and it's he best I ever got. I seriously doubt it can be dramatically improved. Tiny details for sure, but the overall flow is just a non solvable problem I believe, so better not spend too much manpower on this and concentrate on the missing parts in my opinion.

chavid commented 1 year ago

Yes. Very very hard to swap parts in a such long cooked bible, without breaking many things. That's one of the reasons we tried to start a less ambitious new course from scratch, few years ago. But this died of lacking time and human resources.

stale[bot] commented 2 months ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. Please manually close it, if it is no longer relevant, or ask for help or support to help getting it unstuck. Let me bring this to the attention of @klieret @wdconinc @michmx for now.