A second post today--woot, it's a twofer.
I was asked to play a game this morning, a very simple word ladder. Go from FOUR to FIVE in 7 steps (6 in-between words). It's a pretty straight forward puzzle.
And that got me to thinking--I love solving puzzles like that and lots of other related mind games. And everyone at work knows it. They can get me distracted sooooo easily. Good thing I'm not a teacher or I'd never make it through a lesson on time.
Recently, I was asked (not really as a puzzle but....) "How would you test this software? It's a command line oriented program call randy that is supposed to take as input the size of random data to produce on stdout." I thought about it for a few minutes and at last a light bulb went off: Compress the results. If they are incompressible, it's evidence leaning toward the randomness. (Now that's not exactly true--even all zeroes could be random.)
The person who asked the question hollered and nearly fell out of her chair. You know why? That's not what she was worried about. She didn't think anyone could determine in white box format whether or not something was generating random data--she never even considered the possibility. (She merely wanted someone to send gibberish input to see what happened and to ensure when you asked for x bits, you got x bits.) But I saw it not as an interview question or quality assurance question--I saw it as a brain teaser. And brain teasers have brain teaser answers.... and if you want to measure for random, the brain teaser answer is to measure the results for compressibility. (At least in my mind.)
This is perhaps the geekiest posting I've ever blogged. I suspect I've been inspired by my cohorts and reading literature. Just for Fun by Linus Torvalds and David Diamond is the book I've just finished. I'm trying to teach my son how to do fractions (including complete factorization) and I work with people who send me puzzles--at least one a week and oft times more. Thanks HP.
Friday, June 13, 2008
Anyone who has ever asked me to work on their computer in whatever way has heard me eschew Internet Explorer and recommend Firefox. Now, Firefox has been updated to version 3. Well, that will occur on Tuesday June 17.
On that day, Mozilla Foundation (the makers of Firefox) would like to set a Guinness World Record for the most downloads in one day. This could be a really self-defeating goal as it may saturate the Internet. I've agreed to participate though and will be grabbing 3 or 4 different varieties of Firefox that day: Windows XP version, Linux 32 bit, and Linux 64 bit for certain. Additionally, I'll have a raft of Ubuntu machines that will be doing "automatic" updates to the final release version of Firefox 3 that day. (I've been running the beta and release candidates of Firefox 3 for some time.)
FF3 has a variety of enhancements and improvements over FF2. And it is vastly superior to Internet Explorer. If you are running Opera 9.5, I've got no comment--you know what you're doing.
And holler if you ever want to try Ubuntu -- or grab it here: