@madpilot rants

An open letter to the Liberal member for Perth: Darryl Moore.

Hi Darryl,

As a Liberal voter, today’s announcement regarding the cut to ICT spending and the implementation of a mandatory internet filter; as well as the clearly flawed coalition broadband strategy, you have forced me to swing my vote. I write you this email so you can be aware of the issues for at least one of your constituents.

It disappoints me that your party has a lack of understanding of technology and the role that it plays in the future of this country. As an IT professional, who runs my own business as well as an internet startup that exports services to the world, the short-sightedness of your strategy is concerning. We are looking backwards to support unsustainable industries like the car industry, while ignoring an industry that Australian can become a world-class player.

We should be encouraging spending in an industry that has the potential to increase exports to the world, not decreasing them.

We should also be encouraging smart people in this country to stay here, rather than forcing them to leave our country to seek opportunities – and better yet, our country should be a destination for other smart people. We should be boosting our knowledge economy, not restricting it.

I’m happy to hear you reasoning behind these decisions.

Thank you for your time.



How to re-play an AJAX request in jQuery after an authentication error

I’m building a mobile web app that is basically one HTML file + backbone.js + other JavaScript magic. The app is authenticated, so the user needs to be able to login. Thankfully the server returns a 403 if a request is not authorised to access the requested endpoint. Ideally, if that happened, a login form would pop up, the user would enter their details, and the system would continue on it’s merry way.

With jQuery, this is surprisingly easy.

You can setup global settings using the jQuery.ajaxSetup method. These settings get injected into every AJAX request you make via the jQuery API. The attribute we are interested in setting is the statusCode attribute: in particular the 403 function.

  statusCode: {
    403: function() {
      // This calls a backbone view that renders a login window, then
      // calls the success function one the user has been authenticated
      // The call back simply re-runs $.ajax using the current context object,
      // which conveniently is a hash of the original AJAX request params.

      var sessionLogin = new SessionsLoginView();
      var context = this;
        success: function() {

What happens is a 403 response code gets captured, we save the current AJAX object into the context variable, we then call the login form, which gets the user to authenticate and then calls the success function. It just so happens that the context variable stores a hash of the original AJAX request settings, which we pass directly into $.ajax. This in effect replays the query, now with the new authentication token!

The beauty of this (besides the fact that it’s hands off, and nicely abstracted) is that it will handle changing passwords on the server gracefully (it’ll just pop up the login form again), as well as handle incorrect usernames or passwords.

Need a frontend coder?

While I work on some personal summer projects, I’m looking at getting some front end contract work – you know HTML/CSS/JS sort of stuff.If you know anyone looking to turn pictures into websites, get them in contact with me.Hourly rate negotiable depending on contract length.

Making the OSX Terminal.app work properly

I just acquired a 13″ MacBook so I can build some me iPhone and iPad apps, and the allure of Unix on the desktop is a nice added benefit, however it is apparent that the default terminal emulator is kind of balls out of the box. I spend A LOT of time in a terminal, with VIM being my IDE is choice. What many people might not know is that modern terminal emulators support mouse gestures, as does vim (:set mouse=a).

I use this. All the time.Vim 7 supports files tabs, which allows you to open multiple files at once (command :tabe <filename>). Vim being vim, you can navigate your tabs using key sequences (Next Tab :tabn Previous Tab :tabp Move to tab :tabm <number> et al.), but clicking stuff with your mouse is easier.The scroll wheel is also quite useful, which vim also supports.Finally, click and dragging over text in vim with a mouse enters Visual mode, which allows you to yank and delete blocks of text, also quite handy.The problem is, Terminal.app doesn’t support mouse stuff… Out of the box any way.

Step 1: Download and install SIMBL

Step 2: Download and install MouseTerm

Step 3: Restart Terminal.app

Right, so that is sorted, next up: OSX’s stupid keybindings. Ok, I guess it makes sense for the home key to go to the very beginning of the document and end to do the opposite, but really the Windows way of home and end placing the cursor to the beginning and end of the line is more practical. Also, PgUp and PgDn don’t work. So, open Terminal.app then select Preferences from the Terminal menu. Click the Keyboard tab, and paste the following strings into the areas next to the Keys:

home: 33[H
end: 33[F
pgup: 33[5~
pgdn:  33[6~

FINALLY, these binding don’t place nice with vim, so open up .vimrc and enter the following:

set mouse=a
map ^[[F $
imap ^[[F ^O$
map ^[[H g0
imap ^[[H ^Og0

Creating a bootable USB stick to install VMware ESXi

I had to install VMware ESXi on a machine that didn’t have a CDROM or DVD player. For extra difficulty, I also didn’t have a Linux box with a USB drive handy – but after a bit of hair pulling, I managed to create a bootable USB stick image in Linux (In my case Gentoo). Hat tip to http://communities.vmware.com/thread/75792

  1. Create a fake filesystem. I created a 1Gb, but 512Mb should be enough
    dd if=/dev/zero of=/mnt/vmware.img bs=1024 count=1048576
  2. Associate it with a loopback device
    losetup /dev/loop0 vmware.img
  3. Create a FAT filesystem on the image
    mkfs.vfat /dev/loop0
  4. Mount the VMware CD ISO to a temporary directory
    mkdir -p /mnt/vmware
    mkdir -p /mnt/vmware-usb
    mount -t iso9660 -o loop /path/to/vmware.iso /mnt/vmware
    mount -t vfat -o loop /mnt/vmware.img /mnt/vmware-usb
  5. Copy the contents across
    cp -r /mnt/vmware/* /mnt/vmware-usb
  6. Delete the isolinux.bin and rename isolinux.cfg file on the USB flash disk to syslinux.cfg in /mnt/vmware-usb
  7. Add usb to the end of the append line in syslinux.cfg
  8. Run syslinux to write a bootloader
    syslinux -s /dev/loop0
  9. Unmount everything
    cd /mnt
    unmount /mnt/vmware
    unmount /mnt/vmware-usb
    losetup -d /dev/loop0

vmware.img should now be a bootable USB image. You will need to write it to your USB stick now. In linux you can use dd (assuming your USB stick is at sdb):

dd if=/mnt/vmware.img of=/dev/sdb

In windows, use Image Writer for Windows.Or, an easier solution might be to buy a DVD Drive :)

220s: A marketing odyssey

For those of you that have been keeping abreast of the goings on of my work life will know that I helped start up a cooperative workspace in Leederville just over a year ago. The idea behind cooperative spaces is pretty simple: You get a bunch of freelancers together to share rent, ADSL and other running costs, which can be prohibitive if you are on your own. A lovely side-effect of throwing a bunch of like-minded people into a couple of rooms together is that you can share work, talk about problems you might have and avoid that oh-so-familiar cabin-fever that is common to people that work from home on their own for long periods of time.

When twotwenty started, we had dreams of doing big jobs together and sharing work, and generally acting like a company – except with the personality of freelancing. While there has been some sharing, lots of talking and there hasn’t really been a single cohesive push marketing or branding wise. So over the past few weeks we have been busy planning, writing, designing, photographing and coding up some marketing material to see if it is possible to do cooperative marketing. At this stage we are focusing on the local Leederville area (of course, we are more than happy to talk to people in other areas), so we came up with the “your local web guys” campaign, starting with the launch of our shiny new website: http://www.twotwenty.com.au. Designed by Pascal, the brief was to present something targeted to the local Leederville area, that spoke about the individuals at twotwenty. We wanted to be approachable and personal, hence the sometimes risky headshots. The only way we had even a chance of pulling them off was with professional photography (Seriously kids, don’t try them at home).

So, if you are in Leederville, drop in and say hi, and we can go for coffee. Oh, and you can follow us on twitter.

Soooo… Which one is better? Online or offline marketing?

Both Alex and I are web nerds. Throw us a technical problem and will be champing at the bit to solve it. This, like many other coders who start their own business, is what we spend all day doing. Unfortunately for us, being totally awesome at what we do is only a small part of running a successful business. Alex’s business, Brown Beagle Software has just taken on it’s first employee, and I’m ready to start selling the living daylights out of my CMS so we need to move beyond adhoc, word-of-mouth “marketing” and get a bit more serious. Of course, neither of us know a great deal about that…

Alex and I are both residents of the collaborative work space twotwenty and over coffee we were discussing some joint marketing stuff that would help the whole group get some work, and the topic of mail drops and social networking came up — and we noticed a pattern: I was speaking in terms of offline networking, whilst Alex kept going back to

online networking. Being the contrary type that I am, I laid down the challenge: We should see which type of sales and marketing works best: offline or online!


The rules of our little game are pretty simple:

  1. Alex can use any marketing method he chooses, but it must occur

    online.This would include Twitter, Facebook, Google Adwords, SEO. He can’t count leads from people that originated in real life.

  2. Myles can’t use the inter-tron with his quest: He can only use traditional channels, such as face-to-face, networking meetups, traditional media and offline advertising
  3. A lead is counted as a genuine enquiry for work. For the sake of this experiment, we can sell any of our services, but we need to be able to do the work. A completion is counted when a job is accepted.
  4. Once a prospect has been engaged, communication can continue into the other medium (e.g. Myles can use email, Alex can use a phone).
  5. Myles and Alex can spend up to $250 each on their campaigns.
  6. Both need to track how much time they have spent on marketing.
  7. At the end of the month, whoever has the best ratio of leads vs. time spent marketing will be deemed the twotwenty marketeer of the month™, and will gain kudos until the end of time (or until April).

Head over to http://www.offlinevsonline.com to watch the craziness unfurl.

Bad customer support = Unhappy campers

I do a lot of front end development, and as a result, I use Adobe Photoshop a lot. I also use Acrobat Professional frequently and Flash and Illustrator enough to warrant purchasing the full Design Premium package. Said Design Premium Package is pretty expensive, so to spread my costs, I’m using the subscription edition. Recently, I had to change my subscription plan, so I cancelled it, and re-subscribed, and so begins my trip down the rabbit hole that is Adobe Support.

Because I had paid for my subscription online, and opted for the downloadable version, I should have received a serial number in my email. I didn’t. Thankfully CS4 goes in to trial mode, so I could still use it whilst I sorted out the serial problem. Time to call Adobe…

Firstly, it was neigh on impossible to find the Australian support number on their website – when ever you try to access support, it defaults to you the US – I assume because the subscription edition doesn’t have an Australian number. Thankfully, one of my friends had general support number in her rolodex.I call the number, and after 45 minutes on hold listening to horrific elevator muzak, I get through to the product activations. The operator was polite enough – but they have to be – the script they are reading would demand it. I give them my email address (and say yes to allowing them to contact me on it), and then give them my phone number in case I get disconnected. After the operator goes through the rest of their script, she realises that actually I need a different department, and asks if she can transfer me. Whilst I would have though that to be an obvious solution, I play along. Phone goes dead.

I can see why they ask for your number. I left it 10 minutes to  see if they would call back. Nadda. So I call them back, another 30 minutes on hold, plus 5 minutes going through the tier-1 product activation script, and the next customer server representative transfers me through. Finally I get to the right department – Subscriptions.Unfortunately, the tier-1 subscriptions customer service representative can’t help with missing serial codes, so they take down for phone number and email address (for the 3rd time) and setup an open case in their support console, in preparation for a tier-2 support officer.Now, I play the waiting game. By this stage Christmas has come and I’m away and forget about CS4 for the moment. Due to inactivity (on their part, mind you) it would seem that they closed the job off. Result: No serial number.

I get back from Christmas, and call up again – by this stage I only have a week left on my trial, so I need to get this sorted quick smart. I go through the exact same steps as above (including the phone disconnection), and once again, a ticket gets opened. After 48 hours, I leave a message following up, as I still have no reply. After 5 more working days (By this stage my trial has finished), I ring back. They ask for my case number, which I give them, which returns a completely different customer case. After giving them my email AGAIN, they find it, and transfer me through to subscriptions. Magically, the service agent finds me a serial number and give it to me. Unfortunately, the downloaded version of the subscription trial requires a serial number with only numbers. The one she gives me has letters. Her reasoning behind this is because I didn’t install it off the DVD.

So, I’ve just uninstalled CS4, and I’m waiting for it to reinstall, which has taken (so far) about an hour. I tell you what, the serial number better be right, or shit will hit the fan.To be continued…

UPDATE: It’s the wrong serial number.

UPDATE 2: I’m once again waiting for tier-2 or tier to email me back.

UPDATE 3: Well, it’s all sorted now! It turns out that the subscription pack is being trialled in Australia, so Adobe hasn’t quite got the process down yet (They might want to make this a little more obvious…). The issue I had was resolved by circumnavigating the Adobe store, and just using the eSellerate console to purchase the new subscription. So all is well that ends well – I’ve provided my feedback, so hopefully this drama will conclude with a better user experience for subscription customers.

Thank you to everyone involved in helping to fix the issue: AJ Mercer,  Brett Favour, @Adobe_Bing and Kirsten Harris. Special mention too to Tian Cheng and Nick Hodge for making some noise through their personal networks too.

How-to tunnel the VMware Intrastructure Web Access control panel

If you have some sort of *nix (Linux, OSX, cygwin), then simply run the following in a shell:

ssh -L 8222:localhost:8222 -L 902:localhost:902 -L 8333:localhost:8333 your.vmserver.com

replacing your.vmserver.com with your ACTUAL VMware server.

Then point your browser at http://localhost:8222 (This is the unencrypted URL – which isn’t a problem, because you are tunneling over SSH)

Note, that this trick really only works if you have an SSH server running on your VMware host.

Ideas 6: The Edge of the Web Edition

Perth has had it’s day in the sun, by holding the last five Ideas events, but now it is Brisvegas’ go. The theme: Edge of the Web, because we have two speakers giving you exclusive previews of their Edge of the Web presentations: Ash Donaldson presenting Designing to persuade: Shaping the User Experience and yours truly blabbing on about Stuff They Never Taught You at Website School.

We will be at the Plough Inn, Southbank on October 21st 2009. So if you are in Brisbane, and have been meaning to get to an AWIA event, now is your chance!

Members are $45, non members are $55. Bargin.

See you all then!