The Jargon File (version 4.4.7, 29 Dec 2003):
rat dance
n.
[From the Dilbert comic strip of November 14, 1995] A hacking run that
produces results which, while superficially coherent, have little or
nothing to do with its original objectives. There are strong connotations
that the coding process and the objectives themselves were pretty random.
(In the original comic strip, the Ratbert is invited to dance on Dilbert's
keyboard in order to produce bugs for him to fix, and authors a Web browser
instead.) Compare Infinite-Monkey Theorem.
This term seems to have become widely recognized quite rapidly after the
original strip, a fact which testifies to Dilbert's huge popularity among
hackers. All too many find the perverse incentives and Kafkaesque
atmosphere of Dilbert's mythical workplace reflective of their own
experiences.