A Lesson in Refactoring

Shawna gave the Beaner an enormous marble run as a combined birthday/Christmas gift, and I finally got to see it in action the other day. It took up the whole play table, involved two conveyor belts, and had innumerable tubes, chutes, flaps, lights, and whistles. Very cool.

"Can you reconfigure it any way you want?" I asked.

"Sure," said the Beaner. "Let's take it apart."

"OK, I'll just move this piece over here..."

"No, no! You have to take the whole thing apart."

"Oh. Well, I was thinking that we could just move one piece at a time."

"No, you're doing it wrong! You have to take the whole thing apart and start over if you want to build it differently."

"But see, if we move one piece at a time 20 or 30 times, we'll end up with a completely different configuration—but with each move, we'll still have a working marble run."

"NO. YOU HAVE TO TAKE THE WHOLE THING APART IF YOU WANT TO RECONFIGURE IT."

It should not be surprising, even to engineers who argue the Beaner's position all the time, that the marble run stayed in pieces on the table for the next five days.

Posted by Lori in parenthood at 7:34 PM on January 4, 2010

Comments (1)

I think "staying in pieces" is what's called "Alpha."

Comments

I think "staying in pieces" is what's called "Alpha."

Posted by: Joe Crawford at January 5, 2010 8:26 PM

Comments are now closed.