Staying on Track with Code Refactoring
- Add missing tooling to enable more maintainable and efficient development in TypeScript.
- Refactor implementation.
- Refactor the UI.
I thought this would be a straightforward process, but I soon learned that the biggest obstacle was actually psychological. As I began refactoring, I found myself getting sidetracked by disorganization or flaws in some implementations, and I would start refactoring those areas without sticking to the plan. This caused the scope of the project to become bigger and bigger, and I ended up spending more time fixing bugs than I had intended.
I am now working on controlling this tendency and reminding myself to take things one step at a time and stick to the plan. It's important to recognize that psychological factors can be just as much of a barrier to writing code as technical ones.