Active software applications are continuously threatened by entropy.
- we write a messy function and forget to refactor later
- a junior developers' code is not given a proper code review
- a feature is completed under a time crunch
One of the methods to combat this entropy is to create time as a team to tackle technical debt and to refactor parts of the application. This inevitable wall of work gets pushed back more and more until it becomes unavoidable.
Yet, this pain can be mitigated.
In a perfect world, one writes perfect code in the first place. But in the real world, challenges arise that force imperfect code that requires maintenance.
Instead of waiting for the unavoidable, focus your efforts on one line of code each day and improve it. One line may be functionally insignificant in a modern application. However, one line of code is one more line than the previous day; and you are probably not the only developer.
Assuming your team has ten developers:
1 line x 10 developers x ~261 work days a year = 2,610 lines of code a year.
Some days you or your team will only improve one line of code each day, and that is fine because often what we need is simply to start and to stay active. You will find that once you have completed one line, you will often improve more lines.
Development is imperfect. But taking five minutes each day to invest in the quality of your application will always be advantageous in the long run.