By Mike Lewis
In my article on calculating distances between UK postcodes, I posted a link to a site named EasyPeasy from where you can download a file containing the grid references of outward postcodes. Several HexCentral readers have recently contacted me to tell me that the link is now dead and the site no longer available.
I have now updated the article to include a new link. This one is to a site hosted by Dan Gibbs, which includes an up-to-date version of the outward postcode file. This version of the file is superior to the one formerly provided by EasyPeasy, as it also includes latitudes and longitudes, and the names of towns and counties (or their equivalents). The site warns that the town names are not completely accurate, but that won't matter for the distance calculations, as these only need the outward postcodes and the grid references.
My thanks to Dan Gibbs for providing this useful resource (free of charge), and to Adrian Bordicott for pointing it out to me.
June 16, 2016
November 28, 2014
Why respond.min.js didn't work (and how I fixed it)
By Mike Lewis
I recently spent a frustrating half hour trying to get respond.min.js to work. I knew there was nothing wrong with the script: I've successfully used it several times before. But this time it just wouldn't play. I eventually found the solution – and kicked myself. For the benefit of anyone else having the same problem, here's the story.
I recently spent a frustrating half hour trying to get respond.min.js to work. I knew there was nothing wrong with the script: I've successfully used it several times before. But this time it just wouldn't play. I eventually found the solution – and kicked myself. For the benefit of anyone else having the same problem, here's the story.
September 10, 2014
Using Google Classic Maps with the Android My Tracks app
By Mike Lewis
Until recently, I used Google's My Tracks application to track my hikes and bike rides, and to share these via My Places in Google Maps. This worked perfectly for over a year. Unfortunately, Google then decided to drop the app's support for Google Maps. Overnight, the app became much less useful – to the extent that I almost gave up using it. In this blog post, I'll explain the problem in a little more detail, and tell you how I solved it.
In a nutshell, My Tracks is an Android app that uses your phone or tablet's GPS receiver to trace a journey: a drive, hike, bike ride, or whatever. Once you have completed the route, you can choose to save or export it in a variety of ways (Figure 1). One of the options was to export it to Google Maps. This was trivially easy to do. You just chose a single menu option, and a few moments later your route appeared on the map. Perfect.
In the latest version, you can still export the map, but it now goes to the new Google Maps Engine. Despite the similarity in name, this is not the same as Google Maps (which is now called Classic Maps). The new tool has several advantages over the classic version, but there are a number of reasons that I – and many other people – prefer not to use it.
Figure 1 |
In a nutshell, My Tracks is an Android app that uses your phone or tablet's GPS receiver to trace a journey: a drive, hike, bike ride, or whatever. Once you have completed the route, you can choose to save or export it in a variety of ways (Figure 1). One of the options was to export it to Google Maps. This was trivially easy to do. You just chose a single menu option, and a few moments later your route appeared on the map. Perfect.
In the latest version, you can still export the map, but it now goes to the new Google Maps Engine. Despite the similarity in name, this is not the same as Google Maps (which is now called Classic Maps). The new tool has several advantages over the classic version, but there are a number of reasons that I – and many other people – prefer not to use it.
August 21, 2014
How to remove 'Permanently shred with AVG' from your context menu
By Mike Lewis
If you have recently installed – or upgraded to – AVG 2014, you might have noticed a new item on context menus in Windows Explorer. The item reads 'Permanently shred with AVG', and it does what its name suggests: It completely destroys the file or folder you are pointing to, without any chance of recovery.
Now, it could be that you will find this feature useful. If you want to place some confidential information beyond the reach of the Recycle Bin or a file recovery tool, this is a good way of doing it. But if, like me, you are worried about accidentally shredding an important file, you might prefer to remove this menu option. Here's how to go about it.
If you have recently installed – or upgraded to – AVG 2014, you might have noticed a new item on context menus in Windows Explorer. The item reads 'Permanently shred with AVG', and it does what its name suggests: It completely destroys the file or folder you are pointing to, without any chance of recovery.
Now, it could be that you will find this feature useful. If you want to place some confidential information beyond the reach of the Recycle Bin or a file recovery tool, this is a good way of doing it. But if, like me, you are worried about accidentally shredding an important file, you might prefer to remove this menu option. Here's how to go about it.
August 8, 2014
How to stop the Samsung Galaxy from vibrating
By Mike Lewis
One of the things I dislike about my new Samsung Galaxy tablet is the way it vibrates at every opportunity – whether I want it to or not. It does this when I switch the device on, press the Home button, press and hold the Power button, and at several other times too.
This is irritating, not least because it’s unnecessary. I could understand it if the vibrations alerted me to an important event, such as an incoming message. But there is no reason to have this kind of haptic feedback every time I press certain buttons. (It’s also adds to the drain on the battery.)
One of the things I dislike about my new Samsung Galaxy tablet is the way it vibrates at every opportunity – whether I want it to or not. It does this when I switch the device on, press the Home button, press and hold the Power button, and at several other times too.
This is irritating, not least because it’s unnecessary. I could understand it if the vibrations alerted me to an important event, such as an incoming message. But there is no reason to have this kind of haptic feedback every time I press certain buttons. (It’s also adds to the drain on the battery.)
July 25, 2014
Google's disavow tool revisited
By Lynn Evans
About a year ago, I submitted some suspicious links to Google’s disavow tool – against the strident advice of several friends and colleagues. Almost everyone I spoke to warned me against doing this. But I went ahead anyway – with a surprising result.
The usual argument against using the disavow tool is that it draws attention to dodgy links that you might have planted yourself – and therefore risks a penalty. I never understood that. If Google thinks the links are spammy, it will ignore them or penalize you in any case. The disavow tool is your chance to tell the search engine that you are not responsible for the links. Another reason not to use it is that you might inadvertently remove reputable links that are helping your rankings. That sounds more plausible to me.
In my case, the site had attracted several thousand links over the years. But about 900 of these were coming from what was clearly a link farm. I don’t know how or why they got there – it was certainly none of my doing. It was these links that I wanted to disavow.
About a year ago, I submitted some suspicious links to Google’s disavow tool – against the strident advice of several friends and colleagues. Almost everyone I spoke to warned me against doing this. But I went ahead anyway – with a surprising result.
The usual argument against using the disavow tool is that it draws attention to dodgy links that you might have planted yourself – and therefore risks a penalty. I never understood that. If Google thinks the links are spammy, it will ignore them or penalize you in any case. The disavow tool is your chance to tell the search engine that you are not responsible for the links. Another reason not to use it is that you might inadvertently remove reputable links that are helping your rankings. That sounds more plausible to me.
In my case, the site had attracted several thousand links over the years. But about 900 of these were coming from what was clearly a link farm. I don’t know how or why they got there – it was certainly none of my doing. It was these links that I wanted to disavow.
Speeding up postcode queries
By John Hyde
In an article on Hex Central, Mike Lewis showed how to calculate the distance between any two British postcodes. Here’s a tip for speeding up the process.
The calculation that Mike demonstrated is a simple application of Pythagoras’ theorem. You start by getting the grid references (that is, the x, y co-ordinates) of the two postcodes. Next, add the sums of the squares of the x and y distances between them. Finally, take the square root of the value thus obtained. That final figure is the straight line distance between the two points.
My tip is simply to omit the calculation of the square root. So, instead of working with the actual distance, you work with the square of that distance.
As an example, let’s suppose you want to sort a series of postcode pairs into descending order of distance apart. You omit the calculation of the square root, which means that you will in fact be sorting by the square of the distance apart. The result will still be correct.
Similarly, if you want to find all postcodes within a given radius of a fixed point, you omit the square root calculation, and compare the distances with the square of the target radius. Again, this will give the correct result.
Since the calculation of the square root is likely to be the most time-consuming part of the process, leaving it out should speed things up considerably.
In an article on Hex Central, Mike Lewis showed how to calculate the distance between any two British postcodes. Here’s a tip for speeding up the process.
The calculation that Mike demonstrated is a simple application of Pythagoras’ theorem. You start by getting the grid references (that is, the x, y co-ordinates) of the two postcodes. Next, add the sums of the squares of the x and y distances between them. Finally, take the square root of the value thus obtained. That final figure is the straight line distance between the two points.
My tip is simply to omit the calculation of the square root. So, instead of working with the actual distance, you work with the square of that distance.
As an example, let’s suppose you want to sort a series of postcode pairs into descending order of distance apart. You omit the calculation of the square root, which means that you will in fact be sorting by the square of the distance apart. The result will still be correct.
Similarly, if you want to find all postcodes within a given radius of a fixed point, you omit the square root calculation, and compare the distances with the square of the target radius. Again, this will give the correct result.
Since the calculation of the square root is likely to be the most time-consuming part of the process, leaving it out should speed things up considerably.
Subscribe to:
Posts (Atom)