Removing digital distractions 2010

January 28, 2010

Over the years I have built up an digital environment that demands my attention – both online and offline. Today, I have started to remove the clutter from this digital life in order to add more clarity and give me breathing space.
Mac/iPhone
Focussing on important apps

Backdrop is a tool I’ve mentioned before. The aim [...]

Read Removing digital distractions 2010 in full →

LaTeX dissertation template for M801

January 24, 2010

Next month I start my 13 month research project and dissertation, which forms the last part of my MSc in Software Development. The research project is based around the topic of mining software repositories.
I was disappointed to find that the OU offers a dissertation template in Microsoft Word format only, so I’ve knocked together [...]

Read LaTeX dissertation template for M801 in full →

Install memcached PHP extension on OS X Snow Leopard

August 30, 2009

memcached is a very useful memory object caching system, which can be used to increase the performance of your dynamic scripts by caching database calls.
This guide will explain how to install the memcached system, including the PHP extension, on Mac OS X 10.6.
Xcode
The Xcode package installs the necessary versions of tools like autoconf which is [...]

Read Install memcached PHP extension on OS X Snow Leopard in full →

Fix PHP timezone warnings in OS X Snow Leopard

August 30, 2009

The standard Mac install of PHP has always been somewhat quirky, and 10.6 is no exception. One of the most obvious issues occurs when attempting to use date/time functions. PHP 5.3 requires that the date.timezone setting is available. Without this, you will receive a warning similar to the following:
Warning: getdate() [function.getdate]: It [...]

Read Fix PHP timezone warnings in OS X Snow Leopard in full →

PHP 5.3: The Good, the Bad and the Ugly

June 30, 2009

PHP 5.3 was released today; here are my positive and negatives:
The Good: Closures
Anonymous functions created with create_function have always been a bit messy. With 5.3 comes support for closures with a much cleaner syntax:

$greet = function($name)
{
printf(”Hello [...]

Read PHP 5.3: The Good, the Bad and the Ugly in full →

Synchronise your iPhone with Yahoo! Calendar

June 19, 2009

Since the iPhone OS 3 update, you can now use the CalDAV protocol to automatically keep your Yahoo! Calendar updated on your iPhone:
Can I sync with my iPhone over the air?

Read Synchronise your iPhone with Yahoo! Calendar in full →

mcrypt support for PHP on 64 bit Mac OS X 10.5

March 16, 2009

Adding additional functionality to the standard Apple-supplied PHP on Mac OS X 10.5 is a little tricky if you are running a 64 bit processor such as the Intel Core 2 Duo. The reason is that any dynamic extensions that you add will need to be 64 bit, and many shared libraries by default [...]

Read mcrypt support for PHP on 64 bit Mac OS X 10.5 in full →

PHP Best Practices #2: Strictures

February 23, 2009

Make sure PHP is reporting all errors and warnings.
Warnings and notices are PHP’s way of letting you know that you are utilising features in a non-standard way. If your code is omitting errors, then it should be fixed as soon as possible. Strict warnings are a class of errors that are turned off [...]

Read PHP Best Practices #2: Strictures in full →

Objects in Perl (part 2,352)

February 20, 2009

One of my issues with Perl has always been its implementation of OOP. Or, to be precise, the multitude of ways that a class can be declared (blessed hash, inside-out, Class::Std etc). I would argue that this is a case where TMTOWTDI is not advantageous. Enter Piers Cawley and his _Moose for Ruby [...]

Read Objects in Perl (part 2,352) in full →

PHP Best Practices #1: Regular expressions

February 19, 2009

preg not ereg
This is the first in what I hope will be a regular series of posts on PHP best practices, inspired in part by Damian Conway’s Perl Best Practices book.
Historically, PHP has had two incompatible regular expression engines available, POSIX Extended and PCRE (Perl Compatible Regular Expressions). Arguably, Perl-compatible regular expressions are more [...]

Read PHP Best Practices #1: Regular expressions in full →