Created
February 28, 2012 04:44
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************** | |
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