Share via


Refactoring Party

In What are my Goals?, Jim asked:

How do you plan to "Develop a culture of energy, productivity, and learning on the team"?

One of the activities I have in mind is a reoccurring Refactoring Party. It works like this:

Each week we come together for an hour to practice Refactoring. You bring a piece of code & we will refactor it as a group. The code can be:

  • Something you came across that’s so bad you want to show us so we can have a good chuckle.   After we clear the milk from our noses, we’ll get serious & refactor it, making the code as clean as possible.

  • Something you came across that’s so bad you don’t even know where to begin.   We’ll start refactoring & see how clean we can get it.

  • A piece of code you wrote that you’re really proud of, because it’s so clear.   You want to show it off to us, so we can appreciate your genius. We’ll burst your bubble by pointing out ways to make it better. <evil grin>

There are couple things I hope to get out of it:

Practice of the actual act of Refactoring. It’s a skill, and practice is important.

Shared learning about selecting Refactorings. Deciding where to go with the code can be challenging, and everyone may have a different answer; we can learn by sharing these ideas.

Exposure to the ideal can change your thinking. Seeing the result of the refactoring effort can inspire you to think in new ways about just what “clear code” really means.

Comments

  • Anonymous
    July 01, 2004
    Sounds good, and if you posted the original code, the results and some information on the reasons for making it into what it is in the end you would have a VERY nice cathegory on your blog.

  • Anonymous
    July 01, 2004
    I think you're onto something here. Can we have a regional Refactoring Party chapter?

  • Anonymous
    July 01, 2004
    Olle: I think you're right. One of the things I liked about Ron Jeffries' EPAiC# (see my sidebar) is that he leaves in all his mistakes, and just shows the steps he went through.

    Problem is, much of the code we look at is Microsoft Confidential; I don't have permission to post it publicly.

    sigh

    Hoping for Microsoft going 100% open source...

  • Anonymous
    July 01, 2004
    The comment has been removed

  • Anonymous
    July 01, 2004
    Pair programming on a grander scale.

    It is kind of like code review live.

    You have to have a comfortable team to start with. Some people would certainly be intimidated by this. My goal is always to be better, so I think I would be okay, but I am sure some on my team would freak if we tried this.

  • Anonymous
    July 01, 2004
    I guess the hard part is to not put down those who wrote the bad code. You want to be encouraging and building, not intimidating and tearing down.

  • Anonymous
    July 01, 2004
    Jim: If you start with your own code & ask people to party on it, then they won't feel threatened by critism as they would if it were their own code. But yes, manners & respect are very important.

  • Anonymous
    July 02, 2004
    Ain't No Party Like a Refactoring Party, 'coz a Refactoring Party don't stop.

    Sorry, I couldn't resist. :)

  • Anonymous
    June 09, 2009
    PingBack from http://insomniacuresite.info/story.php?id=5987

  • Anonymous
    June 18, 2009
    PingBack from http://outdoordecoration.info/story.php?id=4196