http://www.ribbonfar...dan-kartik-keith/
The act of refactoring is a revisiting, an attempt at understanding the pathways of thought that led to a particular result, and experiments in improving upon it. This is a sort of temporally-displaced empathy, putting yourself in past-you’s shoes, or in the shoes of prior wayfarers. Choices that may appear perverse or horrifying from the outside may be found, on reflection, to be less unreasonable than first thought, as the technical limitations, skill limitations, or political constraints upon the original solution come to light. (The reverse may instead be true; choices you thought noble may turn out to have been thoroughly venal).