A bit of inspiration most weekdays for exploring your mindset .

Always refactor the code

Khem Raj March 04, 2025 #meta

Writing new software is always exciting, adding new features, even solving a hard bug provides immense satisfaction. However, every line of code that is added today becomes part of technical debt next moment after its committed.

Keeping technical debt in check is essential for a project to have a long life and evolve. Finding ways to address technical debt should be high priority task. One simple technique that can help is to refactor the code. Refactoring as you go and piece meal it. Grand refactoring can get the attention however, it is quite disruptive. Therefore, whenever there is an opportunity to refactor while implementing a new feature, consider adding it as code improvement "Do XYX while here"

Its iterative and when you look back after a year of practice you might have refactored more code than you would think.

As a good byproduct this helps reduce complexity