Why Refactor?

Why does software development require refactoring?

“What does this ‘refactor’ word you keep using really mean . . .?”

I could almost hear the client’s eyes and nose scrunching up in scrutiny. We were talking about realistic budgets and schedules for a potentially large, multi-developer feature addition to his existing application.

I switched gears, put on my imaginary professor glasses and set my imaginary apple on the corner of my desk.

“Well, you are right. It’s part of the software development and developers’ lexicon. It’s a word that means – sort of – ‘optimize’ or ‘clean up’ or ‘tighten’ and, really, all three of these things at once.”

“So, the code is dirty?” he intoned. I could hear the silent thought bubble form above his head — “but-I’m-paying-you-NOT-to-write-bad-code!” (more…)