Refactoring Party

Published 01 July 04 12:24 PM

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

# Olle de Zwart said on July 1, 2004 1:10 PM:
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.
# Dimitri Glazkov said on July 1, 2004 1:57 PM:
I think you're onto something here. Can we have a regional Refactoring Party chapter?
# jaybaz [MS] said on July 1, 2004 2:11 PM:
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...
# Sergiy Mesropyan said on July 1, 2004 4:09 PM:
Is there a chance you share your refactoring parties on-line? Or maybe have refactoring raves by enabling people to collaborate, present, and chat on-line?
# Jim Argeropoulos said on July 2, 2004 6:26 AM:
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.
# Jim Argeropoulos said on July 2, 2004 6:30 AM:
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.
# jaybaz [MS] said on July 2, 2004 7:59 AM:
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.
# FL said on July 2, 2004 9:12 AM:
Ain't No Party Like a Refactoring Party, 'coz a Refactoring Party don't stop.

Sorry, I couldn't resist. :)
# jaybaz MS WebLog Refactoring Party | Insomnia Cure said on June 9, 2009 8:35 PM:

PingBack from http://insomniacuresite.info/story.php?id=5987

# jaybaz MS WebLog Refactoring Party | Outdoor Decor said on June 18, 2009 11:58 PM:

PingBack from http://outdoordecoration.info/story.php?id=4196

New Comments to this post are disabled

This Blog

Syndication

Page view tracker