Steve Jobs, 1955-2011

I wasn’t awake ten minutes this morning before I learned that Steve Jobs had died. I was never truly happy with Apple products — too expensive, not expandable enough, not complex enough to satisfy my geek soul — but even long before the iPhone, they had a major if indirect impact on everything I did.

Goodbye Steve. The world will miss you… and not just that part that own shares in Apple Computers.

“Isaac Asimov on Security Theater”

In another case of life-imitates-science-fiction, Bruce Schneier reports that someone has discovered the perfect description of today’s “security theater” in a 1956 Asimov story.

(For those of you not following along at home, “security theater” refers to all the crap the TSA is doing that is trivial to get around, but that they’re doing just so they’re seen to be doing something. Which, unfortunately, is essentially everything they’ve done to date. The TSA knows it, the terrorists know it, and any citizen who looks into it figures it out in minutes too, but they have to do something to justify their jobs.)

Jack-of-the-Lantern

I never knew where the Jack-o’-Lantern came from, but a newsletter that I get (for a company that I cannot recommend, so I won’t name) described one version of the legend behind it recently, and it’s sufficiently interesting that I wanted to pass it on.

The tale, apparently hundreds of years old, comes from Ireland and tells the story of a man called Stingy Jack. In this version, Jack was a miserable old drunk who liked to play tricks on everyone. One day he even tricked the Devil himself, convincing him to climb an apple tree, whereupon Jack quickly placed crosses around the tree to trap him there until the Devil agreed not to take Jack’s soul when he died.

Years later, Jack died, but at the gates of Heaven he was told that he was too cruel to be let in. He tried Hell, but the Devil gleefully said that he never broke an agreement and wouldn’t allow Jack in there either. Jack cried that he had nowhere to go, the darkness between Heaven and Hell was too absolute, so the Devil spitefully tossed him an ever-burning ember from Hell itself to light his way. Jack happened to enjoy turnips, and had one on him, so he hollowed it out and placed the ember within.

From then on, Stingy Jack was doomed to wander the earth without a resting place, lighting his way with this turnip, and was referred to as Jack-of-the-Lantern, or Jack-o’-Lantern.

The original Jack-o’-Lanterns were made from turnips, gourds, potatoes, beets, and similar items. On All Hallow’s Eve, the Irish would carve them out and place a light in them “to ward off evil spirits and keep Stingy Jack away.” Irish immigrants to America soon discovered that pumpkins, due to their size, were easier to carve out than turnips and beets, and the modern Jack-o’Lantern was born.

There are apparently several variations on the story too, which you can find on the Wikipedia page.

“Creationists are infiltrating US geology circles”

Ridiculous. The belief that the Earth is less than 10,000 years old is about on par with the heliocentric geocentric model of the solar system — the evidence is pretty damning against both.

However, as I suggested recently to a voluble evolution denier, they’re welcome to try. The discipline of science is self-correcting, and will shrug off anything that contradicts the evidence, as it has throughout history. You never know, one of these guys might come up with something useful to science despite his beliefs.

“Geek to Live: Mastering Wget”

I often take my computer and do programming in places where I don’t have an Internet connection for a few hours at a time. It generally works out well: no e-mail or IM to distract me, no fascinating web links to follow and spend time reading. Unfortunately it also means that I don’t have access to online reference material.

There are four things that I commonly need reference material for, at present: the Boost library, the wxWidgets library, the SQLite library, and the C++ Standard Template Library. The first three all have downloadable HTML reference material, so I’ve long had them on call.

The last one… there’s a lot of reference material on it, but most of it is in book form, which isn’t very convenient. The dead-tree format is the worst: I’ve got an excellent reference book, but it weighs at least twice what my laptop computer does, and it’s not very efficient to look things up in either, compared to a hyperlinked format. I’ve also got an e-book version of it, which is a lot lighter, but which still suffers in the lookup-efficiency department.

When I’m in the office, I generally use two reference sites, which I won’t name here. I generally know the name of the function I want to use, and am just looking for the proper syntax, so the hyperlinked format that they provide is perfect for quick lookups. Their reference material was not, however, available in downloadable form… until I ran across this article on Lifehacker.

I’d used wget before on occasion, to download large single files, but I’d never seen it used for anything else. The article showed me that it was useful for a lot more than that — and the thing that got my attention, that it was useful for downloading entire swathes of a site too. 🙂

It took me a while to come up with the proper invocation, because the site I was trying it on has a lot of stuff I don’t want too, including a link that appears everywhere on the site with different parameters, and which wget was downloading each time. I would have just let it, but one of the places that link appears is in its own page, recursively and with different parameters each time, and it simply never ends. Anyway, the final result looks something like this, with some names changed:

wget -m -k -X forum,userprofiles --reject='garbagelink*' http://www.example.com

The -m says to “mirror” the site to my local hard drive; the -k says to change all links to refer to the local copy. The -X forum,userprofiles tells it to ignore those directories on the site, and the --reject='garbagelink*' says to ignore the problematic link, with the asterisk indicating that it should ignore any URL containing the link regardless of what comes after it. The last piece is, of course, the site to download from.

The result: everything I wanted was pulled to my local hard drive, available for reference regardless of whether I’m connected to the ‘net or not, exactly as I’d hoped. 😀

It’s a nice tool to have. I don’t really have any other sites I need to use it on, at present, but if I find one, I now know how to get it.

“A Little Deception Helps Push Athletes to the Limit”

Did you ever hear the story about the first man to run a sub-four-minute mile? As I heard it, after he did so, it suddenly seemed that everyone could do it. I’ve also heard that the first man to lift 400 pounds was tricked into it by his trainer, who told him it was only 390 pounds, which he’d lifted before.

Both stories may well be apocryphal. I haven’t been able to find verification of either. But it seems that they could well be accurate too.

The human brain is truly an amazing piece of equipment. Too bad it doesn’t come with an owner’s manual, but maybe we can reverse-engineer enough of it to write one ourselves eventually.

“Virtual cloud monkeys go bananas writing Shakespeare”

I’m sure this experiment saved on banana costs — and machine repair and replacement costs, apparently — but a little statistical math could have told him the same thing a lot faster.

(The comment about the interview with Fox News amuses me, as even more evidence that regular Fox News viewers are on the low end of the intelligence spectrum. Not that more evidence was really necessary.)

VMware Fusion vs Parallels Revisited

I recently made an entry about trying out Parallels Desktop for the Mac. My two-week trial key still has a few days left on it, but I made up my mind days ago.

For what I do (Windows and Linux software development and a few Windows games), Parallels simply offers much better performance. Much better — it’s at least twice as fast as VMware Fusion on memory-intensive programs like games and compilers, and sometimes up to four times as fast. (Anything that isn’t memory-intensive they run at pretty much the same speed.)

I wasn’t able to find a single program that I use that it couldn’t run. The games I’ve tried (Age of Empires II and III so far) are very playable, far more so than under VMware. Claws Mail and GCC under Linux both still spend some time in the “IOwait” state on occasion, but far, far less than they did under VMware.

Visual Studio 10 on Windows is still a little slow, again due to disk accesses, but also again it’s two to four times faster than under VMware. I don’t have a Boot Camp version of Windows installed on this machine, so I’m not sure how it compares with running Windows as the primary OS, it might well be near-identical. Bumping up the memory on the Windows development VM would probably help, but I have two other VMs that I run regularly and I’m pushing the limits of this machine’s 8GB already, so I haven’t tried it yet.

I think I’ve figured out why VMware is so much slower. From various discussions in the VMware forums, it looks like it uses some kind of disk-storage of memory, probably a mapped file. I’m sure that greatly simplifies memory management, and probably lets you run more VMs than you’ve got the memory for (which I’m not sure Parallels can do), but it also causes the speed problems when large chunks of memory change quickly, as with compiling. That would explain why there’s much less of a speed hit if you run less memory-intensive programs, though of course that doesn’t do me much good.

Other than one minor bug, I’ve only seen one problem with Parallels. I had just suspended a large VM, and the system hadn’t finished writing it yet, when I tried to switch to another VM. The program immediately stopped responding to input of any sort, in VMs or in its menus; all it would give me is the “beach ball” cursor that says it’s too busy to respond. After a bit the system finished writing, but the beach ball remained and it continued to ignore input, though programs were still visibly operating in the remaining VM. The system claimed Parallels wasn’t responding, so I finally instructed it force-quit Parallels.

I expected to have lost what I was doing in the remaining virtual machine, but to my shock and amazement, when I restarted Parallels after a few seconds, the VM popped up immediately, still running! I suspect that the user interface code was running in a separate process than the VMs, and what I killed was only that; restarting it immediately reconnected to the still-existing VM.

All in all, I’ve been very impressed with Parallels. I took the plunge a couple days ago, buying a copy using the $30 “competitive cross-grade” from VMware Fusion. The odds are that I’ll be persuaded (or coerced) to switch back to VMware at some point, but for the foreseeable future, Parallels has my business.

EDIT, 2011-10-01: I’ve finally found a game that Parallels won’t run. Master of Orion II, the Windows version (as opposed to the DOS version, which I haven’t tried yet, but I expect would work). VMware Fusion wouldn’t run it either, locking up at about the same place, and the bit that it would run ran at about the same speed as molasses in February. Not really a problem, I can always run the DOS version in DOSbox under Linux.