Using the SmugMug API from Adobe AIR

March 26th, 2008

SmugMug is an online photo sharing site that has a powerful API. I've been looking for a Mac based bulk uploader that will do things like skip duplicates and couldn't find one, so I set out to write one using Flex Builder and Adobe AIR.

I'm not done yet, but I've got all the pieces working well enough now that I have something I can post. Here it is:

Smug.air

(If you download this and get what looks like a zip file, make sure you're downloading and saving as Smug.air - I think I need to figure out how to get the right MIME type set for a *.air file, because Safari seems to be figuring out it's a Zip file and downloading it as a folder called Smug. If that's what you've got, I don't see any way to feed that to the AIR installer).

If you've got the AIR runtime installed and you run Smug.air, it will install the application and it should just work for you, Mac, PC or Linux. (I didn't test it on all the platforms but I'm crossing my fingers). If you don't have the AIR runtime, get it here.

The way I packaged the AIR application, you should be able to right-click and View Source to see how things are done. It's a pretty simple application (that was the point - to write as little code as possible while still managing to log into SmugMug, download a list of albums, let you choose an album and a photo, and upload them).

I used the Cairngorm prescriptive micro-architecture (I love that phrase) to build the app, and although it took a little getting used to, like many others, after some orientation time, I found the structure was actually a benefit, not a drawback. It could use some wizard support though.

Anyway, I'm not claiming this tool is all that useful in it's current form, but it's a start, and if you're looking to work with the SmugMug API in AIR, it's at least some code to refer to. I'd love to hear any comments.

Linking Policy and Wikipedia

March 17th, 2008

Link rot is an epidemic. Websites are owned by marketing people, who don't consider whether you'll still be able to link to their current stuff in 5 years. The Web needs an indirection layer, something that you can link to, that will always point to current information about any given topic, product, or service.

Turns out the Web already has that. It's called Wikipedia. See how I used it there in that first link? And that last one?

So here's my policy:

  • If what I'm linking to has a top-level domain, then I will link to it.
  • If I'm linking to someone's words (say, a blog post or magazine article), then I will link to that.
  • Otherwise, I'm linking to Wikipedia.

I'm not the only one who links this way. It's placed Wikipedia in quite an enviable position. I wonder how long Wikipedia will continue to exist without ads. Any bets?

Moving In to the MacBook

March 16th, 2008

I've been slowly moving in to my new 15" MacBook Pro, which is slowly becoming my main system at home. It's got decent video (average FPS in World of Warcraft is over 60, and that's with options cranked up), good enough for the gaming I still do on the PC (most of it is on the Xbox 360), and beefier than my old desktop in most other ways.

I am having to make do with external storage for my music collection and photos (it would fit on the Mac but then I'd have no space left), so I'm leaving that stuff on the Windows Home Server. I still like the "just plug in more disks" model of expanding the storage available on Windows Home Server, though I lose out on the nice automated backup. Hopefully someday soon Time Machine and WHS will play nicely together, or maybe I'll just end up with a Time Capsule.200803160954-1

The MagSafe power adapter has saved my bacon at least once already - my cat came tearing through where I was sitting on the couch working last night and ripped the power out of the laptop. The power connection is magnetic, designed to pull out without doing damage to the cable or computer, so no harm done. If it weren't a MagSafe, something would have had to give.

iTunes is faster on the Mac than the PC - no surprise there.

One of the big "I can't switch because" apps are the tax preparation apps. I'm doing my taxes on the PC this year - I'll visit that next year, although I have VMWare Fusion on the Mac so if I need to install QuickTax I can do it. But hopefully next year we'll have a Canadian version of this great Flex application for doing your taxes online. (Check it out if you haven't seen it - it's the best "online form" application I've seen).

Another must-have for me is OneNote. This is a relatively new Microsoft application, which they haven't yet ported to the Mac. I kept a ton of information in OneNote on the PC, and I want that information available on the Mac.

There is no Mac tool that can read OneNote files yet, as far as I know, but I did find an interim solution so I don't lose the information:

  1. Export your notebooks from OneNote as MHT (MIME HTML) files.
  2. Split those apart using File Juicer.

This gives you a folder with HTML files in it that contain the information from your OneNote files. A lot of the formatting is lost, but I wasn't using OneNote for it's formatting, just as basically a place to dump little pieces of text, so this is fine for me.

One bonus of having the information in folders a HTML files is that Spotlight indexes it. It's actually easier to find the info in OneNote on the Mac, now, than it was on Vista, where search still seems to be a crapshoot.

I'm still looking for an app to replace OneNote.

There are a lot of sites with information for switchers so I won't launch into a list of Mac apps I'm using. Here's one that looks good.

Snow Day Aftermath

March 9th, 2008

I managed to get WordPress to let me post images again (after upgrading WordPress), so here's a few more.

Img 0969
Img 0962
Snowypanorama
That last one is a massive panorama I put together using Photoshop CS3. I didn't post the whole file - I doubt anyone really wants to see over 100 meg worth of my snowy back yard.

Snow Day

March 8th, 2008

Actually a Snow Night.. here's what it looks like outside:

And it's not done coming down yet!

The Future of IntelliSense

March 2nd, 2008

Here's a blog post by Jim Springfield at Microsoft about IntelliSense in Visual Studio 10

I like to hear that IntelliSense is going to be fixed, but I've been hearing that for many versions of Visual Studio now, and I have a hard time believing it.  IntelliSense for C++ code has always been unreliable in the projects I've used it on (generally massive MFC applications).

Remember a product called Lookout?  It was a very fast, reliable search engine for Outlook.  Microsoft bought it.  I don't know why they bought it, because they obviously didn't use it - with Office 2007 on Vista, searching email is not fast and not reliable. 

For C++ users of Visual Studio there's a tool called Visual Assist X, which is a fast, reliable IntelliSense replacement for Visual Studio.  It extends Visual Studio in a lot of ways, many of which don't require any changes to your workflow.  For example, if you have a pointer and you type "pMyPtr." as soon as you type the period, it will be replaced with a "->".

One particular improvement VAssistX makes to IntelliSense that I find very useful, is you can type "pMyWnd->size" and list that appears as you type "size" includes all the relevant symbols that contain the word "size", not just ones that start with it.

I'd love to see VAssistX become obsolete with Visual Studio 10, but I'm not holding my breath.  I just hope Microsoft doesn't buy them, so that if Microsoft's improvements don't deliver, Whole Tomato still can.

Don’t Make Me Think

February 28th, 2008

I just finished reading Steve Krug's book Don't Make Me Think!: A Common Sense Approach to Web Usability on Safari.  The first edition was written in 2000, but it's amazing how much of it still applies.  And not just to web usability.

The book is about web design, and how to create sites that users can use without thinking about them.  Kind of like how you walk into a room and reach for the lightswitch without first looking for it, because it's usually in the same spot, there are strong conventions that, if followed, will enable users to use your site instinctively.  If a box looks like a search box, users will assume it's a search box and type stuff into it.  Get it wrong and they'll have to think about it, and web users aren't good at that.

How much of this is true in software?

Users are usually much more invested in the software they're using than in most of the websites they encounter, but that doesn't mean as UI designers we shouldn't try to learn some of the same lessons.  Both Microsoft and Apple published UI guidelines that helped define conventions that software developers have been using for the last 20 or so years to create applications that most users can find their way around with the lights out.

I have two comments on this.  The first is that from this perspective, the current trend away from standard user interfaces is disturbing.  IE7 takes away the menu bar in favour of a collection of toolbar buttons that each drop down a selection of menu items.  Office 2007 provides the ribbon bar.  iTunes has a lot of quirky UI behavour.  Plain old applications are passé. 

In some ways this is like trying to find new places to put the light switch. 

My other comment, and the one I'm really more interested in (since I don't think I'm about to stop the swing from consistent UI design to style driven UI design on my own) is that the ways Steve does usability testing can be applied to software as well.

Good UI should also be something you don't have to think about.  Unless you're doing something completely new (and you probably aren't), a dialog should fit the pattern of other similar dialogs well enough that the user already knows how to use it.  And the best way to determine whether or not you're hitting this mark is usability testing.

A phenomenon that Steve talks about is one where companies try to do higher quality usability testing and end up going overboard.  By spending money on testers and studies and finding the right sample of users to test with, and coming up with extensive scripts and processes, the process becomes onerous.  Not something you can do on a whim.  So they end up not doing it very often.  That's typical of every company I've worked for.

But that's how you should be doing it.  Mock up a dialog, find a few users, and show it to them.  Ask them to use it, and see how it goes.  Do this often, and in a more or less ad-hoc manner.  If you have questions about how new UI should work, prototype it, and then put it in front of some users with roughly the amount of computer skill you expect your target users to have, and see how they use it.  Lather, rinse, repeat.

If you don't approach it this way, you won't do as much testing, and imperfect usability testing is still way better than none.

Politics, Part 2

February 26th, 2008

In part one, our hero was left feeling like neither the liberal party nor the conservative party (instances of these being the Republicans and the Democrats in the United States, or the Liberals and the Conservatives in Canada) was truly his (or her) party.

Stephanie commented on Part 1 and noted that it's not just the conservative parties that have stopped being classically conservative, but the liberal parties have stopped being classically liberal as well. 

There's a real disconnect between what a political party has to promise to get elected, and what they do once they are in power.  Broken promises are a consistent theme in politics.  I'm thinking there's a good reason for this.

Trying to get elected is a delicate balance between trying to make everyone happy while seeming like a capable leader.  Trying to make everyone happy is easy:  Promise everyone something they will like.  On the campaign trail you'll find speeches tailored to the audience.  If they're in an industrial town then it's all about how much they're going to do for industry.  If they're talking to the women's knitting circle then it's all about what they'll do to bring down the high cost of yarn.  You get the point.

But there isn't a significant group of people anywhere that a politican will stand up in front of and say "we need to cut how much money we're spending on your cause" or even "we're spending a ton of money on your cause, I hope you're happy".

So they promise the moon, the people buy into it and they get elected.  Now what? 

Politicans can blatantly break the promises that got them elected, and still get elected. 

In 1993, Jean Chrétien in Canada promised to eliminate the GST (a 7% goods and services tax) and then simply didn't do it.  He used the money the government was making from the GST to eliminate the deficit, which was probably a better move, but it's not what he promised to do.  And he got re-elected. 

The Liberal party was elected in Ontario in 2003 after winning the election largely on a promise not to raise taxes, and the same year instituted a new "Health Premium" of $300 to $900 that was billed separately from taxes.  Not only did they break this promise, but they did it in a way that called it out and drew attention to it.  And in 2007, they won a majority government.

Wikipedia has an article that explores more broken promises.

So not only do the parties not stand for the issues they were created to represent, but they don't even stand for the things they say they stand for.  It's no wonder voters are apathetic.

But our country hasn't fallen apart.  It's tended to do fairly well in fact, because it's not in one person's power to really screw things up.  Governments are made up of a lot of smart people, who realize the difference between election promises and running a responsible government.  And the people on either side generally have a bias towards the party's stated values, so things will tend to move in the direction defined by the ruling party.

So you choose a party that seems like it's current ideals align more closely with yours on some issues that you care about, vote, and hope those are the issues that they choose to follow through on.  Is this the best we can do?

Look at me still talking when there’s Science to be done.

February 24th, 2008

I finally finished Portal.  This game deserves every award it's won.  If you haven't finished it yet, go do it now.

Aperture Science.  We do what we must, because we can.

Microsoft and Blu-Ray

February 18th, 2008

HD DVD has been having a rough time lately, and now that Wal-Mart has pulled HD DVD, it's pretty much over. Microsoft needs to respond.

Here's the situation that millions of Xbox 360 owners are in: We want HD movies. Nobody's going to buy an HD DVD drive for the 360 now, and HD movie downloads, while attractive, are only available in the US. And you don't get the extras that you get on the Blu-Ray discs.
The best Blu-Ray player is a PS3.

If Microsoft doesn't introduce a Blu-Ray drive for the 360 soon, a lot of current 360 owners are going to buy a PS3 to use as a Blu-Ray player. I know I'm thinking about it.