Twitter Weekly Updates for 2010-07-11

  • BBQ time ! #
  • Timberhonger 10k race tomorrow; here's to hoping my legs are up to it. #bromsgrove #10km #run #
  • A woman says she's uncomfortable watching you wank. You A: need more time together B: she's a prude C: Tell her to sit elsewhere on the bus. #
  • I`m getting sick of these Tyneside gunman jokes. They`re not even raoulmoatly funny. #
  • Postfixadmin 2.3.1 live; .rpms and .debs etc; see http://postfixadmin.sf.net – virtual mail domain admin tool for postfix #php #mail #isp #
  • Turned on the radio to kerrang. Toddler demanded we danced. Fun times. Shame the radio reverted to talking after the song. #
  • Ooh. Thanks John truslove. Two potential offices to view 🙂 bromsgrove ftw 😉 #
  • Bromsgrove … Where are the decent offices hidden.? Room for 4-5 required. #
  • Postfixadmin release 2.3.1 is almost here. #postfix #linux #sysadmin #
  • Paddy tells Mick he`s thinkin of buying a labrador. "F___ off" says Mick, "have you seen how many of their owners go blind?" #joke #
  • Women! They just don't have a sense of humour. The wife didn`t find it nearly as funny as I, when I replaced her tampon with a party popper! #
  • OH: "website ______ is crap it has BNP images in it…. " (I heard bnp, he did say bmp). #
  • I quite like my jabphone 4 but cant help think it's a bit like the emperors new clothes. Wish orange would port my number too. #iphone4 #
  • The estate has a scrap man who drives around in an ex-BT transit van. Failure on so many levels, and let's not mention his 'jingle' #
  • Sweet. Phone didn't loose 3G coverage walking home. Suck on that o2, orange ftw. #
  • Come on orange. Finish porting my number. #
  • Twitterific on my new phone seems to be having a bad day wrt authentication #
  • RT @CalEvans: http://bit.ly/a4MLMx #rofl Rasmus has the patience of Job. #php /via @akrabat #

Adventures in Continuous Integration (PHP, Xinc, Phing etc)

I’ve had cron’ed unit tests running for ages which happily spam me when stuff breaks – and likewise adding e.g. phpdoc generation and so on into the mix wouldn’t be too hard.

Anyway, for want of something better to do with my time I thought I’d look into CI in a bit more depth for one customer’s project. As some background, we’ve maintained their software for about the last 12-18 months, the project is largely procedural – although we’re introducing Propel, Zend Framework, Smarty etc into the mix slowly over time. We’ve also added a number of unit tests to try and keep some of the pain points in the project under control.

So, there’s the background.

With regards to CI within a PHP environment there seem to be three options:

  1. phpUnderControl
  2. Xinc
  3. Hudson

To the best of my knowledge 1 & 3 require Tomcat, and therefore are Java based. I thought I’d try and make my life easy and stick with Xinc which is written in PHP (and perhaps therefore something I can hack/patch/modify if needs be).

In retrospect I’m questioning whether I made the right choice – Xinc seems to be unmaintained and unloved at the moment.

Xinc Installation

It should be the case of doing something easy like :

pear channel-discover pear.xinc.eu
pear install xinc/xinc

Unfortunately, the Xinc project seems a little unloved as of late, and it’s necessary to use an unofficial mirror :
pear channel-discover pear.ctrl-zetta.com
pear install ctrl-zetta/Xinc

(This required rummaging through Xinc’s issue log… *sigh*).

Follow the instructions and it’s not really difficult to install. There’s no requirement for a database or anything.

Once installed, edit /etc/xinc/config.xml and comment out the <project>…</project> block and instead only edit /etc/xinc/conf.d/whatever.xml – in my case I just copied the skeleton one and added in stuff… giving something like the following project.xml

In a nutshell, this says:

  1. Run from /var/www/xinc/whatever.test.palepurple.co.uk
  2. Every 900 seconds rebuild using what’s defined in the <builders> tag
  3. Always build (hence <buildalways/>) – in reality, you’d probably want the <svn directory=${dir}” update=”true”/> enabled so rebuilds only occur if someone’s changed svn.
  4. Once the build is complete, publish the php docs (found in ${dir}/apidocs)
  5. Once the build is complete report the results of the unit tests using ${dir}/report/logfile.xml – obviously this path needs to match up with what’s in your phing build.xml file.
  6. If a build fails, email root
  7. If a build succeeds after a failure, email root
  8. When a build succeeds, run the publish.xml file through phing (target: build) – this is used to create a .tar.gz with appropriate numbering which appears within Xinc’s web ui for download.

Obviously in my case, this didn’t get me very far initially as the project wasn’t using phing.. so that was task #2.

Phing

I had a few issues once I started to phing-ise things – firstly, I’ve always historically used SimpleTest as my unit test framework of choice – unfortunately it’s phing and Xinc integration isn’t all that good – and phpUnit is clearly superior in this respect. So I quickly converted out tests from SimpleTest to phpUnit – thankfully this wasn’t too hard as all my tests extent a local class (LocalTest) (hence the exclude line in the build.xml file below) to which I just added a few aliasing methods in so all the PhpUnit/SimpleTest method name differences (e.g. assertEqual($x,$y) and assertEquals($x, $y)) were handled along with crude mimicking of some of SimpleTest’s web_tester functionality.

Anyway, once that was done, it was pretty easy to pinch various bits of config from everywhere and get something like the following build.xml file – when Xinc runs it defines a few properties – so I’ve added in a couple of lines to the build.xml to ensure that these properties are set to something (incase I’m running phing from the command line and not via Xinc).

In my case it was necessary to explicitly exclude e.g. the Zend Framework or ezComponents from various tasks (e.g. phpdoc api generation and code sniffing). In this project’s case the code for each is explicitly within the hierarchy – as opposed to being a system wide include.

Running a particular ‘target’ is just be a case of doing ‘phing -f build.xml tests’ (for instance). phing will default to using ‘build.xml’, so the ‘-f build.xml’ is redundant.

Firing up Xinc (/etc/init.d/xinc start) and tail’ing /var/log/xinc.log give me a good idea of what was going on, and eventually with a bit of prodding I got it all working.

I then thought I ought to integrate test code coverage reports – as they’d be a useful addition and something I can point the customer to – at this point I discovered I needed to hack phing a little to get it to work with phpUnit’s xml output format to create the code coverage report. A patch of what’s needed should be here but phing.info has been down for the last few days… so manually :

In /usr/share/php/phing:

Edit: tasks/ext/phpunit/formatter/XMLPHPUnitResultFormatter.php and change

$this->logger = new PHPUnit_Util_Log_JUnit(null, true) to

$this->logger = new PHPUnit_Util_Log_XML(null, true);

And change the require_once() call at the top of the file to become require_once ‘PHPUnit/Util/Log/XML.php’).

No doubt the above won’t be required once a new release of phing is made – I’m running v2.4.1.

And, if your code has an implicit dependency on various variables being global – and they’re not implicitly declared as global within an include file – it will fail and look like phpunit is trampling on globals; it’s not. Just edit the include file and be explicit with respect to global definition. You will probably need to tell phpUnit to not serialise globals between test calls as some variables ( e.g. a PDO connection) can’t be serialised…. this can be done by setting a property within your test class(es) called backupGlobals to false.

And, if everything works well, you’ll see something like the attached screenshot [[Screenshot 1]]

Summary

Xinc appears unmaintained; patching of it is probably required, but it does appear to work.

I’m glad I’ve finally started to use phing – I can see it being of considerable use in future projects when we have to deploy via FTP or something.

Twitter Weekly Updates for 2010-07-04

  • Sign fail. http://yfrog.com/5sichktj #
  • Looks like the neighbours are holding a donut party for the police …. #
  • Man salt. (I sweat a lot when running, bit surprised it's so visible tho) http://yfrog.com/j8usfej #
  • now lets see if my body can run – http://bit.ly/droitwichrun #
  • At last! last.fm backgrounds on my iphone (3GS with ios4). #
  • Who will win? Patch or my aunt ? (bye patch, I hope) #
  • Can haz new iPhone ? #
  • I might be off to Best Buy in Merry Hill today. That'll be: apple kb, mobo/psu, external drive bays, dvi cables…. Macmini? Self control? #
  • – how is it possible for @myspace to be so shit? it can't be an accident, must be deliberate /via @BluMarTen <- soon: what's myspace? #
  • Of course today
    my work desktop may have died. Coincidence?Conspiracy? Did an apple agent visit and vandalise it ? #macmini for work? #
  • I'm falling in love with my mighty mouse and apple keyboard … Does the mouse work with Linux ? #lazyweb #
  • And a prospect customer I last spoke to a year ago is back in touch…. Glad I now have an extra minion. #palepurple #
  • Thank you @alijamieson for showing my http://klout.com (twitter stats) #
  • Why isn't there a standard bread size which matches up with what toasters can take? All I want is to toast the whole slice…. Come on #eu #
  • I love the new twitterific – shame it didn't update magically. Well worth £2.99 IMHO. #twitterific #
  • Woo. New apple mac mini does dual monitor display out of the box with no config. #whycantubuntudothis ? #shinytoy #itsforworkhonest #
  • See http://bit.ly/ukfoodhygiene for our first iphone app – food hygiene ratings for most of the UK. Pls rate/review 🙂 #opendata #Fsa #food #
  • See http://bit.ly/ukfoodhygiene for our first iphone app – food hygiene ratings for most of the UK. Pls rate/review 🙂 #
  • Fetchez le chien… #
  • The dog has been found….. Alive etc. #
  • The shed of Persia. #swapwordinfilmforshed #
  • The great shed #swapwordinfilmforshed #
  • The green shed #swapwordinfilmforshed #
  • RT @madeupstats 2 in 5 Englishmen now think MILF stands for Match I'd Like to Forget. #
  • RT @paulfabretti: Do we want the England team to return? Surely there are more skilled workers we can allow in before them? #worldcup #
  • RT @asda Free eye test for anyone with a Uruguayan passport after Lampard's goal disallowed: http://bit.ly/eyeoffer <- haha #

Twitter Weekly Updates for 2010-06-27

  • Roads are deserted and it's so peacefully quiet. Can we do this football thing next weekend too ? #
  • I predict England flags and other promotional crap will be very cheap tomorrow and few cars / houses will remain 'decorated' #mysticdavid #
  • I can think of better things to do than be woken by the ninky nonk at 530am on a sunday. If only I could drug him …. #
  • RT @ArmedForces_Day: It's Armed Forces Day! Show your support by retweeting this message http://bit.ly/2nZeL #armedforcesday #
  • RT @PingChat PingChat! Android Beta begins next week! Join the Android page to be eligible! http://bit.ly/cnvF7O – iPhone and blackberry too #
  • One customer handles foreign villa letting. A prospect handles flight bookings. This seems a good match. #
  • Dog gone walking. Hoping he's heading home, safely. The perils of keeping doors open in the hot weather #bromsgrove #
  • RT @madeupstats Social media gurus have on average :
    850 Twitter followers
    410 contacts on LinkedIn
    390 Facebook friends
    1.5 real friends #
  • Failed to jailbreak and upgrade to ios4. stupid pwnage tool. Reverting back to default apple image, will miss bitesms 🙁 #
  • RT @PalePurpleLtd iPhone app accepted 🙂 look for 'food hygiene' by Transparency data – free. <- check out where you eat out. #
  • Losers still outside o2…. Orange is the way toward. #
  • Will there be a geek fight now the iPhone supplies have run out? #
  • RT @madeupstats The Sun newspaper has sufficient stocks of anti-German jokes to last until the year 2051. #achtungschweinhund #
  • So we can win. #eng #
  • Annoyed that I had an off-by-one perception error. Today is not iPhone Thursday … That's tomorrow. #
  • Whole earth's chocolate spread is so very very very nice. #
  • What a lovely morning. #
  • .@rowangoodwin has decided to have a lie in. What a clever, perfect child he Is. #
  • RT @mezzle http://i.imgur.com/17Kkt.jpg <– utter win #ftw #mud #
  • RT @BromsgroveDC News: Sainsbury’s Planning Application to be Heard http://bit.ly/b8GK4q #bromsgrove #
  • Hello $always_late_paying_customer – your website is offline as you've not paid your hosting fees with $third_party … No, I can't help… #
  • Why do I have a cold in the middle of
    Summer? Grr. Rubbish voice etc. #
  • Bromsgrove …. is shit. Photographic proof found – http://twitpic.com/1yi54z #

Twitter Weekly Updates for 2010-06-20

  • My iPhone took the threat of replacement seriously and now all camera pixels work. Grr. #
  • Peace. Perhaps. http://twitpic.com/1ygohu #
  • RT @EmmaEC09 Oxo are bringing out a new cube 4 the world cup. Its gonna have a white wrapper w/ a red cross on it – called 'laughing stock'! #
  • RT @GeneHunt How do you confuse the England football team? ….. Give 'em a football. #ENG #
  • RT @GeneHunt You know you're in the England footie team: sıɥʇ pɐǝɹ ʇ,uɐɔ noʎ ɟı #
  • RT @GeneHunt I was happy when my Scrabble letters spelt out 'England' but then I realised they only amounted to one point. #
  • My scientific selective random sampling of cars shows there are fewer flags today. Was last night a failure and the end of us? #
  • RT @GeneHunt Teenagers drink twice as much as they did 10 years ago. Mind you, they were only aged between 3 and 9 ten years ago. #
  • Wondering how and why nursery have taught Rowan Postman Pat lyrics. Thundercats or something would be better. #
  • Today I'm a bus runner. That's not quite as interesting as it sounds. There was no illegal smuggling involved. #
  • Trainfire is an excellent song. Thanks @dvntownsend #
  • Phew. Got past ticket inspector with invalid ticket. In one stop it'll be valid 🙂 #bookingfail #
  • Spelling fail of the day. http://twitpic.com/1xha0f #
  • Somehow I doubt future nights will be that easy. #
  • Final baby photo for now. Me and Anya Rose (perhaps?) http://twitpic.com/1x70qb #
  • 9lbs. Second 'breakfast' underway. All well. http://twitpic.com/1x6p3m #
  • Second side…. Lots of hair. http://twitpic.com/1x6kyn #
  • It's here. Girl. http://twitpic.com/1x6de7 #
  • Hello baby. #
  • In an ambulance. Labour. #
  • TENs machine thing deployed. #
  • RT @Aypok Finished preparing lunch for today: http://twitgoo.com/zvll4 #
  • The dog has been practicing his coax cable stripping skills on the aerial wires. Good thing I don't have a TV….. #
  • RT @GeneHunt Women's football would be a lot more popular if they renamed it '22 girls and only one cup' #

Anya Rose Goodwin

So, here’s the quick story.

At around 12:01am (midnight) on Wednesday 16th of June, Kat asked me to put the TENS machine on (as per this) and soon after I went to sleep. She stayed downstairs on the sofa “I can get comfy on there…” and I believe she slept between 2am and 4am. In retrospect this may have been the transition period.

As background, she was already a few days overdue (due date was the 11th of June 2010) – and she was due to have a sweep later in the day to hopefully move things along a bit.

Anyway, at 4am (or so I think it was), I woke up to hear her panting up the stairs (“Oh, that sounds like it might be soon”, I thought). She confirmed this by soon screaming a little in pain, and telling me to sort Rowan out and that we were going to hospital soon.

I woke Jenny up, but she was clearly in a zombie mode – and I guess it might have been towards 5am when we dropped Rowan off with her. At this point in time Kat was crouching on the back car seat screaming a little (enough to worry Rowan). I therefore left a crying toddler with Jenny, trying not to panic myself.

Next up – I phoned the delivery ward in Redditch (5:10am according to my phone) – and wasn’t particularly impressed to hear a “Sorry, we’re full, we might need to send you to Worcester… I’ll phone you back after I check”. While waiting, I drove to our office (as it’s located in the right direction) and waited to hear back. At 5:14am they rang back, and I spoke to them for 20 minutes; at the same time, Kat was out of the car on all fours screaming quite loudly, and the midwife had instructed me to get a towel out ready – hence an ambulance was ordered for us. I think Kat was slightly crowning a little at this point in time. I couldn’t tell if it was just her pushing (uncontrollably) or it if the baby was actually coming out. She was having contractions at least once every three minutes.

The ambulance seemed to take forever to reach us (in reality perhaps 10-15 minutes). It’s very demoralising to see an ambulance fail to find you…  but it did eventually. We were fortunate to also be near to a local midwife, who was very good in turning up on the scene moments after the ambulance.

At 5:34 I finished talking to the midwife on the phone (and rushed off a quick tweet to maintain my geek cred on twitter). I was confined to the front of the amblance, so couldn’t see anything, and could only hear Kat screaming.

As we were about to leave the M5, I head “blah blah blah BABY” followed by a “Waaah” … at which point I realised I wasn’t going to get to see the actual birth. (tweet) Kat gave birth at 5:54am. I grabbed a quick photo or two once the ambulance had pulled up – hence this tweet and accompanying photo

Kat and Anya - in the ambulance
Kat and Anya - in the ambulance

In Worcester hospital itself, they quickly established breastfeeding, she was soon weighed (9lbs), and I took a few random photos and this and this (my favourite).

naked, about to be weighed
naked, about to be weighed
Daddy David and Anya
David and Anya Goodwin
first milk
first milk

By 10am, Jenny and Helen visited, bringing Rowan who met his sister for the first time – he was a little unsure of what to make of it… we all then left (leaving Kat and Anya to themselves) so I could retrieve the car from Bromsgrove. When we returned at about 11, we waited for the midwives to do their paperwork, and eventually left – giving us just enough to get to RhythmTime (13:20?) in Bromsgrove. After this we went shopping (Asda) and then home. On meeting his sister the second time Rowan was much more at ease – and wanted to hug / hold / cuddle / kiss / stroke her.

Kat was quite energetic and on somewhat of a high during the day – and in our first night at home, Anya only woke once (at 2am).

Twitter Weekly Updates for 2010-06-13

  • Waiting to eat carvery, toddler asleep http://twitpic.com/1wg1i4 – too many strawberrys earlier perhaps ? http://twitpic.com/1wg1oz #
  • 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 … http://twitpic.com/1vbj39 #
  • 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 http://j.mp/iPhoneOnO2. #
  • 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 http://riotclitshave.com/2010.05/16lwj9j.jpg "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 – http://gb.mapometer.com/en/running/route_481046.html … run fatty run #
  • Cooling down, ready for ice skating. #
  • I've been good and registered my phone + laptop at http://www.immobilise.com (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 http://google.co.uk. 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 http://bit.ly/repeal-the-dea #DEBill #
  • An eventful but uneventful night. Everyone's tired Jim. #
  • Check out my OnePage card at http://myonepage.com/david.goodwin #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 http://jakebible.com (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 http://tinyurl.com/39lw3oc #