Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add List.Extra package #48

Closed
ceddlyburge opened this issue Apr 5, 2023 · 12 comments · Fixed by exercism/elm#575
Closed

Add List.Extra package #48

ceddlyburge opened this issue Apr 5, 2023 · 12 comments · Fixed by exercism/elm#575

Comments

@ceddlyburge
Copy link
Contributor

The Zebra Puzzle exercise is commonly solved using permutations of a list, which is something that is already available in List.Extra.

However, this package isn't available to students, as the test runner doesn't support it, which means that they have to create the permutation code themselves, which isn't really part of the exercise, and is a fairly large additional burden.

Usage of List.Extra is quite common in Elm, and it has many other packages that are useful.

We may also want to add some of the other *.Extra packages as part of this issue

@mpizenberg
Copy link
Member

What about including the permutation functions in a provided read-only file?
There has been a lot of maintenance issues lately with the packages under elm-community. To the point Evan was wondering if it shouldn’t be dropped entirely. They also change quite regularly so I’d worry getting into situations where we haven’t updated a *-extra package and people expect to be able to use them.

@mpizenberg
Copy link
Member

Alternatively, we could have our own exercism/elm-list-extra package where we package functions relevant to the exercism elm track

@ceddlyburge
Copy link
Contributor Author

Hi @mpizenberg , I didn't know about the maintenance issues, I have never had any issues with the .extra packages, so assumed that they were pretty stable.

I feel like it would be good to introduce students to them, I think most elm projects will use at least one of them.

Creating an exercism specific package makes sense, although it does seem like some extra work.

So maybe providing the permutations function in the Zebra Puzzle exercise is easier?

@mpizenberg
Copy link
Member

mpizenberg commented Apr 5, 2023

what are the thoughts of other @exercism/elm maintainers on these 4 options?

  1. keep as is
  2. provide relevant extra functions in read-only files with exercises that need them
  3. have our own exercism/elm-extra package
  4. add *-extra packages to the list of available packages for all exercises

@jiegillet
Copy link
Contributor

Sorry for the slow response :)

1. keep as is

That's where my vote goes. When I solved zebra-puzzle, part of the fun was to re-implement the permutation function, and if people don't want to do that, they can always copy/paste the function they want from source.
I once implemented a whole parser in Elixir just for an exercise, it was great fun. I solve the same one easily in Elm with elm/parser, it wasn't quite the same ;)

2. provide relevant extra functions in read-only files with exercises that need them

How will we know which function are required? There might be a clever solution using something else that we will keep someone from finding because we are pushing our way of thinking.

3. have our own exercism/elm-extra package

Sounds like a lot of maintaining work :p

4. add *-extra packages to the list of available packages for all exercises

Maybe. But again, I've solved all of Elm's exercises and only a couple of times did I wish to have access to these. And when I did, I copy/pasted the 10 lines I needed.

@ceddlyburge
Copy link
Contributor Author

Maybe we could mention that these packages exist in exercises where it might be relevant, so that students can copy paste from them if they want? And they would also then become aware of the packages, which is a useful part of learning Elm ...

@jiegillet
Copy link
Contributor

I fully agree with that. We can append instructions whenever needed.
Or, thinking way outside the box, we could have a concept exercise about it and have them find the perfect .Extra function for the job :)

@mpizenberg
Copy link
Member

A concept exercice dedicated to help students discover relevant packages and resources is a good idea!

This combine with relevant info at the exercice level is a good compromise IMO. I personally prefer that over adding the -extra packages to the whitelist

@ceddlyburge
Copy link
Contributor Author

Ok, so how about we create an issue for that concept exercise and add something to the instructions of the zebra puzzle exercise?

And maybe record this decision somewhere. Not sure where, maybe we could start a decisions log, or use architectural decision records, or something like that?

@mpizenberg
Copy link
Member

Yes, I'm also in favor of all this. I remember vaguely trying to add some architectural decisions either in the readme or in some guide to write concept exercise. Might be wrong. But crystalizing some of these decisions in one "track-architecture" document is a good idea

@ceddlyburge
Copy link
Contributor Author

Ok, I've created the issue for the new concept
exercism/elm#576

And the pull request for updating the zebra puzzle and updating the instructions
exercism/elm#575

@jiegillet @mpizenberg

@mpizenberg
Copy link
Member

Thanks @ceddlyburge !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants