Agile Zone is brought to you in partnership with:

Gil Zilberfeld has been in software since childhood, starting out with Logo turtles. With more than 15 years of developing commercial software, he has vast experience in software methodology and practices. Gil is the product manager at Typemock, working as part of an agile team in an agile company, creating tools for agile developers. He promotes unit testing and other design practices, down–to–earth agile methods, and some incredibly cool tools. Gil speaks locally in Israel and internationally about unit testing, TDD, and agile practices and communication. And in his spare time he kills dragons, for fun. Gil blogs at http://www.gilzilberfeld.com on different agile topics, including processes, communication and unit testing. Gil is a DZone MVB and is not an employee of DZone and has posted 53 posts at DZone. You can read more from them at their website. View Full User Profile

Why We Refactor

12.11.2013
| 8992 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.)