Skip to content

Instantly share code, notes, and snippets.

@dchymko
Created February 28, 2012 04:44
Show Gist options
  • Save dchymko/1929611 to your computer and use it in GitHub Desktop.
Save dchymko/1929611 to your computer and use it in GitHub Desktop.
C# pseudo-code to determine if your device/car/band is better than someone else's
/**********************************************************
Class: myFavoriteDevice
Desc: C# pseudo-code to determine if your device/car/band is better than someone else's
disclaimer: coded by hand inside gitHub, may require tweaking to compile.
***********************************************************/
Class myFavoriteDevice() Implements FavoriteThing {
string[] similarWords = new string[3] {"Ripoff", "Blatent Copy", "Patent Infringment"};
string[] differentWords1 = new String[4] {"failure", "abomination", "stupid name", "bad idea"};
string[] differentWords2 = new String[3] {"too many buttons", "not enough buttons", "sharp edges"};
string function compareTo(inferiorDevice)
try {
if (this.formFactor == inferiorDevice.formFactor) {
string similarTerm = similarWords[random.Next(0, similarWords.Length)];
system.out.print "pfft, the" + inferiorDevice.Name + "is such a " + similarTerm + " of the " this.name;
} else {
string derogatoryTerm1 = differentWords[random.Next(0, differentWord1.Length)];
string derogatoryTerm2 = differentWords[random.Next(0, differentWord2.Length)];
system.out.print "pfft, the" + inferiorDevice.Name + " is such a " + derogatoryTerm1 +". It has " + derogatoryTerm2 + " and nobody will buy it."
} catch (YouProbablyNeverHeardOfItException as Hipster) {
}
}
TODO: extend FavoriteThing for myFavoriteCar and myFavoriteBand classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment