From 8f9548ee02b8686a8a13b15dca944f004e201505 Mon Sep 17 00:00:00 2001 From: Corey McCandless Date: Fri, 27 Oct 2017 09:40:07 -0500 Subject: [PATCH 1/4] dominoes: improve description readability Avoid confusion with 2-digit numbers `23` vs domino `[2|3]` https://github.com/exercism/problem-specifications/pull/972 --- exercises/dominoes/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/dominoes/README.md b/exercises/dominoes/README.md index da7405f24..3e7341ad1 100644 --- a/exercises/dominoes/README.md +++ b/exercises/dominoes/README.md @@ -7,10 +7,10 @@ correct domino chain (the dots on one half of a stone match the dots on the neighbouring half of an adjacent stone) and that dots on the halfs of the stones which don't have a neighbour (the first and last stone) match each other. -For example given the stones `21`, `23` and `13` you should compute something -like `12 23 31` or `32 21 13` or `13 32 21` etc, where the first and last numbers are the same. +For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something +like `[1|2] [2|3] [3|1]` or `[3|2] [2|1] [1|3]` or `[1|3] [3|2] [2|1]` etc, where the first and last numbers are the same. -For stones 12, 41 and 23 the resulting chain is not valid: 41 12 23's first and last numbers are not the same. 4 != 3 +For stones `[1|2]`, `[4|1]` and `[2|3]` the resulting chain is not valid: `[4|1] [1|2] [2|3]`'s first and last numbers are not the same. 4 != 3 Some test cases may use duplicate stones in a chain solution, assume that multiple Domino sets are being used. From de489c278a9b21c3f210b24681c08d8f9a00132f Mon Sep 17 00:00:00 2001 From: Stargator Date: Sun, 29 Oct 2017 15:31:32 -0400 Subject: [PATCH 2/4] phone-number: Fix typo in Readme https://github.com/exercism/problem-specifications/pull/980 --- exercises/phone-number/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/phone-number/README.md b/exercises/phone-number/README.md index e39a907e0..f49517ced 100644 --- a/exercises/phone-number/README.md +++ b/exercises/phone-number/README.md @@ -14,7 +14,7 @@ The format is usually represented as where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9. -Your task is to clean up differently formated telephone numbers by removing punctuation and the country code (1) if present. +Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present. For example, the inputs - `+1 (613)-995-0253` From 5b867c2969c4bdd959e355f751be78408106b2cb Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Sat, 4 Nov 2017 16:00:31 -0700 Subject: [PATCH 3/4] two-bucket: Do not specify any types in description The description currently specifies that buckets are represented, in both the input and the output, as strings. This seems overly constraining. Consider those tracks that wish to represent these buckets as variants of a tagged union or of an enum for the purpose of better type safety. These tracks have these options in order to do so: * Accept the problem-specifications README as is, but act in contravention of it. But it is confusing if the README contradicts the tests. * Create a custom description.md. But this is a little unfortunate because only two lines need to change, and it adds extra maintenance burden to have to maintain the custom description.md. Consider that if this description.md changes, the changes will probably need to be copied to each custom description.md * Add to .meta/hints.md saying something to the effect of "ha ha ignore the above text about using Strings, we're using tagged unions / enums" so that this will be appended to the description. But it seems too strange to have a README contradict itself. * Other solution I did not think of. Thus, it seems it is best to remove the specification of the buckets as a string so as to allow the flexibility. For the purpose of consistency, all other types have been removed as well, otherwise it would invite (very reasonable) questions about why all inputs/outputs except the buckets have types given. It is surmised that this leads to no real loss, because it should be obvious that sizes, number of moves, and number of liters are all numeric values. https://github.com/exercism/problem-specifications/pull/990 --- exercises/two-bucket/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/exercises/two-bucket/README.md b/exercises/two-bucket/README.md index 31638f8bf..f6620a78a 100644 --- a/exercises/two-bucket/README.md +++ b/exercises/two-bucket/README.md @@ -7,15 +7,15 @@ Since this mathematical problem is fairly subject to interpretation / individual To help, the tests provide you with which bucket to fill first. That means, when starting with the larger bucket full, you are NOT allowed at any point to have the smaller bucket full and the larger bucket empty (aka, the opposite starting point); that would defeat the purpose of comparing both approaches! Your program will take as input: -- the size of bucket one, passed as a numeric value -- the size of bucket two, passed as a numeric value -- the desired number of liters to reach, passed as a numeric value -- which bucket to fill first, passed as a Bucket (either Bucket::One or Bucket::Two) +- the size of bucket one +- the size of bucket two +- the desired number of liters to reach +- which bucket to fill first, either bucket one or bucket two Your program should determine: -- the total number of "moves" it should take to reach the desired number of liters, including the first fill - expects a numeric value -- which bucket should end up with the desired number of liters (let's say this is bucket A) - expects a Bucket (either Bucket::One or Bucket::Two) -- how many liters are left in the other bucket (bucket B) - expects a numeric value +- the total number of "moves" it should take to reach the desired number of liters, including the first fill +- which bucket should end up with the desired number of liters (let's say this is bucket A) - either bucket one or bucket two +- how many liters are left in the other bucket (bucket B) Note: any time a change is made to either or both buckets counts as one (1) move. From 4eed956a7e52dbe45cc0458a0c99ca13d09e626c Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Sat, 4 Nov 2017 15:27:49 -0700 Subject: [PATCH 4/4] description.md: rm trailing spaces One might assume that we can consider a CI check that there are no trailing spaces, but we have to be careful because some embedded strings that serve as example outputs are expected to have trailing spaces. The currently only example is ocr-numbers. One might consider a CI check, but simply exclude that file. https://github.com/exercism/problem-specifications/pull/995 --- exercises/nucleotide-count/README.md | 4 ++-- exercises/rectangles/README.md | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/exercises/nucleotide-count/README.md b/exercises/nucleotide-count/README.md index 36dfae6bf..c29640a03 100644 --- a/exercises/nucleotide-count/README.md +++ b/exercises/nucleotide-count/README.md @@ -2,8 +2,8 @@ Given a single stranded DNA string, compute how many times each nucleotide occurs in the string. -The genetic language of every living thing on the planet is DNA. -DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides. +The genetic language of every living thing on the planet is DNA. +DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides. 4 types exist in DNA and these differ only slightly and can be represented as the following symbols: 'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' thymine. Here is an analogy: diff --git a/exercises/rectangles/README.md b/exercises/rectangles/README.md index 16d4d07ae..71cc5c4eb 100644 --- a/exercises/rectangles/README.md +++ b/exercises/rectangles/README.md @@ -37,27 +37,27 @@ The above diagram contains 6 rectangles: ``` ```text - - + + +--+ | | +--+ ``` ```text - - + + +--+ | | +--+ ``` ```text - - ++ - ++ - - + + ++ + ++ + + ``` You may assume that the input is always a proper rectangle (i.e. the length of