3 ms·
Funny, but not a correct answer. The XKCD comic is based on the point that getRandomNumber() gives you a random (i.e. selected randomly at coding time) number,
by Deestan 17y ago
Funny, but not a correct answer.
The XKCD comic is based on the point that getRandomNumber() gives you a random (i.e. selected randomly at coding time) number, but it isn't a random number generator like its name implies.
The Dilbert troll may be a random number generator.
- mikeryan 17y agoslight disagreement - there's nothing in the name of the function that implies a random number generator.
- Xichekolas 17y agoTrue, but Deestan has the right idea. The number was random at the time of coding (presumably selected by the programmer using a fair dice roll), but is obviously not random at runtime. It's amusing that every answer in that SO thread completely missed the point.