Heating beer, Stavanger (background)

I think I found a completely new use for the Python programing language while tasting beer with Geir Ove at Cardinal last week. Cardinal is a nearly perfect pub, but they serve their beers too cold. I typically solve this by ordering the beers a bit early, and using my hands. If desperate, I may put the beer on top of my laptop, which usually is quite warm.

However, last week we were trying to get through the last beers before having to rush for the plane back to Oslo, and the usual heating methods were not doing the job. In fact, the beers were cooling my laptop CPU from the usual 60 degrees (C) to 50, and my hands were getting cold, too. Something had to be done, and fast.

At this point inspiration struck. My reasoning went roughly like this: running more CPU-intensive tasks makes the CPU temperature go up. The OKS test suite would work, for example. However, it only runs for a couple of minutes, so I'd have to keep restarting it. Then I realized: why make it complicated? Any infinite loop will do the job.

So I wrote a beer-heating Python script, as follows:

while 1: pass

Running this did the trick. The temperature quickly rose from 50 degrees to 90 degrees. It helped a little bit in heating the beer, but not enough, to be honest. I guess I need a laptop with more CPUs.