Inside Google Wave

ClearPoint held one of its regular tech-drop get-togethers last night covering Google Wave.

The Cloudbreak team gave a good walk-through of the product  and I gave a quick overview of some of the technology inside Google Wave and it’s APIs.

Here is my slide deck:


Click to see next slide

The PDF (with notes) can be downloaded here.

For those of you who know nothing about the wave, here is short intro video:

YouTube Preview Image

Ok I’ve done it now…

Wow, I have just announced the launch of my pet project: split-the-bill.com I’m feeling  excited yet panicked at the same time.

It will be very interesting to see how this pans out (hopefully well). For more details check out http://blog.split-the-bill.com/the-cat-is-out-of-the-bag-2

SvnViz 1.0.0 Released

Finally got off my butt and packaged up version 1.0.0 of SvnViz. It can be downloaded from sourceforge.

SvnViz builds visualizations of the activity within a Subversion repository. Here is an example of the default visualization run against the project that I am currently working on. Green dots indicate file adds, blue dots are modified files and red dots are deleted files. The greater the activity of the user the higher their score.

YouTube Preview Image

SvnViz also provides a framework for creating your own visualizations. Simply extend the FrameViz class and implement the generateFrame method. To run your vizualization class, instead of the default class, just pass the fully qualified name of your class to the application using the -vc parameter.

Source files can be downloaded from here. All code is released under the GPL.

Have fun and drop me a line if you come up with an interesting visualization.

Expose /var/www using Samba

This is actually more of a note for myself but it may be of use to you. I often find myself running up Linux VMs to test and build LAMP based systems but since I (generally) use Windows it is a major pain to have to transfer files via scp or worse edit files using vi.

However is you install Samba into your test VM, you can simply browse to the folder using Windows explorer and edit the files directly. The following configuration exposes your /var/www folder via Samba and makes its content editable by everyone. It makes the files read/writeable by all and makes sure that www-data remains the owner.

Needless to say this configuration is very very insecure and MUST NOT be used in production !

[www]
comment = apache root folder
path = /var/www
guest ok = yes
browseable = yes
create mask = 777
directory mask = 777
read only = no
force user = www-data
force group = www-data

Cross-browser testing and virtualization

Update: The latest images from Microsoft now ONLY work under MS Virtual PC ! Not so useful if you are a Mac developer or you want to run under VMware like we are. Microsoft is aware of the problem, hopefully they fix it soon.

I’ve been setting up a bunch of VMware images for testing various browser and OS combinations. This has worked out very nicely and the best thing is you can do it all for free !

In my travels I came across these very useful images from Microsoft, basically XP and Vista installs with various flavours of Internet Explorer ( 6, 7 and 8 ) installed.

These are free for download (but they do expire) and can be easily run using Microsoft’s free Virtual PC.

To get these images to run under VMware, you first need to set up the images to run under Virtual PC (to create a .vmc file) and then you can converted the images to the VMware format using the VMware vCenter Converter. This tool is also free.

The VMware Converter is also able to create an image of your locally installed OS, I haven’t tried this but it could be useful for backups and the like.

All up its taken about 2 days to set up XP, Vista & Ubuntu images running combinations of IE 6, IE 7, IE 8, Firefox 3, Opera 9, Safari 4 and Chrome.

Now the fun really starts….

ScanPaste – My first app released to the Android Market

Last week I released by first Android application on the Android Market. It is called ScanPaste. The application lets you scan barcodes and then  copy the scanned data to the phone’s clipboard for pasting into web pages, emails etc.

I had been looking for a simple app to build, to test out the end to end Android Market publishing process and when I saw this blog post by about populating your Google books list using barcodes scanned with a USB scanner, I figured why not build an Android app to do it.

Now scanning barcodes with a phone’s camera is not that simple but luckily someone else has done all the hard work. The ZXing team have released an excellent barcode scanning application and library. Even better, using a cool feature of Android, integrating barcode scanning into ScanPaste was only a few lines of code!

In an Android application each screen is broken down into it’s own little task called an Activity. If an Activity is correctly “marked” it can be initiated not only by the application owning the Activity but by other applications. This is what the nice guys on the ZXing team have done and with their application installed, any other application can simply use the following code to scan and process barcodes:

...
// start the scan
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
startActivityForResult(intent, 0);
...
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
  if (resultCode == Activity.RESULT_OK && requestCode == 0)
  {
    Bundle extras = data.getExtras();
    String result = extras.getString("SCAN_RESULT");
    // do stuff with result here
  }
}

The rest of the app is pretty straightforward, a couple of buttons, a text field and some error checking. All up the application is less than 100 lines of code.

In all it took a few hours to put together and test. The bulk of the time was actually spent working on the icon :) The 1.5 Android platform has some pretty clear guidelines and I was trying to adher to them.

Building a signed app for upload to the Market was a snap, just a menu click and a step by step wizard. Actually publishing the application was as simple as uploading the signed .apk file, filling in a form and clicking on upload. Couldn’t be simpler especially when you compare it to the nightmare process of uploading an iPhone app to the iPhone App store and of course the Android Market doesn’t have a vetting process so as soon as the upload was complete the application could be downloaded by anyone.

One of the things that took me by surprise was that within half an hour the application had been downloaded 20 times. A week later it has been downloaded 1849 times and it has 1156 active installs! It also has a 4 1/2 star rating and all positive comments. From the comments it seems that many people are using the app to scan the barcodes of books that they are selling on Amazon.

Ok the bad stuff….

Firstly, a minor one,  in the developer console of the Market there is no way to see the comments about your application. You can see the rating and the number of ratings but that is it. Instead you need to look up the app in the Market application on your phone or view a 3rd party site like Cyrket (which apparently uses the Market’s own APIs so why the info cannot be surfaced in the developer console is beyond me).

Now for the killer…since I am in New Zealand I cannot sell any Android applications! I need to be in the US, UK or one of a couple of other countries to be able to sign up as merchant. What the heck is up with that? I see that as a major shortcoming of the Android platform and one that Google needs to rectify ASAP.

Hopefully with the imminent launch of the HTC Magic here in New Zealand this will change. Lets wait and see….

The Contact Protocol & my first RFC

About ten years ago I had a couple of interesting ideas but due to sheer laziness on my part I never did anything with them.

One of these ideas however keeps popping back into my head and so finally I’ve decided to do something about it.

The original idea is very very simple: wouldn’t be nice to have a URL that points to information about you ? You could give this URL to people and they would always be able to find you.

Now of course it’s 2009 and the idea is slightly more refined and so I give to you: the “Contact Protocol”… It works as follows:

  1. you give out a Contact URL which looks something like contact://host.com/xyz . This URL can be put on business cards, email footers, websites etc
  2. the URL can then be used to retrieve your up-to-date contact details. If your details change you simply update them in one place and anyone who has your Contact URL can retrieve them.

Now obviously you would be able to type the URL into a web browser to lookup someone’s details but that is only one use.

How about an email client ? Just add the Contact URL for someone into your address book and voilà your email client will always have right email address for them.

What about your mobile phone ? Add a contact URL for a contact and the device can use it to figure out which phone number to use when you call them.

Instant messaging, same deal…

Pretty nice… at least I think so.

So what the heck is an RFC and how does it fit in with your crazy idea I hear you ask ?

Well I want the Contact Protocol to be widely used and the easiest way to do this is to make it a standard. On the Internet standards are defined in request for comments or RFCs. This practice has been in place since the Internet was born.

The RFC process is looked after by the IETF (Internet Enginnering Task Force) and most RFCs are written by this group but anyone can write one and submit it for consideration so this is what I have started to do.

It is however not entirely straightforward, RFCs have specific format, language, style and content requirements. Check out the RFC style guide (formatted as an RFC itself). Luckily the IETF have provided the xml2rfc tool which takes an xml file and generates a correctly formatted RFC, this makes things much simpler.

So I’m currently enthusiastically hacking away on my xml file, I’ll let you know when I have something to look at.

mPass article on NZ Herald

My Google Alerts just turned up this very nice article about mPass on the NZ herald site.

It is always nice to get good press about things you have worked on.

I like the comments too:

I downloaded the Air New Zealand mPass a couple of months ago and have used it successfully a number of times. It is a fantastic application and has sped up the already fast check in process with Air NZ. its great to see “our” airline is right up there with technology and has made the whole tiresome process of checking in simple and enjoyable. PS – the iphone rocks. just a shame about the data charges.

and

Excellent idea ! Keep it up, Kiwi’s – show the world we can make things better, faster and more convenient.

mPass for iPhone is live!

mPass for the iPhone is now available. If you are a lucky iPhone owner then you can download the application here or visit the AppStore and search for “mPass”

For those of you who are iPhone-impaired (like me), here are some screen shots:

Its all about clarity

Over the last 15 odd years I have been involved with dozens of IT projects of all shapes, sizes. Recently I have been reflecting on why some of these projects were a dream and delivered successfully, whilst others were a complete nightmare and went horribly wrong.

An obvious factor is the size of the project but that does not ring true. I have been involved with huge projects that went like clockwork and small projects that just couldn’t seem to get off the ground. The same is true for projects with complex or simple domains; projects with untried technologies or projects with proven technologies.

So what was the differentiator?

After much pondering I have come to the conclusion that those projects that were most successful had a good deal of clarity. Clarity in what needed to be done, why it needed to be done and how it was going to be done.

So I’ve come up with a new catchphrase (which I intend to bandy about at every opportunity):

“CLARITY leads to FOCUS, FOCUS leads to DELIVERY”

Actually I really wanted to use VELOCITY in there somewhere and DELIVERY is just so so unsexy so perhaps its still a work in progress but I digress.

So what do I mean by clarity ? Well pretty much exactly what it’s definition says “The state of being clear in thought”.

Of course this isn’t a new concept, which is why we have the waterfall process with its BDUF (big design up front) approach. Unfortunately this process actually has the opposite effect because it tends to silo the project members around particular phases and then uses big fat documents as a means of communication between these silos. At each step of the way clarity around the why, what and how is typically eroded or even (as I have seen in some cases) corrupted, all of which leads to the classic customer reaction ,when they see their software for the first time, of “What the hell is that, thats not what I wanted”.

This of course is where agile processes come into play with their sleek processes that allow a project to deliver efficiently and successfully. Of course without clarity an agile project degenerates into a mess, with quality going out the window in an effort to meet iteration deadlines, constant quick fixes, a stressed out team and a failed project.

So how do you about gaining clarity?

The best approach I have seen is to get as many of the people who are going to be involved with the project into a room to work out the why, what and how. The group should include the stakeholders, end-users, subject matter experts, architects, UI designers, testers, business analysts, developers, project managers, infrastructure bods. Pretty much anyone who can add value to the process.

Don’t panic, even for large systems the effort involved for this is measured in hours and days, not weeks and months. I would however, suggest you find a good facilitator to keep what is typically a fairly large group of people focused.

Here are some techniques that I have used or seen used to nail down the why, what and how:

To capture the why, write a vision statement. It doesn’t have to be book. In fact put a limited on the length of the statement such as “25 words” or “3 sentences” or if you want to be particularly nasty: “7 words”.

To capture the what, you can uses any number of techniques. I find that visual ones work best (and are easily done on a whiteboard) so use-case diagrams, storyboards or UI wireframes and entity or domain models are the order of the day.

In a similar vein, to capture the how, nothing beats a deployment model and some sequence or activity diagrams (all in UML of course).

So to make your IT project a success make sure you have clarity and remember

“CLARITY leads to FOCUS, FOCUS leads to DELIVERY” :)



Check out Scott Ambler’s Agile Modelling site which covers some of the techniques above and has a bunch of other practical and interesting ideas.