From 18ecb99c7d0b83f353dd5e1d7f26340e3b770409 Mon Sep 17 00:00:00 2001 From: "Jeremy W. Sherman" Date: Wed, 30 Oct 2019 15:23:43 -0400 Subject: [PATCH 1/3] Update readme template URLs Cribbed liberally from the C++ version: https://github.com/exercism/cpp/blob/32d08a0822d5d14c10ccc4484c69afed1130f795/config/exercise_readme.go.tmpl Also added the latest bits from the template readme prolog: https://github.com/exercism/docs/blob/737cd278c85cbf5a1581c1bb115729f5857e22de/language-tracks/exercises/anatomy/readmes.md#default-template We can't adopt the track hints README insert, because we rely on interpolation of details of the specific exercise, and the config/exercise-readme-insert.md is injected literally, without access to any formatting variables. --- config/exercise_readme.go.tmpl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/config/exercise_readme.go.tmpl b/config/exercise_readme.go.tmpl index 73dbfe1..224b3a3 100644 --- a/config/exercise_readme.go.tmpl +++ b/config/exercise_readme.go.tmpl @@ -4,14 +4,15 @@ {{- with .Hints }} {{ . }} {{ end }} -## Setup - -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. +{{- with .TrackInsert }} +{{ . }} +{{ end }} +## Getting Started -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -24,7 +25,8 @@ exercism submit /objective-c/{{ .Spec.Slug }}/{{ .Sp ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + {{ with .Spec.Credits }} ## Source From 81d9cc8be449e689a281db63f615904d432b4d9f Mon Sep 17 00:00:00 2001 From: "Jeremy W. Sherman" Date: Wed, 30 Oct 2019 15:36:14 -0400 Subject: [PATCH 2/3] Regenerate exercise READMEs Configlet emitted one error. It has to do with this being track-specific exercise, not one of the shared ones, it seems? ``` -> 1 error occurred: * open ../problem-specifications/exercises/bracket-push/metadata.yml: no such file or directory ``` --- exercises/acronym/README.md | 15 +++-- exercises/all-your-base/README.md | 15 +++-- exercises/allergies/README.md | 15 +++-- exercises/anagram/README.md | 18 +++--- exercises/atbash-cipher/README.md | 15 +++-- exercises/beer-song/README.md | 15 +++-- exercises/binary-search/README.md | 15 +++-- exercises/bob/README.md | 15 +++-- exercises/clock/README.md | 15 +++-- exercises/collatz-conjecture/README.md | 15 +++-- exercises/crypto-square/README.md | 68 +++++++++++----------- exercises/difference-of-squares/README.md | 17 +++--- exercises/etl/README.md | 19 +++--- exercises/flatten-array/README.md | 15 +++-- exercises/gigasecond/README.md | 18 +++--- exercises/grade-school/README.md | 15 +++-- exercises/grains/README.md | 25 ++++---- exercises/hamming/README.md | 49 ++++++---------- exercises/hello-world/README.md | 15 +++-- exercises/isogram/README.md | 15 +++-- exercises/largest-series-product/README.md | 15 +++-- exercises/leap/README.md | 18 +++--- exercises/luhn/README.md | 15 +++-- exercises/meetup/README.md | 15 +++-- exercises/nth-prime/README.md | 15 +++-- exercises/nucleotide-count/README.md | 15 +++-- exercises/pangram/README.md | 15 +++-- exercises/pascals-triangle/README.md | 15 +++-- exercises/perfect-numbers/README.md | 15 +++-- exercises/phone-number/README.md | 15 +++-- exercises/prime-factors/README.md | 28 ++++----- exercises/raindrops/README.md | 39 ++++++------- exercises/reverse-string/README.md | 25 ++++---- exercises/rna-transcription/README.md | 15 +++-- exercises/robot-name/README.md | 23 ++++---- exercises/roman-numerals/README.md | 15 +++-- exercises/run-length-encoding/README.md | 15 +++-- exercises/say/README.md | 17 +++--- exercises/scrabble-score/README.md | 17 +++--- exercises/secret-handshake/README.md | 15 +++-- exercises/series/README.md | 29 +++++---- exercises/sieve/README.md | 23 ++++---- exercises/space-age/README.md | 17 +++--- exercises/strain/README.md | 46 ++++++++++----- exercises/sublist/README.md | 15 +++-- exercises/sum-of-multiples/README.md | 15 +++-- exercises/transpose/README.md | 15 +++-- exercises/triangle/README.md | 15 +++-- exercises/two-fer/README.md | 34 +++++++---- exercises/word-count/README.md | 46 ++++++++++----- 50 files changed, 510 insertions(+), 516 deletions(-) diff --git a/exercises/acronym/README.md b/exercises/acronym/README.md index 3a600e8..da47e28 100644 --- a/exercises/acronym/README.md +++ b/exercises/acronym/README.md @@ -7,14 +7,12 @@ Techies love their TLA (Three Letter Acronyms)! Help generate some jargon by writing a program that converts a long name like Portable Network Graphics to its acronym (PNG). -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -27,7 +25,8 @@ exercism submit /objective-c/acronym/Acronym.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/all-your-base/README.md b/exercises/all-your-base/README.md index 7dcf964..75306ca 100644 --- a/exercises/all-your-base/README.md +++ b/exercises/all-your-base/README.md @@ -31,14 +31,12 @@ I think you got the idea! *Yes. Those three numbers above are exactly the same. Congratulations!* -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -51,7 +49,8 @@ exercism submit /objective-c/all-your-base/AllYourBa ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/allergies/README.md b/exercises/allergies/README.md index d48e6a4..75fae96 100644 --- a/exercises/allergies/README.md +++ b/exercises/allergies/README.md @@ -29,14 +29,12 @@ allergens that score 256, 512, 1024, etc.). Your program should ignore those components of the score. For example, if the allergy score is 257, your program should only report the eggs (1) allergy. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -49,7 +47,8 @@ exercism submit /objective-c/allergies/Allergies.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/anagram/README.md b/exercises/anagram/README.md index c725b70..8e80b0d 100644 --- a/exercises/anagram/README.md +++ b/exercises/anagram/README.md @@ -1,19 +1,18 @@ # Anagram -Given a word and a list of possible anagrams, select the correct sublist. +An anagram is a rearrangement of letters to form a new word. +Given a word and a list of candidates, select the sublist of anagrams of the given word. Given `"listen"` and a list of candidates like `"enlists" "google" "inlets" "banana"` the program should return a list containing `"inlets"`. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -26,7 +25,8 @@ exercism submit /objective-c/anagram/Anagram.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/atbash-cipher/README.md b/exercises/atbash-cipher/README.md index 9948d26..c0fd86b 100644 --- a/exercises/atbash-cipher/README.md +++ b/exercises/atbash-cipher/README.md @@ -28,14 +28,12 @@ things based on word boundaries. - Decoding `gvhg` gives `test` - Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog` -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -48,7 +46,8 @@ exercism submit /objective-c/atbash-cipher/AtbashCip ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/beer-song/README.md b/exercises/beer-song/README.md index 221da5b..d97fbc7 100644 --- a/exercises/beer-song/README.md +++ b/exercises/beer-song/README.md @@ -320,14 +320,12 @@ are some additional things you could try: Then please share your thoughts in a comment on the submission. Did this experiment make the code better? Worse? Did you learn anything from it? -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -340,7 +338,8 @@ exercism submit /objective-c/beer-song/BeerSong.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/binary-search/README.md b/exercises/binary-search/README.md index 8c26764..886b56f 100644 --- a/exercises/binary-search/README.md +++ b/exercises/binary-search/README.md @@ -34,14 +34,12 @@ A binary search halves the number of items to check with each iteration, so locating an item (or determining its absence) takes logarithmic time. A binary search is a dichotomic divide and conquer search algorithm. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -54,7 +52,8 @@ exercism submit /objective-c/binary-search/BinarySea ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/bob/README.md b/exercises/bob/README.md index 84b1771..5081da4 100644 --- a/exercises/bob/README.md +++ b/exercises/bob/README.md @@ -11,14 +11,12 @@ anything. He answers 'Whatever.' to anything else. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -31,7 +29,8 @@ exercism submit /objective-c/bob/Bob.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/clock/README.md b/exercises/clock/README.md index 5f61787..0ad68ad 100644 --- a/exercises/clock/README.md +++ b/exercises/clock/README.md @@ -6,14 +6,12 @@ You should be able to add and subtract minutes to it. Two clocks that represent the same time should be equal to each other. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -26,7 +24,8 @@ exercism submit /objective-c/clock/Clock.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/collatz-conjecture/README.md b/exercises/collatz-conjecture/README.md index dd01c73..e450e86 100644 --- a/exercises/collatz-conjecture/README.md +++ b/exercises/collatz-conjecture/README.md @@ -26,14 +26,12 @@ Starting with n = 12, the steps would be as follows: Resulting in 9 steps. So for input n = 12, the return value would be 9. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -46,7 +44,8 @@ exercism submit /objective-c/collatz-conjecture/Coll ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/crypto-square/README.md b/exercises/crypto-square/README.md index 95840a8..1515065 100644 --- a/exercises/crypto-square/README.md +++ b/exercises/crypto-square/README.md @@ -12,11 +12,15 @@ regarded as forming a rectangle when printed with intervening newlines. For example, the sentence -> If man was meant to stay on the ground, god would have given us roots. +```text +"If man was meant to stay on the ground, god would have given us roots." +``` is normalized to: -> ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots +```text +"ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots" +``` The plaintext should be organized in to a rectangle. The size of the rectangle (`r x c`) should be decided by the length of the message, @@ -27,13 +31,13 @@ Our normalized text is 54 characters long, dictating a rectangle with `c = 8` and `r = 7`: ```text -ifmanwas -meanttos -tayonthe -groundgo -dwouldha -vegivenu -sroots +"ifmanwas" +"meanttos" +"tayonthe" +"groundgo" +"dwouldha" +"vegivenu" +"sroots " ``` The coded message is obtained by reading down the columns going left to @@ -42,41 +46,38 @@ right. The message above is coded as: ```text -imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau +"imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau" ``` -Output the encoded text in chunks. Phrases that fill perfect rectangles -`(r X c)` should be output `c` chunks of `r` length, separated by spaces. -Phrases that do not fill perfect rectangles will have `n` empty spaces. -Those spaces should be distributed evenly, added to the end of the last -`n` chunks. +Output the encoded text in chunks that fill perfect rectangles `(r X c)`, +with `c` chunks of `r` length, separated by spaces. For phrases that are +`n` characters short of the perfect rectangle, pad each of the last `n` +chunks with a single trailing space. ```text -imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau +"imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau " ``` Notice that were we to stack these, we could visually decode the -cyphertext back in to the original message: +ciphertext back in to the original message: ```text -imtgdvs -fearwer -mayoogo -anouuio -ntnnlvt -wttddes -aohghn -sseoau +"imtgdvs" +"fearwer" +"mayoogo" +"anouuio" +"ntnnlvt" +"wttddes" +"aohghn " +"sseoau " ``` -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -89,7 +90,8 @@ exercism submit /objective-c/crypto-square/CryptoSqu ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/difference-of-squares/README.md b/exercises/difference-of-squares/README.md index d6430e7..465978c 100644 --- a/exercises/difference-of-squares/README.md +++ b/exercises/difference-of-squares/README.md @@ -12,14 +12,16 @@ Hence the difference between the square of the sum of the first ten natural numbers and the sum of the squares of the first ten natural numbers is 3025 - 385 = 2640. -## Setup +You are not expected to discover an efficient solution to this yourself from +first principles; research is allowed, indeed, encouraged. Finding the best +algorithm for the problem is a key skill in software engineering. -There are two different methods of getting set up to run the tests with Objective-C: +## Getting Started -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -32,7 +34,8 @@ exercism submit /objective-c/difference-of-squares/D ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/etl/README.md b/exercises/etl/README.md index 63f0e73..566d4ec 100644 --- a/exercises/etl/README.md +++ b/exercises/etl/README.md @@ -13,7 +13,7 @@ moaning about how stupid we could possibly be.) ### The goal -We're going to extract some scrabble scores from a legacy system. +We're going to extract some Scrabble scores from a legacy system. The old system stored a list of letters per score: @@ -25,7 +25,7 @@ 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 +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: @@ -46,14 +46,12 @@ 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. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -66,7 +64,8 @@ exercism submit /objective-c/etl/Etl.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/flatten-array/README.md b/exercises/flatten-array/README.md index c4f1e5e..5400786 100644 --- a/exercises/flatten-array/README.md +++ b/exercises/flatten-array/README.md @@ -10,14 +10,12 @@ input: [1,[2,3,null,4],[null],5] output: [1,2,3,4,5] -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -30,7 +28,8 @@ exercism submit /objective-c/flatten-array/FlattenAr ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/gigasecond/README.md b/exercises/gigasecond/README.md index 8f5fd8d..f0698a9 100644 --- a/exercises/gigasecond/README.md +++ b/exercises/gigasecond/README.md @@ -1,17 +1,16 @@ # Gigasecond -Calculate the moment when someone has lived for 10^9 seconds. +Given a moment, determine the moment that would be after a gigasecond +has passed. A gigasecond is 10^9 (1,000,000,000) seconds. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -24,7 +23,8 @@ exercism submit /objective-c/gigasecond/Gigasecond.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/grade-school/README.md b/exercises/grade-school/README.md index 465573e..55f1994 100644 --- a/exercises/grade-school/README.md +++ b/exercises/grade-school/README.md @@ -34,14 +34,12 @@ are some additional things you could try: Then please share your thoughts in a comment on the submission. Did this experiment make the code better? Worse? Did you learn anything from it? -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -54,7 +52,8 @@ exercism submit /objective-c/grade-school/GradeSchoo ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/grains/README.md b/exercises/grains/README.md index 02fa60c..11ff652 100644 --- a/exercises/grains/README.md +++ b/exercises/grains/README.md @@ -6,14 +6,14 @@ on each square doubles. There once was a wise servant who saved the life of a prince. The king promised to pay whatever the servant could dream up. Knowing that the king loved chess, the servant told the king he would like to have grains -of wheat. One grain on the first square of a chess board. Two grains on -the next. Four on the third, and so on. +of wheat. One grain on the first square of a chess board, with the number +of grains doubling on each successive square. -There are 64 squares on a chessboard. +There are 64 squares on a chessboard (where square 1 has one grain, square 2 has two grains, and so on). Write code that shows: -- how many grains were on each square, and -- the total number of grains +- how many grains were on a given square, and +- the total number of grains on the chessboard ## For bonus points @@ -26,14 +26,12 @@ are some additional things you could try: Then please share your thoughts in a comment on the submission. Did this experiment make the code better? Worse? Did you learn anything from it? -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -46,7 +44,8 @@ exercism submit /objective-c/grains/Grains.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/hamming/README.md b/exercises/hamming/README.md index a5741c7..9af832a 100644 --- a/exercises/hamming/README.md +++ b/exercises/hamming/README.md @@ -1,48 +1,34 @@ # Hamming -Calculate the Hamming difference between two DNA strands. +Calculate the Hamming Distance between two DNA strands. -A mutation is simply a mistake that occurs during the creation or -copying of a nucleic acid, in particular DNA. Because nucleic acids are -vital to cellular functions, mutations tend to cause a ripple effect -throughout the cell. Although mutations are technically mistakes, a very -rare mutation may equip the cell with a beneficial attribute. In fact, -the macro effects of evolution are attributable by the accumulated -result of beneficial microscopic mutations over many generations. +Your body is made up of cells that contain DNA. Those cells regularly wear out and need replacing, which they achieve by dividing into daughter cells. In fact, the average human body experiences about 10 quadrillion cell divisions in a lifetime! -The simplest and most common type of nucleic acid mutation is a point -mutation, which replaces one base with another at a single nucleotide. +When cells divide, their DNA replicates too. Sometimes during this process mistakes happen and single pieces of DNA get encoded with the incorrect information. If we compare two strands of DNA and count the differences between them we can see how many mistakes occurred. This is known as the "Hamming Distance". -By counting the number of differences between two homologous DNA strands -taken from different genomes with a common ancestor, we get a measure of -the minimum number of point mutations that could have occurred on the -evolutionary path between the two strands. - -This is called the 'Hamming distance'. - -It is found by comparing two DNA strands and counting how many of the -nucleotides are different from their equivalent in the other string. +We read DNA using the letters C,A,G and T. Two strands might look like this: GAGCCTACTAACGGGAT CATCGTAATGACGGCCT ^ ^ ^ ^ ^ ^^ -The Hamming distance between these two DNA strands is 7. - -# Implementation notes +They have 7 differences, and therefore the Hamming Distance is 7. -The Hamming distance is only defined for sequences of equal length. This means -that based on the definition, each language could deal with getting sequences -of equal length differently. +The Hamming Distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :) -## Setup +# Implementation notes -There are two different methods of getting set up to run the tests with Objective-C: +The Hamming distance is only defined for sequences of equal length, so +an attempt to calculate it between sequences of different lengths should +not work. The general handling of this situation (e.g., raising an +exception vs returning a special value) may differ between languages. -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. +## Getting Started -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -55,7 +41,8 @@ exercism submit /objective-c/hamming/Hamming.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/hello-world/README.md b/exercises/hello-world/README.md index 6c1f6ed..e119c21 100644 --- a/exercises/hello-world/README.md +++ b/exercises/hello-world/README.md @@ -14,14 +14,12 @@ The objectives are simple: If everything goes well, you will be ready to fetch your first real exercise. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -34,7 +32,8 @@ exercism submit /objective-c/hello-world/HelloWorld. ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/isogram/README.md b/exercises/isogram/README.md index a278089..35fcec3 100644 --- a/exercises/isogram/README.md +++ b/exercises/isogram/README.md @@ -13,14 +13,12 @@ Examples of isograms: The word *isograms*, however, is not an isogram, because the s repeats. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -33,7 +31,8 @@ exercism submit /objective-c/isogram/Isogram.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/largest-series-product/README.md b/exercises/largest-series-product/README.md index 269e0d8..4c94f9d 100644 --- a/exercises/largest-series-product/README.md +++ b/exercises/largest-series-product/README.md @@ -13,14 +13,12 @@ in the input; the digits need not be *numerically consecutive*. For the input `'73167176531330624919225119674426574742355349194934'`, the largest product for a series of 6 digits is 23520. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -33,7 +31,8 @@ exercism submit /objective-c/largest-series-product/ ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/leap/README.md b/exercises/leap/README.md index 7b16c1b..6f589ba 100644 --- a/exercises/leap/README.md +++ b/exercises/leap/README.md @@ -13,9 +13,6 @@ on every year that is evenly divisible by 4 For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap year, but 2000 is. -If your language provides a method in the standard library that does -this look-up, pretend it doesn't exist and implement it yourself. - ## Notes Though our exercise adopts some very simple rules, there is more to @@ -26,14 +23,12 @@ phenomenon, go watch [this youtube video][video]. [video]: http://www.youtube.com/watch?v=xX96xng7sAE -## Setup - -There are two different methods of getting set up to run the tests with Objective-C: +## Getting Started -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -46,7 +41,8 @@ exercism submit /objective-c/leap/Leap.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/luhn/README.md b/exercises/luhn/README.md index bffc0e0..0c58e28 100644 --- a/exercises/luhn/README.md +++ b/exercises/luhn/README.md @@ -64,14 +64,12 @@ Sum the digits 57 is not evenly divisible by 10, so this number is not valid. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -84,7 +82,8 @@ exercism submit /objective-c/luhn/Luhn.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/meetup/README.md b/exercises/meetup/README.md index fff4e49..8143508 100644 --- a/exercises/meetup/README.md +++ b/exercises/meetup/README.md @@ -26,14 +26,12 @@ Given examples of a meetup dates, each containing a month, day, year, and descriptor calculate the date of the actual meetup. For example, if given "The first Monday of January 2017", the correct meetup date is 2017/1/2. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -46,7 +44,8 @@ exercism submit /objective-c/meetup/Meetup.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/nth-prime/README.md b/exercises/nth-prime/README.md index ca99a90..ad16660 100644 --- a/exercises/nth-prime/README.md +++ b/exercises/nth-prime/README.md @@ -8,14 +8,12 @@ the 6th prime is 13. If your language provides methods in the standard library to deal with prime numbers, pretend they don't exist and implement them yourself. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -28,7 +26,8 @@ exercism submit /objective-c/nth-prime/NthPrime.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/nucleotide-count/README.md b/exercises/nucleotide-count/README.md index dfef09d..892712c 100644 --- a/exercises/nucleotide-count/README.md +++ b/exercises/nucleotide-count/README.md @@ -12,14 +12,12 @@ Here is an analogy: - legos are to lego houses as - words are to sentences as... -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -32,7 +30,8 @@ exercism submit /objective-c/nucleotide-count/Nucleo ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/pangram/README.md b/exercises/pangram/README.md index dd35be7..1ab6a68 100644 --- a/exercises/pangram/README.md +++ b/exercises/pangram/README.md @@ -8,14 +8,12 @@ The best known English pangram is: The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case insensitive. Input will not contain non-ASCII symbols. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -28,7 +26,8 @@ exercism submit /objective-c/pangram/Pangram.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/pascals-triangle/README.md b/exercises/pascals-triangle/README.md index c31ad51..28fb1c3 100644 --- a/exercises/pascals-triangle/README.md +++ b/exercises/pascals-triangle/README.md @@ -14,14 +14,12 @@ the right and left of the current position in the previous row. # ... etc ``` -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -34,7 +32,8 @@ exercism submit /objective-c/pascals-triangle/Pascal ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/perfect-numbers/README.md b/exercises/perfect-numbers/README.md index 25777b8..e87b8c0 100644 --- a/exercises/perfect-numbers/README.md +++ b/exercises/perfect-numbers/README.md @@ -17,14 +17,12 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -37,7 +35,8 @@ exercism submit /objective-c/perfect-numbers/Perfect ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/phone-number/README.md b/exercises/phone-number/README.md index da7fbde..c09953b 100644 --- a/exercises/phone-number/README.md +++ b/exercises/phone-number/README.md @@ -28,14 +28,12 @@ should all produce the output **Note:** As this exercise only deals with telephone numbers used in NANP-countries, only 1 is considered a valid country code. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -48,7 +46,8 @@ exercism submit /objective-c/phone-number/PhoneNumbe ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/prime-factors/README.md b/exercises/prime-factors/README.md index 51e1628..73e1c06 100644 --- a/exercises/prime-factors/README.md +++ b/exercises/prime-factors/README.md @@ -12,10 +12,10 @@ What are the prime factors of 60? - Our first divisor is 2. 2 goes into 60, leaving 30. - 2 goes into 30, leaving 15. -- 2 doesn't go cleanly into 15. So let's move on to our next divisor, 3. + - 2 doesn't go cleanly into 15. So let's move on to our next divisor, 3. - 3 goes cleanly into 15, leaving 5. -- 3 does not go cleanly into 5. The next possible factor is 4. -- 4 does not go cleanly into 5. The next possible factor is 5. + - 3 does not go cleanly into 5. The next possible factor is 4. + - 4 does not go cleanly into 5. The next possible factor is 5. - 5 does go cleanly into 5. - We're left only with 1, so now, we're done. @@ -29,14 +29,12 @@ You can check this yourself: - = 60 - Success! -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -45,14 +43,16 @@ When submitting an exercise, make sure your solution file is in the same directo The submit command will look something like: ```shell -exercism submit /objective-c/all-your-base/AllYourBase.m +exercism submit /objective-c/prime-factors/PrimeFactors.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. -## Submitting Incomplete Solutions -It's possible to submit an incomplete solution so you can see how others have completed the exercise. ## Source + The Prime Factors Kata by Uncle Bob [http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata](http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata) + +## Submitting Incomplete Solutions +It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/raindrops/README.md b/exercises/raindrops/README.md index f769605..9c7d4ec 100644 --- a/exercises/raindrops/README.md +++ b/exercises/raindrops/README.md @@ -1,30 +1,26 @@ # Raindrops -Convert a number to a string, the contents of which depend on the number's factors. +Your task is to convert a number into a string that contains raindrop sounds corresponding to certain potential factors. A factor is a number that evenly divides into another number, leaving no remainder. The simplest way to test if a one number is a factor of another is to use the [modulo operation](https://en.wikipedia.org/wiki/Modulo_operation). -- If the number has 3 as a factor, output 'Pling'. -- If the number has 5 as a factor, output 'Plang'. -- If the number has 7 as a factor, output 'Plong'. -- If the number does not have 3, 5, or 7 as a factor, - just pass the number's digits straight through. +The rules of `raindrops` are that if a given number: -## Examples - -- 28's factors are 1, 2, 4, **7**, 14, 28. - - In raindrop-speak, this would be a simple "Plong". -- 30's factors are 1, 2, **3**, **5**, 6, 10, 15, 30. - - In raindrop-speak, this would be a "PlingPlang". -- 34 has four factors: 1, 2, 17, and 34. - - In raindrop-speak, this would be "34". +- has 3 as a factor, add 'Pling' to the result. +- has 5 as a factor, add 'Plang' to the result. +- has 7 as a factor, add 'Plong' to the result. +- _does not_ have any of 3, 5, or 7 as a factor, the result should be the digits of the number. -## Setup +## Examples -There are two different methods of getting set up to run the tests with Objective-C: +- 28 has 7 as a factor, but not 3 or 5, so the result would be "Plong". +- 30 has both 3 and 5 as factors, but not 7, so the result would be "PlingPlang". +- 34 is not factored by 3, 5, or 7, so the result would be "34". -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. +## Getting Started -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -37,11 +33,12 @@ exercism submit /objective-c/raindrops/Raindrops.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source -A variation on a famous interview question intended to weed out potential candidates. [http://jumpstartlab.com](http://jumpstartlab.com) +A variation on FizzBuzz, a famous technical interview question that is intended to weed out potential candidates. That question is itself derived from Fizz Buzz, a popular children's game for teaching division. [https://en.wikipedia.org/wiki/Fizz_buzz](https://en.wikipedia.org/wiki/Fizz_buzz) ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/reverse-string/README.md b/exercises/reverse-string/README.md index 364e291..23a8805 100644 --- a/exercises/reverse-string/README.md +++ b/exercises/reverse-string/README.md @@ -1,17 +1,17 @@ # Reverse String -Reverse a string. +Reverse a string -For example: input: "cool" output: "looc" +For example: +input: "cool" +output: "looc" -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -20,15 +20,16 @@ When submitting an exercise, make sure your solution file is in the same directo The submit command will look something like: ```shell -exercism submit /objective-c/robot-name/RobotName.m +exercism submit /objective-c/reverse-string/ReverseString.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source -A debugging session with Paul Blackwell at gSchool. [http://gschool.it](http://gschool.it) +Introductory challenge to reverse an input string [https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb](https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb) ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/rna-transcription/README.md b/exercises/rna-transcription/README.md index 3a762c9..51aba10 100644 --- a/exercises/rna-transcription/README.md +++ b/exercises/rna-transcription/README.md @@ -18,14 +18,12 @@ each nucleotide with its complement: * `T` -> `A` * `A` -> `U` -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -38,7 +36,8 @@ exercism submit /objective-c/rna-transcription/RnaTr ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/robot-name/README.md b/exercises/robot-name/README.md index 44624e6..7d766c4 100644 --- a/exercises/robot-name/README.md +++ b/exercises/robot-name/README.md @@ -2,27 +2,25 @@ Manage robot factory settings. -When robots come off the factory floor, they have no name. +When a robot comes off the factory floor, it has no name. -The first time you boot them up, a random name is generated in the format +The first time you turn on a robot, a random name is generated in the format of two uppercase letters followed by three digits, such as RX837 or BC811. Every once in a while we need to reset a robot to its factory settings, -which means that their name gets wiped. The next time you ask, it will +which means that its name gets wiped. The next time you ask, that robot will respond with a new random name. The names must be random: they should not follow a predictable sequence. -Random names means a risk of collisions. Your solution must ensure that +Using random names means a risk of collisions. Your solution must ensure that every existing robot has a unique name. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -35,7 +33,8 @@ exercism submit /objective-c/robot-name/RobotName.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/roman-numerals/README.md b/exercises/roman-numerals/README.md index 2d704f6..691541e 100644 --- a/exercises/roman-numerals/README.md +++ b/exercises/roman-numerals/README.md @@ -42,14 +42,12 @@ In Roman numerals 1990 is MCMXC: See also: http://www.novaroma.org/via_romana/numbers.html -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -62,7 +60,8 @@ exercism submit /objective-c/roman-numerals/RomanNum ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/run-length-encoding/README.md b/exercises/run-length-encoding/README.md index d00d0a8..a2b1544 100644 --- a/exercises/run-length-encoding/README.md +++ b/exercises/run-length-encoding/README.md @@ -23,14 +23,12 @@ the letters A through Z (either lower or upper case) and whitespace. This way data to be encoded will never contain any numbers and numbers inside data to be decoded always represent the count for the following character. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -43,7 +41,8 @@ exercism submit /objective-c/run-length-encoding/Run ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/say/README.md b/exercises/say/README.md index 9e6a1c1..edb00d8 100644 --- a/exercises/say/README.md +++ b/exercises/say/README.md @@ -24,7 +24,7 @@ Some good test cases for this program are: ### Extension If you're on a Mac, shell out to Mac OS X's `say` program to talk out -loud. +loud. If you're on Linux or Windows, eSpeakNG may be available with the command `espeak`. ## Step 2 @@ -62,14 +62,12 @@ Use _and_ (correctly) when spelling out the number in English: - 1002 becomes "one thousand and two". - 1323 becomes "one thousand three hundred and twenty-three". -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -82,7 +80,8 @@ exercism submit /objective-c/say/Say.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/scrabble-score/README.md b/exercises/scrabble-score/README.md index 874c8ea..8700c00 100644 --- a/exercises/scrabble-score/README.md +++ b/exercises/scrabble-score/README.md @@ -1,6 +1,6 @@ # Scrabble Score -Given a word, compute the scrabble score for that word. +Given a word, compute the Scrabble score for that word. ## Letter Values @@ -39,14 +39,12 @@ And to total: - You can play a double or a triple letter. - You can play a double or a triple word. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -59,7 +57,8 @@ exercism submit /objective-c/scrabble-score/Scrabble ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/secret-handshake/README.md b/exercises/secret-handshake/README.md index 81df49f..239abd6 100644 --- a/exercises/secret-handshake/README.md +++ b/exercises/secret-handshake/README.md @@ -28,14 +28,12 @@ Given the input 19, the function would return the array Notice that the addition of 16 (10000 in binary) has caused the array to be reversed. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -48,7 +46,8 @@ exercism submit /objective-c/secret-handshake/Secret ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/series/README.md b/exercises/series/README.md index 0ecb095..2aeedce 100644 --- a/exercises/series/README.md +++ b/exercises/series/README.md @@ -1,18 +1,18 @@ # Series Given a string of digits, output all the contiguous substrings of length `n` in -that string. +that string in the order that they appear. For example, the string "49142" has the following 3-digit series: -- 491 -- 914 -- 142 +- "491" +- "914" +- "142" And the following 4-digit series: -- 4914 -- 9142 +- "4914" +- "9142" And if you ask for a 6-digit series from a 5-digit string, you deserve whatever you get. @@ -20,14 +20,12 @@ whatever you get. Note that these series are only required to occupy *adjacent positions* in the input; the digits need not be *numerically consecutive*. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -36,11 +34,12 @@ When submitting an exercise, make sure your solution file is in the same directo The submit command will look something like: ```shell -exercism submit /objective-c/sieve/Sieve.m +exercism submit /objective-c/series/Series.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/sieve/README.md b/exercises/sieve/README.md index cef8052..fa67436 100644 --- a/exercises/sieve/README.md +++ b/exercises/sieve/README.md @@ -5,8 +5,8 @@ number. The Sieve of Eratosthenes is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as -composite (i.e. not prime) the multiples of each prime, -starting with the multiples of 2. +composite (i.e. not prime) the multiples of each prime, starting with the +multiples of 2. It does not use any division or remainder operation. Create your range, starting at two and continuing up to and including the given limit. (i.e. [2, limit]) @@ -25,16 +25,16 @@ https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes Notice that this is a very specific algorithm, and the tests don't check that you've implemented the algorithm, only that you've come up with the -correct list of primes. +correct list of primes. A good first test is to check that you do not use +division or remainder operations (div, /, mod or % depending on the +language). -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -47,7 +47,8 @@ exercism submit /objective-c/sieve/Sieve.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/space-age/README.md b/exercises/space-age/README.md index 6628d21..3df29b2 100644 --- a/exercises/space-age/README.md +++ b/exercises/space-age/README.md @@ -2,9 +2,9 @@ Given an age in seconds, calculate how old someone would be on: - - Earth: orbital period 365.25 Earth days, or 31557600 seconds - Mercury: orbital period 0.2408467 Earth years - Venus: orbital period 0.61519726 Earth years + - Earth: orbital period 1.0 Earth years, 365.25 Earth days, or 31557600 seconds - Mars: orbital period 1.8808158 Earth years - Jupiter: orbital period 11.862615 Earth years - Saturn: orbital period 29.447498 Earth years @@ -17,14 +17,12 @@ be able to say that they're 31.69 Earth-years old. If you're wondering why Pluto didn't make the cut, go watch [this youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs). -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -37,7 +35,8 @@ exercism submit /objective-c/space-age/SpaceAge.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/strain/README.md b/exercises/strain/README.md index 655ccb5..38e6c6b 100644 --- a/exercises/strain/README.md +++ b/exercises/strain/README.md @@ -1,35 +1,44 @@ # Strain -Implement the keep and discard operation on collections. Given a collection and a predicate on the collection's elements, keep returns a new collection containing those elements where the predicate is true, while discard returns a new collection containing those elements where the predicate is false. +Implement the `keep` and `discard` operation on collections. Given a collection +and a predicate on the collection's elements, `keep` returns a new collection +containing those elements where the predicate is true, while `discard` returns +a new collection containing those elements where the predicate is false. For example, given the collection of numbers: -1, 2, 3, 4, 5 +- 1, 2, 3, 4, 5 + And the predicate: -is the number even? +- is the number even? + Then your keep operation should produce: -2, 4 -While your discard operation should produce: +- 2, 4 -1, 3, 5 -Note that the union of keep and discard is all the elements. +While your discard operation should produce: -The functions may be called keep and discard, or they may need different names in order to not clash with existing functions or concepts in your language. +- 1, 3, 5 -Restrictions - +Note that the union of keep and discard is all the elements. -The filter/reject/whatchamacallit functionality provided by the standard library should not be used! This should be solved using other basic tools instead. +The functions may be called `keep` and `discard`, or they may need different +names in order to not clash with existing functions or concepts in your +language. -## Setup +## Restrictions -There are two different methods of getting set up to run the tests with Objective-C: +Keep your hands off that filter/reject/whatchamacallit functionality +provided by your standard library! Solve this one yourself using other +basic tools instead. -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. +## Getting Started -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -42,7 +51,12 @@ exercism submit /objective-c/strain/Strain.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + + +## Source + +Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2) ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/sublist/README.md b/exercises/sublist/README.md index a1c2206..994f0fa 100644 --- a/exercises/sublist/README.md +++ b/exercises/sublist/README.md @@ -17,14 +17,12 @@ Examples: * A = [1, 2, 3, 4, 5], B = [2, 3, 4], A is a superlist of B * A = [1, 2, 4], B = [1, 2, 3, 4, 5], A is not a superlist of, sublist of or equal to B -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -37,7 +35,8 @@ exercism submit /objective-c/sublist/Sublist.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/sum-of-multiples/README.md b/exercises/sum-of-multiples/README.md index 5fde47e..a8e9f6d 100644 --- a/exercises/sum-of-multiples/README.md +++ b/exercises/sum-of-multiples/README.md @@ -8,14 +8,12 @@ we get 3, 5, 6, 9, 10, 12, 15, and 18. The sum of these multiples is 78. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -28,7 +26,8 @@ exercism submit /objective-c/sum-of-multiples/SumOfM ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/transpose/README.md b/exercises/transpose/README.md index c827098..b5167d9 100644 --- a/exercises/transpose/README.md +++ b/exercises/transpose/README.md @@ -58,14 +58,12 @@ In general, all characters from the input should also be present in the transpos That means that if a column in the input text contains only spaces on its bottom-most row(s), the corresponding output row should contain the spaces in its right-most column(s). -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -78,7 +76,8 @@ exercism submit /objective-c/transpose/Transpose.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/triangle/README.md b/exercises/triangle/README.md index e3f566e..ace2ab4 100644 --- a/exercises/triangle/README.md +++ b/exercises/triangle/README.md @@ -22,14 +22,12 @@ The case where the sum of the lengths of two sides _equals_ that of the third is known as a _degenerate_ triangle - it has zero area and looks like a single line. Feel free to add your own code/tests to check for degenerate triangles. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -42,7 +40,8 @@ exercism submit /objective-c/triangle/Triangle.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source diff --git a/exercises/two-fer/README.md b/exercises/two-fer/README.md index 17b5998..c37abc6 100644 --- a/exercises/two-fer/README.md +++ b/exercises/two-fer/README.md @@ -2,24 +2,35 @@ `Two-fer` or `2-fer` is short for two for one. One for you and one for me. +Given a name, return a string with the message: + ```text -"One for X, one for me." +One for X, one for me. ``` -When X is a name or "you". +Where X is the given name. -If the given name is "Alice", the result should be "One for Alice, one for me." -If no name is given, the result should be "One for you, one for me." +However, if the name is missing, return the string: +```text +One for you, one for me. +``` -## Setup +Here are some examples: -There are two different methods of getting set up to run the tests with Objective-C: +|Name |String to return +|:-------|:------------------ +|Alice |One for Alice, one for me. +|Bob |One for Bob, one for me. +| |One for you, one for me. +|Zaphod |One for Zaphod, one for me. -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. +## Getting Started -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -32,11 +43,12 @@ exercism submit /objective-c/two-fer/TwoFer.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source -[https://en.wikipedia.org/wiki/Two-fer](https://en.wikipedia.org/wiki/Two-fer) +[https://github.com/exercism/problem-specifications/issues/757](https://github.com/exercism/problem-specifications/issues/757) ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/word-count/README.md b/exercises/word-count/README.md index ed943b0..5b1ccc1 100644 --- a/exercises/word-count/README.md +++ b/exercises/word-count/README.md @@ -1,24 +1,41 @@ # Word Count -Given a phrase, count the occurrences of each word in that phrase. +Given a phrase, count the occurrences of each _word_ in that phrase. -For example for the input `"olly olly in come free"` +For the purposes of this exercise you can expect that a _word_ will always be one of: -```text -olly: 2 -in: 1 -come: 1 -free: 1 -``` +1. A _number_ composed of one or more ASCII digits (ie "0" or "1234") OR +2. A _simple word_ composed of one or more ASCII letters (ie "a" or "they") OR +3. A _contraction_ of two _simple words_ joined by a single apostrophe (ie "it's" or "they're") -## Setup +When counting words you can assume the following rules: -There are two different methods of getting set up to run the tests with Objective-C: +1. The count is _case insensitive_ (ie "You", "you", and "YOU" are 3 uses of the same word) +2. The count is _unordered_; the tests will ignore how words and counts are ordered +3. Other than the apostrophe in a _contraction_ all forms of _punctuation_ are ignored +4. The words can be separated by _any_ form of whitespace (ie "\t", "\n", " ") -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. +For example, for the phrase `"That's the password: 'PASSWORD 123'!", cried the Special Agent.\nSo I fled.` the count would be: -Both are described in more detail here: http://exercism.io/languages/objective-c +```text +that's: 1 +the: 2 +password: 2 +123: 1 +cried: 1 +special: 1 +agent: 1 +so: 1 +i: 1 +fled: 1 +``` + +## Getting Started + +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -31,7 +48,8 @@ exercism submit /objective-c/word-count/WordCount.m ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. + ## Source From 6924ab02f914ed8073a3d7009e342fe5d589b0dd Mon Sep 17 00:00:00 2001 From: "Jeremy W. Sherman" Date: Wed, 30 Oct 2019 15:38:43 -0400 Subject: [PATCH 3/3] Manually update bracket-push README --- exercises/bracket-push/README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/exercises/bracket-push/README.md b/exercises/bracket-push/README.md index 095206e..357d7d3 100644 --- a/exercises/bracket-push/README.md +++ b/exercises/bracket-push/README.md @@ -3,14 +3,12 @@ Given a string containing brackets `[]`, braces `{}` and parentheses `()`, verify that all the pairs are matched and nested correctly. -## Setup +## Getting Started -There are two different methods of getting set up to run the tests with Objective-C: - -- Create an Xcode project with a test target which will run the tests. -- Use the ruby gem `objc` as a test runner utility. - -Both are described in more detail here: http://exercism.io/languages/objective-c +Make sure you have read the [Installing](https://exercism.io/tracks/objective-c/installation) and +[Running the Tests](https://exercism.io/tracks/objective-c/tests) pages for Objective-C on exercism.io. +This covers the basic information on setting up the development +environment expected by the exercises. ### Submitting Exercises @@ -23,7 +21,7 @@ exercism submit /objective-c/bracket-push/BracketPus ``` You can find the Exercism workspace by running `exercism debug` and looking for the line beginning -with Workspace. +with `Workspace:`. ## Source