Skip to content

Commit e9d1d2d

Browse files
authored
Sync etl docs with problem-specifications (#719)
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
1 parent 41cdbbd commit e9d1d2d

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed
Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
# Instructions
22

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

5-
## ETL
6-
7-
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."
8-
9-
(Typically, this is followed by, "We're only going to need to run this once."
10-
That's then typically followed by much forehead slapping and moaning about how stupid we could possibly be.)
11-
12-
## The goal
13-
14-
We're going to extract some Scrabble scores from a legacy system.
15-
16-
The old system stored a list of letters per score:
5+
Currently, letters are stored in groups based on their score, in a one-to-many mapping.
176

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

26-
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.
27-
It also stores the letters in lower-case regardless of the case of the input letters:
15+
This needs to be changed to store each individual letter with its score in a one-to-one mapping.
2816

2917
- "a" is worth 1 point.
3018
- "b" is worth 3 points.
3119
- "c" is worth 3 points.
3220
- "d" is worth 2 points.
33-
- Etc.
34-
35-
Your mission, should you choose to accept it, is to transform the legacy data format to the shiny new format.
21+
- etc.
3622

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

39-
A final note about scoring, Scrabble is played around the world in a variety of languages, each with its own unique scoring table.
40-
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.
25+
~~~~exercism/note
26+
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.
27+
~~~~
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Introduction
2+
3+
You work for a company that makes an online multiplayer game called Lexiconia.
4+
5+
To play the game, each player is given 13 letters, which they must rearrange to create words.
6+
Different letters have different point values, since it's easier to create words with some letters than others.
7+
8+
The game was originally launched in English, but it is very popular, and now the company wants to expand to other languages as well.
9+
10+
Different languages need to support different point values for letters.
11+
The point values are determined by how often letters are used, compared to other letters in that language.
12+
13+
For example, the letter 'C' is quite common in English, and is only worth 3 points.
14+
But in Norwegian it's a very rare letter, and is worth 10 points.
15+
16+
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 commit comments

Comments
 (0)