I noticed that there are a bunch of open tasks for adding concept exercises to the F# track. I’d be happy to start working on some of them. Any suggestions from the maintainers on which one(s) to start with?
Great! The issues list is a bit outdated I think. But maybe an exercise about Option?
OK, I will do it!
It’s worth checking out the syllabus of other tracks like Elixir to see if there is an exercise that you can borrow/take inspiration from. I’d also recommend discussing your plans for a concept exercise here to ensure that you’re building something that fits our goals ![]()
Thanks for the tips, @ErikSchierboom. I noticed that there is an existing Option concept/exercise on the Rust track, although it is not currently live. But I will also look at Elixir and other tracks.
We recently had a similar decision to make for julia/type-unions (a generalization of Option/Maybe/Nullable in other languages). Porting gleam/role-playing-game worked best for us, though your priorities may differ.
The same exercise is used for elm/maybe, though each track tends to make some language-specific changes to the basic idea.
Thanks for sharing that, @colinleach. That same exercise was also contributed on the Rust track a while ago. Given that porting an exercise across multiple language appears to be a common practice for Exercism, I will plan to follow suit on this one.
Good idea, but you can stay flexible on the implementation details and do whatever is best for your syllabus. We only try to standardize Practice exercises across tracks. Concept exercises are more like the Wild West, with authors and track maintainers given considerable freedom to decide what works for their language and teaching style.
If a Concept exercise has previously been used on multiple tracks, I find it helpful to start by looking at 2-3 of them to get a feel for how they differ (and they usually will differ). That can be helpful in focusing my ideas on what to emphasize in the syllabus I’m trying to create.
I created a pull request at Add Option concept doc by blackk-foxx · Pull Request #1332 · exercism/fsharp · GitHub for the proposed Option concept doc, and it is ready for review.
I was thinking that it would be good to create the doc first in one PR, then the exercise in another, and finally update the top-level config.json file in a final PR to make them both “live”. But I’m open to other ideas on how to stage it.
In general PRs tend to be a complete and self contained working change. Generally speaking you’d merge the full working thing in one PR. This makes it easier to catch things like inconsistencies between different parts of the change, eg the exercise using something the intro doesn’t cover of the intro having material which isn’t needed for the exercise.
You could stage things on your fork as multiple changes, or the track maintainer might be open to partial concept files, too!
My main question was whether it is common practice to contribute the concept doc separately from the associated exercise. After reviewing some of the previous PRs, I understand that is not the case.
If you are referring to {exercise-slug}/.docs/introduction.md, that is part of the exercise and should be included in the PR.
It may be the same (or very similar) to the {concept-slug}/introduction.md, but these are separate files in separate PRs. The exercise version should generally be focused fairly narrowly on what is needed by a student solving the exercise.
Authors differ, but some of us write the concept about.md first, as something fairly detailed and comprehensive. Then cut that down to the minimalist exercise introduction.md. Finally copy that back to the concept’s introduction.md.
Confusing at first, but it soon becomes automatic!
I think they are talking about concepts and concept exercises. If it is possible or common to PR a concept (all docs) before PRing its exercise (all docs).
I did that in the x86-64 track because it allowed me to do (and get reviews for) many concepts before setting in stone the contents of each one. There is also no great harm in doing that because the docs are separated. The only shared doc is introduction.md and the exercise has a separate copy of it (which can be different than the one in the concept). It is even possible for multiple distinct concepts to share a single exercise.
But I think this is not the most common practice, as Isaac mentioned.
OK, Add Option concept exercise and doc by blackk-foxx · Pull Request #1332 · exercism/fsharp · GitHub is now ready for review. It contains a concept exercise in addition to the concept docs.
Thanks @ErikSchierboom for the review/approval. It’s nice to see the new concept and exercise live on the site! After reviewing it, I think maybe the hints could be improved a bit:
- Task 1: a hint about
Option.default - Task 2: something about returning
Some playerorNone - Task 3: use a
matchexpression covering theSomeandNonecases, and remove the mention of themaxfunction since it does not pertain to theOptionsconcept
Other thoughts?
Sounds like a good idea! A PR is appreciated :)
One more thing I noticed in the UI: The human-readable title of the exercise appears as “role-playing-game,” but it should be “Role Playing Game.”
Proposed fix in Correct role-playing-game exercise name by blackk-foxx · Pull Request #1334 · exercism/fsharp · GitHub.