// 27.Jan.2010

Unix Turns 40: The Past, Present and Future of a Revolutionary OS

After four decades, the future of the operating system is clouded, but its legacy will endure.

Regardless of the ultimate fate of Unix, the operating system born at Bell Labs 40 years ago has established a legacy likely to endure for decades more. It can claim parentage of a long list of popular software, including the Unix offerings of IBM, HP and Sun, Apple’s Mac OS X and Linux. It has also influenced systems with few direct roots in Unix, such as Microsoft’s Windows NT and the IBM and Microsoft versions of DOS.

The [Association for Computing Machinery] may have said it best in its 1983 Turing award citation in honor of Thompson and Ritchie’s Unix work: “The genius of the Unix system is its framework, which enables programmers to stand on the work of others.”


// 31.Dec.2009

10 WordPress Dashboard Hacks

A large part of my professional work involves the build and deployment of WordPress-based websites. Now as any designers/developers among you will appreciate, it can be extremely annoying frustrating to sign off a build only to come back later to see that your client has (inadvertantly) messed things up because WordPress has placed too much power in their hands.

I was delighted then to read “10 WordPress Dashboard Hacks” because there are some really useful code snippets presented therein:

  • Remove Dashboard Menus: At last I can remove certain menus from the client’s view — whilst obviously still leaving full control for the Admin user
  • Define Login and Dashboard Logos: Great for branding.
  • Disable the “Please Upgrade Now” message: I never want my clients to do this. I think this is one of my responsibilities.
  • Customise Dashboard Widgets: Again, it’s about keeping control. Not exposing the client to things which could be hazardous.
  • Provide Help Messages: Because they’re helpful (if done correctly).

Some of these are definitely going to be rolled out on to some of my client’s sites in the near future.


// 29.Dec.2009

Gearman

Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. It allows you to do work in parallel, to load-balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events. In other words, it is the nervous system for how distributed processing communicates.

Sounds awesome. I’ve got to make some time to experiment with this.


// 02.Dec.2009

Installing LESS on OS X

I’ve just started experimenting with LESS for a new web development project. With my programmer head on, LESS looks like it has the potential to speed up my CSS coding (which I do by hand) as well as enabling me to abstract my CSS with variables (very handy), nested rules, mixins and even mathematical operations (yeah baby)!

However, installing LESS on my OS X “Leopard” machine wasn’t quite as simple as advertised. I should just be able to go:

sudo gem install less

But that resulted in an error:

ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 403 fetching http://gems.rubyforge.org/yaml

I ended up scratching my head for a moment — before turning to my good friend and problem-solving guru, Google, for help. I was advised as follows:

wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
sudo gem update --system
sudo gem install less

That worked a treat.

Then, in Terminal, I navigated to my source directory, renamed my style.css file to style.less and issued the following command:

lessc style.less --watch

LESS then generated a new style.css from my .less file and went into watching mode — automatically compiling my .less file into its .css counterpart whenever it detected changes in my source (ie: when I hit save in my text editor) which is a rather cool.

It’s early days yet, but so far LESS is looking like a tool that I can really make use of. I don’t need to change my workflow (aside from starting the watch/compiler process) and I get a degree of CSS flexibility and freedom that I didn’t have before. That’s neat.


// 22.Nov.2009

Accelerating My WordPress Installation (Redux)

Ferrari 612 Scaglietti

A long time ago, in a galaxy far, far away… oh sorry, wrong script. I’ll start over. In the dim and distant past, I wrote about my efforts to eke a little bit more performance out of the WordPress installation that this glorious website runs upon. What I’d done was fairly basic: content compression, reduced page weights, database tuning… the usual stuff.

I also described how I’d failed to get WP Super Cache working and wrote that I was investigating PHP accelerators. Yet, despite my endeavours, the website’s performance continued to be, well, pitiful. Some time later I managed to get WP Super Cache working and things improved, but were still disappointing to me.

I come from a mod_perl background and one of mod_perl’s strengths is the speed at which it can run its applications. The PHP app’s that I now find myself working with just can’t compete. I believed that I’d just have to accept that the performance goals I was aiming for weren’t achievable.

However, I was recently forced to reconsider my position when I was contracted to build a website on top of the Zend Framework — because, despite being written entirely in PHP, nursesstore.co.uk turned out to be very fast.

Suddenly, I knew that it was possible to build fast PHP applications. So I turned my attention, once again, to the speed-deficient Urban Mainframe with the fire of the true zealot burning in my eyes.

Continue Reading…


// 21.Nov.2009

Installing APC on Media Temple Grid Server

For some time now I’ve been wanting to install the Alternative PHP Cache (APC) on the Media Temple GS server upon which this website is hosted. Tantalised by the performance improvements that I’ve read about, APC became my Holy Grail. But I couldn’t get it to install on the GS server, until now.

I’ve documented the steps I used to get APC running here, in case they’re useful to anyone else.

  1. Telnet or SSH onto your GS server
  2. mkdir /home/#####/data/lib (where “#####” is your Media Temple account number)
  3. mkdir /home/#####/data/lib/php
  4. wget http://pecl.php.net/get/APC-3.0.19.tgz (at the time of writing, this is the latest stable version - adjust as necessary)
  5. tar zxvf APC-3.0.19.tgz (again, adjust as necessary)
  6. cd APC-3.0.19
  7. phpize5
  8. ./configure --enable-apc --enable-apc-mmap --with-apxs2=/usr/sbin/apxs --with-php-config=/usr/local/php-5.2.6-1/bin/php-config
  9. make clean
  10. make && cp modules/*.so /home/#####/data/lib/php
  11. Finally, add the following code to your php.ini file:
    extension_dir = /home/#####/data/lib/php/
    extension = apc.so

That’s it. APC should now be installed and you should be able to measure a significant improvement in your PHP script performance.


// 20.Nov.2009

Simple CouchDB Multi-master Clustering via Nginx

Via Simon Willison:

An impressive combination. CouchDB can be easily set up in a multi-master configuration, where writes to one master are replicated to the other and vice versa. This makes setting up a reliable CouchDB cluster is as simple as putting two such servers behind a single nginx proxy.


// 18.Nov.2009

Image Director

Image Director
Photo Credit: Elisabet Garcia by Vincent Boiteau

Over the past few months I’ve been building up a library of imaging functions that I seem to end up using over-and-over again in my web development projects. On this website alone, I’ve added automatic thumbnailing, grayscale image conversion and CSS Sprite generation to supplement the various iterations of design I’ve been through. This has been especially visible on the recent redesign of the home-page, where imagery became the foundation of the design rather than an adjunct to it.

The imaging library I’ve built has become indispensable to me and, as it’s so very useful, I thought I’d package it up and release it under a GPL so that others can benefit from it too.

Continue Reading…


// 17.Nov.2009

ditaa: Diagrams Through ASCII Art

DIagrams Through ASCII Art:

ditaa is a small command-line utility, written in Java, that can convert diagrams drawn using ASCII art into proper bitmap graphics. ditaa interprets ASCII art as a series of open and closed shapes, but it also uses special markup syntax to increase the possibilities of shapes and symbols that can be rendered.

Works as advertised. I’m not sure if it has any worth outside of its curiosity value. I found it quicker by far to flowchart with a GUI application than to laboriously create ASCII artwork equivalents for ditaa to process. Neat hack though! [via]


// 01.Nov.2009

Traffic Server

Mark Nottingham tells us about Traffic Server: [via]

A long time ago, the word in high-performance proxy-caching was Inktomi’s Traffic Server. It was so fast it was referred to as being “carrier grade” and this could be said without people smirking, and it was deployed by the likes of AOL, when AOL was still how most people accessed the Internet.

A few years ago, some Yahoo! engineers found that code sitting on a shelf and decided to have a play. What they found was that it was still faster than pretty much every thing else out there. So they started using it, and built a team around it.

Fast forward to today, when the source code for Traffic Server is suddenly available as an Apache Incubator Project.