Angelo Stavrow

On Dates

Pop-quiz, hotshot: You have a project that’s due on 10/01/2014. How long do you have to complete it?

Yeah. Short-date formats are the devil.

For the first twelve days of the month, they have exactly zero reliability. This is not a quality that we like for a thing that is meant to store data—and potentially critical data, at that.

Additionally, they have cultural bias. If you read that due date as March first, it’s likely that you’re from North America. If you read it as January third, chances are you’re from Europe. Obviously, data types should be culturally agnostic.

So, in the late 1980s, the International Standards Organization set out to get some kind of consensus going on short-date formats. And out popped the standard known as ISO 8601, Data elements and interchange formats – Information interchange – Representation of dates and times, which states that dates shall heretofore be written as follows: YYYY-MM-DD

So let it be written, so let it be done.

As an added bonus, it builds-in some valuable organizing capabilities. Try this:

  1. Make a list of 100 random dates spanning a few years in Excel.
  2. Put them in a few different formats, including ISO 8601.
  3. Now sort them alphabetically.

Which one naturally sorts the dates in chronological order?

(As an aside, it makes the most sense to use dashes instead of slashes or dots because dashes will not confuse less-sophisticated parsers into thinking you’ve got escape characters or file extensions in the middle of your date.)

(As a second aside, I have a TextExpander shortcut, sdate, that expands to today’s date in ISO 8601 format. You should set one up too.)

Of course, this being an international standard, no one actually follows it, and instead does their own thing.

If you choose to ignore ISO 8601—and even if you choose to implement it—please consider your design carefully, keeping your users in mind (remember, the person writing in a date may be different from the person reading the date). Users have a funny habit of running amok if you don’t try to somehow validate or constrain their input.

This is why web and app forms use slow, clunky date-pickers—they ensure that dates are being input correctly by, at a minimum, providing cues regarding what part of the date you’re entering.

The dropdown list goes from 1 through 12? You’re entering the month.

The same consideration is required for readers of a printed page. I recently received a form document from a company which contained the following table:

Requested on Required by
11/11/2013 10/01/2014

So: how long do I have to fulfill this request?

The kicker is that this company almost certainly has internal procedures or software for filling out or generating this form. I, on the other hand, need more context. Consider the following modification:

Requested on
(dd/mm/yyyy)
Required by
(dd/mm/yyyy)
11/11/2013 10/01/2014

Even if they’re not using an international standard or a fully-written-out long-date format, I know that this is needed by the tenth of January. No further discussions necessary. Clarity and consensus naturally flow from adding context.

DxO Perspective Available for Mac

It’s been a while now since I moved away from using big expensive photo-editing packages; for my purposes, I’m perfectly well served with lower-cost alternatives. But occasionally, I do miss some of the features that pro software like Photoshop can deliver.

One such feature is perspective correction. You know this phenomenon well: it happens when the camera’s film or sensor plane isn’t perfectly parallel to the subject you’re photographing, and distortion causes vertical and/or horizontal lines to converge or diverge across the frame. Sometimes this is left as-is for effect, but when you want to make those lines parallel again, Photoshop has a distortion correction feature to solve that problem.

For an order of magnitude less in price, DxO—known for their powerful image processing plugins and software—have released DxO Perspective, a simple-to-use bit of software for performing perspective correction. Have a look at their demo video:

I decided to give it a try with a photo I snapped on my iPhone at IKEA:

Before

After

The difference is subtle but clear. And best of all, the correction took all of 30 seconds. DxO Perspective is currently selling for 50% off ($9.99) on the Mac App Store.

When GTD Doesn’t

Lately, I’ve been thinking a lot about productivity—largely because I’ve been falling behind on actually doing some the things I have on my various to-do lists. Don’t get me wrong: the most important and urgent projects are being completed. But if you subscribe to the Getting Things Done mantra, that’s only one step above putting out fires as they flare up.

And so whenever I review my GTD system (which I implement using the excellent OmniFocus for iPhone, iPad, and Mac), I keep shuffling dates and seeing the same projects keep coming up, again and again, slowly piling up. Clearly, I’ve not been doing very effective GTD reviews.

ALAC of Activity

I like audio. I like C++. So when I looked around for an open-source project to contribute to, I came upon the Apple Lossless Audio Codec project on MacOS Forge and jumped right in.

I figured that a good start would be to view the tickets that had been posted, and fix an issue prioritized as minor; this would acquaint me with the codebase and, at the same time, let me see what the community is like. Four weeks later, I’m still waiting to find out.

I think that this is emblematic of a lot of the smaller open-source projects out there. Developers will open-source their code and, for whatever reason, these projects tend to fall by the wayside. When there’s no real means of communicating with the developer, either via mailing list or e-mail, there’s no way for other developers to pick up the torch. This seems to be the case with ALAC; the wiki was last updated over a year ago, and the last ticket filed was in July of last year. A few people seem to have either mirrored the repository or ported it to another language, but there’s a dearth of activity in those projects as well.

On the surface, it’s troublesome that even a relatively well-publicized (by Ars Technica, MacRumors, &cet.) open-source project by a major company (Apple) can fail to gain traction. But really, it’s not that surprising. A smaller project won’t have the priority level that keeps the attention of an otherwise-busy developer. And something like ALAC doesn’t have the appeal of, say, Webkit, nor does it have well-known developers of projects like ThinkUp, who bring along both their talent and their audiences.

Another possibility is that the project has been obsoleted by something newer and better, and thus there’s little point in maintaining it. This makes good sense, even if it bothers my personal need for closure. I can’t find anything to support this, but it certainly looks like ALAC is abandonware.

Oh well. Onwards and upwards.

Taking Stock: 2012 MS Bike Tour

Over the weekend, I participated in my 3rd annual MS Bike Tour. This year’s 1200-rider provincial event, in Trois-Rivières, managed to raise over $910,000; combined with the amounts raised in the Québec regional event, we managed to raise $1.24 million.

We had some lovely—if a little hot—weather, and while I won’t go so far as to say the ride was leisurely, it was definitely one of the more pleasant I’ve been a part of. I’m thrilled to have been a part of Team Assante, which in total raised just short of $24,000 this year—160% of our $15,000 goal.

While I screwed up running Cyclemeter on the first 80-km day (turns out Airplane mode turns off iPhone’s GPS too, for some reason), I managed to get some of my (lousy) stats for day two:

  • Ride time: 4:38:57
  • Distance: 64.81 km
  • Fastest Speed: 41.94 km/h (whee!)
  • Average Speed: 13.94 km/h (not sure if this includes stopped times or not.)
  • Elevation: 74 m
  • Ascent: 247 m
  • Descent: 242 m
  • Calories: 2351

Here’s a map link including my average times per 5-km leg. As soon as the photos are up, I’ll put up some links.

Once again, a great event put on for a great cause. I’m looking forward to next year.

iOS Keyboard Shortcut Tip: Ellipses

If you’re like me and use ellipses ( ) a lot in your messages and e-mails, then here’s a quick tip for using iOS 5’s built-in keyboard shortcuts.

Go to SettingsGeneralKeyboardAdd New Shortcut… and enter the following:

Note that to enter an ellipsis in the Phrase field, hold down the period key ( . ) to show the alternate character bound there. Then, when you’re typing something, just hit the period key three times in a row and it’ll auto-replace it with a proper ellipsis:

Why bother?

  1. iOS won’t auto-capitalize a word that comes after an ellipsis, but it will auto-capitalize a word that comes after a period. Obviously, you don’t want a capitalized word following an ellipsis.
  2. The ellipsis counts as one character, rather than three, which is handy for limited-length things like SMS and Tweets.

Hope this is useful to someone out there.

On Blaming the User and the One-Dad-Call Rule

Leo Laporte on the tone of Dr Paul Vixie’s writings regarding DNS Changer:

And [there’s] a little bit of blaming the user. It’s their fault. And I think really he should take more blame for setting up a system that doesn’t work and should be putting more effort into fixing it than blaming the user, to be honest.

This got me thinking. It’s important for engineers to understand that to everyone else, we’re the weird ones. That’s why good UI/UX people are worth their weight in gold.