Using Git

Since going freelance at the end of last month I made the conscious decision to use Git for my source control on freelance projects. I’d kind of used it a bit when adding stuff to GitHub but hadn’t really used it in anger on anything. Until now. And so far so good.

Quite a nifty little cheatsheet I found was this: http://cheat.errtheblog.com/s/git

I really like the aliases and colour-coding – simple stuff but these save you a lot of typing / keystrokes and make it easier to see at a glance what’s what respectively :)

Posted in devtools at April 27th, 2010. 1 Comment.

JavaScript WebKit Notifications API Demo With Flickr and JSONP

I’ve been playing around with the JavaScript Notifications API recently – or to be a bit more specific the WebKit Notifications API – and put together this little demo using Flickr and JSONP:

  1. You search Flickr by entering a tag
  2. The JSONP callback function then displays the first few photos returned using the Notifications API
  3. Each notification is cancelled after 10 seconds (there is no Dismiss button, like there is when you use the API on localhost)

You’ll need to grant notification permissions first to be able to view the notifications – you should see an info bar like the one below the first time you click on Search:

WebKit Notifications API requestPermission screenshot

After that, you should see the notifications stack up in the bottom right-hand corner of your screen:

Screenshot of the notifications

At the time of writing, you’ll need to be using Google Chrome for the demo to work (although I’m pretty sure that support for the Notifications API in Safari is imminent).

And, as an aside, I managed to throw a bit of HTML 5 into the demo as well with some autofocus and placeholder attributes on the <input type="text" /> field, just for good measure :)

Posted in javascript at April 24th, 2010. No Comments.

Usability Testing of APIs

Usability testing, as you may well know, involves you watching real users interact with your website or application so you can really see how they interact with it and how you might improve certain areas of it.

Of course, there’s no reason usability testing in software has to be restricted to just websites and applications. In Peter Seibel’s book, Coders at Work, I was interested to read Simon Peyton Jones discussing how Microsoft applies usability testing to API’s:

Well, they also do some interesting work on testing APIs. Steven Clarke and his colleagues at Redmond have made systematic attempts to watch programmers, given a new API, talk through what they’re trying to do. And they get the people who designed the API to sit behind a glass screen and watch them.

And the guys sitting there behind the glass screen say, “No, no, don’t do that! That’s not the right way!” But it’s soundproof. That turns out often to be very instructive. They go and change their API.

from Coders at Work, Chapter 7 – Simon Peyton Jones [p. 253]

If you haven’t yet got a copy of Coders at Work you can buy one from Amazon.

Posted in ux at April 21st, 2010. No Comments.