elliot's blog


I've been fiddling with two PEAR packages for PHP, PHPDocumentor and PHPUnit2. This is part of an attempt to make my PHP development more structured. These should provide, respectively, a unit testing framework and a system for documenting my code.

One annoying thing about PHP libraries is that they seem to have multiple incarnations (e.g. a PEAR homepage and another homepage), which reference different versions; and there are multiple libraries with very similar names which do similar things; plus the documentation is appalling in nearly all cases. It took me a while to hunt through the rubble to find what I wanted, but I got there eventually.

So, still using the trusty XAMPP (which bundles PEAR), I installed these two with a simple:

    /opt/lampp/bin/pear install --alldeps phpunit2
    /opt/lampp/bin/pear install --alldeps phpdocumentor

--alldeps ensures all dependencies of the packages are installed as well. I've toyed with PHPUnit and got that working satisfactorily (I think a howto may be in order before too long), but haven't got round to PHPDocumentor yet.

PEAR (and the related PECL) are noble attempts to pull together the morass of PHP libraries, but they are still very hard to dig around in. What's needed for PHP is a kind of "PHP Ubuntu", which sorts the wheat from the chaff and presents the "best of breed" libraries for particular tasks. Typically this will be the PEAR/PECL libraries, but occasionally there will be gaps or deficiencies in PEAR where you want to know what the good solutions are (e.g. Phrame for Model-View-Controller, Smarty for templating). I'm hoping that companies like SourceLabs might move into this area and produce an add-on for their AMP stack.

Looking for attractive personnel for your corporate event?

I had to blog this unusual company, who provide attractive, caring professional staff for events. Nicholas is my favourite, and would surely add a touch of class to any function. As the site states, he looks the part and oozes presence.

San Francisco visit

Sunny California. The Beach Boys playing on the plane over promising summer. Sun-bleached, geometrical, mock-Victorian buildings. A pock-nosed cab driver taking me from the airport to the Savoy Hotel, past municipal planting made up of luxuriant, exotic plants I'd kill to grow in my cold, damp garden. Packs of homeless people wandering around the Tenderloin near my hotel: some in wheelchairs, some staggering drunk across the road, some pushing shopping trollies seeming to contain only plastic bags. Hills so steep they made my shins ache.

No tea in the hotel room, but a personal percolator. Fan in the ceiling. Quotation from a Belinda Carlisle song on the covine and a child's surfer suit framed on the wall. On the TV, alternating adverts: junk food, health product, junk food, health product... Embedded food: you can't just buy a cheese roll, you have to get a roll with a pancake inside it, with cheese in the pancake. Wierd toothpaste flavours like cinammon, citrus, vanilla.

On Sunday, went to Fisherman's Wharf, where you embark for Alcatraz. It is a shit hole, a bit like Margate in Kent, but with more begging. Exhibition of antique amusement machines on the pier: metal horse, bizarre monkeys, terrifying father and mutant children. Alcatraz poised on the edge of utter deriliction, populated by sea birds and Agaves, crouching among the fallen stones and inscrutable machines. A gruelling, matter-of-fact narrative about the games prisoners played in "The Hole" (solitary confinement with no light): throwing a button into the dark, then trying to find it, over and over; or pressing eyes shut so tight it created hallucinations of light. On the way back, hunted down a couple of locations they used in the film "Vertigo" and took some photos.

Next day, through Pacific Heights, Alta Plaza Park (where they filmed parts of "What's Up Doc?"), Union Street, down to the Marina, then onto the Golden Gate. Walked along the bridge a bit, but felt strangely unaffected. More interesting was the withered beauty of the nature reserve, including wild Echeveria and Echium in massive drifts. Caught the bus to the Golden Gate Park, then through to Haight-Ashbury. Full of mock hippies and poseurs. Extremely seedy; I walked through quickly. Less like the centre of the hippy movement and more like Camden. Returned to my hotel via the gauntlet of Market Street, dodging people lunging from doorways, thrusting plastic cups at me.

Tuesday and Wednesday were taken up with the Open Source Business Conference. Tuesday night, Sun provided a very nice buffet of food from around the city, and I sat and ate mine with a nice fellow called Randall Stewart Baird, a resident of California. I informed Randall that London isn't really that foggy, and he told me that San Francisco is foggy in summer. I thus demonstrated to him that British people really are obsessed with talking about the weather, so that cliché is true at least.

On the last day, I didn't walk too far, and went to a fantastic cult/pulp bookshop called Kayo. Tried to go to the Museum of Modern Art as well, but it didn't open until 11:45 and I had a plane to catch at 14:00.

So overall: A beautiful city, with some great things to see. Alcatraz is a good day out. I can't comment on the food, as I was very conservative in what I ate (mainly pizza). It could perhaps be said that I squandered my opportunity to sample the rich tapestry of Californian cuisine. The conference was interesting, though I was a bit disappointed with some of the talks; but there were a few gems.


This content management system is one of those which uncomfortably straddles the open source/proprietary boundary. The code is open source, but by default only comes equipped to use SQL Server as a back-end server. If you want to use it with MySQL as the back-end, you have to pay for a separate data provider. I found the project website difficult to navigate, and it was almost impossible to find installation instructions (couldn't find any on the website, and there seem to be none bundled with the download). Add to this lots of broken links, and the fact that several of the links in the Documentation page are books for sale rather than free documentation, and you've got a system which is tricky to get a handle on and install. Coupled with the fact that I'd be virtually forced to use IIS to run it (unless I can work out Mono), I'm immediately put off. A client is interested in this system, but I'm not sure I would be happy recommending it to anyone else.

MySQL migration suite

This nifty piece of software could be useful. Currently supports Access and Oracle. Perhaps this is an indication of where MySQL thinks the competition is: at the two extremes of the market, the big corporate back end and the desktop. I've just watched the demo of an Access migration, and it looks really smooth. I used to use MySQL-Front to migrate Access to MySQL, when MySQL-Front was freeware and before it turned commercial. Between these two states, development halted altogether, and the product went out of step with MySQL versions. I learned an important lesson about proprietary software when this happened, leaving me stuck with a version which wouldn't work with my version of MySQL: I vowed never to use proprietary software again for anything important.

Google Maps UK

Hurrah! Google Maps UK has been launched, as looks just as good as its US counterpart. It even does directions, like the RAC. While I was playing with it, I also came across a Birmingham business directory I hadn't seen before, which might be useful.


I installed Nvu today, as I've been reformatting a document from OpenOffice.org word processor format to HTML, and it's been painful using a combination of gedit (which I hate, by the way), the Kupu editor in our Plone content management system, and the online version of HTML tidy. So far, Nvu has been great, and does what it's supposed to (WYSIWYG web page editing). I haven't taxed it much, but so far it's an improvement on manual HTML coding. I used a version bundled for Ubuntu which some helpful soul has built (it's not been properly packaged for Ubuntu apt yet), but you can probably get a version from the main Nvu site.

Barry Malzberg

Barry Malzberg is a great science fiction writer. I've been reading Dwellers of the Deep, about a science fiction fan who is periodically abducted from earth, so that the aliens can try to persuade him to give him a copy of one of the magazines he collects. The dark atmosphere of helplessness is palpable, and it has the hallmark delirious rush of words I associate with his work. A nice quotation which gives a flavour of his work is this one:

Most of contemporary existence [...] is indeed a bad working draft of reality.

He really ought to be better known. Unfortunately, I think most of his 75 novels (he was very prolific in the seventies) and short story collections are out of print, though the better known ones crop up in second hand book shops quite a bit.

SourceForge upgraded

Is it just me, or is SourceForge actually usable these days? They've been doing hardware upgrades, which seems to be paying off. Also looking forward to their Subversion service (it pains me to say it, but CVS has always been a bit too arcane for me to grasp).

iPod Shuffle

I heard about the release of the SourceLabs AMP stack through some news site, and thought I'd go and have a look at what they've done with it. I have a professional and personal interest in the idea of software stacks, and their potential as a foundation for an open source business. Anyway, the stack itself installed with no problems, and presented me with a fairly straightforward LAMP installation, no frills. Pretty good, but I won't be swapping it for XAMPP any time soon.

More interesting, though, was SourceLabs' "maven" competition, where they are giving prizes for the best forum entries about their stack. I thought I'd post something to the forum about my experiences installing the stack on Ubuntu, on the off-chance I might win. The prizes were a weekly one of a DVD of Spinal Tap and an iPod Shuffle, with a grand prize of a Marshall amp which "goes up to eleven", in homage to Spinal Tap's guitarist Nigel Tuffnel (get it? AMP, amp). So I sent in my forum posting and crossed my fingers.

About a week later, much to my surprise and delight, I got an email telling me I'd won the weekly prize! I only really wanted the DVD (Spinal Tap is close to being my all-time favourite film), as I already have a 40Gb MP3 player, but thought I could give the iPod to Nicola (my wife). I received both prizes this week. The DVD: great. The iPod Shuffle: the task of getting it working with Linux soon reared its ugly head.

Well, it turns out that there are two main programs for working with an iPod from Linux: Gtkpod and Gnupod. The former is a GUI interface, which sort of looked like it worked, but then turned out to not support the Shuffle; the latter is a command line Perl script, which does support the Shuffle, though it is a bit arduous. I built Gnupod from source, after installing the necessary Perl XML libraries via apt-get on Ubuntu. It works like a charm, but I can't see Nicola getting to grips with it. I may have to resign myself to the duty of adding new tracks when she wants them, until Gtkpod supports the Shuffle (promised in the next release). At least Gnupod works, though.

Syndicate content