26th Aug, 2006

It's the Safety Dance!

Well, my cousin threw down the gaunlet by proposing this quite humorous programmatic rendition of Sir Mix-a-Lot’s indominatable “I Like Big Butts”:

I.like(bigButts) && I.canLie(false);
otherBrothers.canDeny(false);
when (girl.walksIn())
{
if (girl.hasIttyBittyWaist() && roundThing.getLocation()==your.FACE)
{
you.getSprung();
}
}

Which I thought was quite clever. So, I felt I owed him a response comensurate with the length of time I made him wait for a reply.

So, I began thinking for an appropriate song. Then I remembered Men Without Hats‘ 1983 classic “Safety Dance” and how it contained a lot of if/then and boolean language (“‘Cause your friends don’t dance and if they don’t dance…” etc.).

Icon - Source Code
The source code.
664 lines.
Developed using Microsoft Visual C# Express Edition and builds cleanly.

Icon - Executable
The executable.
Tested under Windows XP SP2 with .Net Framework.
MD5 checksum.

Icon - Output
The program’s output.
Prints the song’s lyrics.

Icon - Output with Logging
The program’s output with log statement enabled.
Show’s the program’s hilarious logic.

Now that should more than settle the score.

Leave a response

Your response:

Categories