in reply to Seek Help Refactoring

I have a few thoughts.
  1. It's pretty obvious that there's further refactoring that can be done. The number of if-else constructs is CodeSmell and indicates that further refactoring can be done.
  2. So long as you maintain the exact same interface and behaviors to the outside world, it doesn't matter how much you have or have not refactored. Basically, this means you should only refactor as much as is necessary for the items you have at the time. Every change is a risk.
  3. Only refactor with an automated test suite. Period, end of story.
  4. The first refactoring that should be done is variable names. It can always be done to any code, period.
  5. If it works, it passes the First Rule.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: Seek Help Refactoring
by moklevat (Priest) on Apr 03, 2006 at 14:13 UTC
    Hot dog! Would you look at that! Here it is only 10 minutes into the work day and I've already learned my "something new" for the day. Thank you dragonchild for introducing me to the term CodeSmell, which I Super Searched to find your helpful Meditation that defined it for me (though I did a bit of Googling too). For the rest of the day everything else will be gravy.