Org-wide consistent exercise sorting?

Related to this post, what are your thoughts on being more prescriptive about exercise sorting? Maybe sort by difficulty then name? Bake sorting into the configlet (lint or fmt) or into the GitHub actions?

By displayed difficulty (easy, medium, and hard) or by level (1-10)? There should be an opportunity first for tracks to revisit exercise difficulties, and then I’d be fine with a shared GHA that tracks can opt out of using.

I would find very little utility in this, and would not use such an action/sort in that way unless forced to.

Tracks should be able to:

  1. Choose exercises that make sense for their language and goals
  2. Assign difficulties to those exercises as they see fit
  3. Make new concept or practice exercises that are unique to the track
  4. Order the track the way that makes sense for their concept exercises and their practice exercises.

And while it is helpful too look at how other tracks “do it”, having an implicit requirement that all tracks are “organized the same” or “sorted the same” doesn’t work.

As an example: Python is (eventually) going to have a bunch of practice exercises that are purpose-built to “practice” particular concepts. They’re not going to be as open-ended as the main practice exercises, and will be linked to the concept exercises. But there still may be “regular” practice exercises that are also linked.

We’re likely to then order the track not by difficulty, but by concept/concept exercise and then related practice exercises (in order of difficulty) then followed by more general practice exercises in some order (maybe difficulty, maybe name, maybe something else).

If we had a way to “tightly” couple practice exercises to concepts, we could sort first by concept-order and their tightly-coupled exercises. Would something like that be helpful?

I think not trying to automate it would be helpful to me. Others would have a different opinion.

As long as there is a clean and easy opt-out for any track that wants it, I’m fine.

2 Likes

I completely understand that. I have a hard time with not automating things as that’s literally my job :laughing: But yes, an opt out makes a ton of sense. Or making it not auto-sort but baking it into the configlet, possibly as a new, optional, separate command.

1 Like

I’m in the process of revising the difficulty levels for all exercises in the Clojure track. I’ve already assigned a number to each, and now I’m trying to sort them again within the same number. Admittedly, that’s very difficult to do, but I would still prefer not to rely on arbitrary criteria like alphabetical order.

That said, my biggest issue right now is that people only see difficulties as easy, medium, or hard, which means they have no way to distinguish a number 1 exercise from a number 3, or a number 4 from a number 7. I’m thinking mentioning the sorting somewhere in the docs.

So automatically sorting by easy, medium, and hard, then randomly ordering within each category, is probably going to be no more effective than sorting by numbers. But I still think it’s a good idea to bake in configlet something like sort by number.

An optional GHA for tracks that opt in would be useful since configlet create --practice-exercise adds new exercises to the bottom of the exercise list regardless of the difficulty so tracks will begin to diverge from the intended sort order sooner or later.

That GHA could use preset scenarios for alphabetical, easy/medium/hard, or raw difficulty. That likely covers sorting needs for most tracks, and then others like Python can skip adding the GHA. Then the maintainers can manage sorting the way is best for their track.

Edit - Per Isaac’s comment, I think we should add this to configlet so it’s easy to sort the exercises and then have the optional GHA for making sure the exercise is sorted a specific way.