Burning Lorry

Spotted this on a road in Kent.

had my new camera handy so managed to get on film….

Tweet vs Twitter

Someone insisted at some point that ‘tweet’ is the correct verb for twitter as the whole web seems to be using.

It’s bollocks!

‘tweet’ is a verb and a noun.

‘twitter’ is a verb and a noun.

you ‘twitter’ and you hear a twitter – its all one word!

‘Tweet’ is a whole other thing!

Bastards!
http://www.askoxford.com/concise_oed/twitter

http://www.askoxford.com/concise_oed/tweet

Nokia N810

Hello world from my new internet tablet….

This was written in a wordpress client for it.

Its an amazing device, I will post more about it soon…..

Working out an age in PHP

A friend just asked how I would work out someones age from their birthday. He said that searching the web came up with lost of people saying just subtract the year of the date from the current year; but this logic falls down when your birthday is later in the year than the current date, instead it tells you how old you will be this year.

The solution that he had thought up involved a series of loops, and was over complicating things.

I thought it worth posting the solution incase anyone else was searching.

It does the first calculation of subtracting years, and then checks the day of year to decide if it should subtract a year.

function age($bday)
{
    $now = time();
    return date('Y',$now)-date('Y',$bday)-(date('z',$now)>date('z',$bday)?0:1);

}