Developing is great. refactoring is amazing. Don't make it at the same time
TL;DR: Don't change functionally and refactor at the same time.
Problems
Hard to review solutions
Merge Conflicts
Solutions
- Never change functionality while refactoring
Context
Sometimes we detect a refactoring is needed for further development.
We are experts at learning.
We should put our solution on hold. Work on the refactoring, and continue with our solution.
Sample Code
Wrong
getFactorial(n) {
return n * getFactorial(n);