Refactoring journey
Practice refactoring tips to improve your day-to-day efficiency
Last updated
Practice refactoring tips to improve your day-to-day efficiency
Last updated
Practice refactoring tips to improve your day-to-day efficiency
Use your IDE features
Clone the repository here
Make sure you can run the tests
Names of Refactorings :
Write down names of refactorings you already know
Write up names on a whiteboard or flipchart
Remind them some they use probably : Rename Variable and Extract Interface.
Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.
Refactoring (verb): to restructure software by applying a series of refactorings without changing its observable behavior. - Martin Fowler
Refactoring is a systematic process of improving code without creating new functionality that can transform a mess into clean code and simple design.
The main purpose of refactoring is to fight technical debt
If you must deal with someone else’s dirty code, try to refactor it first
Clean code is much easier to grasp
Refactoring makes it easier to add new features
Easier to make changes in clean code
You can copy and paste the code once
BUT when the same code is replicated 3 times, it should be extracted into a new procedure
Clean your code and the errors will practically discover themselves.
Code review may be the last chance to tidy up the code before it becomes available to the public
Best to perform reviews in a pair with an author : you could fix simple problems quickly
Dev teams can create technical debt consciously at one time and book some time later to tackle it
There are two cases when tests can break down after refactoring :
You made an error during refactoring
Go ahead and fix the error
Your tests were too low-level (for example, you were testing private methods of classes)
In this case : the tests are to blame
Either refactor the tests themselves or write an entirely new set of higher-level tests
Follow the journey step by step as explained in my website :
Learning feedback
Each participant add his/her name on the quadrant
Please explain why you are there