n. A random series of actions that produces a useful (and usually unintentional) result.
"François tossed whatever he find into the pot, added a few spices, simmered the whole mess for a while, and was shocked to find the finished dish actually tasted quite good. It was a total rat dance meal."
This phrase originated in the Dilbert comic strip. In the strip, Dilbert asks Ratbert (a rat) to dance on his keyboard. The intent was to create software bugs that Dilbert could then fix, but Ratbert's dance created a Web browser, instead.