Code refactoring and cleaning out the garage
I made a small mistake recently while refactoring code in a large system written by other people. Refactoring is a functionality-preserving activity. It is usually a mistake to try to add functionality while refactoring; rather, we should make small changes with lots of intermediate testing in order to minimize debugging time (i.e., make one or two changes at atime, and is is more obvious what caused a new bug). I added some functionality to the system that I was refactoring and in the end, I think that it took me more time than breaking this process into two pieces: refactoring, then adding functionality.