jump to navigation

Refactoring your own code… January 30, 2007

Posted by javafoo in java, javanotes, refactoring.
trackback

I can’t describe the kind of high I get when refactoring my own code and that too code that was only written a month ago. And when doing it to my own code, I can be as ruthless as I want to be, without coming off as a jerk or being too intrusive. Right now I can’t believe the kind of bloated code I wrote a month ago, I am reprimanding my self (the month old self) and patting my back (the current self), at the same time. Everything looks and feels so much better now, crisp and concise, each in it’s own little silo. So go ahead, don’t be bashful, refactor away, as many times as possible. You will realize how naiive you were just a few weeks ago. Ok I think I will stop now, sorry this is not exactly a technical kind of post. Just a feel good post, something I wanted to share.

Comments»

1. closingbraces - January 31, 2007

Absolutely agree – no matter how big or small, how bad or ok the old code was, it’s always a high to make it “better”. I get the same kick when a possibly difficult or extensive change turns out to be simple due to good code or previous refactoring. It’s a pity when there’s nobody else to appreciate it, but nice to be able to do it without anyone getting in the way.

The only pity is that there are all these sophisticated refactoring tools, but I still end up doing refactoring mainly by hand (except for trivial renames/moves etc)… because however clever a tool might be with code (and most of them aren’t so smart as to be “trusted” to get it right), it can’t rewrite my Javadoc and test cases for me.

2. arun - March 28, 2007

1. closingbraces – January 31, 2007
Absolutely agree – no matter how big or small, how bad or ok the old code was, it’s always a high to make it “better”. I get the same kick when a possibly difficult or extensive change turns out to be simple due to good code or previous refactoring. It’s a pity when there’s nobody else to appreciate it, but nice to be able to do it without anyone getting in the way.

The only pity is that there are all these sophisticated refactoring tools, but I still end up doing refactoring mainly by hand (except for trivial renames/moves etc)… because however clever a tool might be with code (and most of them aren’t so smart as to be “trusted” to get it right), it can’t rewrite my Javadoc and test cases for me.

2. arun – March 28, 2007
downloadjavanotes