XKCD | Website February 9, 2007

Alt Text

RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.

Transcript
int getRandomNumber()
{
	return 4;	//chosen by fair dice roll.
					// guaranteed to be random.
}
  • thehatfox@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    1 month ago

    The mistake was to pre-roll the dice. Security could have been greatly improved by providing the randomness as a service, with the developer being paid a monthly fee to roll the dice for each function call.