Many Pies

Many Pies

Wednesday, February 26, 2014

Google Now, Berg and our washing machine


Google Now is the thing on the Google mobile app which displays "cards" containing hopefully helpful information, like how long it will take you to get to work. I liked the idea, but as my journey to and from work usually takes the same amount of time, it was never really much use. I was going to blog about the sorts of cards I'd like to see them do, but I could only think of one thing: tell me how long is left on the washing machine.

However, now those clever people at Berg have done something even more useful - made a washing machine tell you when it's finished.
Here's the short version of the news. Here's the long technical explanation with lots of juicy detail. The Guardian have picked up on it too.

Update (later the same day): our washing machine must have read this blog post and got worried because its gone on strike. :-(

Monday, February 10, 2014

Happy (slightly belated) Birthday Mac!

My first encounter with the Apple Mac was on a project I worked on for what was then Powergen when I worked at Logica. The computers we were developing on were mini-computers, which were about the size of a two drawer filing cabinet. Well kids, I expect you find it strange to hear something so big described as a "mini" computer, but that shows how big the normal computers were. The Macs weren't up to running the software for managing electricity operations, but they were good at drawing the Yourdon diagrams we used to design the software. The software to do that was pretty good. One of my memories of those days was, following a project meal where a lot of alcohol was consumed, someone came in looking rather worse for wear. He took one of the Macs under his arm and headed home again, presumably to do some design diagrams in a darkened room. In time PCs replaced them as the tools for doing the graphical stuff we needed to do, but for a while they just fitted the job.

Stephen Fry has a really good blog post about the Mac, including a bit about something I wasn't aware of - when Steve Jobs nearly met Tim Berners-Lee, but not quite.



Wednesday, February 05, 2014

Should I cycle to work or not?

With the @wycombeweather twitter bot and the UK Weather Little Printer publication that I've created you may detect that I have an interest in the weather. Now because I'm a wimpy cyclist I've created something that will tell me whether the weather is suitable for cycling.

It scrapes the BBC weather page looking for the weather conditions and temperature at two times of day (going to work and coming back) and sees if they fit my wimpy criteria for weather that I will cycle in. It then tells me whether to cycle or not. The idea is that I somehow get this information when I get up in the morning and use it to decide what to dress in. Maybe I could get a Raspberry Pi to turn on an LED based on what it tells me. In practise I'm probably going to look at the whole forecast for the day, as it it's been showery, even if the prediction at 5pm is that it isn't going to rain, there's a chance that it will and so I won't cycle. Still, it's fun to create it.

"It" at the moment is currently one web page which is in partial debug mode in that it tells me the conditions at the two times so I can see what the decision is for each of those conditions.


It's not just for me though - you can use it! By supplying query parameters to the URL you can specify your own postcode (UK only), times of day, min and max temperatures and the acceptable types of weather that you're prepared to cycle in. Here are the names of the parameters:

  • postcode - just the first bit, e.g. HP14
  • mintemp - a number
  • maxtemp - a number
  • firsthour - a number, e.g. 6 for 6am, 17 for 5pm
  • secondhour - as firsthour
  • goodweather - a comma separated list of words with %20 instead of space
For those words, as I had the @wycombeweather twitterbot running for a number of years I could mine the archives and get a definitive list of words the BBC have used for the weather. When I started work on this though I discovered that sometimes words were used for an hour slot that weren't used for a summary of a day. So this is all the words I know about:
  • clear sky
  • cloudy
  • drizzle
  • fog
  • foggy
  • grey cloud
  • heavy rain
  • heavy rain shower
  • heavy showers
  • heavy snow
  • light cloud
  • light rain
  • light rain shower
  • light showers
  • light snow
  • light snow shower
  • light snow showers
  • mist
  • misty
  • partly cloudy
  • sleet
  • sleet showers
  • sunny
  • sunny intervals
  • thick cloud
  • thunder storm
  • thundery shower
  • white cloud
So for example, if you live in Birmingham and you'll only cycle when it's sunny and warm you could use this URL:
http://paulmorriss.com/bikeornot/bikeornot.php?postcode=B1&mintemp=15&maxtemp=99&firsthour=9&secondhour=16&goodweather=sunny,sunny%20intervals
If you run this after 9am you'll get a "(not found)" for the first hour slot.

All the code for this is on github. You can see the work I've yet to do on the readme there. At the time of writing the next thing is to make it easier to specify your own preferences without creating a big URL, and then to store those in a cookie.

Thursday, January 16, 2014

NetCommunity - fix acknowledgement page after donation

One of the retrograde steps (in my opinion) that was made to Blackbaud NetCommunity at one of the previous upgrades was to make it so that after someone had given they were kept on the same page, but that the donation part was replaced with some acknowledgement text. So before they gave it would look like this:
Please give!
Amount: ___
Name etc.

and then after

Please give!
Thanks for giving etc.

I thought this was impossible to fix with Javascript because I couldn't find a way to get a script to fire while the acknowledgement is displaying. However there is a workaround on the Knowledgebase. The workaround it gives only works if you have one text part on the page. However if you have more than one text part at the top of the page you can use a class to do this instead of an id so you have:
Then in the HTML for the custom acknowledgement put this:


Another problem with this change is that you can easily see Google analytics for after people have given, so if anyone has any tips, please share.

Wednesday, January 15, 2014

Virtually sitting at a meeting table

I'm taking part in some meetings via video conference at the moment. (This picture is from when I did it a couple of years ago, this is what I looked like as I was "sitting" at the table with the other people. I didn't know my photo was being taken so this is my concentrating face.) The meeting is with the steering group of the Polder Consortium. We're looking at how we can help all the organisations in the Wycliffe Global Alliance take part in seven streams of participation, mainly through a technological viewpoint.

Part of the reason we are able to do this is because of the expanded scope of the Polder Consortium to include other things than just identity issues. However identity, and trust are essential foundations for organisations working together, so they will play their part.

Thursday, January 09, 2014

Old Bible Translators and Maori tattoos

At our weekly staff meetings (now monthly since our move to the new office) we would often have someone talking about their work with Wycliffe, usually in some distant country. Often people carry on into their 60s and 70s before they stop. These older people (older than me anyway) would have great stories to tell, and there would obviously be so much more they could say, given the number of years they have been doing the work. Apart from their usual wrinkles I would wonder why their exploits left no obvious physical trace. There was no sign of the days waiting in line to get visa or travel permits, or some other government documents approved, the days and weeks they'd spent travelling along muddy tracks in their 4x4s, the months and years they'd spent patiently working through a translation with speakers of the language.

It put me in mind of Maori tattoos which I thought (until I researched for this post) were about what had happened to you, but I now know are about your social standing by birthright and also about "the quality of their personal participation" (see that linked webpage). You could imagine a translator getting a tattoo after they worked on a New Testament, or Old Testament - maybe one dot or line per verse (7,959 in the New, 23,214 in the Old), or more realistically per chapter (1,189 in the whole Bible). It's not uncommon that when someone has finished on such a project that they then move onto being a consultant for other projects in the same area of the world. So they might be involved in several more projects in their remaining working years. So the first tattoo would need to not be too big!

Wednesday, December 18, 2013

Bitcoin - digging deeper and deeper into what it's all about

At the moment I'm finding Bitcoin really interesting.As you can tell from the post about Cryptography for Curious Kids I'm interested in cryptography. I've read overviews and that Wikipedia article I've linked to, and the Bitcoin wiki. I find that I grasp the overall concept. Then I read into the detail and think I've grasped it at a deeper level. Then I go away and forget about the detail and have more questions which means I need to read again, and deeper. Almost every fact seems to raise more questions. It's almost like an adventure game:

Bitcoin is a peer to peer digital currency. Where do you want to go?
N: How do they get created?
E: Can you have a physical Bitcoin?
S: What does it mean to have a quantity of them?
W: How do you exchange them for other currencies?

>S
You have chosen S. The way that you have a Bitcoin is that everyone taking part in Bitcoin has a record of all the transactions that have taken place since they started being used, so everyone agrees that you have a certain number in your wallet.(OK not everyone taking part, but a lot of people.)

N: What is a wallet?
E: How does this information get synced between everyone?
S: What's to stop people falsifying the information?
W: How can you have fractional parts of a Bitcoin?

And so it goes on: mining, pooling, the blockchain, public/private keys, speculation about deflation, bubbles, anonymity, hashes, really big numbers.What's not to like?

Articles by my favourite bloggers (linking doesn't mean I agree)
I sold some Bitcoins by Tim Bray
Why I want Bitcoin to die in a fire by Charlie Stross