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…)

Code Reviews: How Far Down the Rabbit Hole Do We Go?

“I only modified one line of the file, why should I be responsible for fixing the coding style of the whole thing?” That was my first reaction when participating in a full-scale code review at one of the software companies I worked for. Then, if I do have to fix the coding style, my name is going to be on the blame list when somebody checks version control for who wrote that section of code. How far should we take fixing things during reviews? (more…)