From 5d8b18b3a23070e84cc92ee738ca807329f7d15b Mon Sep 17 00:00:00 2001 From: Oskars Ozols Date: Fri, 3 Apr 2020 15:04:59 +0300 Subject: [PATCH] Changed weeks to steps and fixed grammar errors. Only step4 was identified as renamed/modified. --- README.md | 14 ++++++-------- step_2.md | 27 +++++++++++++++++++++++++++ step_3.md | 32 ++++++++++++++++++++++++++++++++ week_4.md => step_4.md | 8 ++++---- step_5.md | 10 ++++++++++ week_2.md | 27 --------------------------- week_3.md | 32 -------------------------------- week_5.md | 10 ---------- 8 files changed, 79 insertions(+), 81 deletions(-) create mode 100644 step_2.md create mode 100644 step_3.md rename week_4.md => step_4.md (75%) create mode 100644 step_5.md delete mode 100644 week_2.md delete mode 100644 week_3.md delete mode 100644 week_5.md diff --git a/README.md b/README.md index c30eeedd..f7838e14 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This code Kata is an extended version of https://github.com/arolla/Craft_Your_Sk 1. Choose your programming language 2. Choose testing framework -3. Read this week's task +3. Read task of this step 4. Start by creating Unit tests 5. Watch as tests fail 6. Create commit @@ -14,20 +14,18 @@ This code Kata is an extended version of https://github.com/arolla/Craft_Your_Sk 9. Refactor code (if needed) 10. Retest 11. Create commit -12. Move to next week (start from 3rd point) +12. Move to next step (start from 3rd point) 13. (bonus) Get 100% (or close) Code Coverage 14. Create pull request -After finishing all weeks, make a pull request which contains all tests and implementation. - ## Let's Begin Hello, -Welcome in our brand new startup where everything has to be done ! +Welcome in our brand new startup where everything has to be done! -"Week 1" : +"Step 1": We just got some cash to implement a big part of our first feature. We need you to implement a service (we will let aside the Rest/web service side of it). -It will take a number (positive integer) and provide : +It will take a number (positive integer) and provide: - "Foo" if this number is multiple of 3 - "Bar" if this number is multiple of 5 @@ -35,4 +33,4 @@ If number have several multiples, they appear in natural order (Foo, Bar). We will return the given number as a string if there is no transformation to do. -Once this step is complete, read and do [week 2](./week_2.md). +Once this step is complete, read and do [step 2](./step_2.md). diff --git a/step_2.md b/step_2.md new file mode 100644 index 00000000..31bb9362 --- /dev/null +++ b/step_2.md @@ -0,0 +1,27 @@ + +Here is "Step 2" : +You made it in time, thanks! +Clients have a good use of it, but are unhappy as Qix is missing! +In the rush we forgot to give you **a last rule in bold**. + +It will take a number (positive integer) and provide: +- "Foo" if this number is multiple of 3 +- "Bar" if this number is multiple of 5 +- **"Qix" if this number is multiple of 7** + +If number have several multiples, they appear in natural order (Foo, Bar, Qix). + +We will return the given number as a string if there is no transformation to do. + +Easy right! +Hum. +Right? +Hum, hum. + +Now we are making money with satisfied customers! +As with all successful software, people use it and trust you to them more with it! +Did you notice, the more successful a software is, the more evolutions it has to implement? +We do as TDD helps deploying "almost bug free" software by implementing the features right. +*Note that BDD helps us to implement the right feature !* + +Let's go to next step, the [sttep 3](./step_3.md), where real problems begins. diff --git a/step_3.md b/step_3.md new file mode 100644 index 00000000..efc8cf8c --- /dev/null +++ b/step_3.md @@ -0,0 +1,32 @@ +Here is "Step 3": +With the money we earned, we are able to go on with our product, so keep up the good work! + +We need to keep all previous functionalities, this is mandatory for our reputation! + +So we need to keep previous rules for our API: +It will take a number (positive integer) and provide: +- "Foo" if this number is multiple of 3 +- "Bar" if this number is multiple of 5 +- "Qix" if this number is multiple of 7 + +If number have several multiples, they appear in natural order (Foo, Bar, Qix). + +We will return the given number as a string if there is no transformation **at all** (not in the old rules, nor in the new rules) to do. + +The new rules are : +If the given number contains specific digit, we will append a word to the transformation in the order they appear in the number. +So if a number contains : +- 3, then we append "Foo" +- 5, then we append "Bar" +- 7, then we append "Qix" + +So we may have multiples followed by occurrences. + +Here, you have to add test for the new functionality and add some to test numbers that triggers both functionality in order to know if they work well together. +You have two main options to do that : +1. Update existing tests with cases that trigger only the multiples, and add tests that triggers only occurrences (then ones that triggers both). +2. Update existing tests to call new services or package visible's methods : one dedicated to multiples, the other to occurrences, and original service will call both of them to integrate them (without regressions, of course). + +Let's go to next step, the [step 4](./step_4.md) will be something new. + + diff --git a/week_4.md b/step_4.md similarity index 75% rename from week_4.md rename to step_4.md index 0537ca2b..c93846ec 100644 --- a/week_4.md +++ b/step_4.md @@ -1,4 +1,4 @@ -Here is "Week 4": +Here is "Step 4": Our FooBarQix service is up and running. Based on feedback we have decided to create **new service InfQixFoo**. So, we need to create another service InfQixFoo. FooBarQix service stays as it is, this is mandatory for our reputation! @@ -8,11 +8,11 @@ InfQixFoo will take a number (positive integer) and provide : - "Qix" if this number is multiple of 7 - "Foo" if this number is multiple of 3 -If number have several multiples, they appear in order **(Inf; Qix; Foo). We will use semicolon as seperator.** +If number have several multiples, they appear in order **(Inf; Qix; Foo). We will use semicolon as separator.** We will return the given number as a string if there is no transformation at all to do. -If the given number contains specific digit, we will apppend a word to the transformation in the order they appear in the number. +If the given number contains specific digit, we will append a word to the transformation in the order they appear in the number. So if a number contains : - 3, then we append "Foo" - **8, then we append "Inf"** @@ -21,7 +21,7 @@ So if a number contains : So we may have multiples followed by occurrences. -Let's go to [final week](./week_5.md). +Let's go to [final step](./step_5.md). diff --git a/step_5.md b/step_5.md new file mode 100644 index 00000000..c68d4eca --- /dev/null +++ b/step_5.md @@ -0,0 +1,10 @@ +Here is "Step 5" (the last one) : + +We need to update InfQixFoo with new functionality and keep all previous functionalities. + +**If sum of all digits is multiple of 8, we will append “Inf” at the very and of response, e.g. (Inf; Qix; FooInf)** + + + +Now it's time for your pull request! + diff --git a/week_2.md b/week_2.md deleted file mode 100644 index 573421b6..00000000 --- a/week_2.md +++ /dev/null @@ -1,27 +0,0 @@ - -Here is "Week 2" : -You made it in time, thanks ! -Clients have a good use of it, but are unhappy as Qix is missing ! -In the rush we forgot to give you **a last rule in bold**. - -It will take a number (positive integer) and provide : -- "Foo" if this number is multiple of 3 -- "Bar" if this number is multiple of 5 -- **"Qix" if this number is multiple of 7** - -If number have several multiples, they appear in natural order (Foo, Bar, Qix). - -We will return the given number as a string if there is no transfomration to do. - -Easy rigth ! -Hum. -Rigth ? -Hum, hum. - -Now we are making money with satisfied customers ! -As with all successfull software, people use it and trust you to them more with it ! -Did you notice, the more sucessfull a software is, the more evolutions it has to implement ? -We do as TDD helps deploying "almost bug free" softwares by implementing the features right. -*Note that BDD helps us to implement the right feature !* - -Let's go to next week, the [week 3](./week_3.md), where real problems begins. diff --git a/week_3.md b/week_3.md deleted file mode 100644 index 714e85c6..00000000 --- a/week_3.md +++ /dev/null @@ -1,32 +0,0 @@ -Here is "Week 3": -With the money we earned, we are able to go on with our product, so keep up the good work !!! - -We need to keep all previous functionnalities, this is mandatory for our reputation ! - -So we need to keep previous rules for our API : -It will take a number (positive integer) and provide : -- "Foo" if this number is multiple of 3 -- "Bar" if this number is multiple of 5 -- "Qix" if this number is multiple of 7 - -If number have several multiples, they appear in natural order (Foo, Bar, Qix). - -We will return the given number as a string if there is no transformation **at all** (not in the old rules, nor in the new rules) to do. - -The new rules are : -If the given number contains specific digit, we will apppend a word to the transformation in the order they appear in the number. -So if a number contains : -- 3, then we append "Foo" -- 5, then we append "Bar" -- 7, then we append "Qix" - -So we may have multiples followed by occurrences. - -Here, you have to add test for the new functionnality and add some to test numbers that triggers both functionnality in order to know if they work well together. -You have two main options to do that : -1. Update existing tests with cases that trigger only the multiples, and add tests that triggers only occurences (then ones that triggers both). -2. Update existing tests to call new services or package visible's methods : one dedicated to multiples, the other to occurences, and original service will call both of them to integrate them (without regressions, of course). - -Let's go to next week, the [week 4](./week_4.md) will be something new. - - diff --git a/week_5.md b/week_5.md deleted file mode 100644 index 194eeeed..00000000 --- a/week_5.md +++ /dev/null @@ -1,10 +0,0 @@ -Here is "Week 5" (the last one) : - -We need to update InfQixFoo with new functionality and keep all previous functionalities. - -**If sum of all digits is multiple of 8, we will apppend “Inf” at the very and of response, e.g. (Inf; Qix; FooInf)** - - - -Now it's time for your pull request! -