Refactoring journey
This journey is available in java and scala
How to start ?
- Clone the repository
Lazy you will be
-> use your IDE
Don’t forget the Golden Rule
We will refactor code : Improve the Design of existing code.
The approach (Kent Beck wisdom) :
- First, make the change easy (refactor)
- Then, make the easy change
Before any changes :
- Check the tests
- Make sure they are all Green
I strongly advise to use the Split Feature of your IDE to organize your work
Prerequisites
- Java 9
- Your favorite IDE :
- IntelliJ or Eclipse
- Lombok plugin
Solutions
- A refactored version of the code is available in the
solution
branch - A step by step solution guide for Scala is available here
Table of contents
- Composing Methods
- Moving Features
- Organizing Data
- Simplifying Conditional Expressions
- Simplifying Method Calls
- Dealing With Generalization