Twitter Weekly Updates for 2010-06-13

  • Waiting to eat carvery, toddler asleep – too many strawberrys earlier perhaps ? #
  • Chav neighbours are armed with an air horn. *sigh* #
  • the problem with chocolate digestives biscuits is failing to resist the urge to have another. Thanks mcvities. #
  • Waiting for someone to calculate the volume of carbon emissions from the Google homepage background image thing #
  • Chav branded house … #
  • 220 quid or thereabouts for me to 'upgrade' to an iPhone 4. Hmmm #
  • RT @O2 Want to know how to upgrade to iPhone 4? Details are now online at #
  • Who's sheryl cole, why is she woman of the year ? #
  • is no Gordon Freeman #
  • Off to run in the rain. Sweet. #
  • What we've got here … Failure to communicate. #
  • I <3 git. #geek #
  • RT @steve_parkes RT @MJHibbett: Saw a white van WITHOUT England Flags at lunchtime. What's the anti-terrorism hotline number? #
  • The dog eats banana. WTF ? #
  • Wow. I never knew Nottingham was so near Dover… #robinhood #

Twitter Weekly Updates for 2010-06-06

  • RT @grifferz "don't leave pumps unattended bp…" #
  • Wondering why my neighbours would willingly spread what smells like rotting silage on their garden. #
  • Treasure island is nearly empty. Shocked to find space in the car park. Perhaps this is a hint we should be outside #
  • I appear to be teaching Rowan new words. "Bollocks" – a word to be said after you tread on dog poo. #
  • The bad thing about falling asleep with the toddler is waking up a couple of hours later and needing to wash up. :-/ #
  • Thanks for the YESSSL promo code GoDaddy 🙂 (SSL cert for $15 all in for one year…) #
  • White chocolate cookies, because they're healthier than the others….. #
  • Move over cakes, it's an ice cream only office till autumn. Hmm cakes with ice cream inside – best of both worlds perhaps? #healthyeating #
  • RT @GeneHunt I'm just a social drinker, every time someone says, 'I'll have a drink'. I say, 'Social I.' #
  • RT @GeneHunt Threw my Hoover out last week – it was only gathering dust. #
  • Falling asleep with Rowan and then waking up at 22:00 wasn't a good idea. But have moved to level 15 on TDPE2 … (PerhapsAShadyTree.aspx) #
  • Found a 2+ year old bug in legacy code today. > instead of == ….. *sigh* ( bug in inherited code ) #
  • New employee set off the building burglar alarm when trying to leave. Haha. I clearly suck at inductions. #
  • Late night toddler feast. Cannibalism FTW. #
  • That was a shit run. Body seems to be rebelling (left hip, stomach etc). #

Twitter Weekly Updates for 2010-05-30

  • (running is probably a better idea than spending the rest of the day playing half life 2… ) #
  • Lets try Bromsgrove to Droitwich with some canal – 20 miles – … run fatty run #
  • Cooling down, ready for ice skating. #
  • I've been good and registered my phone + laptop at (to help the plod reunite me in the event of theft) #
  • RT @plc: "An Apple store was burgled with over £10,000 of goods stolen. The police are confident they'll be able to find both computers." #
  • Electric meter replaced; book read; perhaps i should pretend to work now (aka buy a mobile phone) #
  • About to get bitten by vampires (giving blood) #
  • Hmm. 4square crashes 4 times in a row as I try to claim Costa coffee. #conspiracy #
  • What's the dog trying to tell me when he turns off my computer ? #
  • Happy my neighbour has mowed my lawn. Odd she hasn't done all of hers though. #
  • I know now what it's like for a chicken when it's put in the oven. #
  • That was a nice pasty. Perhaps I should come to pershore more often. #
  • Come on the m5. #
  • I can wear shorts and t-shirt to/at/from work. Enjoy wearing your suits suckers. #

Twitter Weekly Updates for 2010-05-23

  • Hot. Lots of women wearing pink. #raceforife #bromsgrove #
  • At last. Summer is back. We'll soon be moaning it's too hot. #
  • Love pacman at Wonder how much this has cost the country in wasted work time ? 😉 #
  • Grr. 4sq Is vaguely intelligent. To think I might have to go inside the places I visit and stay there for a bit. #
  • There are too many smug people around today, who are strangely happy considering some chav has stolen the roof off their car. #
  • If the council paid me £1 a go to pick up other peoples dog poo, I'd be rich. #bromsgrove #
  • Must stop laughing at the 'new' dog (well he's had a good coat trim) #
  • First 2 applications from Aston uni students for an industrial placement year are failures – customise your cv/letter for the job! #
  • I wonder how much of bromsgrove I can rule over in 4square #
  • An interesting end to season 1 of V … good episode. #
  • RT @OpenRightsGroup Nick Clegg asks what laws to delete, tell your MPs, the #DEAct #DEBill #
  • An eventful but uneventful night. Everyone's tired Jim. #
  • Check out my OnePage card at #onepage #
  • RT @GeneHunt I liked the idea of being married. It's great to find that one special person you can annoy for the rest of your life. #
  • RT @jakebible Dead Mech Episode 19 is so gonna put a mechanized boot in yo ass! Subscribe at (plz RT) #
  • Learning about vaginal dividers, dual cervixes and horned uteruses. I'm glad I'm not a woman. #
  • RT @birminghampost Woman banned from drinking in public found drunk in Bromsgrove street #

Twitter Weekly Updates for 2010-05-16

  • I've never walked a dog which can't make it up a small hill without collapsing in a panting heap. #
  • The neighbours are walking a young cat on a lead. Guess they're trying to keep up with the girl who walks a ferrett in town #bromsgrove #
  • RT @GeneHunt A prisoner escaped last night, she's a clairvoyant midget. We're warning the public that there's a small medium at large. #
  • RT @GeneHunt You know what it means when you come home to a little affection, tenderness and sympathy? It means you're in the wrong house. #
  • RT @grifferz Believe me, it's possible. nice spelling. #
  • RT @PalePurpleLtd Looking for professional php dev. Contract or full time. See #
  • I wonder how often someone types in a URL incorrectly and gets/leaves a rude surprise. #
  • I signed the petition to repeal the Digital Economy Act #DEBill #DEAct #GE2010 #
  • Right, time to run off this stupid sore throat and looming crapiness. #
  • I'm mentally washed out now. Time to degenerate down to a 2 year old's level soon. #
  • Strange sales pitch about sales training with someone from Sandler Training (anyone come across them? #
  • Everyone will suffer now; everyone will suffer now. You can't help yourself. #
  • Run away (for 40 minutes) #
  • Dear Twitterverse: Is Nightmare on Elm Street any good / worth watching? #
  • Don't use phpunit from Debian Lenny (v3.3.16) – full of fail; Install via pear. My tests now pass; I now get code-coverage reports. Win. #
  • Toddler clearly deciding that he should have a lie in. In the interests of Good parenting I can't get up till he does … 😉 #
  • Today's discovery – orange marmalade with ginger. nom nom. #
  • 35 weeks #

Twitter Weekly Updates for 2010-05-09

  • Just found Prey – remote tracking of laptop etc incase of theft … #osx #linux #windows #
  • Stripping done, holes filled; now to get the gun out and do some kinky latex^h^h silicone sealant stuff … Then lawn mowing. #
  • Roast lamb after 17 mile run seems good. (2.5 hours; worship me) #
  • 10k isn't far enough – let's do instead. #
  • RT @UKLabourParty We need 100,000 people to retweet if you want Proportional Representation #
  • Suggestions on how to stop a dog chewing stuff when he's left alone welcome. (attention seeking?) has bone etc to chew …. #
  • Think I'll wait for an android like ipad or spend the money on an iPhone v4. #
  • My tummy and bed are now a drum with toddler hand sized drumsticks beating away. #
  • Ah that's better. Second waking at 9am. This is more civilised. #
  • Waking at 550 on a saturday is not ideal. #
  • Right. Time to cudde up to the boss and fall asleep. #
  • RT @GeneHunt Why is it that one careless match can start a forest fire, but it takes a whole box to start a barbeque? #
  • Is rowan trying to give me a hint by the way he's washing the bath (as opposed to washing himself in the bath) #
  • Emergency chocolate fix applied. Recovery underway. Now I want more …. #
  • Sweet. I definitely don't need a tv license – & still use iplayer #
  • RT @alexmace This is exactly why I voted Lib Dem: RT if you did too. #votelibdem #
  • #ukvote B61 #
  • Git is too quick. I have difficulty accepting it's done anything – perhaps it should sleep(1) to give me confidence it's done something. #
  • I've just registered my opinion for my constituency for #ge2010 at, why don't you? #twitVoteUK #
  • Fixing your router's WIFI since 1903 #
  • TV harms children / toddlers / babies – – no news (haha) there then (or surprise) #
  • Haha. I've had the window open and blinds drawn in the office for at least an hour and the minions haven't noticed / burnt from sunlight. #
  • Damn you ubuntu – updates to an existing release shouldn't break everything. Grr. #
  • There's a horrible smell of burning plastic/dead computer in the office and my desktop is unwell. Are the two linked? Fuckitallnotagoodday #
  • Guess I should run. 10k race this Sunday. Still doing 6 miles this morning isn't much shorter. #lazyweekend #
  • RT @GeneHunt I'm proud of my Grandfather. He shot down two German planes. Admittedly that was in 1972 but you can't be too careful. #
  • Iron man 2 perhaps. #
  • Stupid hail. It's summer. Get lost. Come back in November. #

Trac and Git on Debian Lenny

Random Brain dump – Trac 0.11 with Git on Debian Lenny; this worked for me …

We’ll use /var/git/ as the location where our git repositories live – e.g. /var/git/repository1, /var/git/repository2 etc.

So, assuming you have git-core installed, create the Git repository:

mkdir -p /var/git/repository

cd /var/git/repository

git init –bare

Next, install the trac-git extension so trac can do ‘git’ like things:

apt-get install trac-git

Ensure the WebDAV FS module is enabled in Apache:

a2enmod dav_fs

And Expose where the Git repository is on the web server – e.g.

cd /var/www
ln -s /var/git git

And add something like :

<Location /git>
     DAV on
To which ever virtual host file has /var/www as it’s document root (probably ‘default’); this should then mean that any git repositories you create in the future will automatically be exposed via Apache. It should go without saying that you should put some sort of Apache authentication check on this location.

Next, let’s create the Trac Repository:

trac-admin /var/trac/repository initenv \
     repository sqlite:db/trac.db git /var/git/repository

Configure Trac to do Git things:

Edit /var/trac/repository/conf/trac.ini and make sure it contains something like :

tracext.git.* = enabled
cached_repository = false
git_bin = /usr/bin/git
persistent_cache = false
shortrev_len = 7

Finally, just make sure permissions are correct:

chown -R www-data /var/trac/repository
chown -R www-data /var/git/repository

Then finally, restart Apache, point your web browser at the trac repository (assuming you’ve already setup Trac via e.g mod_python or similar) and you’ll probably seen an AssertionFailed error (with no helpful message). This seems to be a one off when the repository is empty… so try :

mkdir ~/src/tmp
cd ~/src/tmp
git init
echo 'test' > hello.txt
git add hello.txt
git commit
git config remote.upload.url
git push upload master

(If this fails with some unhelpful message like :

orange:~/src/tmp $ git push upload master


error: Cannot access URL,
      return code 60

error: failed to push some refs to
It’s probably moaning about you having an invalid (or at least non-trusted) SSL Certificate (as I happen to) – create ~/.gitconfig and set it to contain :
sslVerify = false
You might also wish to read this doc on git setup with Apache

Twitter Weekly Updates for 2010-05-02

  • Good luck with the #dyfienduro mtb'ers. #enduro #mountainbiking #Machynlleth #
  • Time to say goodbye to "cd /pub; more beer" (t-shirt). You've lasted at least 10 years but now look a bit too old. #
  • I tried to get some non-dull coloured clothes. #
  • Chewing my £15 (new) running hat is not smart or clever dog. Maybe I'll forget to take you to the farm tomorrow? #
  • Best add Predators To my list of films to watch. #
  • RT @GeneHunt What's long, hard, easy to erect and makes women groan?…… An Ironing Board. #
  • – my biggest problem of the day is now solved!! 🙂 #
  • The dog has a hard life. Eating a donut. #
  • Cameron was smarmy and didn't answer questions; Brown tired and boring. Clegg genuine but niave? Seeing DC may have put me off voting Tory. #
  • Ought to find a running club/group in Bromsgrove…. and/or Squash. #
  • welcome #ubuntu lucid …. time to upgrade desktop soon then. #
  • This is how you to scream (while chasing a dog) – toddler style…. #
  • RT @GeneHunt 'Ultra-sensitive condoms?!' What do they do? Keep her talking after you've gone to sleep & ask how she's feeling? #
  • RT @schmooster #bigotgate For the sake of balance, here's Cameron with the public. <- nice 'documentary' #
  • wondering if I'm somehow damaged a nerve along the top of my foot; weird sensation occasionally…. still at least it's not my hand. #
  • Anyway. Time to go running. 7 miles perhaps. Rests are for girls and babys. Sort of. #
  • This is not orange (or any fruit) juice on my arm….. "bloody dog" #
  • Avatar is only £8 on DVD on release. So it really was over hyped and not that good then? (3d ++; story —-) #
  • I'm sheltering in the blind (warm) spot of an overactive aircon unit waiting for gparted to do succeed. Not quite
    my idea of fun. #
  • Stupid Compaq server vs gparted. Gparted seems to be winning. Phew. #
  • I wish I'd remember to upgrade $server before feeling tired at mid-night. #
  • Woo… 148 out of 844 marathon wise (; now my head has expanded. #stratford #marathon #
  • Won't be voting for them…. #bnp #

phing / unit tests and global variables

Yesterday I thought I’d move one project over to using phing (with the end goal of hopefully getting some sort of Continuous Integration setup in place, with graphs and stuff to show the customer).

All went reasonably well – svn update, php documentation generation, php code sniffer tasks etc were all in place. Unfortunately when I got to do the unit tests (simpletest) things failed, and it seemed to be the case that no global variables in use within the code base were available. As my brain finally realised why this is the case this morning, I thought I’d better write a blog post in the hope it may help someone else in the future.

The code base itself is ‘legacy’ – in that it’s been pulled in different directions over the years before we got our hands on it. There’s bits of procedural code (e.g. query(..) which seems to just be the same as calling mysql_query(..)) and object oriented ($db->query(..)). Mixed in with this is a liberal use of global variables (e.g. $db, $database_name, $software_root and so on).

My unit tests, when run via a script on the command line look like :

$test = new GroupTest('my tests');
exit($test->run(new TextReporter()) ? 0 : 1);

And worked fine.

Within the code base, there is one include file within the application which defines a number of variables, on the assumption it’s at the top level scope – e.g.

$database_name = "blahblah_live";
$db = new Database($database_name, $database_username, $database_password, $database_host);

Which works fine. However, because $db hasn’t been explicitly defined as a global variable, when the tests are run through phing – they run within the scope of a function, and hence the global variables aren’t available (because they’ve not been implicitly registered as globals – the code just makes an assumption that they are).

So, to fix it, I just need to find all the variables defined in the script, and make them explicitly global.


global $db;
global $database_name
$database_name = "whatever";
$db = new Database(.....);

One step closer; perhaps soon I’ll be posting about getting Xinc or something similar working.

My First Marathon

But will it be my last?

To detail it here – hopefully instead of telling everyone the same thing – and to remind myself next year… here’s how it went.

We arrived in Stratford for the Shakespeare marathon at about 8:45am, changed, herded toddlers and children towards the start and did the toilet ritual. The start line had moved from last year, but it was obvious where to go. Then we spent about 15 minutes standing around waiting for the start klaxon.

Obviously the start was crowded; there were fat/slow/lazy people everywhere – as I did a lap around the town centre, I just found myself zig-zagging through them all and getting frustrated somewhat. It was nice to have Rowan, Kat, Jenny, Emily, Rachel, Helen, Vickie, Anderson and Bailey all looking on as I raced past. Suffice to say, I was full of beans at this point in the race 🙂

I knew I was running relatively quickly, at least for the first half marathon – I did 12 miles in about 1 hour 30, or thereabouts – and enjoyed myself certainly until sometime after this point, which makes me wonder if I should do half marathon’s in the future and not bother with full ones (now I’ve done it… ) but that’s an argument for another day.

Anyway, at about 16(?) miles, I went to the loo; while sitting down on the toilet (hey, at least I didn’t just hide behind a hedge) my legs were busy shaking. By about 18 miles I was making a conscious effort to slow down a little, and keep my heart beat at around 150-156. I suspect I generally failed at this. In my mind I knew I had little more than my daily morning run left to complete – but it certainly dragged on. My fingers and toes had been getting slightly numb since perhaps 18 miles. Maybe earlier.

The last 5-8 (?) miles of the marathon involve running down a straight disused railway track – the Greenway – this dragged on for a long time. Especially as we’d covered part of it on lap one. By about 20 miles, my stomach area was starting to cramp slightly; By 22-23 ish miles, I had slowed down quite a lot – but discovered myself overtaking walkers doing the half marathon. My vision started to blur slightly, and my legs felt pretty useless perhaps at about 24 miles – and time / distance seemed to drag on and on.

Eventually I returned to the recreation ground/park in the middle of Stratford for the finish. In retrospect I could have upped my pace at bit at this point – but it still seemed like there was some distance left to run, and I couldn’t remember the route that well from last year – so it wasn’t until the last corner that I sprinted what is probably the last 50 metres to the finish line. My legs were numb, I was just glad the ground was quite flat as I couldn’t really feel them. Thankfully I didn’t trip which would have been a pain.

Once over the finish line I just wanted to collapse and remove my t-shirt. My shoulders had ached for about the last hour. I staggered back to where the waiting family were and promptly collapsed on the floor. My legs then took turns in cramping in alternate muscles – Jenny didn’t approve of my method of punching myself in the appropriate cramping muscle and helped me stretch – which I think helped.

So, anyway, would I do it again? Yes. But I somehow need to get a better sense of pace. On my own, two to three weeks ago – with no one to chase – I did 24 miles in about 3 hours 30 mins and that was difficult enough; yet I did the entire marathon in 3 hours 35 mins on Sunday. I can see that I probably went too quick for the first half, but I’m not sure I have the discipline (?) to slow myself down in the first half enough to have an effect towards the end.

So, Nottingham’s marathon beckons sometime in September, I think.

If I’d done just the half marathon, I’d have been in good form at the end (not tired, able to run the last mile or so very quickly etc); yet I did the full marathon and found it pretty hard going. So, should I focus instead on just doing half marathons quickly? I don’t think I have the lanky runners physique which suits marathon runners…..

Update: apparently I was 184th out of nearly 900 runners. 🙂