Refactoring own code is a good practice to keep code in a good shape. Especially after some time being on the project when the architecture is settled and a number of architectural decisions being made.
Some developers invest own time in code refactoring, while others don’t. How to identify the one still has the opportunity to restructure own code and make it better?
On the chart above we see the amount of Technical Debt created by 2 developers that are working on the project. Developer 1 after coding 3 months on the project started to rethinking the code he wrote and gradually decreased the amount of Technical Debt in following months. While Developer 2 never bothered himself with the refactoring merely working on adding new features.
- Take a positive note on the Developer 1 coding culture and conscious approach to keep his code in a good shape.
- Check other projects where Developer 2 is participating to find out if he always skips refactoring/rethinking stage or it was his deliberate decision on this project.
- Motivate Developer 2 to use techniques that can improve his approach to maintaining own legacy code.
Knowing own team better means makes it possible to be proactive, knowing about possible risks faster to tackle them.