Because we know what it is like to read and debug a 500 lines method . And we don’t want to go through it again.
Because we’re sure the other guys’ code can use improvement. Even if they thought otherwise.
Because we can’t think at the same time about both the solution and its readability. Even if we think we can.
Because there’s a good chance that our current design is not the best ever. Even if we think it is.
Because we want to decouple how we feel from what we write. Even if that elation of “I’m so close to pulling this off” is actually behind pulling it off.
Because we understand that our code has economic consequences for years to come. Even if we’re concentrating on solving that one bug that’s been haunting us for a week.
Because everything we write for the first time sucks. Even if it works.
Because we’re professional.
2 comments on “Why We Refactor”