After completing the “Sieve” and “Pythagorean Triplet” exercises, Exercism says I have learned about Sets. However my solutions to both problems do not involve sets in any way, and the Python instructions and tests for “Pythagorean Triplet” specifically request the use of a list of lists rather than sets.
Hi @xanni
This thread - particularly the last answer applies here.
We try to associate practice exercises with their relevant concepts and concept exercises, so that students can use what they’ve learned in a broader context. However, the practice exercises are designed to be open-ended and flexible with how students solve them. So the association is imperfect.
Hmm. Is there another concept that would better suit “Pythagorean Triplets”, considering that the instructions specifically warn against using Python sets? The higher-level concept is computational complexity, but the lower level concept is just lists. Also the best “Dig Deeper” solution still unecessarily uses floating point and square roots, neither of which need to be introduced to solve the problem.
Well, you’ve learned something about sets in order not to use them :). The instructions mention you should return lists and not sets – they don’t say anything about using them.
But I can definitely see what you mean. Lists are indeed inevitable, as you need to return them. In my solution I only use lists for this purpose. Does that mean I learned about lists in this exercise? Maybe. Anyway, as Bethany mentioned, these associations cannot be perfect and IMO not too important, as long as they aren’t blatantly wrong.
Going to chime in here and say I would welcome suggestions or even a PR from either of you for this. But I am not willing at this time to undertake a several hours project — or longer — to find a good replacement for Pythagorean Triplet
. And there are many many solutions to Sieve
that use set math, so I think Sieve
should stay put.
Be warned
This has to do with the Python track config and how concept exercises are associated with practice exercises. I’ve spent a fair amount of hours over several years trying to make these meaningful. Clearly, I’ve had mixed success.
The thing is, once a practice exercise is associated with a concept exercise/concept, its pretty useless to associate it to another. If a student solves Anagram
whilst learning strings
(as a random example), then when they move on to sets
, the exercise will already be marked as solved.
So if you suggest an exercise to associate with sets
:
- It needs to be one that has not been used for any other concept/concept exercise.
- It needs to be one that won’t be better associated with another concept.
- It needs to be at a level of difficulty that is in appropriate order (can’t be too easy or too hard) -
Pythagorean Triplets
and `Sieve are both at level 3. - This is not an opportunity to re-negotiate the entire tree. No one has time for that.
I have seriously considered removing all the associations for all concepts and concept exercises, similar to the way the JavaScript track does it.
I have also thought about purpose-building a set of practice exercises that link much closer to the concepts they practice. I think that will probably be the way the track goes longer term, but that’s gonna take a fair amount of time.
Ok. Rant over. But I am serious about the suggestions/PR, if either of you want to take on the challenge.
Well, this isn’t your fault, and you know it. But the way the learning path is designed doesn’t really allow for any flexibility. It’s one learning exercise that forces us to cram whatever stuff we believe are important, then it’s practice exercises that go way beyond what has been taught. I bet most people who go through the syllabus attempt to solve the practice exercises, realize they can’t do them, and end up giving up in frustration.
I fully agree with this. That’s my plan for the Clojure track as well.
What I believe would be a much better approach is to have multiple learning exercises for each topic, with each exercise building upon what has been learned previously. Also, there should be a linear progression, not allowing students to choose which topic to tackle next. In real life, teachers would never let students make that choice. Would a teacher ever ask, 'Hey, what do you want to learn next—sets or arrays? There’s really no point asking that kind of questions.
The bootcamp structure seems correct, but Exercism itself is lacking in many aspects.
So having purpose-built practice exercises IMHO solves the first bit.
And by that I mean that I don’t think something like the list
concept benefits from further breakdown. It DOES benefit from practice exercises that push students to use things like indexing and nested lists in their solutions. To that end, I do intend to port some of the list-based bootcamp exercises to list
and list-methods
concepts on the track.
The second bit is actually taken care of by unlock logic, If you look at the track config, there is a “prerequisites” array. So — if I’ve done my work correctly — students can’t start numbers
until they’ve solved basics
, and so on. It only looks non-linear in the diagram. For concept exercises, it is a “straight line” – as far as we’ve got it built.
But the farther into the syllabus (we are by no means even halfway on buildout for Python) you get, the less linear it is. There is no reason to require OOP before you learn functional programming, for instance.
I wasn’t talking specifically about the Python track. Tracks, in general, often suffer from non-linear approaches, and practice exercises that are too hard and complex compared to the concepts being taught.
That’s an interesting idea! I’ll check back to see how you tackle this.
There’s actually two sides to this. And forgive me, but I am going to use Python again since its the track I am most familiar with.
Not only are there practice exercises that are too difficult compared to the concept being taught – there are also concepts for which there aren’t any practice exercises.
While you can use practically anything to solve a practice exercise, most of them steer clear of pushing students to use specific data structures or techniques. On purpose. So that makes it difficult to “relate” them to a particular concept, which is part of what this thread is about.
Currently:
- We don’t have anything for the proper handling of Unicode.
- We don’t have any exercises that challenge a student to decide between string interpolation vs string templating vs string format methods.
- We don’t have anything that practices most of the methods in
functools
oritertools
. - We don’t have any exercises that help students understand class customization beyond a shallow level.
- We don’t have anything that uses context handlers or context handler customization.
And the list goes on and on.
Ok. Back to clearing the PR queue…
Thank you again for all your hard work - what you have already achieved so far is very impressive, and I love the continuous improvement.
I do sincerely mean what I said – happy to have either of you suggest a different exercise than Pythagorean Triplet to associate with the sets
concept.
OR
If anyone on this thread is interested in making a Python Practice exercise that practices sets
– I am more than happy to help you with it and review it. And it can even be a variation/extension of the current sets
concept exercise (so you could reuse all that test data).
I just realized I missed this point! You are also very welcome to write up additional approaches - or add to the main approaches doc to talk about what is or is not necessary for solving this problem. When Colin and I wrote the doc up, we went with what made sense to us at the time — but by no means is it exhaustive (perhaps exhausting??).
But we did want to represent a fair amount of ways to solve the problem. So if you have more perspectives, please do PR them.
As far as I can tell you’re doing a lot already. I hope that none of my comments suggest otherwise, 'cause it wasn’t my intention.
I didn’t realize this topic was a bit deeper than the association between a particular exercise and a particular concept, that might or might not be appropriate. I haven’t thought about this from that perspective.
I’m not sure the comparison is fully valid. You need a linear learning path, as a teacher, for practical reasons:
- You have more than one student at a time, and each might choose a different “next”. While democracy could be an answer, you have so much time in the classroom.
- You are teaching a particular curriculum, with particular goals, that usually is connected to other disciplines and expects a certain common previous knowledge. This allows (and/or requires) you to shape that curriculum in a certain way (or, to get take it down a notch at least it gives you an excuse for it… :-) ).
Different teachers will choose different linear paths, and so would different students. So while I definitely agree a particular such linear path would be easier to maintain, I must say I really loved the “choose your own adventure” approach on many of these tracks.
Bootcamp is a classroom, while the “main” Exercism site is not. Just in my view, of course – and I have far less experience here than you guys.
p.s. Gosh, apologies for the long post where I basically add nothing useful
@petrem You’re raising some good points. I’d prefer not to continue the discussion here, as I feel we’ve strayed quite a bit from the original topic. Let’s keep those thoughts for another day