Editing 221: Random Number
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
}} | }} | ||
==Explanation== | ==Explanation== | ||
− | The comic specifies a function (in a {{w|C (programming language)|C}} | + | The comic specifies a function (in a {{w|C (programming language)|C-like}} syntax), which judging by its name should be designed to return a random number. Most functions of this form are random number ''generators'', meaning that on subsequent calls they return ''different'' random numbers. But the programmer has instead implemented a function that just returns always the ''same'' random number; which, while it could indeed have been truly randomly chosen by rolling a die as the comment documented, is essentially worthless as it could simply be replaced by a "4" wherever it is used. In fact, most modern compilers would do this optimization automatically. |
− | + | The {{w|IEEE}} is the organization responsible for maintaining a number of computer standards. An RFC, or {{w|Request for Comments}}, is a formal document put out to computing experts by {{w|IETF}} in the hopes of becoming a future standard. However, RFC 1149 was an {{w|April Fools' Day Request for Comments|April Fools' joke}}, defining how carrier pigeons can be used to transmit Internet packets. The <nowiki>RFC 1149.5</nowiki> simply does not exist. | |
− | |||
− | The {{w|IEEE}} is the organization responsible for maintaining a number of computer standards. An RFC, or {{w|Request for Comments}}, is a formal document put out to computing experts by {{w|IETF}} in the hopes of becoming a future standard. However, RFC 1149 was an {{w|April Fools' Day Request for Comments|April Fools' joke}}, defining how carrier pigeons can be used to transmit Internet packets. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==Transcript== | ==Transcript== | ||
− | |||
int getRandomNumber() | int getRandomNumber() | ||
{ | { | ||
Line 29: | Line 21: | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:Computers]] | [[Category:Computers]] | ||
− |