Mass query generation using “The SpreadSheet Trick”

I honestly assumed that most developers already knew about “the spreadsheet trick”. However, in the last few months and years I’ve shown it to a few developers and they go through and interesting mix of emotions. If you know this

Tagged with: ,
Posted in MySQL

Why can’t I find files written by PHP-FPM in /tmp?

Last night, I was trying to use XHProf to do a bit of profiling on phpDocumentor. The CLI app runs, XHProf collates statistics and writes the data to /tmp. When I fired up the XHProf web interface, it couldn’t find anything in

Tagged with: , ,
Posted in Linux, PHP

Working with pcntl_fork – part 1

I’ve been working with pcntl_fork and friends recently for a personal project. I worked with pcntl_* functions from a very early in my programming career and I love the challenges it presents for the traditional web programmer. Here is one

Posted in PHP, System

Fonts on Fedora – aka pulling at a loose thread

Apologies for not posting in a long time, etc, etc but this is actually more of a note to myself. I was speaking to one of my colleagues at Magma Digital and he got me thinking about font rendering in

Tagged with: , ,
Posted in Linux, Ramblings

A brief reminder on object scope

Every so often, you may approach a problem in a novel or unconventional manner and it reminds you just how much ground you cover as a programmer. And today at Magma Digital was no exception. I was reminded how scope

Tagged with: , , ,
Posted in Development, PHP

WordPress: Getting a menu item selected on a Custom Post Type

I am by no means a WordPress expert. Quite the opposite in fact. While learning the ropes, I look at WordPress with a frustrating blend of admiration and confusion. I’m so impressed with both Custom Post Types and the Navigation

Tagged with: , ,
Posted in PHP, Wordpress

faking latency on your local network

I recently had call to try and artificially introduce network latency on my machine. During development of a web application of any sort, it’s artificially fast and reliable if it only has to go over localhost or even to another

Posted in Linux

The tale of the sleepless developer

It wasn’t too long ago that I used to have a lot of trouble sleeping. Once I was asleep I was OK, but getting there was troublesome. As my head hit the pillow, I’d start trying to solve all the

Posted in Ramblings

Given enough cautionary tales, can we become better developers?

A recent tweet by Smashing Magazine about mistakes got me thinking about all the times either myself or a colleague had made a significant mistake. I’m not talking about a white-space error here. I mean the sort of mistake that gives instant,

Posted in Development, Ramblings

PHP and Nginx RPM repo for RedSleeve Linux on Raspberry Pi

You may have already noticed from a previous post that I’m a big fan of CentOS. So, I’ve spent the past few days trying to recompile some SRPMs for the Raspberry Pi. I don’t have a cross compile too chain,

Posted in Development, Linux, PHP, RasberryPi