diff --git a/building/configlet/lint.md b/building/configlet/lint.md index 9d40393e..14dd002a 100644 --- a/building/configlet/lint.md +++ b/building/configlet/lint.md @@ -30,6 +30,7 @@ The linter should check if all the required files are present. The non-exercise - `docs/LEARNING.md` - `docs/RESOURCES.md` - `docs/SNIPPET.txt` +- `docs/SIGN_UP_SNIPPET.txt` (only for tracks whose `config.json` has `"active": true`) - `docs/TESTS.md` - `exercises/shared/.docs/help.md` - `exercises/shared/.docs/tests.md` diff --git a/building/tracks/docs.md b/building/tracks/docs.md index a8d04b37..9ab0b598 100644 --- a/building/tracks/docs.md +++ b/building/tracks/docs.md @@ -8,6 +8,7 @@ docs ├── INSTALLATION.md (required) ├── LEARNING.md (required) ├── SNIPPET.txt (required) +├── SIGN_UP_SNIPPET.txt (required for active tracks) ├── REPRESENTER_NORMALIZATIONS.md (optional) ├── RESOURCES.md (required) ├── TESTS.md (required) @@ -134,6 +135,34 @@ let hello = "Hello, World!" Check [this page](https://exercism.org/tracks/fsharp) to see what this looks like when rendered (note: you must not have already joined the track). +## File: `SIGN_UP_SNIPPET.txt` + +**Purpose:** Help people who are signing up to Exercism work out whether they are ready for it, or should learn the basics on [Jiki](https://jiki.io) first. + +**Displayed on:** The sign-up page. +When someone says they can code a little, they pick the language they use most and see this snippet. +They then say whether the code feels easy, tricky or impossible. + +Every track shows the same small program: a function that finds the most common word in a piece of text and says how many times it appears. +The snippet should be short (around 10 lines) and use variables, a loop, a conditional, a dictionary or map, function calls and string formatting, written the way the language normally does them. + +This file is required for active tracks, and `configlet lint` checks for it. +Only the `maintainers-admin` team can change it. + +### Example + +```ruby +def most_common_word(text) + counts = Hash.new(0) + best = "" + text.downcase.split(" ").each do |word| + counts[word] += 1 + best = word if counts[word] > counts[best] + end + "\"#{best}\" appears #{counts[best]} times" +end +``` + ## File: `REPRESENTER_NORMALIZATIONS.md` **Purpose:** List the normalizations the representer applies to a solution.