Clean The Kitchen

["Clean The Kitchen" - an analogy that illustrates why doing refactoring after making each change makes sense, rather than putting off refactoring "for some other time."]

The fastest way to be done with dinner is to not clean the kitchen.

If you don't clean the kitchen then a mess builds up. In order to make dinner you have to fumble through the dirty pots and pans, chiselling off the dried on spaghetti from last Tuesday, and melting the hardened peanut butter out of spoons. But eventually you will find the pots, pans, and dishes you need, and you will eat dinner.

And still the fastest way to be done with dinner is to not clean the kitchen.

This fundamental truth never changes. You can always be done faster, today, if you don't clean the kitchen today.

On the other hand, if you clean the kitchen after dinner every day, the total time spent making dinner over a year will be far less...

Contributors: RobertMartin (http://groups.yahoo.com/group/extremeprogramming/message/61485), JeffGrigg


It's a beautiful dilemma, which smells rather of XenosParadox?. -- RobertMartin

It's a great sound bite but not an accurate analogy. "Clean the Kitchen" is "Keep your workspace tidy", or "Reset your test environment", or just "Get the empty coffee cups off your desk". Refactoring in catering terms is "Will that steak be cheaper or be ready sooner if I microwave it rather than grill it?". -- GeoffFranklin?

I think it smells rather like a dirty kitchen. But maybe that's why I like it. -- LeonBambrick

...but not an accurate analogy. Disagree, think of what 'CleanTheKitchen' would mean in terms of, say, mechanics: put all the screws and bolts back in their proper places that you haven't already before you start the next task, even though they may not be strictly necessary. Otherwise, you have a machine that 'works', is hanging together by duct tape, and a pile of parts that don't seem to belong anywhere. -- WilliamUnderwood

A good catering analogy: http://groups.yahoo.com/group/extremeprogramming/message/61514

And JeffGrigg states the obvious: A dirty kitchen attracts BUGS! http://groups.yahoo.com/group/extremeprogramming/message/61520


See TechnicalDebt, FixBrokenWindows


EditText of this page (last edited November 20, 2014) or FindPage with title or text search