Blog


  1. What Got You Involved in Open Source?


    I did a very unscientific twtpoll recently regarding what brought each of us into open source. Plenty of people took the time to vote or retweet, so I thought I'd loop back around and let you know how it looked overall when the poll closed.

    Read more

  2. Logging to Stdout with Monolog


    My worker scripts have really basic logging (as in, they echo when something happens, and I can see those in the supervisord logs). Which is kind of okay, but I wanted to at least add timestamps in to them, and maybe send emails when something REALLY bad happened.

    I'm a …

    Read more

  3. Colourless Git Output


    I teach git and often have issues with bad projectors where you can't see the colours. Recently I had a setup where even white on black was more or less invisible, but using black text on a white background worked okay. There's lots of documentation on how to turn on …

    Read more

  4. PHP 5.6 Benchmarks


    A while ago I did some benchmarks on how different versions of PHP perform in comparison to one another. This isn't a performance measure in absolute terms, this was just benchmarking them all on the same laptop while it wasn't doing anything else, and averaging the time it took to run the benchmark script.

    Recently I ran it again for versions PHP 5.3 through PHP 5.6 and I thought I'd share my results:

    php-performance-may-2014

    Read more

  5. Easy Lint Check for JavaScript


    I'm introducing lint checking on one of my projects, because it didn't have a build process yet and I love this as a great place to start. Oh, and because we managed to commit broken syntax! So I set up a php lint job (I will share my travis config in another post) and tried to work out doing the same thing for JavaScript.

    Read more

  6. Beanstalk, Pheanstalk and Priorities


    I've got an application that uses Beanstalkd to queue up messages, and some PHP worker scripts that grab messages from the queue and process them. Messages get added by the web application, but can also be added by cron - and when I add a bunch of messages via cron, I …

    Read more

  7. Copy/Pasting and Vim


    I'm a vim user and I somehow completely missed this excellent feature until much more recently than I care to admit! Usually vim has its own clipboard, but it doesn't share with the operating system. You will need a vim-gtk install, this isn't available in really basic vim (I'm a …

    Read more

  8. Quick Switch Between Git Branches


    Today's little-known git feature (or maybe everyone knows but me? I only found this a few months ago) is for quickly switching between branches. Usually I would switch branches with:

    git checkout [branchname]

    However if you switch from one branch to another and want to switch back again (this happens …

    Read more

  9. Wireshark Capture on Remote Server


    The joind.in project uses a really nice vagrant setup for its dev platform - which is much needed these days as we move away from a single LAMP stack install to a website plus another website, which talks to an API and caches in redis and deploys with .... you get the picture :) This is great but having everything on the VM can make it a bit trickier to debug what's going on - and with a website that talks to an API that talks to MySQL, that all lives on a VM with port forwards, you can see the problem :)

    To get an insight into the traffic going around the place, I've been using Wireshark and it's ability to capture remotely, it's really simple so I thought I'd write down my "recipe" on how to do this in case it's useful.

    Read more

  10. PHP 5.6 and the Splat Operator


    We have a couple of new features coming in to PHP 5.6 with names that sound much less exciting than the features they actually represent: "variadic functions" sound positively academic, and "argument unpacking" isn't exactly catchy. However they both use a new operator in PHP which looks like an elipsis (three dots ...) and is referred to as either the splat operator or the scatter operator. I included them in a recent version of my "Upgrading PHP" talk so I thought I'd share the examples here too in case anyone is interested.

    Read more

  11. Using Composer Without GitIgnoring Vendor/


    Recent additions to the joind.in API have introduced some new dependencies so we decided we'd start using Composer to manage these - but we don't want to run composer unsupervised. I'm sure this will bring the rain of "just run composer install, it's probably mostly almost safe" criticism, but actually it's quite tricky to run Composer without excluding vendor/ from source control so I thought I'd share how we did it so that anyone who wants to do so can learn from my experience!

    Read more

  12. Working with PHP and Beanstalkd


    I have just introduced Beanstalkd into my current PHP project; it was super-easy so I thought I'd share some examples and my thoughts on how a job queue fits in with a PHP web application.

    Read more

21 of 92