Dice February 15, 2007 3:29 PM

Hmm …
I thought this one was much funnier.

Back to topic.

I remember being given instructions to set a password on a service account using a computer password generator program. The instruction also required adding some human random parts in the middle of the computer generated password as well. I asked why and was informed that the author of the instruction did not fully trust machine generated passwords and therefore liked to add a bit of human randomness. I suppose it made sense; unless you’ve written the code, you don’t know how ‘random’ machine generated data is and even then you could be wrong.

j February 15, 2007 3:48 PM

I think to be a seriously geeky joke, you have to get it without reading the comment.

I confess to needing the comment, and I thought it was pretty funny.

j February 15, 2007 3:50 PM

“I think to be a seriously geeky joke, you have to get it without reading the comment.”

I meant to say “I think to be a serious geek, you have to get it without reading the comment.”

Carlo Graziani February 15, 2007 4:00 PM

From “Numerical Recipes in C”, chapter 7 (“Random Numbers”):

“One infamous such routine, RANDU […] was widespread on IBM mainframe computers for many years, and widely copied onto other systems. One of us recalls producing a “random” plot with only 11 planes, and being told by his computer center’s programming consultant that he had misused the random number generator: “We guarantee that each number is random individually, but we don’t guarantee that more than one of them is random.” Figure that out.”

Undecidable February 15, 2007 4:26 PM

I got stuck on the title.

Is it: (Random Number) Humor
or: Random (Number Humor)

I couldn’t find any authoritative rules for the precedence of noun vs. adjective.

I think we should have a specification. But should it be submitted to ACM or IEEE?

Ctrl-Alt-Del February 15, 2007 4:30 PM

We have prize drawers at our Christmas functions. These traditionally use “ticket drawn from a hat” model. One year the group organising it decided “Hey, we’re a technology area, we should have a computerised drawing!” and they dumped the task of writing it on me.

I never win these prize draws, so I was not enthusiastic, but I did my best. I wrote a nifty little random number routine with a cute graphical front end. Input a list of names and it would output the name of the winner. I made an honest effort to ensure randomness within the limitations of the PC.

I tested it extensively and it worked perfectly. Come the day of the Christmas party …

… and guess whose name popped out?

I’ve never lived it down.

Sgt. Riggs February 15, 2007 4:40 PM


“I never win these prize draws, so I was not enthusiastic, but I did my best.”

It looks like you did just fine. Well done.

Peter February 15, 2007 4:47 PM

@Arthur S
I thought of that Dilbert cartoon immediately.

My current email sig contains this quote:
“The generation of random numbers is too important to be left to chance.” –Robert R. Coveyou

Spider February 15, 2007 4:53 PM

In high school the first programming assignment of any difficult was to program a number guessing game. a “Guess which number I’m thinking of” — sort of deal. At least 75% of the class would forget to seed the random number generator in Microsoft pascal. I used to impress people by getting the answer right the first time on their implementations.

UNTER February 15, 2007 4:57 PM

Well, I would have found it funny, but the redundant coding style ruined the joke for me. Real geek humor:

grn() {return 4;} // grntd rnd frm dce rl
#define grn 4 //grntd rnd frm dce rl

Rich February 15, 2007 5:19 PM

Reminds me of the A7 Navy plane that reported an alttitude of 3750ft if both altimeters (barometric and rader) were broken. Software Engineer D.L. Parnas couldn’t figure out why the flight manual said that if the altimeter held at 3750, “Pull Up!”

Beryllium Sphere LLC February 15, 2007 5:50 PM

It’s both funny and profound, because “random” is one of those words everyone thinks they understand but which is diabolically difficult to define.

One easy way to think about it is that when someone says “random number generator” you should hear it as “random (number generator)” and not “(random number) generator”. That’s a good informal way to understand the principle that “entropy is a property of the source and not of the output”.

There was a real-life case kind of like the xkcd cartoon. I believe it was Netscape that generated SSL keys based on the time of day. Problem was, only a few of the theoretically possible keys could actually be generated that way. It was millions of times better than just returning “4”, but still an example of feeding too limited a source of input to a place that needed full randomness.

bjimba February 15, 2007 6:01 PM

It seems to me that xkcd’s program is perfectly correct, as long as the dice roll was fair. The unspoken (or uncommented) assumption, of course, is that it is for a one-time use program.

It would be interesting to see how the compiler would enforce this restriction. (I’m sure we remember how the Mission Impossible tape recorder used to enforce a similar restriction.)

Pat Cahalan February 15, 2007 6:13 PM

“Make me a sandwich”

“What!? Make it yourself”

“Sudo make me a sandwich”


That was seriously still cracks me up.

DJ February 15, 2007 8:40 PM

Beryllium, I remember that Netscape story well. I was in the room that weekend when Ian Goldberg declared victory in breaking the SSL. Didn’t realize the significance until Monday’s NT Times came out. Hehe. If only I knew how to short Netscape stocks.

jwd February 15, 2007 9:20 PM

What’s funny about that? This is almost the same implementation used by Apple in their Javascript.

Mordaxus February 15, 2007 9:29 PM

Tsk. There’s a bug in the code. If they had really used a fair die, it would have come up with 17.

greg February 16, 2007 2:39 AM

all jokes aside. Why don’t all computers have some hardware based random number generator. They don’t need to be as expensive as the comercial ones, and they don’t need super high through-put.

I have wired up a few myself. Based on the waiting times between radation decays (I used a FPGA with a 64 bit LFSR counter, and output the state when a decay was detected-Still need to process this thou). You don’t even need a radioactive source as you can use the background. Still need to entropy check the thing though, but it really isn’t that hard.

And anyway everyone knows that real random number generators output primes, cus composisite numbers stink by factors.

Dilbert Reader February 16, 2007 7:22 AM

I actually liked a Dilbert from a few years ago better.

Dilbert comes across the “Random Number Department” where a guy is sitting at his desk repeating “3… 3… 3… 3…”

Dilbert says something along the lines of, “It’s not a random number if you always say ‘3’!”

To which the man replies, “Ah. But how you don’t know it will always be ‘3’.” Then he continues, “3… 3… 3… 3…”

(Sorry, Scott, for how I butchered your comic.)

Carlo Graziani February 16, 2007 9:29 AM

Greg, on a linux box, “man urandom”.

…”The random number generator gathers environmental noise from device
drivers and other sources into an entropy pool. The generator also
keeps an estimate of the number of bits of noise in the entropy pool.
From this entropy pool random numbers are created…”

X the Unknown February 16, 2007 2:25 PM

@Undecidabl: “I think we should have a specification. But should it be submitted to ACM or IEEE?”

That’s why we have the much-maligned and often-discouraged hyphen. Properly used, it easily distinguishes “Random-Number Humor” from “Random Number-Humor”.

Fenris Fox February 16, 2007 8:42 PM

Well, hey, at least it’s truly random*!

The constant “code upkeep” required, however, may become tedious. =;o)

  • This is assuming the dice are not loaded – but since having those is a felony in Nevada, they should do it here. After all, everyone follows laws, don’t they? [sarcasm] =;o)

Fenris Fox February 16, 2007 8:47 PM


“My current email sig contains this quote:
“The generation of random numbers is too important to be left to chance.” –Robert R. Coveyou”

Cute. =:o) :: giggle ::

Fenris Fox February 16, 2007 8:49 PM

@Pat Cahalan:

“”Make me a sandwich”

“What!? Make it yourself”

“Sudo make me a sandwich”


That was seriously still cracks me up.”

That requires the root password. =;o)

Jay February 17, 2007 11:57 AM


I recall reading a paper some years ago showing that seek-time differences in hard disks exhibited randomness due to random air turbulence from the spinning platter. It was not a high rate, but it was measurably random (if that’s not oxymoronic).

Leave a comment


Allowed HTML <a href="URL"> • <em> <cite> <i> • <strong> <b> • <sub> <sup> • <ul> <ol> <li> • <blockquote> <pre> Markdown Extra syntax via

Sidebar photo of Bruce Schneier by Joe MacInnis.