CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Ben Reichelt's Weblog


Refactoring to Patterns



Comments

yudanja said:

I disagree with the previous post to a point. While by true definition it might not be refactoring how many developers simply refactor code just to refactor. Typically you are refactoring b/c what you are trying to do can't be done well with the current implimentation. Don't be so picky. It is refactoring but the developer is also adding more functionality.
# July 11, 2005 4:53 AM

breichelt said:

I think yudanja has it right. While I was adding some functionality, I still refactored the current implementation that returned the m3u file. That code was no longer in the page, but rather in the M3UPlaylist class. Had I stopped there it would just be refactoring, but then I went and also added functionality for the other 2 playlist types.
# July 11, 2005 5:44 AM

Kerpal said:

For the results of your refactoring to be verifiable, you should first re-structure the code without adding any additional functionality. Only when this is complete, and your unit tests still pass, should you add anything new.

It sounds like this is pretty much what you did, but this wasn't made clear in the original post.
# July 11, 2005 6:59 PM
Check out Devlicio.us!

Our Sponsors

Proudly Partnered With