Skip to content

Commit

Permalink
Better instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Vincent committed Aug 2, 2024
1 parent 0cf6494 commit c22684b
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 27 deletions.
3 changes: 2 additions & 1 deletion dvd-store/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ep2 kata
# Code quality workshop
The objective of this session is to stimulate the team spirit, and illustrate the benefits of good practice:
- Work in pairs
- Code quality
- Write tests to ensure quality
- Coding conventions

Expand Down
57 changes: 40 additions & 17 deletions dvd-store/instructions/Requirements.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,60 @@
Please find below the requirements for the workshop "Best practice & code quality"

___

<img src="../media/fire-leaving.jpg" alt="Example image" width="1620" height="400"/>


**It is strongly recommended to implement them in order, as the complexity increases.**

Don't worry if you don't have enough time to finish : Focus on the journey, not the destination

Req 0 is not very clear, but introducing Movie object will be a huge benefit for the next requirement.
Req 1 is tougher as you will discover lots of problems, hence lots of refactoring on top of the requirement itself
* Req 0 is not very precise and there is several option to implement it, but introducing Movie object will be a huge benefit for the next requirement.
* Req 1 is tougher as you will discover lots of problems, hence lots of refactoring on top of the requirement itself

To help you, some hints are available in the requirements, but don't hesitate to ask for more.

As hiring a PO was too expensive, and his job can't be too complicated, the owner of the shop will be your PO for the day.

## ------- Requirement 0 --------

The future is in content... so the business doesn't know the difference between a DVD and a VideoTape... everything you can watch will now be a Movie !
All next requirements will be for Movies from now on.
___

Hint :
This requirement is a good opportunity to get rid of all the petty details slowing you down : confusing names, lack of unit-tests, language barrier, etc...
## Requirement 0 : Refactor and introduce Movie concept


## ------- Requirement 1 --------
<div style="display: flex; align-items: center;">
<img src="../media/movies.jpg" alt="Example image" width="80" height="80" style="margin-right: 10px;"/>
<p style="margin-bottom: 0; margin-top: 0;">The future is in content... so the business doesn't know the difference between a DVD and a VideoTape... everything you can watch will now be a Movie !
All next requirements will be for Movies from now on</p>
</div>

We're running out of business because we're not making enough money!
<br>
<details> <summary>Hint</summary>
Movie could be a new interface,or a new abstract class, you may also need a new enum for the type of movie (DVD, VideoTape).
This is a good opportunity to get rid of all the petty details slowing you down:

We're gonna change the way we price :
* Confusing names
* Lack of unit-tests
* Language barrier
</details>

The quality of a DVD will drop down with each renting..... so the value should decrease as well.
___

## Requirement 1 : new pricing logic

### Here are the pricing rules :

Price for a DVD = 10 if it was released more than 10 years ago
<div style="display: flex; align-items: center;">
<img src="../media/money.jpg" alt="Example image" width="80" height="80" style="margin-right: 10px;"/>
<p style="margin-bottom: 0; margin-top: 0;"> We're running out of business because we're not making enough money!
We're gonna change the way we price :
The quality of a DVD will drop down with each renting..... so the value should decrease as well.</p>
</div>

Actual logic other case , max price is 23 for any movie
### Here are the pricing rules :

Oh, and I'm a huge fan of Tom Cruise, every movie is a masterpiece ! Then price when Tom is within a movie should be 15
* Price for a DVD = 10 if it was released more than 10 years ago
* Actual logic other case , max price is 23 for any movie
* Oh, and I'm a huge fan of Tom Cruise, every movie is a masterpiece ! Then price when Tom is within a movie should be 15

Add an API that gives the price for a movie ( ISBN ), provide the two prices DVD / VideoTape is possible.

Expand All @@ -50,5 +72,6 @@ This requirement is a good opportunity to get rid of all the petty details slowi
{ price : yyy, type : Video }
]_

Hint :
- add unit-test for the existing and the new pricing rules
<details> <summary>Hint</summary>
Add unit-test for the existing and the new pricing rules. I'm not sure the owner realized some of his instructions are contradictory...
</details>
16 changes: 7 additions & 9 deletions dvd-store/instructions/Session-timetable.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Planning - March 2023 workshop sessions
# Planning - workshop sessions

## Before the session

Expand All @@ -13,16 +13,16 @@ join metro-retro, send people to rooms, solve any issue to get the codebase runn

### 2h15-2h30 : Requirements will be given... let the fun begin !

Each team will then create his own branch ( `kata_YYYYMMDD_groupX` ) from `workshop/step0-initial-state` and work on it.
Each team will then create his own branch ( `workshop_YYYYMMDD_groupX` ) from `master` and work on this branch.

Teams may decide how they will work ( pair programming ? parallel programming ? story separated ? unit-tests ? screen-share ? CodeWithMe Plugin ? Cool team name ? Coffee break ?)
Teams may decide how they will work ( pair programming ? commit frequency ? parallel programming ? story separated ? unit-tests ? screen-share ? CodeWithMe plugin ? cool team name ? coffee break ? what do you want on your pizza ?)

The objective is to implement the given requirements and leverage the overall quality. Best effort strategy.
The objective is to implement the given requirements and leverage the overall quality, and to share with your team. Best effort strategy.


### 15 minutes end session
### Debrief session

Don't forget to commit changes and push your branches !
Don't forget to commit changes and push your branches ! Your code will be reviewed by your peers !

Quick debriefing, poll to gather feedbacks, feelings and improvements.

Expand All @@ -33,12 +33,10 @@ People can decide to work a bit longer on the requirements if they want to.

The poll will remain open until the debrief session

I will review each branch, to build the debrief-session ( and improve the quality of the workshop of course ! ).


## Debrief session

Will happen some weeks after the workshop, most likely in a fo info-session and will be recorded
Will happen some weeks after the workshop with not only your cohort, interactive kahoot

Clean code & code - quality - Wall of shame - resources - Q&A

Binary file added dvd-store/media/fire-leaving.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dvd-store/media/money.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dvd-store/media/movies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c22684b

Please sign in to comment.