Chris Worfolk's Blog


PHPUnit on OSX Lion CLI

November 10th, 2012 | Programming, Tech

If you’re trying to run PHPUnit from the terminal in Mac OSX Lion, you may get an error similar to the following.

File/Iterator/Autoload.php failed to open stream

You can resolve this by running the following commands.

curl http://pear.php.net/go-pear.phar > go-pear.php
sudo php -q go-pear.php

PHPUnit should now run without errors (or at least, without errors in their code 😉 ).

50mm part II

November 10th, 2012 | Photos

More photos of me shamelessly abusing selective focus.

James Caan – The Real Deal

November 9th, 2012 | Books

I’ve just finished reading The Real Deal: My Story from Brick Lane to Dragons’ Den by James Caan. He is a dragon (now former dragon I assume, as he isn’t on the latest series) who started by building up several recruitment companies, and now runs a private equity firm that invests in SMEs.

Was it an interesting read? Certainly. Was it a useful read? Yes, I think it probably was.

The same themes come up across books by different entrepreneurs – invest in the right people and it will pay dividends, work hard and make sure you understand your business inside out.

I actually really like James’ way of doing things. For example, at the end of a meeting, he’ll take time to double check whether the other party has any concerns. So often, you’ll walk out of a meeting already resenting the deal you have just done, and so James’ final check allows him to resolve issues there and then.

He also argues that he is actually risk adverse, and only really pursues an opportunity once he has minimised the risks – investing isn’t about taking risks, it’s about taking smart risks when you know the odds are in your favour – think of it like poker pot odds, you might have some losses, but if you play the right game, you’ll eventually turn a profit.

Windows

November 8th, 2012 | Photos

Turns out, it’s reasonably easy to remove windows, in Photoshop.

50mm lens

November 7th, 2012 | Photos

I used my birthday gift vouchers to buy a new 50mm f/1.4 lens for my camera. It’s excellent for doing very shallow depth of field, although, on reviewing the photographs, I’ve realised I went far too far with the shallow depth – sometimes it was narrower, even than the object I was actually trying to photograph! Looking forward to playing around with this lens a lot more.

The Big Society

November 6th, 2012 | Religion & Politics

David Cameron unveils his new proposal for structuring government.

Birthday meal

November 5th, 2012 | Life

At my birthday meal, we managed to eat our way through £557.54 worth of meat :D.

Embedding other templates in Sinatra ERB templates

November 4th, 2012 | Programming, Tech

If you are using the Sinatra framework in Ruby, and you want to embed one ERB template in another, you can do this simply by using the ERB template tag like you can in your regular Ruby code.

<%= erb :welcome %>

Replace “welcome” with your template name as you usually do.

Donington Park

November 4th, 2012 | Photos, Public Speaking

The Division E competition took place at Donington Park racing circuit, which wasn’t a very good venue as it was difficult to find (we got sent to the wrong part of the circuit) and very cold inside their buildings slash sheds, but on the plus side we did get to look round the Formula One museum section.

Division E competition

November 3rd, 2012 | Public Speaking

Having previously won the club competition and area competition, I travelled down to Donington to take part in the Division E humorously speaking competition. Division E covers an area from Royal Leamington Spa and above – the North of England and Scotland.

I got flattened at the competition, I didn’t even place. This was disappointing as while I thought I was well beaten for first place, I thought I might have done enough to get in the top three. But live and learn, the next competition starts in March, and that one ends in the World Championship of Public Speaking.