Duration.parse
As far as I can tell, the
de facto standard Ruby duration class can't parse ISO 8601 durations (
e.g.,
PT1H for one hour). This makes the iCal parser rather worthless, if your source happens to actually use the
Event.duration member.
I wrote
an ISO 8601 parse method for Duration. The code is quite awful (I haven't really written any Ruby since 2002, and I'm very out of practice!) but it works:
irb(main):001:0> load "iso8601-duration.rb"
=> true
irb(main):002:0> Duration.parse("P1H20M")
=> #<BigDuration: 1 hour and 20 minutes>
I'm putting this code in the public domain. If any of the Duration maintainers want to integrate it, they can go right ahead (though an email to let me know about it wouldn't go amiss!).
Posted at 2007-04-22 21:08:53 by Richard • Link to Duration.parse
, trackbacks.
Cory Doctorow doesn't know shit about email clients
Thunderbird 2.0 is out. Thunderbird is the free, open email client that does for email what Firefox does for browsing: liberates you from proprietary software, proprietary formats and expensive upgrades and puts desktop mail back into the control of the community of users.
That's all well and good, but
it's not as good as Apple's Mail.
It's really not. Try it:
- Compose a new message, and send it without touching the mouse. (You can't: there's no keyboard shortcut to send a message.)
- Go to cancel that message, and tell it “Don't save” without touching the mouse. (You can't, because the dialogs don't respect Mac interface convention, so Cmd-D doesn't work. If you're lucky, you have full keyboard accessibility turned on, so you can hit Space to press the button.)
- Take one account offline.
- Search within messages across multiple accounts (even the Find dialog can't do this).
- Connect to an Exchange server without using IMAP.
- Use a sensible sort order, and get the sorting indicator arrow to face the right direction. I can't believe that this is still wrong in 2.0.
- Delete your junk mail or deleted items without touching the mouse.
- Change the font size in the message list so you can see more than 32 emails at once on a MacBook Pro.
- Jump from a message to your reply with one click.
- Send an email to a contact in your Mac Address Book.
There are plenty more, but I don't need to go on. Thunderbird is a pretty shitty email client, and I only use it for one account, because I require one particular Thunderbird extension. If I didn't need that extension, I'd actively avoid using it.
(I do agree with Cory on one point, though. Thunderbird does indeed do for email what Firefox does for browsing: it makes me look for a more usable alternative (on the Mac, at least). In Firefox's case, that's OmniWeb.)
Posted at 2007-04-22 00:16:18 by Richard • Link to Cory Doctorow does…
, trackbacks.