Google Latitude contacts disappeared…now fixed

I’ve used Google Latitude for about four years now and have found the application really useful. For those of you who don’t know, Latitude is an app that you install on your smart phone (it supports Android, Blackberry or iOS) and it keeps track of your location. You can then use this information how you wish. You can share it with friends or family, so that they know where you are in real time, or just use it to maintain a history of where you’ve been. (I find it useful for expense claims when I can’t remember how many miles I’ve done or exactly which day I visited a particular client).

typicalday

About 2 months ago my wife asked why I wasn’t showing up on her list of contacts on her iPhone. I had a look at my own iPhone and saw that I had “no contacts” either. I hadn’t made any changes to my privacy settings and thought it was curious that it affected both me and my wife on multiple devices. (Windows 7 and Windows 8 PCs, multiple different browsers including Chrome) as well as on my iPad and iPhone. As a result of this, I suspected that the problem was with Google.

I tried deleting and adding my wife as a “Latitude contact”. Despite clicking on the invitations that we sent each other and accepting the request to share location information we never appeared in each others contact lists.

Searching for answers I found plenty of discussions on internet forums. Several people had reported that this was due to new privacy settings which coincided with a new release of Google Maps. The only solution seemed to be to log onto an android device and enable location sharing again.

But I  don’t have an Android tablet…..

As an application tester, I’m reasonably au fait with virtualisation, so I had a quick look around the internet and I found this website which contains OVA files with images of Android Tablet devices. These can be used to emulate an Android tablet. http://androvm.org/blog/download/

Android tablet in VMWare Player
Android tablet in VMWare Player

These are the steps that I took to fix my problem

  • I already had VMWare Player on my home PC.
    (Download and install this if you don’t already have a copy)
  • Downloaded a suitable OVA file
  • Open it in VMWare Player, created a new virtual machine
  • Start the VM and “boot up” your Android tablet
  • Choose a country location and go through the basic setup
    (including typing in your google account credentials.)
  • Open the Google Play Store
  • Install Google Maps
  • Once Google Maps is installed, open maps and enable the “Latitude layer”
  • Enable location sharing

Google Maps

Google Maps”Hey presto” almost immediately all your devices will repopulate your friends lists and location sharing will work again.

Latitude screenshot
Latitude screenshot

It looks like the new version of Google Maps for Android has the functionality to enable sharing and accept invitations but this doesn’t work for existing, non-Android users, including those of us using iPhones.

If you’ve deleted friends whilst trying to fix the problem get your friends to send an invitation whilst you’re logged into your “new tablet” and you can accept the invitation and enable location sharing from within the Maps application.

Raspberry Pi as a WOL server

My electricity supplier in the UK recently sent me a electricity consumption meter which tracks energy use in real time and displays in on a small LCD panel. This has proved to be a real eye opener for me and has helped me to see how much power is used by a variety of devices in the house. I’ve found myself checking the meter at regular intervals and I’m getting good at working out which things are powered on just by checking the meter!

Electricity Consumption Meter
Electricity Consumption Meter

I’m one of those geeky types that likes to leave my home PC on all the time. This means that when I’m away from home, I can connect to the PC remotely and pick up files or refer to old email archives that I don’t keep on my laptop. I haven’t given this much thought until now but I checked the power consumption of my PC and saw that it draws 250W – 300W whenever it’s powered on. I did some rough calculations to see what this was costing me and I was surprised.

Daily power use for my PC = 0.275 KW x 24 = 6.6 KWh
Annual power use for my PC = 6.6 KWh x 365 = 2409 KWh
Average cost in the UK for 1 KWh = £0.14

Annual cost for running my PC all the time = £0.14 x 2409 KWh = £337.26

This made me think about turning my PC off more (as my wife has been suggesting for years) 😉  But I don’t want to lose the ability to turn it on remotely and get access to files….. hence my use of WOL (Wake on Lan).

I recently bought a Raspberry Pi and I’ve been tinkering with it for a while, I’ve used it for time lapse photography and general experimentation. I’ve also put one in the Trust IV office in Manchester which operates a webcam. I thought that I could use the low-powered Raspberry Pi to wake up my high-powered PC when I need it and I’d enable power management on the PC to put the PC to sleep when it isn’t in use.

Here’s how I did it.

  • Installed a base build of Raspbian on my Pi
  • Installed “wakeonlan” on the Pi, using the command [sudo apt-get install wakeonlan]
  • Installed Apache on the Pi, using the command [sudo apt-get install apache2]
  • Installed PHP5 on the Pi using the command [sudo apt-get install php5]
  • Wrote a small PHP script that sends the wakeonlan command to my PC.
  • Changed the default port for the webserver
  • Enabled port forwarding on my router to forward HTTP requests from outside to the Pi.
RPi screenshot
RPi screenshot

The PHP script (above) is pretty straightforward and uses the “exec” command to simply execute the wakeonlan command. I may improve this to give myself some visual feedback to show that the magic packet has been sent to the PC. For now I’m just happy that I can reduce my energy consumption and still access my PC remotely whenever I want to.

Assuming that  this gives me a 50% energy saving, this should reduce the electricity bill by more than £150 per annum.

Bristol Pound – a great concept but a flawed web launch

I was drawn to the Bristol Pound project by a tweet that I spotted at lunchtime today.

The concept is simple:

  • Launch a local currency to help support the local economy in Bristol.
  • Encourage people to support local businesses.
  • Boost local spending power and lock money into the Bristol economy.

This all sounds great, but I just went to their website at  https://bristolpound.org  and the page took more than 3 minutes to download. Now I’m not blessed with the world’s fastest Internet connection in the office, but that’s a lot longer than most people are prepared to wait.

I was reminded of a couple of StrangeLoop infographics:

The first one describes web user’s boredom thresholds and shows that people abandon slow sites quickly, many never return and even worse, they tell their friends about their bad experience. This can be very damaging for a brand that puts so much effort into their day 1 launch.

User boredom thresholds - infographic

The second infographic documents the increasing size of pages over time. I know that we all use high speed internet connections nowadays, but if a lot of people start to hit your site, you’re going to run out of bandwidth to serve the requests pretty quickly.

I think that the Bristol Pound website is suffering from “page bloat” and here’s why…

Using a Firefox browser with an empty cache and Firebug, I connected to http://bristolpound.org and saw that it took almost 3 minutes for the page to download completely. The page looks great and is graphically rich, but it doesn’t perform well for those first-time visitors hitting the site today.

The image below which is taken from the HAR (HTTP archive) file that I created shows a single image taking 2.33 (139 seconds) minutes to download. The large/slow image is called FINAL_Launch_POSTER_copy.jpg , and it is advertising tonight’s launch party for the Bristol Pound.

The main problem with this image is that somebody has uploaded the full size image to the website and rescaled it using HTML. The original image size is 3,508 x 4,966 pixels which is huge, but it is displayed at only 338 x 495 pixels. Serving a scaled-down image could save 1.8MB of bandwidth for each page request (a 99% size reduction). This would reduce the download time for this component from about 139 seconds to less than 2 seconds. This alone would significantly improve user’s first impressions of the site.

This screenshot shows the “offending image” highlighted in red.

There are other improvements that could be made, but to improve performance for now, I’d simply resize the image in an image editor (MSPAINT would do) and then keep my fingers crossed…..