2006-07-16

Book: "Things a Computer Scientist Rarely Talks About"

It's said that you can't judge a book by its cover, but that's no excuse for buying Knuth's "Things a Computer Scientist Rarely Talks About" without even looking inside, as I did. Based on that impulse-buying experience, I fear I may be the kind of fool the famous have to thank for the fact that they can pretty much just crap in a box and be guaranteed to sell it.

It's not often you buy a book from the CS shelves and end up wondering "Am I any better than a teenage girl who buys Britney Spears perfume?"

I can't even claim I wasn't forewarned. Years ago I bought, read, and passed on to a friend a copy of Knuth's earlier "3:16". So I was fully aware of the perp's prior. But hope triumphed over experience and I assumed that this time he'd be talking about esoteric CS or mathematical topics. Like "Selected Papers", only less famous.

But mainly Knuth wanted to waste 200 pages of once-lovely trees, $20 of my money, and several hours of my precious reading time on, well, nothing really. Nothing stood out as I read it, and nothing much has stuck with me. I remember him describing the religious symbolism in some of the calligraphy in "3:16", which for me finally explained why there were so many weak works in that book: the effort of shoehorning in symbolism can compromise anyone's work. (Interestingly, Knuth describes how he made a "correction" to one artist's work because he didn't get it; I remember that as one of the uglier examples, but uncorrected it actually works.) I also remember him commenting that the ratings for "3:16" on a certain well-known patent-abusing bookseller's web site were all either 1 (the lowest) or 5 (the highest).

The website ratings for "3:16" go to the heart of the matter. The problem with books like this, or, to be more accurate, the authors of books like this, is that they're only really good at preaching to the choir. You might expect that the rigorous Knuth of the "Art of Computer Programming" complexity analyses might avoid this trap, but he doesn't. If you don't already find mysticism interesting, you won't after reading this book. Really, this book is interesting only in the same way that Buckminster Fuller's "Critical Path" is interesting, only it's rather less funny because Knuth's crackpot side is so much more commonplace than Fuller's: the friend I gave my copy of "3:16" has (to an outsider) the same beliefs as Knuth, but I'm pretty sure I've never known anyone quite like Fuller.

If you're a stoner or a drunken student, you might like this book. Then again, if you are either of those things, you probably get enough of this kind of blather every time you sit down with your friends. Sound and fury, signifying nothing. It's not even as forehead-slappingly "let them eat cake" wrong-headed as C.S. Lewis' "Mere Christianity" (a book I usually think of as in many ways the opposite of Aldous Huxley's "Brave New World") because, as far as I could make out, Knuth and his friends don't really say anything.

Funnily enough, I've read Star Wars fiction that gave me more to think about.

I promised myself a while back that I'd stop writing reviews of books and films that weren't directly related to computing, but since I've just saved you $20, I have a couple of suggestions of what you might spend it on. If you want (often religious) craziness tranformed into art, try "A Scanner Darkly". For once this adaptation really does Dick justice, even to the extent of poking gentle fun at him (or taking on his style so completely that the invented bits were totally convincing). If you're more of a book person, you could read the original book, or you might prefer T.E. Lawrence's "Seven Pillars of Wisdom", about Lawrence's time fighting in the desert in WWI. It took me two months to read, but it was worth every page. And it coincidentally contains some of the most interesting writing on religion I've read in years.

Plus shit gets blown up every couple of chapters, and you can't buy quality like that.

2006-07-11

QuickTime

The other day, while ostensibly talking about VMware Player, I started to rant about QuickTime Player. I've just gone back and edited that post to condense the lengthy aside back down to the salient point, which was that a demonstration version of an application should either let you use all the functionality or at least let you explore all the functionality.

But I'm still offended by Apple's QuickTime Player, so I thought I'd let the rant live on.

QuickTime Player, if you don't know, is part of Mac OS (which we pay about $120/year for) but is full of grayed-out menu items saying, in effect, "you're not really welcome to use this OS you think you've already paid for, but give us more money, you hateful plebs, and maybe then we'll consider letting you use the rest". Being able to see what you're missing out on only rubs in the fact that Apple are ripping you off, charging $120 for an OS full of barely-useful or non-functional shite but denying you stuff like a simple movie-playing application.

People laugh at Microsoft's plans to have all those different editions of Vista? We Mac users have had that for years. We've had the iLife edition, the QuickTime Pro edition, and the .Mac edition, and we can even mix and match them.

Of 10.4's "Top [10] Features" according to Apple, I don't or can't use:

  1. Spotlight (too slow, too inexhaustive, too unfocused)

  2. Dashboard (utterly devoid of any obvious function)

  3. Safari RSS (even if I hadn't bought NetNewsWire, a link to the free download of NetNewsWire Lite would have been more useful and a lot less effort)

  4. iChat AV (I have no camera, and Adium supports the protocols people I know use)

  5. Automator (unlikely to replace cron(8) and Ruby)

  6. QuickTime 7 (crippled unless I pay $29/year to use it)

  7. .Mac Sync (useless unless I pay $99/year to use it)

  8. VoiceOver (I'm not blind)

  9. Parental Controls (I'm not a parent, and I don't believe in censorship)

  10. Mail (slow search, awkward editing; it was better in 10.3)


So why did I buy 10.4? It's not like Steve came round my house with a gun! I bought 10.4 because that was the only way I was going to get Java 5 on Mac OS. A free download on Linux, Solaris, or MS Windows, but it's been $120/year in Mac land so far. (Java 6 may be the first time a Java release isn't tied to an OS release. We can only hope.)

Two things in 10.4 are genuinely useful to me on a regular basis: the dictionary and thesaurus. Okay, so that's actually one thing, Dictionary.app. But it's really nice. A few more denizens of /usr/bin became a little less out of date with 10.4, too, but I could have built them from source if I'd really needed them, and I already had, where I had really needed them.

Did I mention the new bugs in 10.4? NSTextView has always been a bit buggy, but 10.4 introduced a bunch of bugs that get me all the time. They may be fixed now, but I wouldn't know, because they made me give up on the couple of applications I'd been using that relied on them. Safari's got worse for me. More spinning rainbow wheel, and, most recently, a lot of cases where the back button just disables itself and I lose my history for that window.

I've just realized that when Firefox gets check-as-you-type spelling correction, Dictionary and iTunes will be the only Apple applications I'm using.

Anyway, about the QuickTime tax. It's a tax, rather than a one-off fee, because each "major revision" requires you to buy a new license. There are ways around paying the tax, because the crippling is done at a high level. If all you're bothered about is the fact that full-screen is disabled, then, as ars.technica mentioned today, it's easy to Get fullscreen in Quicktime without paying for Pro. I knew that the full-screen functionality is available in the underlying libraries without the need for a license, but I didn't realize that the player application has the code to disable the feature in the wrong place. (The method called by the "Full Screen" menu item causes a license check.)

If you want more of the functionality than just full-screen mode, you could try QuickTime Amateur, which uses the QuickTime for Java library.

If you're interested in QuickTime for Java, you should check out the source to QuickTime Amateur. It's a much better introduction and guide than the O'Reilly QuickTime for Java: A Developer's Notebook, which is just a collection of small demo programs.

There's probably a QTKit (the Objective-C veneer over the underlying ugly Pascal-crossed-with-C late 1970s monster that is the QuickTime API) equivalent to QuickTime Amateur, but I haven't heard about it.

If you're interested in playing stuff QuickTime can't manage, VLC is worth a look. It's a little ugly and awkward to use, though. Not that QuickTime Player is going to win any prizes in those departments.

2006-07-03

Fedora on VMWare on Ubuntu

I've felt bad for some time now that I'm behind the times when it comes to virtualization. It's obviously potentially very useful to any developer. And with Intel Macs and Apple currently advertising Parallels Workstation to prospective switchers, virtualization is pretty mainstream by nerd standards.

And still I'd been waiting for it to become easy enough for me to try.

You might be wondering why I think I'd have difficulty installing or using a product that Apple recommends (even though it's a potential competitor's product), but my Macs are all still PowerPC, and my Ultra 20 is amd64 and, somewhat foolishly given the current state of the onion, I opted to install Ubuntu/amd64 on it. So Parallels' i386 .deb is useless to me. I'm also a little put off by the fact that when I tried to download the Parallels 2.1 Linux installation guide, Ubuntu's evince(1) couldn't display it. "Error 3", I'm told, somewhat unhelpfully. (Getting ahead of myself, Fedora/i386 failed to install the .rpm with "Missing dependency: libXft.so.1 is needed by package Parallels", and likewise failed to display the PDF installation guide.)

As for VMware, I may have mentioned before my disappointment that VMware Player didn't work out of the box on Ubuntu 5.10, and I may also have mentioned my disappointment that things didn't seem to have gotten any easier with Ubuntu 6.06. Specifically, if you choose "VMware Player" in "Add/Remove Applications" (easy enough so far), you're shown the following text:

VMware Player

Free virtual machine player from VMware The free VMware Player lets you run pre-built virtual machines on your desktop.You can run multiple operating systems side-by-side, easing the process of software development, testing, and evaluation.Virtual machines developed in VMware Workstation, ESX Server, or VMware Server can be run in VMware Player.To run the VMware Player, just run /usr/bin/vmplayer from within X.

Note: You will also need the VMware Player kernel modules to run vmplayer. These can be built from source from vmware-player-kernel-source, or you can install a pre-built vmware-player-kernel-modules package for your kernel.

Version: 1.0.1-4

I don't know about you, but I found that note pretty off-putting. Yeah, building kernel modules: that sounds like fun.

It turns out that if you pretend the note isn't there and just install anyway, you're automatically given suitable pre-built packages. So there's actually no hassle. VMware Player just appears on your "System Tools" menu, and it works just fine.

I've no idea why they went out of their way to put people off in the package description.

Anyway, the next problem is that if you go to VMware's web site and want to download a RedHat image you'll find that RedHat want you to register for a trial. Luckily, thoughtpolice.co.uk offer a selection of images for hassle-free distributions. I tried the Fedora Core 5 one, because I wanted to test the software.jessies.org RPMs.

Performance is pretty good, though graphically the guest OS runs slightly more sluggishly than the host OS did before I installed the non-free NVIDIA drivers, which can make the guest quite uncomfortable to use other than on the command-line. Using Firefox to surf the web isn't obviously different from the host OS, but trying to start something from the "Applications" menu can be quite tricky, with the selection highlighting lagging behind the mouse pointer. I certainly couldn't imagine doing anything more serious than a bit of testing.

The guest OS' clock is wrong, despite me telling Fedora to use NTP. I've no idea why.

A particularly annoying problem is that there's no obvious way to make clipboard transfers in or out of the virtual machine. That's really quite annoying even when just playing, and would be crippling if you were really trying to use both OSes.

It's pretty cool to be able to close the VMware Player window, stop the virtual machine, but then come back later (even after the host OS has rebooted) to exactly where I left off. I can reset the guest OS to its original state, too, by removing the ".vss" file. There's nothing in the interface for explicitly making machine state snapshots, though, or reverting to earlier states. Which seems a shame. Presumably the paid-for version has this.

I find it offensive that Apple's QuickTime Player that ships with Mac OS is full of grayed-out menu items saying, in effect, "you're not really welcome to use this OS you think you've already paid for, but give us more money, you hateful plebs, and maybe then we'll consider letting you use the rest", but the good thing about that is that at least you can see what you're missing. In the case of VMware Player, which is effectively a demonstration version of commercial software, you'd think it would make sense for the demo version to let you explore all the full version's functionality, even if you can't use it all.

So that's what I think of VMware Player. What about Fedora?

I hadn't used an RPM-based Linux since about 1998. I hated it. Debian, for all its faults ("would sir like stale Debian or broken Debian?"), restored some of my faith in free Unixes. RedHat was just one long nightmare of manual package dependency resolution. If it hadn't been for the desire to test our RPMs, I'd never have thought of trying it again, even though I've heard of yum.

Also, for some reason, amongst the people I know, Fedora seems to attract the KDE users. That was another reason I'd assumed I wasn't missing anything. The default, though, seems to be GNOME, so those people must have deliberately inflicted KDE upon themselves.

Fedora's boot process looks a bit nicer than Ubuntu's. Ubuntu doesn't have a fancy graphical lilo/grub stage, and when it starts booting proper, it's in some ugly low-res mode with dark brown text on a black background. I'm sure the coprophiles in the audience love that, but for normal people it's not so great. Fedora has a plain Mac OS-like display while loading, but has a disclosure triangle that lets you see something like what Ubuntu shows by default. Neither, as far as I can tell, let you see the full unadulterated Linux boot noise. (But then you wouldn't guess how to see the full output on Mac OS. It makes you choose ahead of time by holding down command-v before the graphical boot starts.)

Fedora's default desktop is a lot less brown than Ubuntu's (again, scatologists may disagree as to whether this is really an improvement), and there's a better range of available background images. (One flaw is that it has the worst-ever icon for Firefox. I had to wait for a tooltip to convince myself it was a web browser. I don't know why the various distributions go out of their way to re-brand Firefox when Firefox's own logo looks fine at a variety of sizes, and is pretty well-known even in the general population. The number one problem I see non-Mac people have when trying to use my Mac? They can't find the web browser because there's no IE or Firefox icon on the desktop.)

From brief use, though, Fedora's an unconvincing proposition.

The first thing I noticed is that "Package Updater", the equivalent of Ubuntu's "Update Manager", is really slow. It's probably just that their servers are slower than Ubuntu's, but it makes a difference to the end user.

I also found that at the moment, for example, I'm unable to install the updates on offer because it's unable to resolve dependencies. I don't know how typical this is of Fedora, but Ubuntu has behaved perfectly in this area. (You'll also remember that I failed to install the Parallels .rpm because a dependency couldn't be resolved. So either I'm really unlucky, or Debian-based systems still have nothing to worry about.)

Fedora's "Package Updater"'s display of "update details" is exceptionally weak, too. It just shows the version numbers of the current and new packages. Ubuntu shows the package description (in case you don't even know what the package is) and the relatively readable changelog.

Fedora's "Package Manager", equivalent to Ubuntu's "Add/Remove Applications", is similarly unappetizing. It may have a GUI, but it's about as easy to use as dselect(1). In fact, it's very much like dselect(1). Ubuntu has something similar (but still better) in "Synaptic Package Manager", but for simple use you don't need to bother with all that. I hadn't really appreciated Ubuntu's "Add/Remove Applications" before, but I do now. Not only is it much easier to use and much faster, it also has stuff I'd actually want to install.

Fedora disingenuously talks about their Java development packages as if Java development stopped in 2003 and 1.4.2 was still the latest version. Worse still, they warn against installing Sun's RPM because Fedora's unfinished Java conflicts with Sun's package and "Sun Java might disappear from an installed system during package upgrade operations". Great. For Java developers and users of Java applications, Debian-based distributions are currently the place to be in the Linux world.

The one other program I got to play with is system-install-packages(1), the RPM equivalent of GDebi. Like the other tools, it's weak in terms of what it tells you about the package. GDebi is streets ahead.

On the bright side, Fedora 5 has a newer kernel than Ubuntu 6.06, and I'm told that if you care about NFS, you'd much rather have Fedora 5's 2.6.17 than Ubuntu 6.06's 2.6.15. SELinux might also be a consideration. Most of the GNOME desktop stuff is the same between the two.

Personally, I saw no reason to use Fedora as anything but a guest OS, and several reasons not to want to give up Ubuntu.