Agile Zone is brought to you in partnership with:

Gil Zilberfeld has been in software since childhood, writing BASIC programs on his trusty Sinclair ZX81. With more than twenty years of developing commercial software, he has vast experience in software methodology and practices. Gil is an agile consultant, applying agile principles over the last decade. From automated testing to exploratory testing, design practices to team collaboration, scrum to kanban, and lean startup methods – he’s done it all. He is still learning from his successes and failures. Gil speaks frequently in international conferences about unit testing, TDD, agile practices and communication. He is the author of "Everyday Unit Testing", blogs at http://www.gilzilberfeld.com and in his spare time he shoots zombies, for fun. Gil is a DZone MVB and is not an employee of DZone and has posted 76 posts at DZone. You can read more from them at their website. View Full User Profile

Why We Refactor

12.11.2013
| 9606 views |
  • submit to reddit

 Because we know what it is like to read and debug a 500-line 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.

Published at DZone with permission of Gil Zilberfeld, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)