Skip to content

Commit

Permalink
Sync etl docs with problem-specifications (#500)
Browse files Browse the repository at this point in the history
The etl exercise has been overhauled as part of a project
to make practice exercises more consistent and friendly.

For more context, please see the discussion in the forum, as well as
the pull request that updated the exercise in the problem-specifications
repository:

- https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943
- exercism/problem-specifications#2250
  • Loading branch information
kytrinyx authored May 16, 2023
1 parent b1b54fc commit 6f73c08
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 28 deletions.
36 changes: 8 additions & 28 deletions exercises/practice/etl/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
# Instructions

We are going to do the `Transform` step of an Extract-Transform-Load.
Your task is to change the data format of letters and their point values in the game.

## ETL

Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so
we're going to migrate this."

(Typically, this is followed by, "We're only going to need to run this
once." That's then typically followed by much forehead slapping and
moaning about how stupid we could possibly be.)

## The goal

We're going to extract some Scrabble scores from a legacy system.

The old system stored a list of letters per score:
Currently, letters are stored in groups based on their score, in a one-to-many mapping.

- 1 point: "A", "E", "I", "O", "U", "L", "N", "R", "S", "T",
- 2 points: "D", "G",
Expand All @@ -25,23 +12,16 @@ The old system stored a list of letters per score:
- 8 points: "J", "X",
- 10 points: "Q", "Z",

The shiny new Scrabble system instead stores the score per letter, which
makes it much faster and easier to calculate the score for a word. It
also stores the letters in lower-case regardless of the case of the
input letters:
This needs to be changed to store each individual letter with its score in a one-to-one mapping.

- "a" is worth 1 point.
- "b" is worth 3 points.
- "c" is worth 3 points.
- "d" is worth 2 points.
- Etc.

Your mission, should you choose to accept it, is to transform the legacy data
format to the shiny new format.
- etc.

## Notes
As part of this change, the team has also decided to change the letters to be lower-case rather than upper-case.

A final note about scoring, Scrabble is played around the world in a
variety of languages, each with its own unique scoring table. For
example, an "E" is scored at 2 in the Māori-language version of the
game while being scored at 4 in the Hawaiian-language version.
~~~~exercism/note
If you want to look at how the data was previously structured and how it needs to change, take a look at the examples in the test suite.
~~~~
16 changes: 16 additions & 0 deletions exercises/practice/etl/.docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Introduction

You work for a company that makes an online multiplayer game called Lexiconia.

To play the game, each player is given 13 letters, which they must rearrange to create words.
Different letters have different point values, since it's easier to create words with some letters than others.

The game was originally launched in English, but it is very popular, and now the company wants to expand to other languages as well.

Different languages need to support different point values for letters.
The point values are determined by how often letters are used, compared to other letters in that language.

For example, the letter 'C' is quite common in English, and is only worth 3 points.
But in Norwegian it's a very rare letter, and is worth 10 points.

To make it easier to add new languages, your team needs to change the way letters and their point values are stored in the game.

0 comments on commit 6f73c08

Please sign in to comment.