Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Refactoring practice

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am going through M.Fowler's Refactoring book, and want to apply the principles on actual code. I don't have an ample source of code needing refactoring to really practice on, and I was wondering if someone had any suggestions of a place to get code that could use refactoring, ie. maybe someone is a professor teaching refactoring and has source code on the Internet somewhere or something like that. Thanks for any help,
OP
 
Sheriff
Posts: 16660
278
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest trying to go through the Cattle Drive and practice refactoring your own code.
After I started reading the Refactoring book, I found myself programming very differently. One thing about trying to do refactoring is that it is more difficult to do without a set of unit tests. So the first change I had to go through was adopting to the test-first programming strategy. JUnit rocks!
The next change was adopting the XP "Do the simplest thing that could possibly work" approach to design. That was a bit tougher to do because I was used to doing big design up front. However, refactoring is easiest to do within the context of an evolving design rather than in one that is being extensively or totally reworked. By starting with a simple design and evolving to a more complex one, refactoring occurs constantly but gradually. The saying that "All complex systems that work are invariably found to have evolved from simple systems that work" comes to mind.
I started a thread a few weeks back in the Process, XP, RUP, UP forum where I was trying to show an example of refactoring and evolving design. I stopped midway because few people seemed interested in discussing it but if you're interested, I'd be glad to pick it up again with you. Look for "Bowling" in the subject.
Junilu Lacar

Originally posted by octavyn pittman:
I am going through M.Fowler's Refactoring book, and want to apply the principles on actual code. I don't have an ample source of code needing refactoring to really practice on, and I was wondering if someone had any suggestions of a place to get code that could use refactoring, ie. maybe someone is a professor teaching refactoring and has source code on the Internet somewhere or something like that. Thanks for any help,
OP


 
octavyn pittman
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I'll take a look... OP
reply
    Bookmark Topic Watch Topic
  • New Topic