01 July 2008

There is a silly South Park joke about how Canadians argue, from one of their recent episodes...in short, the arguments go like this:

Person A: [Says something argumentative], friend!
Person B: I'm not your friend, buddy!
Person A: I'm not your buddy, guy!
Person B: I'm not your guy, friend!
Person A: I'm not your friend, buddy!
Et cetera.

Feeling a bit on the tired side, my mind is prone to strange ideas, and so as a bit of an exercise I thought I'd replicate the above in some sort of computer language.

Say you start with a simple string array. I'm going to do the string() class instead of the character array approach just to keep it simple. Say you have n number of epiphets:


string epithet[ n ];
epithet[ 1 ] = "friend";
epithet[ 2 ] = "buddy";
epithet[ 3 ] = "guy";
epithet[ 4 ] = "mister";
....
epithet[ n ] = "man";


Then after they are declared as above, you enter into a loop:


int i;
//n is total number of epithets in array epithet[]
while (true)
{
for (i = 1; i <= n; i++)
{
if (i == n)
{
cout << "I'm not your " << epithet[i] << ", " << epithet[1] << "." << endl;
}
else
{
cout << "I'm not your " << epithet[i] << ", " << epithet[i+1] << "." << endl;
}
}
}


I'd wager not many people have given that much thought. Digital Canadianity.

1 comment:

Percussivity said...

I think Dan Aykroyd used to be in a techno-blues-funk band called Digital Canadianity. I can vaguely still recall their hit single "Back Bacon."