Stolen from this
Article:
"There was a minor bug in one of my company's applications," Craig M wrote, "for whatever reason, it just hung after the 'Are you sure?' prompt."
"In an attempt to try and track down the problem, I popped my head into our UserInput class to ensure that the code was correctly validating the input. That's when I came across this..."
if (answer.equals("y")|| answer.equals("yes") || answer.equals("yep")) {
return true;
}
if (answer.equals("ok")) {
return true;
}
if (answer.equals("proceed")) {
return true;
}
if (answer.equals("affirmative")) {
return true;
}
if (answer.equals("positive")) {
return true;
}
if (answer.equals("correct")) {
return true;
}
if (answer.equals("aye")) {
return true;
}
if (answer.equals("fine")) {
return true;
}
if (answer.equals("yar")) {
return true;
}
-- snip --
"The list goes on," Craig added, "followed by another large list for a simple answer of 'no', totaling twenty-six possible answers. You've got to wonder the level of boredom required to
make such an extensive list, and whether the developer in question really had nothing better to do."
And this is followed a pretty funny comment:
Perhaps this was just a frustrated developer who was tired of dealing with bug reports.
QA: When I typed "yes" it didn't work. Please fix.
Developer: OK, "yes" should work the same as "y" now, and "no" should be the same as "n".
QA: When I typed "ok" it didn't work. That is standard for dialog boxes. The prompt should be more forgiving. Please fix.
Developer: But this isn't a dialog box... oh, whatever. There, now "ok" and "cancel" should be accepted as well.
QA: The text on the page before mentions the word "proceed", so the prompt should accept that as well. Please make the prompt more forgiving.
Developer: Fine. I'll make the prompt more forgiving. You want to type "proceed"? Here, you can type "proceed"! How about "affirmative"?
You want "affirmative"? Or maybe "positive"? What about pirates? Aye? Do we have any pirates using our software? Gotta think of the
pirates, yep! Hey, "yep" -- you want "yep" too? Have a "yep"! Have whatever you want! Is that forgiving enough?
IS THAT FORGIVING ENOUGH?
QA: When I just hit enter, nothing happens. Hitting enter should default to "yes".
Developer: