16th Mar, 2008

Pastebin post filtering

As there’s been some cases of cracked email address lists being posted on pastebin recently, this week I tweaked the spam filtering to block such posts. A few legitimate posts got caught in the crossfire, causing a few more tweaks to the rules.

If you’re having trouble posting something because pastebin says it looks like spam, post a sample in a comment below and I’ll see what I can do to improve it!

Many people enjoyed the 3rd birthday mosaic image I made for Geograph, so I’m now offering to make custom mosaics for anyone who wants one. All I ask in return is that you make a donation of whatever you can afford to Oxfam - see my fundraising page for details.

Here’s my first effort, an A2 sized poster based on this Geograph image by Michael Ely. Click for zoomable fun!

Mosaic

Thankyou so much to Michael for helping me towards my fundraising target of £1500.

The images are made from tiles drawn from Geograph images - thanks to the thousands of photographers who made that possible.

Get in touch if you’d like one too!

6th Mar, 2008

Geograph is Three!

Geograph went live on March 6th 2005 - three years on it has far surpassed all our expectations! Here is a small selection of the 700,000 images - click the picture for a zoomable version.

Geograph is three

This mosaic is derived from Three Trees by David Crocker. Tiles drawn from images submitted to Geograph in 2007 - many thanks to the thousands of photographers who made that possible.

Naturally, the above image is available for re-use under a Creative Commons 2.0 by-sa licence!

The mosaic was created with Metapixel and the zoomable version was generated with Zoomify. Suggestions for more celebratory mosaics are welcome!

I have a couple of spare invites for Yahoo’s new location service Fire Eagle, which had a limited beta launch today. Leave a comment if you want one.

I had a quick play earlier and as TechCrunch noted, it’s a little light on features right now! If nothing else, the current beta gives a glimpse of how they will manage the privacy issues surrounding a “always on” awareness of your location.

I might see what I can hack together to use it while doing the Trailwalker Challenge later this year!

28th Feb, 2008

Geohash PHP class

geohash.org popped up recently with a method of generating short hash codes for geographical locations. The codes have some interesting properties and the algorithm is documented on wikipedia.

I recently started doing a Project Euler problem a day as a fun diversion. I found the geohash algorithm intriguing, so it became my “Euler problem” for the day!

Having done it, I’m not sure I’ll find a use for it myself, but if anyone else finds it handy, do let me know!

Download it here.

I wanted to track the delay of a mysql slave server in Munin, and found nothing appropriate after a quick google. So, in case anyone else finds it useful, here is a plugin which will allow you to do just that.

Here’s a typical graph:

Slave Delay Graph

Download: mysql_slave (1 Kb)

EDIT: I wrote this so I could better understand the recovery time of a slave which had 13 hours of updates to catch up on. While it was good for that, it’s less useful for the day-to-day lag as munin will only be polling it every 5 minutes. A better way would be to use mk-heartbeat to get a more accurate moving average.

I’ve formed a team to take on the Oxfam Trailwalker Challenge - a 62 mile walk on the South Downs that must be undertaken in less than 30 hours! Our training is well underway, and it looks like we’ll be shooting for around 25 hours.

On the big day I’ll be sending pics and reports to the team blog, and you’ll also be able to send us messages of support via SMS too.

We’re hoping to raise £1500 for Oxfam, so if you can possibly afford it, please consider sponsoring me.

You can keep track of our training and out how to sponsor us on our team blog at http://trailwalker.dixo.net

Tired of banal comments on YouTube videos? Now every comment can be intellectually stimulating by installing a GreaseMonkey script called Feyntube - turns every comment into a Richard Feynmann quote.

(Blimey, my first post in months. Must try harder).

We just updated a development server from Ubuntu 6.06 to 6.10. As a result, MySQL went up a couple of point releases from 5.0.22 to 5.0.24a.

Suddenly, the web application we were working on stopped working. It wasn’t possible to log in.

We quickly narrowed it down to a clause in query which checked a users subscription was valid by checking its start and end dates. It looked bit like this:

SELECT foo FROM bar WHERE NOW() BETWEEN start AND end;

MySQL 5.0.22 returned rows, but 5.0.24 didn’t. After scratching our heads, I checked the manual:

For best results when using BETWEEN with date or time values, you should use CAST() to explicitly convert the values to the desired data type. Examples: If you compare a DATETIME to two DATE values, convert the DATE values to DATETIME values. If you use a string constant such as ‘2001-1-1′ in a comparison to a DATE, cast the string to a DATE.

The phrase “best results” make it sound like we’re baking a cake, and that your query results will be fluffier and more flavoursome if you use CAST! What they actually mean is, if you’re comparing different date types, you’re screwed if you don’t cast. You might get nothing.

Sure enough, our start and end columns were dates, and using cast in the query worked just fine:

SELECT foo FROM bar WHERE CAST(NOW() AS DATE)  BETWEEN start AND end;

I couldn’t find anything directly related to this change in behaviour in the changelogs, but hopefully this will help someone out there…


Needed a costume with just a few hours to spare, so knocked this up, printed on transfer paper, and hey presto, one fabulously scary halloween costume.

The whole Tesco Value thing is a running joke on b3ta.com, I think the original inspiration came from the greetings cards over at http://boakes.org/tescovaluecard/

Categories