April 17, 2012
Sending a letter over the internet
Ever want to send a letter without the hassles of printing, stamps and going to the post office? I personally recommend PostalShout/PostalMethods.com service.
Check it out at www.postalshout.com
November 1, 2011
Prebuilt HipHop for PHP
Having built HipHop for PHP (HPHP) myself, I realise that this is a rather time consuming process, especially for those with a slow connection. Fortunately, since everything is statically linked, the final binary can be ported across hosts without a bunch of dependent libraries. Here is the build for hphp and hphpi that was created on Ubuntu 11.10. I believe that it can be ran on any x64 platform (a requirement of hphp btw).
October 31, 2011
Optimising PHP performance
First, let's ignore the toy boxes where people change a line of code every few minutes. Optimisation usually comes when the applications are loaded into production servers - the hot boxes! Of course I am not saying that we should in any ways ignore the general coding practices and write slow code.
For this discussion, I assume that you are NOT hosting your precious code base on a regular shared hosting package - i.e. the kind that anyone can get with under $10/month, because:
- You risk loosing your source code to the hosting provider. And please trust me, a client of mine smashed their own head after realising their code got stolen.
- Shared hosting comes with limited resource (the obvious) and a generic set-up that makes any non-code optimisation difficult (not so obvious).
As a starting point, any VPS with around 512MB of memory will do. However, as soon as you get serious, remember to take into consideration the bandwidth quality and support. For VPS, I recommend Linode.com and MediaTemple.net, depending on your budget and needs. (Don't get me wrong, although MediaTemple's shared hosting package sucks, their VPS and Dedicated services are brilliant)
For simplicity, let's break down the optimisation process into three parts:
- Web server
- PHP execution
- Database and code optimisation