Skip to main content


Showing posts from March, 2012

A quick phone navigation tip

If you find yourself navigating from written instructions (either received in email, or given on paper) then a simple tip is to take a photograph of the email (or paper) and set it as the image on the lock screen. Then when you are walking around there's no need to unlock your phone to read the directions. Here, for example, is how to do that on the iPhone. Suppose you've received directions in an email (if you have a paper set of directions then just photograph them and jump ahead). First, take a snapshot of the email containing the directions. You can do that by clicking the power button and home button at the same time. A screen shot will appear in Photos. Find the image in Photos and click on the "Forward" button (bottom left hand corner). That button is used for photograph actions: Then choose Use as Wallpaper and then position the image so that the directions are in the middle of the screen (which prevents them from being hidden by the clock). Onc

Met Office and CRU argue for open data and open code

Regular readers of this blog will recall that back in 2009 I looked at data released by the Met Office and CRU and found some errors and software bugs in the land surface temperature record known as CRUTEM3. That experience led to a collaboration between myself and two professors and a joint paper in Nature entitled The Case for Open Computer Programs which used my experience with the closed Met Office code as one example. Our paper argued for the open release of data and code with all academic papers. Today comes the news of a new paper from the Met Office and CRU describing an update to CRUTEM3 (called CRUTEM4). The paper is Hemispheric and large-scale land surface air temperature variations: An extensive revision and an update to 2010 . It contains a couple of pleasing, if slightly surprising, paragraphs (my emphasis): Given the importance of the CRUTEM land temperature analysis for monitoring climate change (e.g. Trenberth et al. 2007), our preference is that the underl

Ambient bus arrival monitor from hacked Linksys WRT54GL

London's Transport for London has a wonderful service called Countdown that can give live bus arrival times. For example, here's a page showing live buses passing No. 10 Downing St. Underlying this is a simple JSON API that, while not public, seems to be usable by the average programmer as long as I'm not abusive. So with its details deciphered (hardly hard since the web site uses the API) I set about building an ambient bus monitor into a model London bus. The idea is that I can glance at the bus and see the times of up to the next two buses that I'm likely to want to catch and know when to leave the house. Here's a picture of the completed unit: To make that work I needed a computer of some kind and I'd originally planned on using a e Raspberry Pi . But with the delay in being able to buy one I switched to another host: a hacked Linksys WRT54GL . It's possible to reflash the Linksys with a custom Linux installation that lets me control the bo

Teaching yourself Morse Code with iPhone's Accessibility options

The iPhone allows the user to create custom vibration patterns, they are considered part of the Accessibility options. (Side note: I've always found accessibility options to be interesting to an able-bodied person like me: there are often customization options there that are very handy). These custom vibration patterns are created by selecting a contact and then by touching Vibration. You can use them to teach yourself a bit of Morse Code . On my phone I've made custom vibration patterns for people who call me frequently so I can tell without removing the phone from my pocket who's calling. You make the pattern by tapping or holding on the screen to create short or long bursts of vibration. Here I've tapped out A I R and used it as the custom vibration pattern for Air France. The other useful iPhone resource for Morse Code learning is this Koch Trainer .

Nine times table on your fingers (and algebraic explanation)

Can't remember that 9 x 7 is 63? Here's the really fast way to do it. Lay your hands on the table and look at your fingers. Imagine they are numbered 1 to 10 from left to right. Find the 7th finger. There are 6 fingers to the left of it: that's the first digit of 9 x 7. There are three fingers to the right of it: that's the second digit. So the answer is 63. Same thing works for the rest of the 9 times table (up to 9 x 10). Here's a quick algebraic explanation of why that works. Suppose we're doing 9 x a where a is a number between 1 and 10. On your fingers you've got (a-1) fingers to the left of finger a and (10-a) fingers to the right. The result is 10 x (a-1) + (10-a) because the (a-1) is in the 10s position. 10 x (a-1) + (10-a) = 10 x a - 10 + 10 - a = 10 x a - a = (10 - 1 ) x a = 9 x a Another thing you can spot this way is that the sum of the digits in the 9 times table is always 9. For example, 63 (6 + 3 = 9), 9 x 5 = 45 (4 + 5 =

How to divide by 9 really, really fast (and why it works)

An interesting post on Hacker News shows tricks for dividing by 9. The fastest trick goes like this. Suppose you want to do 53876 / 9 in your head. You do the following: 1. The first digit is going to be the same as in the left hand side, so it's 5. 2. The second digit is the first digit plus the second digit: 5 + 3 = 8 3. The third digit is the previous answer plus the third digit: 8 + 8 = 16. Because that's bigger than 10 carry it to the digit above (which is now 9) and just take the rest. So it's 6. 4. The fourth digit is previous answer plus the fourth digit: 16 + 7 = 23. Again carry the tens to the preceding digit (which now becomes 8) and you're left with 3. 5. The last digit is the sum of all the digits: 23 + 6 = 29. For this final digit it's necessary to work out how many times 29 can be divided by 9 (it's 3). That gets added to the previous digit which becomes 6. The remainder (29 - 9 x 3 = 2) is the remainder of the whole calculatio

The Delilah Secure Speech System

Part of the new exhibit being unveiled at Bletchley Park is the Delilah Secure Speech system that Alan Turing developed during the Second World War. Details of the system are in Andrew Hodges' excellent biography of Turing and have recently been placed in the National Archives (references FO 850/256 and HW 25/36 for people who want to go an see them for themselves). Delilah was intended to be fairly portable (unlike SIGSALY ) and usable in the field (such as in a tank) and allow secure speech communication between people over radio or telephone. A team at Bletchley Park has been working to rebuild Delilah from the report (with some assistance from GCHQ) and I was able to see and photograph the reconstructed machine. Here are some pictures: And here are pictures of the original machine taken from recently declassified documents: Briefly, Delilah worked as follows. The incoming speech was limited a channel of 2kHz which was then sampled at 4kHz to produce 4,000 sa