From 4e4b5083ba05406d4843ae461c059a421840cbd5 Mon Sep 17 00:00:00 2001 From: Adam Henley Date: Tue, 19 Mar 2024 14:20:31 +1300 Subject: [PATCH 1/4] Exercises no longer ask developers to 'write a function' (#2396) Signed-off-by: Adam Henley --- exercises/alphametics/description.md | 4 +--- exercises/alphametics/metadata.toml | 2 +- exercises/darts/description.md | 4 ++-- exercises/darts/metadata.toml | 2 +- exercises/flatten-array/description.md | 2 +- exercises/go-counting/description.md | 4 ++-- exercises/nucleotide-codons/description.md | 2 +- exercises/nucleotide-codons/metadata.toml | 2 +- exercises/parallel-letter-frequency/description.md | 2 +- 9 files changed, 11 insertions(+), 13 deletions(-) diff --git a/exercises/alphametics/description.md b/exercises/alphametics/description.md index 68c48a5d07..c5548f9b1c 100644 --- a/exercises/alphametics/description.md +++ b/exercises/alphametics/description.md @@ -1,6 +1,6 @@ # Description -Write a function to solve alphametics puzzles. +Write a solver for alphametics puzzles. [Alphametics][alphametics] is a puzzle where letters in words are replaced with numbers. @@ -26,6 +26,4 @@ This is correct because every letter is replaced by a different number and the w Each letter must represent a different digit, and the leading digit of a multi-digit number must not be zero. -Write a function to solve alphametics puzzles. - [alphametics]: https://en.wikipedia.org/wiki/Alphametics diff --git a/exercises/alphametics/metadata.toml b/exercises/alphametics/metadata.toml index c7c75c5780..a4664b9c8c 100644 --- a/exercises/alphametics/metadata.toml +++ b/exercises/alphametics/metadata.toml @@ -1,2 +1,2 @@ title = "Alphametics" -blurb = "Write a function to solve alphametics puzzles." +blurb = "Write a solver for alphametics puzzles." diff --git a/exercises/darts/description.md b/exercises/darts/description.md index 5e1a9b2a2f..ec84fe37e2 100644 --- a/exercises/darts/description.md +++ b/exercises/darts/description.md @@ -1,6 +1,6 @@ # Description -Write a function that returns the earned points in a single toss of a Darts game. +Calculate the points scored in a single toss of a Darts game. [Darts][darts] is a game where players throw darts at a [target][darts-target]. @@ -16,7 +16,7 @@ In our particular instance of the game, the target rewards 4 different amounts o The outer circle has a radius of 10 units (this is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1. Of course, they are all centered at the same point — that is, the circles are [concentric][] defined by the coordinates (0, 0). -Write a function that given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), returns the correct amount earned by a dart landing at that point. +Given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), calculate the correct score earned by a dart landing there. ## Credit diff --git a/exercises/darts/metadata.toml b/exercises/darts/metadata.toml index 3d839d2ad0..3d2e7aace4 100644 --- a/exercises/darts/metadata.toml +++ b/exercises/darts/metadata.toml @@ -1,3 +1,3 @@ title = "Darts" -blurb = "Write a function that returns the earned points in a single toss of a Darts game." +blurb = "Calculate the points scored in a single toss of a Darts game." source = "Inspired by an exercise created by a professor Della Paolera in Argentina" diff --git a/exercises/flatten-array/description.md b/exercises/flatten-array/description.md index 0cfcc818bc..c5a863727b 100644 --- a/exercises/flatten-array/description.md +++ b/exercises/flatten-array/description.md @@ -2,7 +2,7 @@ Take a nested list and return a single flattened list with all values except nil/null. -The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values. +The challenge is to take an arbitrarily-deep nested list-like structure and return a flattened structure without any nil/null values. For example: diff --git a/exercises/go-counting/description.md b/exercises/go-counting/description.md index 1e1b66c0b6..716f0abb5f 100644 --- a/exercises/go-counting/description.md +++ b/exercises/go-counting/description.md @@ -5,10 +5,10 @@ Count the scored points on a Go board. In the game of go (also known as baduk, igo, cờ vây and wéiqí) points are gained by completely encircling empty intersections with your stones. The encircled intersections of a player are known as its territory. -Write a function that determines the territory of each player. +Your task is to calculate the territory of each player. You may assume that any stones that have been stranded in enemy territory have already been taken off the board. -Write a function that determines the territory which includes a specified coordinate. +Given a board, determine the territory which includes a specified coordinate. Multiple empty intersections may be encircled at once and for encircling only horizontal and vertical neighbors count. In the following diagram the stones which matter are marked "O" and the stones that don't are marked "I" (ignored). diff --git a/exercises/nucleotide-codons/description.md b/exercises/nucleotide-codons/description.md index fb0eaed42d..6b619cafa1 100644 --- a/exercises/nucleotide-codons/description.md +++ b/exercises/nucleotide-codons/description.md @@ -1,6 +1,6 @@ # Description -Write a function that returns the name of an amino acid a particular codon, possibly using shorthand, encodes for. +Return the name of an amino acid encoded by a particular codon, possibly using shorthand. In DNA sequences of 3 nucleotides, called codons, encode for amino acids. Often several codons encode for the same amino acid. diff --git a/exercises/nucleotide-codons/metadata.toml b/exercises/nucleotide-codons/metadata.toml index 03a28b08b5..24077d23a1 100644 --- a/exercises/nucleotide-codons/metadata.toml +++ b/exercises/nucleotide-codons/metadata.toml @@ -1,2 +1,2 @@ title = "Nucleotide Codons" -blurb = "Write a function that returns the name of an amino acid a particular codon, possibly using shorthand, encodes for." +blurb = "Return the name of an amino acid encoded by a particular codon, possibly using shorthand." diff --git a/exercises/parallel-letter-frequency/description.md b/exercises/parallel-letter-frequency/description.md index 9522947225..92cd468039 100644 --- a/exercises/parallel-letter-frequency/description.md +++ b/exercises/parallel-letter-frequency/description.md @@ -4,4 +4,4 @@ Count the frequency of letters in texts using parallel computation. Parallelism is about doing things in parallel that can also be done sequentially. A common example is counting the frequency of letters. -Create a function that returns the total frequency of each letter in a list of texts and that employs parallelism. +Employ parallelism to return the total frequency of each letter in a list of texts. From 321b04887e9f3420b7a7c17efe61cc1d68062997 Mon Sep 17 00:00:00 2001 From: Adam Henley Date: Tue, 19 Mar 2024 23:21:08 +1300 Subject: [PATCH 2/4] Change requests from review (avoiding `return` and using more specific language) Signed-off-by: Adam Henley --- exercises/alphametics/description.md | 2 +- exercises/darts/description.md | 2 +- exercises/flatten-array/description.md | 2 +- exercises/go-counting/description.md | 4 ++-- exercises/nucleotide-codons/description.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/alphametics/description.md b/exercises/alphametics/description.md index c5548f9b1c..6bbf48c2bb 100644 --- a/exercises/alphametics/description.md +++ b/exercises/alphametics/description.md @@ -1,6 +1,6 @@ # Description -Write a solver for alphametics puzzles. +Write some code to solve alphametics puzzles. [Alphametics][alphametics] is a puzzle where letters in words are replaced with numbers. diff --git a/exercises/darts/description.md b/exercises/darts/description.md index ec84fe37e2..c76db8e8dd 100644 --- a/exercises/darts/description.md +++ b/exercises/darts/description.md @@ -16,7 +16,7 @@ In our particular instance of the game, the target rewards 4 different amounts o The outer circle has a radius of 10 units (this is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1. Of course, they are all centered at the same point — that is, the circles are [concentric][] defined by the coordinates (0, 0). -Given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), calculate the correct score earned by a dart landing there. +Given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), calculate the correct score earned by a dart landing at that point. ## Credit diff --git a/exercises/flatten-array/description.md b/exercises/flatten-array/description.md index c5a863727b..6b88385494 100644 --- a/exercises/flatten-array/description.md +++ b/exercises/flatten-array/description.md @@ -2,7 +2,7 @@ Take a nested list and return a single flattened list with all values except nil/null. -The challenge is to take an arbitrarily-deep nested list-like structure and return a flattened structure without any nil/null values. +The challenge is to take an arbitrarily-deep nested list-like structure and produce a flattened structure without any nil/null values. For example: diff --git a/exercises/go-counting/description.md b/exercises/go-counting/description.md index 716f0abb5f..1ee601d562 100644 --- a/exercises/go-counting/description.md +++ b/exercises/go-counting/description.md @@ -5,10 +5,10 @@ Count the scored points on a Go board. In the game of go (also known as baduk, igo, cờ vây and wéiqí) points are gained by completely encircling empty intersections with your stones. The encircled intersections of a player are known as its territory. -Your task is to calculate the territory of each player. +Calculate the territory of each player. You may assume that any stones that have been stranded in enemy territory have already been taken off the board. -Given a board, determine the territory which includes a specified coordinate. +Determine the territory which includes a specified coordinate. Multiple empty intersections may be encircled at once and for encircling only horizontal and vertical neighbors count. In the following diagram the stones which matter are marked "O" and the stones that don't are marked "I" (ignored). diff --git a/exercises/nucleotide-codons/description.md b/exercises/nucleotide-codons/description.md index 6b619cafa1..133188de33 100644 --- a/exercises/nucleotide-codons/description.md +++ b/exercises/nucleotide-codons/description.md @@ -1,6 +1,6 @@ # Description -Return the name of an amino acid encoded by a particular codon, possibly using shorthand. +Write some code which will output the name of an amino acid encoded by a particular codon, possibly using shorthand. In DNA sequences of 3 nucleotides, called codons, encode for amino acids. Often several codons encode for the same amino acid. From f47fae703d60108d58d32de8b0eed5589243c1c3 Mon Sep 17 00:00:00 2001 From: Adam Henley Date: Wed, 20 Mar 2024 17:15:10 +1300 Subject: [PATCH 3/4] Update missed metadata instances, missed return, and bravely fix the nucleotide-codons description Signed-off-by: Adam Henley --- exercises/alphametics/metadata.toml | 2 +- exercises/nucleotide-codons/description.md | 2 +- exercises/nucleotide-codons/metadata.toml | 2 +- exercises/parallel-letter-frequency/description.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/alphametics/metadata.toml b/exercises/alphametics/metadata.toml index a4664b9c8c..331a31cc06 100644 --- a/exercises/alphametics/metadata.toml +++ b/exercises/alphametics/metadata.toml @@ -1,2 +1,2 @@ title = "Alphametics" -blurb = "Write a solver for alphametics puzzles." +blurb = "Write some code to solve alphametics puzzles." diff --git a/exercises/nucleotide-codons/description.md b/exercises/nucleotide-codons/description.md index 133188de33..6fabbececf 100644 --- a/exercises/nucleotide-codons/description.md +++ b/exercises/nucleotide-codons/description.md @@ -1,6 +1,6 @@ # Description -Write some code which will output the name of an amino acid encoded by a particular codon, possibly using shorthand. +Translate a given codon into the name of the amino acid that it encodes, possibly using shorthand. In DNA sequences of 3 nucleotides, called codons, encode for amino acids. Often several codons encode for the same amino acid. diff --git a/exercises/nucleotide-codons/metadata.toml b/exercises/nucleotide-codons/metadata.toml index 24077d23a1..e63ea85a6c 100644 --- a/exercises/nucleotide-codons/metadata.toml +++ b/exercises/nucleotide-codons/metadata.toml @@ -1,2 +1,2 @@ title = "Nucleotide Codons" -blurb = "Return the name of an amino acid encoded by a particular codon, possibly using shorthand." +blurb = "Translate a given codon into the amino acid it encodes, possibly using shorthand." diff --git a/exercises/parallel-letter-frequency/description.md b/exercises/parallel-letter-frequency/description.md index 92cd468039..3339155802 100644 --- a/exercises/parallel-letter-frequency/description.md +++ b/exercises/parallel-letter-frequency/description.md @@ -4,4 +4,4 @@ Count the frequency of letters in texts using parallel computation. Parallelism is about doing things in parallel that can also be done sequentially. A common example is counting the frequency of letters. -Employ parallelism to return the total frequency of each letter in a list of texts. +Employ parallelism to calculate the total frequency of each letter in a list of texts. From 366f22d054eda28d59834cfd6a0a4a904d396107 Mon Sep 17 00:00:00 2001 From: Adam Henley Date: Thu, 21 Mar 2024 08:51:32 +1300 Subject: [PATCH 4/4] Remediate `Write some code` in alphametics exercise description Signed-off-by: Adam Henley --- exercises/alphametics/description.md | 2 +- exercises/alphametics/metadata.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/alphametics/description.md b/exercises/alphametics/description.md index 6bbf48c2bb..6e8c6e401c 100644 --- a/exercises/alphametics/description.md +++ b/exercises/alphametics/description.md @@ -1,6 +1,6 @@ # Description -Write some code to solve alphametics puzzles. +Given an alphametics puzzle, find the correct solution. [Alphametics][alphametics] is a puzzle where letters in words are replaced with numbers. diff --git a/exercises/alphametics/metadata.toml b/exercises/alphametics/metadata.toml index 331a31cc06..0abe093f2e 100644 --- a/exercises/alphametics/metadata.toml +++ b/exercises/alphametics/metadata.toml @@ -1,2 +1,2 @@ title = "Alphametics" -blurb = "Write some code to solve alphametics puzzles." +blurb = "Given an alphametics puzzle, find the correct solution."