Update (26th Aug 2009): It does now seem to be working and I've successfully ordered my copy. In fact it tried to order me 4 copies, apparently having remembered my previous failed attempts.

I recently bought a new Mac so I qualify to get Mac OS X 10.6 (Snow Leopard) super-cheap as part of Apple's Up-To-Date program. Unfortunately, the online up-to-date system doesn't seem to be working, for the UK at least. Here's my transcript of live chat with the Apple rep, where they state that indeed it's not working and they know it.

  • You are chatting with Danielle C, an Apple Expert

  • Hi, my name is Danielle C. Welcome to Apple!

  • Hello – I'm struggling to use the Snow Leopard Up to date program.

  • Good evening

  • You are trying to register for it online?

  • I click through, fill in details, it says my computer is qualifying, but then it says "There are no items in your basket"

  • yes – using website

  • I apologize for the inconvenience.

  • I'm clicking through from http://www.apple.com/uk/macosx/uptodate/index.html

  • Unfortunately there is a glitch in the site, you can still order via post or fax in your order form.

  • :-/

  • I've been trying for days.

  • Using different browsers, assuming the problem might be my fault.

  • The site is not working for most people trying to order it unfortunately.

  • You would have to fax or send in your order form.

  • How about putting something up on the page to say so, to save all those people's time?

  • I am very sorry about the inconvenience.

  • How do I email in an order?

  • You cannot email it in, it has to be Fax or Post.

  • I bet a lot of people will stump up the full amount, to get past the inconvenience.

  • Which might be why nobody's fixing it or even putting up a sign saying it's broken. But that's the cynic in me.

  • Do you know when it might be fixed? I'll wait if it's fairly soon.

  • Unfortunately I would not have that information.

  • Do you mind if I post this transcript on my blog?

  • Thanks for waiting. I'll be right with you.

  • Sure.

09. August 2009 · 8 comments · Categories: iPhone, Mac

I've noticed that in iPhone's Calendar, you can't change the calendar (Home,Work, etc.) of an entry once it's been created – only at the point that it is being created. This is immensely frustrating as quite often I fail to spot which calendar an entry is being created in until after I've hit Done and I see it showing up in green or blue in my calendar. I split about 50/50 between Home and Work entries and so very often each new entry is of a different type to the last (though I fail to notice it) leaving the default calendar assignation incorrect. Grrrr.

Update: I realised that a big reason for failing to spot which calendar is being used at point of entry is that it doesn't use the calendar colour in the creation UI – only the name. If it backed the name with a big splash of colour (green for home, blue for work) I for one would be far less likely to mess up.

Because my broadband wasn't working I've been using internet tethering with my iPhone for my main internet connection for my computer. So when my iPhone demanded I update its software to cure its SMS vulnerability I thought hey why not go ahead! I figured it would download the update to the computer (via the iPhone's net connection) as per normal, then perform the update. No reason to suspect a problem. 

Unfortunately once it had got the whole 300MB package and tried to install it, it required access to some Apple server in order to finish the install, but the iPhone was half-updated and no longer providing internet connectivity. So I got stuck there, with an iPhone just showing a "connect to iTunes" graphic when switched on. I understand this is known as "recovery mode". And that's how it's been for a full day, but thankfully I now have broadband working and have managed to get it back up on its feet. That required a factory restore then update from backup then full sync though, and I'm yet to determine if all is truly well.

So the lesson here is – don't use your iPhone as the sole internet connection in order to update your iPhone!
For some reason, having switched it off when the previous occupants left, we now have to wait 2 weeks for BT to turn our broadband back on again. I know not why. They must literally have a system that includes a "wait two weeks for no good reason" step. As such I'm using my iPhone with internet tethering as my internet connection.

It works reasonably well, maxing out at about 50 kilobytes/s – which equates to about half a megabit, so stretching the term broadband quite thin but useable as long as you're not in a hurry. However I've noticed that O2 are pulling a fast one (pun intended) and rewriting JPEG and GIF images that you request via HTTP, re-encoding them at a much lower quality level, presumably in order to make your bandwidth go that much further.

I have a problem with this though as they've gone so far down the quality slope that the images are often no longer fit for purpose, with small text unreadable and photos suffering from JPEG artefacts so badly that there's only a muddy mess left. Here's a small screenshot from my blog sidebar, showing the knackered JPEG, which I have saved with very high quality JPEG compression so as not to introduce more artefacts. Of course when I review this post it'll get re-compressed by O2 again and look even more terrible (indeed the hyperlink text is near unreadable) but hopefully you won't have that problem unless you're also tethering.

O2CompressedJPEG

So this is a plea to O2, asking them to turn up the quality, if they must mess with the web at all.
08. July 2009 · Write a comment · Categories: Mac

I hear that Mac OS X 10.6 Snow Leopard will herald the return of the permanently visible event inspector panel in iCal. I've really missed it for the last couple of years. Double clicking each item then clicking "Edit" is a major chore and I look forward to getting back to the simple old ways.

Whilst they're at it I hope they fix the basic mouse event handling so I can reliably grab and drag the edges of an event. The current behaviour seems to be based on coin flips.

Update: It's not quite what I hoped unfortunately. Rather than having a fixed panel for displaying and editing the full details of the currently selected event, there is a popup window. In exactly the same manner as the Finder's Get Info window, this can also be opened as an 'inspector' that changes to reflect the current selection. It is always a floating window above the rest of the UI rather than a built-in portion of the main iCal window like it used to be. I've arranged my main iCal window and inspector alongside each other and thankfully they both reappear when the app is quit and reopened. So nearly, but not quite what I was after.

I've been putting together a WordPress powered blog or two recently and diligently documenting the steps required, as ever. The documentation available from the WordPress site is pretty good, but sometimes it's over verbose, whilst frustratingly also stopping short of giving you exactly the details you need. So here's what works for me to upgrade an existing WordPress installation to a newer version. This is using the manual approach BTW rather than the built in auto-upgrade functionality, which asks for FTP details (of what I'm not sure, and it doesn't bother to elaborate) and therefore makes a mockery of the term 'auto'.

The official instructions that got me going initially are at http://codex.wordpress.org/Upgrading_WordPress FWIW, but I do precisely this on Mac OS X:
  • Download the zipped upgrade package and unzip it somewhere - e.g. to wordpress_upgrade directory for the sake of this example.
  • Backup existing installation in full – both the wordpress directory itself and the associated MySQL DB, just in case.
  • Merge the newly downloaded package over your existing install (assumed to be a directory named wordpress here) with the following incantation at the command line, which takes advantage of the fact that cp merges, whereas Finder copying just oafishly replaces:
  • > cp -r  wordpress_upgrade/ wordpress_original
  • Compare the new wp-config-sample.php with your existing wp-config.php (e.g. using FileMerge) to see if any new config items have been added. If so, manually add those into your wp-config.php file, or if easier rename the sample to wp-config.php and put back the DB connection and other relevant bits.
  • Load up the /admin page in your web browser and follow the instructions to complete the upgrade, which involves it upgrading any DB bits, etc.
Apple have finally patched up some serious security holes in their Java distributions with Mac OS X. I had a problem when trying to install it, getting the simple message The update "Java for OS X 10.5 Update 4" can't be installed almost immediately after pressing the Install button (it didn't even start downloading). I'd just freshly started up my Mac and the browser wasn't running (it specifically instructs you to quit all browsers) so that wasn't the problem.
JavaUpdate4Fail 
Repairing permissions on my startup disk with Disk Utility then restarting seemed to fix it and allow the installation to proceed. Now I have 1.6.0_13 successfully installed.

Update: Exactly the same experience on my PowerMac G5 (original attempt was on an Intel MacBook). Same problem, same solution. Could it be because I've previously used the Java Preferences app to switch between JVM versions (like you're supposed to)? It's just about conceivable that the way the prefs app performs the switching leaves permissions a bit messed up as far as the installer is concerned, but none of the permissions it claimed to have fixed looked to be related in any way. Maybe it was more the restart that helped. Certainly just fixing permissions alone was not enough.
WWDC has begun and more information is trickling out about Mac OS X 10.6 "Snow Leopard". I like what I see, but one thing really stood out as intriguing: default gamma will be 2.2 rather than the traditional Mac setting of 1.8. It's one of the many items mentioned on this page: http://www.apple.com/macosx/refinements/enhancements-refinements.html. This is going to be important for photographers and graphic artists in particular.

What does it mean? Gamma refers to the way numerical colour representations are mapped to real colours on the screen – specifically how the luminance is mapped, i.e. how light they appear. Wikipedia explains gamma in full, complete with some neat sample images to show how different gamma settings affect the way an image looks. Windows PCs traditionally use system gamma setting of 2.2 whereas Macs go for 1.8, which means that the same image tends to look darker on the PC than on the Mac, assuming that the image doesn't contain colour profile information, which is the case for most images and videos on the web. Mac users create pictures to look just right on their monitor and are disappointed when the image looks dark and dingy on their PC using friends' machines. Conversely, the PC artist is surprised that the image they create looks bright and washed out on their friends' Macs. And neither of them generally have a clue that this is because of the different gamma settings of the systems!

It seems that Apple have decided to bite the bullet and get in line with the popular 2.2 standard to end this perennial confusion. This is a major step for Apple to take and I imagine they had to think long and hard over it, but it's probably for the best in the long term.
I've been working on an iPhone app that uses location data extensively. From poring through the raw data that comes from CLLocationManager I've learned a few interesting things. In particular it seems that CLLocation objects with negative (i.e. invalid) verticalAccuracy value were likely derived from non-GPS sources – e.g. triangulation from cell towers or SkyHook WiFi positioning. In my app I really need only the purest, most accurate data so I'm choosing to ignore non-GPS data and this is how I can tell it apart in order to do that.

It took a while for this realisation to dawn on me as I was seeing occasional poor data points mixed in with the good ones, and this seems to be because it occasionally slips in a non-GPS location in certain circumstances.
Objective-C can be a difficult mistress at the best of times, but I've been pulling my hair out over the useless exception traces it gives when my iPhone app falls over. For example:

2009-06-02 22:22:39.036 GPSDraw[31024:20b] *** -[CLLocation timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x40add0
2009-06-02 22:22:39.038 GPSDraw[31024:20b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[CLLocation timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x40add0'
2009-06-02 22:22:39.039 GPSDraw[31024:20b] Stack: (
    2532991147,
    2419396155,
    2533020330,
    2533013676,
    2533013874,
    2532962733,
    23499,
    22944,
    2520474771,
    2532494021,
    2532494456,
    827745792,
    827745989,
    816114848,
    816160924,
    11116,
    10970
)

Which is all very exciting, but how about telling me the line of my code that threw the exception? That's what any sane IDE would do, but XCode is different and prefers to give an unhelpful list of numbers instead. The stack that the debugger shows is always just some arbitrary point in the main run loop, with the only bit of my code in scope being main.

However I've stumbled across the crucial way to get the behaviour that should be enabled by default. Whilst debugging, select Run > Manage Breakpoints > Add Symbolic Breakpoint. Now enter "objc_exception_throw" without the quotes and it should actually break at the point in your code that the exception is thrown.