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

Explain how to name concept exercises #72

Merged
merged 1 commit into from
Mar 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions anatomy/tracks/concept-exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,45 @@ Some languages require additional files for the tests to run. Example of these a

Some files are not specific to individual exercises, but are instead applicable to _all_ exercises. Check the [documentation](./shared-files.md) for more information.

## Naming

Concept Exercises should be named after their story/theme, _not_ after their concept(s).

Good examples of names:

- `Tim from Marketing`
- `Lucian's Luscious Lasagna`
- `Calculator Conundrum`

Bad examples of names:

- `Booleans`: should not be named after a concept
- `Exercise #1`: an exercise is not a story/theme

When forking an exercise without major changes, use the original name when possible.

### Slugs

Each exercise also has a _slug_, which is normalized version of the exercise name using the following rules:

1. Use lowercase.
1. Use [kebab-case][kebab-case].
1. Use alphanumerical characters ('a' - 'z') and dashes ('-').

Good examples of slugs:

- `tim-from-marketing`
- `lucians-luscious-lasagna`
- `calculator-conundrum`

Bad examples of slugs:

- `TIM-FROM-MARKETING`: should use lowercase (i.e. `tim-from-marketing`)
- `TimFromMarketing`: should use kebab-case (i.e. `tim-from-marketing`)
- `floating-point-numbers`: should not use a concept
Comment on lines +484 to +488
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must the slugs follow the rules above or should they follow those rules?

The paragraph above suggests they must follow those rules, but these examples suggest they're optional.

Copy link
Member

@iHiD iHiD Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must.

Suggested change
Bad examples of slugs:
- `TIM-FROM-MARKETING`: should use lowercase (i.e. `tim-from-marketing`)
- `TimFromMarketing`: should use kebab-case (i.e. `tim-from-marketing`)
- `floating-point-numbers`: should not use a concept
Bad examples of slugs:
- `TIM-FROM-MARKETING`: does not use lowercase (i.e. `tim-from-marketing`)
- `TimFromMarketing`: does not use kebab-case (i.e. `tim-from-marketing`)
- `floating-point-numbers`: uses a concept name not a story name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#78


## Presentation

There is a difference in how exercise documentation is presented to the student when using the in-browser editor versus using the CLI. See [this document](./presentation.md) for more information.

[kebab-case]: https://en.wiktionary.org/wiki/kebab_case