221: Random Number
| Random Number |
![]() Title text: RFC 1149.5 specifies 4 as the standard IEEE-vetted random number. |
[edit] Explanation
The comic specifies a function (in a C-like syntax, perhaps C++) that, when called, returns a random number. Most functions of this form are random number generators, implying that they return a range of different random numbers. Here, the programmer has instead created a function that just returns a single "random" number - one that the comment claims is chosen by rolling a dice. This function is essentially worthless, as it could simply be replaced by a "4" wherever it is used. (In fact, most modern compilers would do this automatically.)
The IEEE is the company organization responsible for maintaining a number of computer standards. An RFC, or Request for Comments, is a formal document put out to computing experts by IETF in the hopes of becoming a future standard. However, RFC 1149 was an April Fools' joke, suggesting that carrier pigeons be used to transmit Internet packets. (Ironically, although the RFC was written in 1990, a homing pigeon with a couple microSD cards tied to its leg might well be faster than your typical consumer Internet connection in the US today.) There is no RFC 1149.5.
[edit] Transcript
int getRandomNumber()
{
return 4; //chosen by fair dice roll.
//guaranteed to be random.
}
