Open HereThereBeDragons opened 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.
Thx @HereThereBeDragons for sketching that outline! I indeed think that the stl
exercise mixes a lot of things at the moment and that we could improve it.
Historically, we had separate exercises for the STL and for lambdas. However: in the opposite order. We first introduced the STL using function objects, and then we had an exercise to convert a program using STL with function objects into a program using STL and lambdas. I campaigned for merging the two because I don't want students to practice writing function objects. Lambdas are just superior in most situations. That explains the status quo.
I especially like your suggestion 1. of having a dedicated exercise on lambda functions without any STL. I would then still combine 2. and 3., because the starting point for the current stl
exercise already gives you all the names of the STL functions you should use. I think we may even had your suggestion 2. at some point, but it took too long for the students to figure out how to refactor a non-STL program into an STL one. Which is why we provide the combined approach.
I personally would keep 2. and 3. separate and have 3. as bonus exercise for the essential course and as a quick refresher exercise for the advanced course.
Also I personally would vary a bit that you use more than just 2 STL functions
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.
After having a longer discussion yesterday with bernhard, i got the following idea how the difficulty of understanding lambdas and
stl
could be eased.I would suggest the following exercises (in order of execution):
lambda simple
: exercise to write simple lambda function, maybe even start with rewritting an existing function by a lambda - no usage of stllambda and stl - simple
: rewrite an (existing & fully functioning) program that usesstl
with function object to replace these function objects with lambdaslambda and stl - advanced
: have an unfinished program wherestl
functions and their respective lambdas must be added. could be that in the readme there is a list of possiblestl
functions to decide from