Refactor this
September 24th, 2008 by Honey
I’m pretty busy at work. I’ve taken on the task of refactoring code that I wrote last year that was a refactoring of code that had existed for a long time. When I performed the initial rewrite, I was extremely careful, as I had a very limited understanding of all the interfaces that would be wrecked by the changes I was making. I brought over a lot of bad (or useless) code as a result.
Eventually, I refactored the interfaces, and then I was in total and complete control. Once I had cleaned up all the ins and outs of the dependent applications, I was free to completely tear down everything I had built last year and start over from scratch, this time with maximum elegance and simplicity.
Refactoring gives me a chance to witness my own improvement as a developer. We don’t do code reviews around here, so I self critique my work based on code developed by my peers both here at Mentor Graphics and also in the ColdFusion blog community. I am shocked by how different my coding style is now as opposed to last year. Everything I write is more clear, understandable, consistent, and more closely follows the best practices established by the community. I am very impressed with myself.
Refactoring code is one of my most favorite things to do. Highlights of my work experience include numerous occasions when I’ve taken hundreds of lines of code and replaced the same features with one or two lines. I love facing a tangled mess, a painful pit of gunk, and delicately unraveling the spaghetti. Luckily for me, ColdFusion developers are really good at writing code that is over-engineered and terribly difficult to follow. I would absolutely love to travel the world as a ColdFusion superhero who turns giant, impenetrable knots into beautiful masterpieces.
Refactoring is not just for programming, either. I am constantly changing the way that I do things in an effort to discover the most appropriate solution. I refactor my commute and my morning routine and my diet and my exercise and my attitude and my addictions.
Side note: I thought of this as a blog post because of Barney and especially the line “Does anyone NOT like refactoring? If so, raise your hand so I’ll know who to slap. ;)” I probably wouldn’t slap you, I’d just tilt my head to the side and look at you like you just sprouted antlers on your head.
Related posts
- No related posts found.


No comments yet.