The mad ramblings of a scientist
September 2011

Sunday, September 25, 2011

Does Marketing Like This Really Work?

You’ve probably seen the advertisement on TV: AllState insurance promises a safe driving bonus check twice a year if you are a good driver. This bonus is up to 5% of the premium.

Yes, they actually send a check in the mail.

Maybe I am being too analytical. Maybe I don’t appreciate the wonder of receiving cash in the mail from one of the bigger contributors to the cost of living for a typical family. But what the heck makes receiving a check in the mail any better than just paying less in premiums to begin with?

Posted at: 9:38 PM
Categories: Science and Policy
What's With the MTU?

Anyone with experience engineering software or hardware understands what most of the public takes for granted: it is a tremendous effort to build complex devices that are reliable. The usual approach is to subdivide an implementation into components in order to make the task manageable. Complex components are divided into sub-components, which are then divided again if necessary, ad infinitum. Even the most complex problem, divided correctly into its trivial components, becomes manageable. Usually.

Consider, for example, the MTU, or Maximum Transmission Unit. The MTU is the largest size object that can be transmitted by a digital communication device. The MTU is an important parameter for the internet, because the internet is build upon millions of hardware devices all interconnected and all of which (in principle) have different values for the MTU. There are an entire collection of protocols designed to keep the internet up and running that deal with possible MTU disparities. Protocols that each device has to adhere too if the network is to work at all.

There are billions of internet users, but very few know about the MTU. Miraculous!

This brings me to the point of this story. It turns out that my home computer, a relatively recent Mac mini, has had some bizarre wireless ethernet problems. When I first installed this computer at home, if I left it on for more than a couple of days, the wireless would slowly start degrading. A simple ping to the wireless router would start showing dropped or badly delayed packets. The longer the computer stayed on, the more common these lost packets became. A simple reboot brought wireless performance back to normal.

I spend hours trying to figure out what was wrong, but could not find anything out of place. Another similar computer at home worked fine, so the problem wasn't directly related to the router. The problem had nothing to do with interference or the choice of wireless channel, since a bad wireless connection that persisted for hours was fixed in minutes by a reboot. Temporarily turning off encryption made no difference. I eventually decided that the problems must be some obscure hardware problem. I suppose I could have returned the computer, but it was easier just to turn it off every night and avoid the issue.

Then I installed Mac OS Lion, and suddenly reboots stopped fixing the problem. That was pretty upsetting, so I started to do more research. I finally found one change that permanently fixed wireless performance: setting the MTU of the wireless connection of the computer from "Set Automatically" to a fixed value of 1400. The computer has been on for weeks and no problems have reappeared.

So, why is my poor computer so sensitive to the MTU setting? I have no idea. Hardware problems? Maybe, I suppose. A hardware problem that some how confuses the algorithm which chooses the optimal value of MTU (for the "Set Automatically" setting)? A little more likely. But I have no proof. Nor is there much evidence that other Mac users had discovered similar problems.

An annoying mystery, but at least my computer works properly again. And I will never take a good quality wireless connection for granted again!

Posted at: 12:04 AM
Categories: Diary

Thursday, September 22, 2011

Sensationalism Makes a Better Story

One of the bigger stories circulating on the internet today is a report from CERN of neutrinos moving faster than the speed of light. The Associated Press titled their report "Roll over Einstein: Law of physics challenged", with quotes from physicists discussing how the news could shatter the foundations of modern physics.

Is this the big discovery of the decade? Do we now believe it is possible to exceed the speed of light and build fantastic interstellar spaceships and time traveling machines? Well… no.

I am sure the scientists involved are searching for a systematic error in their measurement, and are publicizing their results in the hope that someone might figure out what exactly is wrong with their calculations (which, by the way, rely on a very accurate estimate of the distance between the instrument and accelerator, among other things). The scientists on the experiment are probably cringing at the tenor of AP’s story.

Posted at: 9:47 PM
Categories: Physics in the news

Sunday, September 18, 2011


This is a friendly reminder that tomorrow is international Talk Like a Pirate Day.

Posted at: 4:55 PM
Categories: Diary
Cookies, yum!

I have been working on polishing up my new web site in my spare time this week, and I have been uncovering little details here and there that need work. One detail I bumped into was the look of my web error pages. The web server software I am using has built in error pages, of course, but they are standard, boring pages, and don't fit into my web site style at all.

Web site designers often go to some trouble to personalize their error pages with their own special look. Because error web pages don't come up very often (or at least, aren't supposed to), to put a lot of effort into them is a sign of thoroughness. And being the perfectionist that I am, I had to do the same.

I started by constructing a prototype using a CSS layout that nicely matched the style of my web site. I then just quickly composed some "suggestions" for users who might have gotten a web page url incorrectly, including a suggestion that was a joke about getting a cookie (everyone likes cookies). I was quite happy with how the web page layout turned out, especially considering how quickly it was coded. But it was entirely in text, and it seemed something was missing. Maybe a picture.

I then had the inspiration to add a picture of a cookie (to play off the cookie joke in the text). So I peeked at some pictures of cookies in the public domain. Some were okay (others weren't), but none had the right composition. So I felt at a bit of a loss. Until I had another inspiration!

She Who Must Be Obeyed is an excellent baker, and a prolific photographer. So I asked her to make some chocolate-chip cookies to my specifications: just the right size and shape. And they were perfect! (And, incidentally, really, really delicious.) I then experimented with various materials to photograph cookies on, in order to reproduce the approximate shade of the background of my web pages ('#333'). A black piece of paper worked fairly well. I found that natural lighting looked far better than flash, and then set up an impromptu studio in the bedroom (with a simple tripod made from old boxes). After some trial and error (and getting just the right bite in the right cookie), I had the perfect picture.

The image I had in my mind was a chocolate-chip cookie sitting on top of the web page. To get that image right, I had to convert the background of the picture into the html color #333. That is were GIMP comes to the rescue. GIMP is a well known open source image manipulation program with capabilities similar to Adobe Photoshop. Being an amateur user, it took a few tries to get a natural look, but I think it turned out pretty good in the end.

The moral of this story is that if you are looking for just the right look in your web page design, and can't find a good picture in the public domain, consider making one yourself. It can be a bit of fun, and educational. And in some cases, you can get added benefits like a entire batch of yummy chocolate-chip cookies.

Posted at: 2:53 PM
Categories: Diary, Projects