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

Vodafone NZ settings for Android phones

I have an Android G1 Developer phone (based on the HTC Dream) and have had major issues getting MMS to work with the Vodafone network in New Zealand. Vodafone was next to useless in resolving this problem but after bashing my head against a wall for ages and “phoning a friend” (thanks Nick) I finally have a configuration that works.

Interesting enough I actually resorted to debugging my phone to see where the issue was and then took a wander through the Android source code to see why things were going wrong. In the end it turned out to be simple case sensitivity issue with the APN type field for the MMS APN  (it must all be in lowercase) !

So in case anyone else is having the same issue here are the details of the two APNs you need to setup. These should work for any Android based devices:

Name: Vodafone NZ
APN: www.vodafone.net.nz
Proxy: <not set>
Port: <not set>
Username: <not set>
Password: <not set>
Server: <not set>
MMSC: null
MMS Proxy: <not set>
MMS Port: <not set>
MCC: 530
MNC: 01
APN Type: default
Name: Vodafone NZ-MMS
APN: live.vodafone.com
Proxy: <not set>
Port: <not set>
Username: <not set>
Password: <not set>
Server: <not set>
MMSC: http://pxt.vodafone.net.nz/pxtsend
MMS Proxy: 172.30.38.3
MMS Port: 8080
MCC: 530
MNC: 01
APN type: mms

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 !

`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 !

`

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….

Facebook: Keeping things between friends

One of the most visited posts on my blog is titled “FaceBook:Do you know who is watching you?” which details how to keep your Facebook profile out of the public eye. In light of the MI6 chief/Facebook scandal (his wife obviously doesn’t read my blog), I thought I’d update the instructions so you can avoid suffering a similar embarrassment :)

  1. Log in to Facebook and from the Settings menu (top right of the page) select Privacy Settings
  2. Now select the Profile section (alternatively click on this link: http://www.facebook.com/privacy/?view=profile&tab=basic)
  3. Set all the options to Only Friends and click on the Save Changes button
  4. Now select the Contact Information tab (or follow this link: http://www.facebook.com/privacy/?view=profile&tab=contact)
  5. Once again set all the options to Only Friends and click on the Save Changes. If you don’t want your friends to know your email then you can select No one as the option for your email address too.
  6. Click on the Privacy part of the breadcrumb at the top of the page and the select the Search section (or follow this link: http://www.facebook.com/privacy/?view=search)
  7. For the Search Visibility option you have a couple of choices. If you are completely a paranoid set it to Only Friends. If you are slightly paranoid then set it to Friends of Friends. If you don’t care then select one of the other options such as Everyone.
  8. In the Search Result section you can control what people can see when they do search for you. I would suggest leaving only the A link to add me as a friend and A link to send me a message options selected. You can also turn on My profile picture but it all depends on how compromising your profile pictures get :)
  9. Lastly in the Public Search Listing section uncheck the create a public search listing for me… option because you don’t want your profile showing up on Google.
  10. Click on Save Changes and you are all done.

Happy Facebooking…

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 12 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….

Its going to get bumpy

Just in the process of moving hosting providers so I expect things to get a little bumpy….

[Update] Ok everything seems to be up and running with my new provider !

[Update2] Well it was all going fine until I accidentally changed ownership /var. MySql, sshd all get very upset when you do that…. All fixed now (I hope)…