This website recently got a major rebuild; if you're missing something, let Lorna know.

    Blog


  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. What Does URI Stand For?


    I get a lot of complaints about an API that I maintain (http://api.joind.in) which is "missing" the ID field. This ID field is the database's primary key; if the user doesn't have access to the database (they don't), then it seems to me that the primary key …

    Read more

  7. Getting Started with Beanstalkd


    I had a good experience implementing beanstalkd for the first time last week, so I thought I'd write down how that went and what I learned.

    Read more

  8. PHP and Git Training Course Dates


    I've had a little flurry of enquiries about training lately, so I thought I'd mention the courses I have coming up, as especially the PHP ones are topics that I don't run public classes on all that often. At the time of writing I have some space on all of these classes:

    Read more

  9. Use a GitHub Branch as a Composer Dependency


    My current project sees Celery (a python distributed task queue) added to my PHP application. There's a handy PHP interface to the RabbitMQ that Celery uses as a backend, which makes it easy for me to create jobs, called celery-php. This requires either the PECL AMQP extension or alternatively it has experimental support for the PHP library for AMQP - I would normally prefer the PECL version but ran into version compatibility problems, missing manual pages, and decided that a pure PHP solution might be more portable and perhaps I would just add the experimental branch to my composer.json file for this project.

    Read more

  10. Git Log All Branches


    I can't be the only person who always seems to be switching between multiple development branches. Sometimes I get distracted for a few days (I'm also part time, which doesn't help!) and then I can't even remember what I was doing or what the branch was called.

    The remedy for this situation? The --all switch to git log.

    Read more

  11. Ubuntu and the X220T Touch Screen


    I have a thinkpad laptop with a touchscreen and a swivel so it can fold up and pretend to be an oversized tablet. I like it a lot, but the touch screen interface hasn't been all that useful since I normally use this machine docked and then it maps the …

    Read more

  12. GitHub-Powered Changelog Scripts


    My current project does periodic releases, we build a few things, then we work on getting a bunch of user feedback and changing/fixing things before we actually release. This means we need to be organised with tags and branches. We're using GitHub for collaboration, including our issue trackers, commits which contribute to an issue have the issue number in the commit message, and when a branch merges in to the main line, we use the "fixes #42" notation to simultaneously close off the issue that it relates to.

    This has been working pretty well, and today I got the question "what's new since I last saw this project?" - so I created a changelog. It's rather rough-and-ready but I had fun so I thought I'd share.

    Read more

21 of 89