R.I.P. Steve Jobs

(Though probably not M.I.X. Or B.U.R.N.)

Steve Jobs has died, and the media and the… Blogosphere? Social Nethood? …is showing an outpouring of, well, grief is the wrong word, but praise and love. Maybe grief is accurate, actually.

Not the kind of grief you have for your grandparents dying, but perhaps the kind of grief for a friend of a friend.
Continue reading

iCal woes

It is an article of faith amongst Mac users that their system of choice is inherently superior to (spit) Windows. Not only that, but it never crashes, loses data or does flaky, unpredictable things.

I’m here to tell you that they are deluded. Apple software generally is not bad, but it’s not infallible. In particular iCal and Address Book have over the years caused me endless hassle and pain.

Anyway, this post is an aide-memoire for me, if nothing else, about how to fix infuriating iCal issues.

De-Dup

Firstly download and install the brilliant iCal Dup Deleter. Various iCal issues, including duplicate entries, missing entries, the appearance of things which you thought had been deleted, and general flakiness, can be solved by running this tool on each of your calendars.

Download it here: http://www.nhoj.co.uk/icaldupedeleter/

I’ve even seen my calendars go completely blank—all the entries disappear—and that’s a bit frightening the first time you see it, if you depend on iCal to keep track of your appointments—and it can often be fixed quickly and easily by iCal Dup Deleter. Loverly.

Restoring from backup

On recent versions of OS X, calendars are stored in “~/Library/Calendars” (not in “~/Library/Application Support/iCal”, though if you’ve upgraded through several versions, that directory may still exist).

In addition, the program preferences are stored in “~/Library/Preferences/com.apple.iCal.*” You can safely delete the preference files. Sometimes that flushes out problems.

Hang on startup (iCal and AddressBook)

Had an issue today whereby I lost all my events, but iCal Dup Deleter didn’t work either.

Tried restoring the directory from backup, and that failed: iCal would hang on startup. I had a nightmare attempting to restore individual calendars, deleting lock files; nothing worked.

Turned out to be a problem with AddressBook(!). AddressBook hung on startup and (I’m hypothesising), iCal hung waiting for AddressBook. Deleted the various lock files:

cd ~/Library/Application\ Support/AddressBook
rm .database.lock
rm .skIndex.ABPerson.lockN
rm .nfs.20051025.00d1
rm .AddressBook-v22*

…and AddressBook started normally and so did iCal. Hurrah!

Prince: brilliant musician; funked-up brain

In other news, Prince is apparently actually my grandmother:

“They [computers and digital media] just fill your head with numbers and that can’t be good for you.”

His new album is available only on CD, and not iTunes, Amazon, eBay… and he’s closing (closed) down his own website (presumably because he doesn’t want to fill other people’s heads with numbers and thus contribute to the problem). So he’s promoting it on MTV? Ah, probably not, since MTV is ‘outdated’ the same way the Internets are.

So expect his ship-to-ship–semaphore–(or possibly telegram)–based marketing campaign to commence in 3… 2… 1…

(Good thing noone’s told him that CDs are digital.)

Incidentally, his cover of Radiohead’s Creep is brilliant.

Removing nulls from Scala, some thoughts

I’ve written one or two small pieces of software in the new upstart programming language Scala, and I love it. It takes all of what is good and right about Java and C#, removes a lot of the cruft, and introduces powerful new bits from modern functional languages. It’s a pleasure to write in.

Unfortunately there is one of the bits of cruft from C#/Java which is still there: the concept of ‘null’—a value which can legally be assigned to any reference type, but which causes an exception if you try to dereference it. It’s an ugly carbuncle on the type system, but, for compatability reasons, it’s never yet been removed.

Here I present one way of ridding the Scala world of nulls—whilst remaining compatible and efficient. I wish for World Peace and for this to be implemented in Scala 3…

[If you don’t care about programming, type systems and language implementation, I heartily suggest you skip this article. I’ll review a film soon. Promise.]

Continue reading