Skip to content

Commit 2d712bc

Browse files
update instructions (#18)
Co-authored-by: guillaume prof <[email protected]>
1 parent d383a0c commit 2d712bc

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Refactoring Golf
22
![illustration code golf]( ./code_golf.png "it's you 😅")
33

4+
45
## Instructions
56

67
npm install -g npm@latest
@@ -35,21 +36,32 @@ yarn test
3536
yarn test:ci
3637
```
3738

38-
## Game
39+
# Fight the code smells
40+
- https://www.opsera.io/blog/what-is-code-smell
41+
- https://blog.codinghorror.com/code-smells/
42+
43+
![illustration code](https://osu-wams-blogs-uploads.s3.amazonaws.com/blogs.dir/6221/files/2023/01/image.png)
3944

45+
## on your Forked Project
4046

41-
- Start on hole 1 and refactor the code to be like the code in hole 2
47+
- put your names in README ETUDIANTS.md; commit and push.
48+
- Create a Pull Request on Exo01
4249
- Use a diff tool to see the differences in code between the starting hole and end hole
43-
- Move to hole 2 and refactor the code from hole 2 to be like the code in hole 3
44-
- Apply the same pattern until you reach hole 13
50+
- write your annotations, remarks... spot the problem(s)
51+
- make a refactoring to the code, to fix the problem
52+
- be sure the tests are green
53+
- review your changes
54+
- push (but don't merge) the pull request to the original repository
55+
56+
- Move to Exo 2 and do the same to refactor the code from Exo 2 to be like the code in Exo 3
57+
- Apply the same pattern until you reach hole 8
4558
- Remember to keep the code compiling and the tests passing at all times during the refactor
4659
- For every refactor, run the tests, and if they pass, commit
4760
- It's okay, and actually heavily encouraged, to revert back to a previous working state at any moment
48-
- Give each hole at least 3 attempts for each run.
61+
4962

5063
## Before you start
5164

52-
- Make sure you have identified as many code smells on the starting hole as possible.
5365
- Make sure the code builds, and tests are passing `yarn test`
5466

5567
## First run
@@ -61,22 +73,10 @@ yarn test:ci
6173
- do the refactoring
6274
- create a Pull Request
6375

64-
## Second run
76+
## other runs
6577

6678
- Refactor the code following the treatment available for each code smell in <https://refactoring.guru/refactoring/smells>.
67-
- Using pen and pencil, take note of the following:
68-
- For every compilation error you get during or after a refactor, count 1 strike.
69-
- For every failing test during or after a refactor, count 2 strikes.
70-
71-
## Third run
72-
73-
- Refactor the code following the treatment available for each code smell in <https://refactoring.guru/refactoring/smells>. Use automated IDE refactoring as much as possible.
74-
- Using pen and pencil, take note of the following:
75-
- For every manual edit, count 1 strike.
76-
- Any code formatting applied does not count as a manual edit
77-
- Deleting blank lines or blank spaces does not count as a manual edit
78-
- For every compilation error you get during or after a refactor, count 1 strike.
79-
- For every failing test during or after a refactor, count 2 strikes.
79+
8080

8181
## Refactoring Priority Premise
8282

0 commit comments

Comments
 (0)