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.