News, ideas and randomness


Posted: October 21st, 2014 | Author: Andrew Gleave | Filed under: Company, mobile | No Comments »

As you may be able to tell, blogging isn’t one of my passions and I rarely think to update this blog – bad, I know.

However, that’s not to say I’m not doing I should probably blog about. So, as a way of getting things up to date in a concise manner, I’ll just list some interesting things I have been working on to get them out there.

New things

Since coming back from Singularity U last December, things have been changing. I’m the technical lead at a new startup company who are developing two products:

  • A new twist on contextual content presentation and delivery – more about that soon
  • A new iOS application and service based around the use of iBeacon technology and location tracking.

Both are due for beta/limited access release in the next 6 weeks so keep an eye out for updates.


I have given a few talks and presentations over the last few months:

  • A talk with Owen Cutajar presenting ideas and insight into what the Isle of Man can do to remain relevant in a world which is experiencing rapid technological growth. Slides
  • A similar talk to the above for the BCS.
  • An Intro to Node.js  - a talk for introducing Node and how to get started. The talk centered around the general concepts of Node and how to get started quickly and there was an interactive element where attendees built a realtime chat web app during the talk to illustrate some of the concepts. Code:
  • An Introduction to React.js – talk given for introducing Facebook/Instagram’s UI Javascript library. The talk was aimed at front-end developers building rich clientside applications and gave an overview of the library and provided a prototype application to serve as an example which was later featured on the React blog. Source: Slides

The Open Elm Project has also been expanded to cover Sussex as well as the Isle of Man in an initiative lead by The Conservation Foundation. This is great news, and I’m pleased the project is helping conservation efforts further afield.

There are other developments as well but I will leave them for another post ;)

Winning: Grand Challenge place at Singularity University

Posted: October 10th, 2013 | Author: Andrew Gleave | Filed under: Company, portfolio, singularity | No Comments »

I found out (on the day my son was born!), that I’d won one of two places on the Isle of Man Grand Challenge!

The Grand Challenge is an initiative being run by the Isle of Man Department of Economic Development and supported by Poker Stars which includes a 7-day placement at Singularity University as part of the Executive Program in December!

While there, we’ll be learning from some of the leading lights of the technology industry about biotech, AI/machine learning, nanotechnology and much more. It’s an amazing personal opportunity, and one which we hope can help inspire technological innovation on the Isle of Man.

I’ll be going with Owen Cutajar (also a winner) and will be reporting on what we learn and the amazing insights throughout the week.

More soon…

University of British Columbia e-EDI and e-MDI

Posted: August 8th, 2013 | Author: Andrew Gleave | Filed under: Uncategorized | No Comments »

It’s been a while since my last blog post. This is primarily due to me being busy with work, and partly because I’m not much of a blogger.

However, two projects I had the pleasure to work on recently are the e-MDI and e-EDI systems for University of British Columbia. Initially my involvement was purely the development of the e-MDI system, and later, and partly due to the success of the that, the development of the e-EDI as well.

The MDI is a survey that is taken by children in grade 4 across British Columbia and is used to give insights in to child development and wellbeing.

Previously the process was a manual one – students entered their information on paper forms which were then sent back to UBC for analysis. This project required the development of a web-based platform for creating and issuing online surveys, and the collection and export of data.

The project is built using Django and PostgreSQL (as usual) as well as Redis for ephemeral storage, caching and as the backend for Celery; Fabric and Nginx on the backend and was probably one of the largest I’ve worked as the sole developer, and required developing interfaces and functionality for 5 different types of user, a RESTful API and a small Javascript-based DSL for authoring surveys built on top of Backbone.js.

The team at HELP have been great to work with, and both systems will help them to roll-out and surveys faster and to gain insights on to student development quicker.

I may write a follow-up post about the technical implementation of some of the more interesting aspects of the systems.

Flip Maps – Simple location bookmarking and sharing for iPhone

Posted: December 30th, 2011 | Author: Andrew Gleave | Filed under: Uncategorized, iphone, portfolio | Tags: , , | No Comments »

I’m pleased to announce that Flip Maps is now on the App Store! (link)

Flip Maps lets you bookmark places you have visited and share them with others. Each new place is added as a page to your notebook so you can quickly flick through all of your maps to find the one you want. Maps can be organised by title, city or region, and when you create a new map, you can attach a photo or movie to it as well as giving it a name and adding notes.

You can see your current location on each map, and get directions.

Flip Maps came about when I was looking for a way to keep track of the great places I went to when I was in New York this September. Trying to remember exactly where a restaurant was quite difficult, and what I really wanted an app I could open up, it would pick up my current location, I could give the place a name add some notes about how great it was, maybe take a photo of it, and save it for future. So, a couple of months after getting back, I still couldn’t find a simple app which would do what I needed and looked nice, so I decided to build one!

Gorgeous page turn animations!

Sort and order your maps by title, city and region

I wanted the app to feel like a little notebook crammed full of maps, so we’ve put a lot of effort in to making the app great to use and look and the same fluid page turn animation that iBooks uses to make it feel like you’re really flipping though pages of notebook.

Maps are shared via email and the recipient just has to tap on the attachment to import it in to their copy of Flip Maps. It’s quick and simple and makes it easy to send maps (and their attached photo/movie) to friends and family without signing up to anything.
Also, maps can been created even if you don’t have a data connection since Flip Maps can still get your location from GPS. So, even if you can’t see the map you can still save it and Flip Maps will get the address information and map tiles the next time you go online!

I have some great ideas for future improvements to the app, but we’re always happy to get feedback and comments!

You can download Flip Maps from the App Store now.

The Open Elm Project

Posted: October 24th, 2011 | Author: Andrew Gleave | Filed under: Django, Uncategorized, couchdb, mobile app, portfolio | No Comments »

This is a blog post which is well overdue.

In April we launched the Open Elm Project which, in collaboration with the Isle of Man Department of Environment, Food & Agriculture, enables the public to monitor and record the Isle of Man’s Elm tree population and report potential outbreaks of Dutch Elm Disease.

Unlike the UK, the Island has been largely unaffected by Dutch Elm Disease and has a population of ~200,000 trees. Unfortunately, the disease is on the rise and although the Isle of Man Government has done a sterling job of controlling and mitigating it’s impact, budget constraints have reduced the funds available for regular professional tree surveys meaning little is known about how quickly or to where the disease is spreading.

Early in the year we approached the Government with a concept: give the public simple tools which they can use to help the fight against the disease and report suspected outbreaks. The idea comprised of a website and two apps for iPhone and Android devices which can be used to find out information about Dutch Elm Disease and record sightings of diseased (or healthy) trees. To our delight, the Government jumped at the chance to participate in the project.

We build a site which enables people to get information about Elm trees and about Dutch Elm Disease itself, and learn how to spot the signs of the disease. We also build two mobile apps (another first for the IoM Government), which enables people to record sightings while they’re out in the countryside.

Using the apps users can take a picture of the tree(s), choose whether it requires inspection and submit it for review by the DEFA team. The records are automatically geotagged by the phone’s GPS radio, so the team can see where the tree is to an accuracy of ~10m on the site’s Google Map – much better than a grid reference!

All reports are first reviewed by the DEFA team and are then made public on the site’s report map and in the mobile apps themselves.

From the off, we wanted this project to be the Isle of Man’s first Open Data project and we released all the source code, and have documented how to get direct access to the database – everything about the project is fully open and transparent.

The project was build entirely using Open Source technology: Django, CouchDB, PhoneGap, jQuery Mobile and the source code is licensed under the GPL. We encourage others who think this type of project could be beneficial to their cause to use the code as they see fit.

The project announcement proved a hit with it being reported by the BBC and by numerous sources in the US and we’ve had a great uptake for such a new project.

Since the disease is hard to spot during the winter months, we’ll be promoting the project with urgency next spring and hope to get a loyal band of contributors to help preserve these trees.

Finding your nearest Diet Club

Posted: April 7th, 2011 | Author: Scott Barnham | Filed under: portfolio | No Comments »

A few months ago we developed a simple proximity search or “find your nearest” site for online marketing consultants OLCM. The site helps you find the nearest diet class from clubs like Weight Watchers and Rosemary Conley.

I’m pretty happy with the project. It was done in a short time and reasonable budget, but made to be reusable across different niches.

We used Django with some customisations to admin so that data can be uploaded from csv files. The proximity search uses a postcode-to-lat/lng database for when a postcode is entered and geocoding from Google Maps when a place name is entered.

The site is proving popular so far and we hope it will be a great success.

PhoneGap CouchDB Attachment Plugin

Posted: March 14th, 2011 | Author: Andrew Gleave | Filed under: couchdb, iphone, mobile | No Comments »

I’m working on a cool new project which makes use of a lot of exciting new tech: jQuery Mobile, PhoneGap, CouchDB (Couchbase) and Django, and I wanted to enable the iPhone and Android PhoneGap apps to push binary attachments directly to CouchDB, without having to proxy through Django.

All access to CouchDB is performed via its RESTful JSON API which is awesome because it means you can to talk directly to the database using javascript! It’s also great because, in this case, there isn’t much going on in the middleware (Django) layer so implementing Python API endpoints to proxy to a standard database wouldn’t be worth it when I can get CouchDB to do the heavy lifting for free.

I had a look around and couldn’t find any existing plugins which could upload binary attachments to CouchDB (I could have used an XHR request to post the photo data, but I didn’t want to Base64-encode the photos as it can cause Out of Memory exceptions on devices with high-res cameras and increases the file size by ~1.4x), so I decided to write a quick Objective-C plugin.  PhoneGap has a simple plugin system which enables native code plugins to be exposed to DOM which means I can call my upload method, pass it the photo’s file URI, and let the plugin handle uploading the content.

The plugin is up on GitHub. Feel free to fork and send pull requests.

Enable AirPlay video streaming in Safari on iOS 4.3

Posted: March 11th, 2011 | Author: Andrew Gleave | Filed under: iphone | No Comments »

I wrote a Mobile Safari bookmarklet a couple of weeks ago to enable AirPlay video streaming to Apple TV, and was using it at home while iOS 4.3 was still in beta. Now iOS 4.3 is live, (and the NDA has been lifted), you can get it from GitHub.


Using images for background text

Posted: February 7th, 2011 | Author: Scott Barnham | Filed under: web development | No Comments »

Background text: What to type in the field

It’s very common to use ‘background text’ in form fields to indicate what should be typed in there. For example, ‘name’ and ‘email’ in grey text means you should type your, um, name and email address, in to those fields.

The normal way to do it is put text in the fields, set the colour to grey using css and then remove it when the user clicks in that field. It just takes a couple of lines of JavaScript.

But what happens if you want text in a search field, or other field that you want to set the focus on when the page loads?

Background images so the field can have focus

An alternative I’ve used a few times is to have an image containing the grey text and show that image whenever there is no text in the field, regardless of whether the field has focus.

Here’s an example from London taxi booking site Tick Tock Taxi:

The “address, postcode or place of interest” text is a background image and the focus is in that field when the page loads. As soon as the user types something, the image is hidden. If they delete all text from the field, the background image comes back.

A fancier example is from hosting reviews site

Here the text is typed in after ‘http://‘, so we actually swap between two background images – one with just ‘http://‘ and one which also has the arrow and ‘Enter the domain here‘. It shows an advantage to using images – you can put arrows and other graphics to better explain or draw attention to the field.

Here’s some code.


BackImage = function(field) {
    field = $(field);
    field.bind('keyup', function(e){
        field.toggleClass('empty', field.val() == '');

new BackImage('#search_field');


var BackImage = new Class({
    initialize: function(field) {
        this.field = field;
        field.addEvent('keyup', this.update.bind(this));
    update: function() {
        this.field.toggleClass('empty', this.field.get('value') == '');

new BackImage($('search_field'));


The css just sets a background image when the field has class ‘empty’.

#search_field.empty {background:#fff url(../images/bg-search-empty.png) no-repeat 5px center;}

That’s it, a simple technique to have background text while allowing the field to have focus.

Mobile ticketing from TicketSense

Posted: February 1st, 2011 | Author: Scott Barnham | Filed under: portfolio | No Comments »

It’s always nice to see innovation in an established industry. Selling tickets for events hasn’t changed much until recently when the web and mobile phones made it cheaper and easier to sell tickets directly to customers.

TicketSense is a UK company which helps event organisers and venues sell tickets direct to customers’ mobile phones. It’s automated and pretty slick: Customers text a keyword like ‘thewho’ to a special number to buy a ticket. They can pay by credit card, PayPal, or on their phone bill. The ticket is sent to them as an SMS text message with a barcode image attached – no need to print and distribute paper tickets.

When the customer gets to the gig/event, they show the barcode on the screen of their phone and the door staff scans it with a barcode scanner.

We helped TicketSense by developing a barcode scanning app for Windows and Mac OS X which integrates with their ticketing backend. Door staff or event managers download the list of tickets sold, then scan them at the door, which checks them against the list.

We made the app simple to use with an obvious interface that’s easy to read in low-light conditions. We developed using XULRunner to make a single cross-platform application.

The guys at TicketSense knew what they wanted and were a pleasure to work with. We got some great feedback from them about the quality of our work and responsiveness.