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

    Blog


  1. PHPComCon Web Services Tutorial


    If you are attending my Web Services tutorial at PHP Community Conference (if not, probably nothing for you to see here) later this week then you might like to download the sample code. I'll be referring to this and inviting you to "play along" as I go creating services during …

    Read more

  2. Script for Database Patching at Deploy Time


    I've written before about a simple way of patching database versions and there's a much more comprehensive article from Harrie on TechPortal as well. I often find though that projects with patching strategies are missing the scripts to apply these automatically when the code is deployed, so I thought I'd share mine.

    My current project (BiteStats, a simple report of your google analytics data) uses a basic system where there are numbered patches, and a patch_history table with a row for every patch that was run, showing the version number and a timestamp. When I deploy the code to production, I have a script that runs automatically to apply the patches.

    Read more

  3. Invalid Protected Resource URL in Pecl_Oauth


    I had a funny (funny weird, not funny haha) problem the other day when working with pecl_oauth in PHP to talk to a service. I'd gone through all the handshaking steps, got the acces token and was ready to start talking to the service itself. However when I tried to …

    Read more

  4. PDF Presenter


    Recently I've switched how I prepare and deliver presentations, using LaTeX to mark up the content and producing PDF slides from that. Which is great but I miss having some of the during-presentation functionality of LibreOffice such as a timer and being able to see what's on the next slide …

    Read more

  5. Downgrading a PECL Module


    Recently I saw some weirdness in an existing application when I upgraded a PECL module that the application depended on. To figure out if that really was the problem, I wanted to downgrade the module to its previous version. There is no opposite command to "upgrade" but you can instruct …

    Read more

  6. Slide Markup with LaTeX: First Steps


    Since starting to create (a large number of) presentations using LaTeX, I've been impressed at how easy this is to pick up and also how quick it is to work with marked up content rather than dragging objects around in Impress or equivalent. With that in mind, I thought I'd outline the very basics of the markup (with probably more snippets to follow as I discover them).

    Read more

  7. Summer PHP Conferences


    Conference season approaches and in May I'm on a trip to take in two of the most high-profile events in the PHP conference calendar: DPC in Amsterdam (19-21 May) and php|tek in Chicago (24-27 May). The two events have historically been a few weeks apart and I've always complained at having all the fun for the year in such a short space of time - but this year the events are literally back-to-back, there are a small number of speakers attending both and we're pretty much all on the same flight from Amsterdam to Chicago!

    Read more

  8. Creating Presentations with LaTeX


    This spring/summer, I'm giving quite a few talks at conferences, and I have a number of my own clients that I'm writing new training materials for. That's a lot of content in total and so, inspired by Dave's article about LaTeX and powerdot (and with some help from Dave himself!), I've started to write my own presentations this way too.

    Getting started was a struggle, I've never really used anything like it before and if there's one thing LaTeX doesn't do well, it's error messages! The blog post I linked above has a sample presentation in it and I used that as my starting point. The source code goes in a file with a ".tex" suffix, e.g. presentation.tex. I then installed the texlive-latex-extra, latexmk, vim-latexsuite, latex-fonts-recommended and texlive-fonts-extra packages from aptitude, and generated a PDF by running:

    Read more

  9. Basement Tanking Project


    At one time I wrote a lot on this blog about houses, and this house in particular once we bought it 4 years ago. One major feature is that the basement kitchen floods fairly regularly, maybe 4 times a year? This is obviously not ideal however the structural work required to put it right was around 20% of the value of the house, and shortly after we bought the house the bottom dropped out of the UK property market so we couldn't borrow against the house.

    Fast forward 4 years of cooking in wellies once in a while, and running down the stairs to check the basement every time it rains a lot (in Northern England, you can imagine this gets really old really fast). Actually even when it wasn't underwater, it was a pretty nasty kitchen, always damp and it had no heating so in winter it was whatever temperature it was outdoors. This sums it up: my mother's old dresser, standing on bricks to keep it out of the water
    Kitchen Dresser on Four Bricks
    Read more

  10. Getting Dates From Week Numbers in PHP


    Recently I've been building a little project that pulls data from Google Analytics and shows your web statistics in a simple form. One thing I wanted to do was show the data for a quarter, but graphing by day is too chaotic and graphing by month only gives three points …

    Read more

  11. Book Review: The Developer's Guide to Social Programming


    Recently the nice folks at Addison Wesley sent me a review copy of "The Developer's Guide to Social Programming" by Mark Hawker (you can find it here on amazon). This is right up my street as I'm doing so much with with APIs, social and otherwise, at the moment and the book covers things I'm using such as OAuth and google's services.

    Read more

  12. Using Persistent Storage with Gearman


    I'm using gearman for the first time in a new project, and two things in particular were bothering me. Firstly, there doesn't seem to be a built-in way to see what's in the queue. Secondly, if the gearman server dies (which seemed quite likely when I was first getting to grips with this stuff and writing really buggy code!) you lose your queue. Therefore I decided that I would switch gearman over to running with persistent storage.

    Read more

37 of 89