For performance, the goal is:

• As a minimum, to be competitive with existing solutions (currently looking at symfony and Composer)
• To be 90% competitive with the theoretical optimum.

## X Autoload: Unit test abstractions, InjectedAPIs

### Virtualize the filesystem.

In symfony, a class finder implementation needs to do a file_exists() whenever it finds a candidate filepath. If that passes, it will return the candidate filepath.

## X Autoload: Slicing it up

Subject: Separation of concerns, composition over inheritance.

The existing autoload libraries found in symfony framework and reused in Drupal 8 core, basically consist of one object doing the entire job:

• UniversalClassLoader implements PEAR and PSR-0.

## X Autoload: Namespace registration interface

Currently the xautoload_ClassFinder_NamespaceOrPrefix does support these registration methods:

/**
* Register a PSR-0 root path for a given namespace.
*
* Example:
*   $finder->registerNamespaceDeep('abc\def', 'x/yz'); *$finder->findFile('abc\def\Some_Class');
*   // this will attempt to find the file in
*


This is one part in a rather technical series about

### PSR-0 and PEAR

Some time ago, the PHP framework interoperability group, consisting of people from different PHP frameworks, published a standard called PSR-0, with policies about how to namespace a class, and where to put the file the class lives in.

The requirements of PSR-0 are described here: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md

Most importa

or: How to write a PHP autoloader.

This is a technical document, explaining implementation details for the X Autoload module on drupal.org.

Please apologize if the document may be incomplete.

## Imagene sample images

animelion on drupal.org asked me for some example images using the Imagene gradient generator.

Here are some. I might be extending this post in the future.

You need javascript enabled to see the gradients. Use your favourite web developer tools (Firebug etc) to inspect the elements and see the background image url.

With only two colors, you can achieve a lot of different gradients: Linear, cubic, etc.

## Fix Nautilus appearance on Ubuntu 11.x

Sometimes after a restart on Ubuntu 11.10, if using the "Gnome classic" desktop, Nautilus will appear in an ugly old-school design.

To fix this, type in your commandline:

pkill gnome-settings-daemongnome-settings-daemon

And, if you like:

killall nautilusnautilus

And now tell me, why is this all so broken.

## Linux bash history with Page up / Page down

In linux you can configure the pgup/pgdown keys to navigate through commands you typed that begin with the string you just typed. Type "mysql" and then hit "Page up", and you will see nothing but mysql-related commands.

## PHP camelCaseExplode, XL version.

A function that turns CamelCase into under_score or just pieces, and which can (optionally) respect acronyms.

A recent situation made me remember a nice piece of code that I wrote years ago, which I thought I should make available to the public.