Archive for the 'Personal' Category

Page 2 of 9

Interesting Rosetta problem

Having set up a brand new Mac mini for my parents (woo!), I tried running the excellent Eric’s Ultimate Solitaire – only to run into a hang while it was opening (this is on 10.5.7). Curiously, in two of the three user accounts (on migrated, one new), the hang occurred; but in the other account, also migrated, it booted fine. This was a pretty major problem, as basically my mother couldn’t live without “Eric”, as she affectionately refers to it. It’s been a constant companion ever since the demo shipped on our first Mac, a Performa 6320.

I deleted cache files, ran maintenance scripts, repaired permissions, deleted preferences… Everything I could think of, but to no avail. I finally ended up staring at the Get Info window for the app, wondering what was wrong, and noticed that it was a PowerPC application.

Universal Binary logo

Now, I know about Leopard’s Rosetta technology for running PPC code on Intel Macs, and I knew that Ultimate worked fine with it: not only did it work in an account on this new Mac, it worked when I tested it on my laptop. So, I figured maybe Rosetta was broken somehow in these two user accounts. I decided to try opening an application in Rosetta – you can force this using the checkboxes in the Get Info window of a Universal application – to test it out. I chose, and it worked fine. Puzzled, I went back to Ultimate for the last time, and… it loaded!

I’ve since tested the solution in other accounts, and each time it’s worked: Ultimate was hanging on launch, I opened Chess in Rosetta mode, and went back to Ultimate to find it was fixed. Best of all, it seems to be permanent.

So, I don’t know if anyone’s ever come across a similar problem, or even this solution, before; but if you’re having trouble with a PowerPC application on an Intel Mac, I highly recommend opening an app like Chess in Rosetta mode and seeing if it helps to jump-start compatibility.

Addendum: Whether the problem lies with Ultimate or with Leopard I honestly have no idea. Ultimate has always been reliable for us (and it’s very heavily tested :)). On the other hand, I had to reinstall iLife Support and zap the P-RAM in order to solve a Leopard problem with slow screensavers (of all things) – that stemmed from using the Migration Assistant. So, I have my suspicions on this one…

Notes on the HTML 5 video codec debate

HTML video tag

You may or may not have heard about the disagreement over HTML 5’s video codec support. Let’s ignore the patent arguments completely, and the licensing fees (which I’m sympathetic to) — I’m not a lawyer, so I can’t bring anything useful to the table.

Basically, the choice is between H.264 and Ogg/Theora, and both Google and Apple think Theora sucks — for hardware support, and in general. (By the way, I’ll apologise now for my inconsistent references to Ogg and Theora; for reference, Ogg is the umbrella project, Theora is the video codec, and Vorbis is the audio codec.)

Let’s examine video quality. Noses were put out of joint by this comment from a Google guy:

If yt were to switch to theora and maintain even a semblance of the current youtube quality it would take up most available bandwidth across the internet.

Clearly, that’s hyperbole. Equally clearly, he doesn’t think much of Theora’s video quality. (Bear in mind, this is coming from the side that’s shipping support for both H.264 and Theora in Chrome; he has fewer reasons for bias than, say, an Apple guy who has some investment in H.264’s success.) This prompted a comparison from Greg Maxwell at Xiph, the people behind Ogg. I’ll summarise my criticisms of that comparison in Handy List Format:

  • Only the first pictures compare H.264 and Theora. The second set compare H.263, the legacy YouTube codec, and Theora, which is not even slightly relevant to HTML 5 (and only relevant to the quotation above if we’re being slightly pedantic).
  • YouTube’s H.264 files aren’t anywhere near the best quality that H.264 can deliver. They’re designed for mobile playback, and as such are designed to be playable by common, low-cost mobile hardware. Files designed for desktop playback — even GPU-accelerated playback — can have much more complex features enabled, and deliver vastly better quality at the same file size. The Ogg files, to my knowledge, are the best that the codec can deliver, without regard for the power of the hardware needed to play it back.
  • Even this H.264 file clearly clearly beats Theora. Note especially the grainy banding around the water lilies, which is often indicative of a codec that’s struggling slightly at the specified bitrate.
  • The Theora files were encoded by an expert, but the H.264 files were encoded with catch-all settings by an automated process. Anyone vaguely serious about video will tell you that different clips need different treatment, and a human who knows what he’s doing will totally outclass a machine which applies the same settings to every clip.
  • H.264 is famously useful at all kinds of bitrates and resolutions. Most codecs are only suitable for a limited range of values, so even if H.264 can be outclassed under specific circumstances (and, again, I see no evidence here that Theora’s going to do that), it wins for its versatility.

So, you’ll gather I’m not a giant fan of Ogg either. From my lengthy use of H.264, my (admittedly limited) exposure to Theora, and considering the opinions of those I trust, I can’t convince myself that Ogg is anything other than inferior. This is not to say that it’s irrelevant, or unimpressive; just less desirable in this context.

The lack of hardware support, though, is inescapable. Lots of video cards have H.264 decoding capabilities, which allow the playback of compatible video without stressing the computer. This is a Good Thing™. There aren’t any such decoder chips for Theora (or if there are, they’re extremely rare), which means decoding would have to be done on the CPU. While that’s generally fine for desktops (if inefficient, even a possible problem for HD video), it completely rules out mobile devices; iPods, iPhones et al rely on hardware decoding to play back video, as their CPUs are about an order of magnitude too weak. So, this alone is probably a deal-killer for anyone interested in mobile video… as both Google and Apple are.

Think of the situation with Flash video. That is largely CPU-grunt-based, and runs bearably on the desktop. When it comes to mobiles, it’s like running through treacle, and really not a viable option. Apple and Google even went to the trouble of creating an H.264-based alternative — which can utilise hardware acceleration — to YouTube for the iPhone. We’ve got essentially the same choice here: either go with Ogg/Theora, which will exclude mobile browsers completely and perpetuate exactly the same bloody mess of incompatibility that HTML 5 is supposed to help resolve, or go with a solution which can easily be supported on a wide gamut of platforms.

So why don’t Apple follow Google, preferring H.264 but implementing both? They’ve actually, of course, taken a quintessentially Jobsian position: a crappy implementation is worse than none at all. (Especially if Theora’s adoption might harm the chances of something better coming along.)

So, what to do? Ian Hickson wrote a remarkably even-handed review of the situation and concluded that any requirement for codec compatibility had to be dropped, to prevent an unworkable specification.

His conclusion rather surprises me though. What’s wrong with requiring at least Ogg or H.264 support of compatible browsers? Sure, it’s just codifying the status quo, and it means that there’s no single file that can be guaranteed to play in every HTML 5-capable browser. It does, though, protect against any further fragmentation in support.

Needing two files might be inconvenient. But it beats 3. Or 4. Or 5…

Solution for iPhone OS 3.0 icon problems

If you’ve been having trouble with messed up icons in iPhone OS 3.0 — duplicated or missing icons, switched icons on apps — then here’s a solution… if you’re jailbroken.

It seems to be caused whenever you have to force-reboot your phone (holding down the home and power buttons), or when certain apps reboot your phone uncleanly (like when installing through Cydia). Edit: saurik says Cydia doesn’t do anything wrong, and he should know; it’s just an unfortunate coincidence. The only known fix for unjailbroken phones is deleting your apps and reinstalling them, which of course deletes all your data. For jailbroken devices, though, you can just dump the icon cache with Mobile Terminal or through SSH:

mv /private/var/mobile/Library/Caches/ /private/var/mobile/Library/Caches/; killall SpringBoard

This renames the file and restarts SpringBoard. If everything seems okay, you can then delete this old file:

rm /private/var/mobile/Library/Caches/

This solved all my icon issues magically, and I’ve not had any side effects. Much better than deleting all my apps!

Ow ow ow

I crippled myself (well, sprained my foot) while playing squash last night. Ever get the kind of pain that hurts so much you have to laugh? Well, climbing stairs is hilarious…

Also, I maintain that victory over an injured dude is no victory at all, TOM. :-)

Beta test a new widget

Transmission widgetLong ago I made a widget for Clutch, the Transmission web interface – and it never made it past early testing. Now Clutch is part of Transmission, and I’ve been updating the widget to work with the latest Transmission builds.

If you’d like to help me test this, and have some input into the final design, email hawkman@ this domain. :)

Just fixed a comments issue I didn’t know I had

Comments are now working again. Don’t know what went wrong there.

Quoter plugin 1.11

Seeing as the WordPress Quoter plugin is now abandonware, I had to fix its bugs myself. No more uncited quotes gaining mysterious attributions, and no more automatic quoting of the last comment in the reply form.

If it’s useful to you too, you can find the fixed version here. Comments, observations etc. welcome, to hawkman@ this domain.

Beta testers wanted

If you’d like to beta test a new version of BBC Radio Widget – that sort-of-kind-of fixes the audio drop issues with RealPlayer 11, amongst other things – please get in touch. I’d particularly like to hear from people who are still running Safari 3, or RealPlayer 10; but any and all testers are welcome. Drop me an email, hawkman@ this domain, or leave a comment.

Update: Thanks to all of you who helped me test this widget. We caught an order of magnitude more bugs than I’d have found alone — as evidenced by the 7 betas it took. Cheers.

Latest project

I can has teaser screenshots?
DashTweets teaser 1DashTweets teaser 2

Introducing gRead

gRead - Google Reader widget screenshotHow do you check Google Reader? Maybe you just load the page in your browser, or have a separate application, or an item in your menubar?

Say hello to gRead, a Google Reader widget for Dashboard which automatically checks your account for new items and links you straight to them from Dashboard. If you’ve got Growl installed, it’ll check while Dashboard is hidden and send you notifications about new items! You can even choose between a badge and colour coding to let you know about new content. Thanks go to Sam for the idea, critique and some artwork for gRead. :)

Surely this is the most convenient way to check Google Reader yet?! And best of all, it’s completely free. Check it out now and let me know what you think.