Category Archives: Computers


Strongly typed routing for Microsoft MVC4

(Right that title should have put off my casual audience who might have come here expecting a film review or a rant about religion.)

TR;DR: This post describes a new wee .NET library, to add static typing of URL routes in Microsoft MVC4. You can get it on github.

Basically it lets you:

  • Define URL routes as strongly-typed, first-class-objects
  • Bind routes to controller actions, fully statically-checked (so the compiler catches parameter mismatches/misspellings)
  • Generate links in your Razor code (a) succinctly and (b) fully statically type-checked.

Oh, and:

  • It all works at compile time—you don’t need to run a program to generate code or anything like that.

Continue reading

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.


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:

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/*” 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!