-
PHPComCon Web Services Tutorial
18 April 2011
Read moreIf 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 …
-
Script for Database Patching at Deploy Time
15 April 2011
Read moreI'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.
-
Invalid Protected Resource URL in Pecl_Oauth
12 April 2011
Read moreI 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 …
-
PDF Presenter
11 April 2011
Read moreRecently 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 …
-
Downgrading a PECL Module
07 April 2011
Read moreRecently 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 …
-
Slide Markup with LaTeX: First Steps
04 April 2011
Read moreSince 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).
-
Summer PHP Conferences
31 March 2011
Read moreConference 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!
-
Creating Presentations with LaTeX
30 March 2011
Read moreThis 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:
-
Basement Tanking Project
23 March 2011
Read moreAt 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 -
Getting Dates From Week Numbers in PHP
22 March 2011
Read moreRecently 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 …
-
Book Review: The Developer's Guide to Social Programming
18 March 2011
Read moreRecently 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.
-
Using Persistent Storage with Gearman
17 March 2011
Read moreI'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.
