Refactoring

July 25, 2012

Programs rot. Without tender love and care, they become unmaintainable. They only way to fight this process is through continuous refactoring.

A feature is not done when its working. Its done after its working and refactored. There is no set and forget in the software world. If we move on from a piece of code, before we refactor, we add to the projects technical dept. Do this too often, and the team will be forced to try and write a check that it can’t cash.

If you are afraid to refactor, as it might break existing code, write more tests. Tests prove that software works. With near 100% test coverage one can be sure that if the test pass, nothing is broken. Keep writing tests until your fears are gone. With no fear, a team can refactor to their hearts’ content.


Profile picture

Written by Eric Koslow a programmer with too much time on his hands You should follow them on Twitter