-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Replace Difference Of Squares
and Grains
on the core track
#761
Comments
If exercism/exercism#4110 is an Exercism-wide policy, we need to remove not only difference-of-squares but also sum-of-multiples and collatz-conjecture, but I suppose I can defer their removals until after there's a replacement for... whatever role in the sequence they play. I must admit I'm better at thinking of exercises that match a given topic rather than deciding what topics should go in the core curriculum. Let's see what we came up with.
Don't think we have a good one right now. POV is about them, but too much for an intro.
maybe
there is the fact that
nucleotide-count or largest-series-product perhaps? for this one there are already a few exercises that have
Eh there was once mention of that in binary-search tree #59 , but I'm not convinced it's strong enough to build the connectoin
wordy perhaps. sgf-parsing has it in the name. poker and alphametics have a bit of it but a bit limited. Even bracket-push can be done as a parser, but I haven't seen anyone do that for a long time. I'm not sure if https://exercism.io/tracks/ocaml/exercises/bracket-push/solutions/67c607f6684646c4a5737a3b0fa289b7 makes it obvious that what's going on is parsing
seems tough since I can't predict how a student will choose to implement, but perhaps
robot-name perhaps, since #727. I also used runST{U,}Array in sieve and sublist but I don't think that's usual
all I have for this one is that I used a
perhaps allergies fits the bill now |
Why would we need to remove all of them? Because they're mathy? (#727: Changing robot-name to use StateT, not sure what the principle is.)
Similarly for Yes, For trees I'd like to see if we can port a new exercise. There are so many interesting kinds of trees. We could also change the error handling of For list comprehensions I remember an exercise at university where for a morse string For QuickCheck we could also extend |
Huh. How did I make such an obvious error. I meant to link to exercism/exercism#4110 for citing the removal of sum-of-multiples and collatz-conjecture. I'll have to edit my post. |
I've acquired an answer on whether it's required to remove those sum-of-multiples and collatz-conjecture: It's not required. exercism/exercism#4110 (comment) says we are free to do as we wish. Great, then let's continue to focus on what we should add to replace difference-of-squares and grains. |
Since `RNA Transcription` is currently the second core exercise that uses error-aware return types, it would make sense to practice `Either` as an alternative to `Maybe`. This suggestion came as a consequence of the discussion in #761.
I'm not sure I know of an existing suitable exercise off the top of my head, but there's always the possibility of me being proven wrong. But in case I wasn't wrong, let's also bring forth the possibility of creating a new exercise in problem-specifications OR creating a track-specific exercise. |
For a new exercise about trees, here are tree ideas: (one) Port |
Have you thoughts on whether it should stay as a refactoring exercise (as https://github.com/exercism/problem-specifications/blob/master/exercises/tree-building/description.md specifies it should be) versus not (implement from scratch)?
I'd also like to bring up the possibility of doing some of this piecemeal. For example, if it is already possible to agree on an order in which the concepts should be presented on the core track, then we can immediately add any concepts for which an appropriate exercise has been identified. If that is not possible, perhaps consider a case where we nevertheless have identified some but not all exercises that should be added. If we are able to assume adding an exercise doesn't change the desired relative ordering of any other pair of exercises, then we can add whatever exercises we've identified. Assuming that it's not too disturbing to students and mentors to be changing the core exercises iteratively rather than all in one go. |
Yes, I'd prefer if it weren't, but it seems that the consensus in exercism/problem-specifications#1174 is against. I like the idea of refactoring exercises in Haskell, but I don't know if I think this one is particularly well-suited. Let's discuss refactoring exercises in another issue and pick another exercise as the first tree exercise. (The theme, however, is very nostalgic to me, since building a forum with nested comments is the first time I solved a problem that involved a recursive data structure as a kid.) Because the random dungeon idea 1) depends on a previous dice-rolling exercise being made first, and 2) isn't just a tree exercise, but also a random generator exercise, I'd favor game trees or a similar tree-based exercise without constraints (either ported or new). |
Consider exercises that teach the use of monads and do-notation beyond error handling and IO (suggested by @petertseng in #782). |
Nucleotide Count has several reasonable implementations and learning goals. Mentor notes are made available in exercism/website-copy#654 and the discussion to replace some core track exercises is advanced in #761. Until either its difficulty has been adjusted (#793) or another order has been picked (#790), continue to order config.json by difficulty.
As part of [The Track Anatomy Project][1], the Haskell core track is restructured in #798 using @F3PiX'es multi-stage framework referred to as "The Track Tool". Since The Track Tool is still under development, it isn't documented yet. But the execution of the first step can be viewed for other languages, e.g. exercism/javascript#590. --- Proposal: - Switch "Bob" and "Pangram". They're both about handling textual data. Pangram has fewer gotchas, is quicker done, has more variations among its alternative solutions, and doesn't lend itself as well to `Data.Text`. (See #795.) Bob often involves more refactoring, has more learning objectives and has the extra "You could do it with Data.Text, too!" part. This way people don't try to solve Pangram with Data.Text which is possible but not ideal without mono-traversable, and they get an exercise more under their belt before being thrown into a lot of refactoring. - Switch "Nucleotide Count" and "Sum of Multiples". Eventually I think we should delete "Sum of Multiples" and "Grains" (see #761). But since The Track Tool does not address removal yet, I want to make "Nucleotide Count" come immediately after "RNA Transcription", since they're both thematically related and Nucleotide Count uses Either while RNA Transcription uses Maybe for monadic error handling, so they practice the same thing in progressive difficulty. The proposed track reordering looks like: 1. hello-world 2. leap 3. space-age 4. **pangram** 5. **bob** 6. collatz-conjecture 7. rna-transcription 8. **nucleotide-count** 9. sum-of-multiples 10. grains [1]: https://exercism.io/blog/track-anatomy-project
After a discussion on #track-haskell @ Slack, I'm proposing here that we move both
Difference Of Squares
andGrains
away from the core track and replace these two last spots with other exercises.A short argument is that they don't provide a lot of opportunities to teach Haskell idioms or data types. Finding explicit formula instead of recursive formula is more of a mathy exercise. While I like
Grains
, I don't think it deserves to be the last core exercise.In coming up with alternatives, not a lot of exercises have been suggested:
Bracket Push
,Nucleotide Count
. We could revise the order if the ones we come up with are not ideal to place at the end of the track. In fact, I might like to suggest that either way.Finally, this might be a good opportunity to port new exercises, since we can do it in such a way that they apply to the track. I said on Slack that I miss the following things from the core track: Trees (like
Binary Search Tree
), Maps (likeNucleotide Count
), higher-order functions (that aren't list combinators),Either
(or a variant that accumulates errors),Monoid
, parsing, list comprehensions, state monads, applicative functors, QuickCheck (properties and generators).So how about we find / come up with exercises that cover things we haven't covered already, and then think about the order on the core track?
The text was updated successfully, but these errors were encountered: