On Linux and random numbers

Look, I hate to bring this up, but there's something we need to discuss: Why haven't I heard from you recently? (No, not you, you've been in touch. It's this guy over here … ) Really, is it too much to ask that you put pen to paper … oh, all right, fingers to keyboard … and tell me what's on your mind?

Anyway, this week two things are on my mind. First, if you do anything even remotely serious with Linux then you'll be well aware of just how much documentation there is for the system. If that's the case then I'll bet you've probably thought "why doesn't someone produce a honking great thick book that summarizes more or less everything I might need to know about Linux?" If you have then your wish has been granted.

Linux in a Nutshell, 6th Edition just been launched to a clamoring world by O'Reilly and at 917 pages including index it beats the heck out of resorting to the "man" command. My one complaint (you may well relate to this) is that my eyes aren't what they used to be and the font size the book is set in is at my limit of resolution without glasses. As I can't see well enough to find my glasses, this is a problem. All you whippersnappers will be fine. This book is a great resource. A 5 out of 5.

Next random stuff. By which I mean really random because there are lots of IT problems where real random input is required (not to be confused with the random input you get from senior management).

I needed to find a way to generate a randomized sequence that consisted of all of the numbers from 1 to 75 with no repeats. Moreover, I wanted to be able to generate the list online for another online process to consume and, so far, I have found only one Web site that does anything like that: Random.org.

This site is run by Dr. Mads Haahr, a lecturer in the School of Computer Science and Statistics at Trinity College, Dublin, Ireland.

What's really cool about this service is that the random numbers it produces are truly random: The service uses multiple radio receivers that sample atmospheric noise on different frequencies as a source of random data. This is important as there are other online random number generators that use pseudo-random number generators (software algorithms that approximate random sequences) but for real scientific purposes these are of little use.

While I'm on the subject of random number sources, check out Lavarand, which describes itself as "a cryptographically sound random number generator of the highest quality".

Lavarand not only includes some really good discussions on the topic of randomness but also provides open source random number generating software and instructions on how to create a random source device called a "Lavacan" using a USB Webcam and some plastic pipe. I must make one of these. My office seems oddly unequipped without one.

So where was I? Oh yes … Random.org offers a sequence generator that almost does what I need but only offers two types of output: Plain text and HTML. Now what I needed was an XML formatted output and so I thought I could run the Random.org output through a Yahoo Pipe (which I discussed and reformat the output.

Unfortunately Yahoo Pipes won't take data from sources that have a robot exclusion file file to prohibit access … which, of course, is exactly how Random.org is configured! Hummm. What to do?

Use a proxy! Ah, but all of the public proxies I could find have a robot exclusion file so I had to set up my own proxy on my own server. I used PHProxy and enabled "hot linking" (this allows Web sites to access the proxy).

After that, it was easy. I created a Yahoo pipe to access the proxy, extract the random sequence from the Web page generated by Random.org, break the sequence into separate numbers, strip out unneeded tags and create an RSS feed. If you want a copy of the Yahoo pipe configuration, drop me a note.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2009 IDG Communications, Inc.

IT Salary Survey 2021: The results are in