Skip to content

Commit

Permalink
Changed weeks to steps and fixed grammar errors. Only step4 was ident…
Browse files Browse the repository at this point in the history
…ified as renamed/modified.
  • Loading branch information
OskarsOzols committed Apr 3, 2020
1 parent 1e1c9e4 commit 5d8b18b
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 81 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,25 +14,23 @@ 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

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).
27 changes: 27 additions & 0 deletions step_2.md
Original file line number Diff line number Diff line change
@@ -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.
32 changes: 32 additions & 0 deletions step_3.md
Original file line number Diff line number Diff line change
@@ -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.


8 changes: 4 additions & 4 deletions week_4.md → step_4.md
Original file line number Diff line number Diff line change
@@ -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!
Expand All @@ -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"**
Expand All @@ -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).



10 changes: 10 additions & 0 deletions step_5.md
Original file line number Diff line number Diff line change
@@ -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!

27 changes: 0 additions & 27 deletions week_2.md

This file was deleted.

32 changes: 0 additions & 32 deletions week_3.md

This file was deleted.

10 changes: 0 additions & 10 deletions week_5.md

This file was deleted.

0 comments on commit 5d8b18b

Please sign in to comment.