White Camel

The White Camel Award is given annually to the unsung heros of the Perl community. This site lets helps you understand why did they receive it and where are the now, 5-10 after they received the award.
On this page you can find an aggregation of the blog entries from some of the people who received the award.
If you look at the main page, you'll find more information about each one of the White Camel Award Winners

September 02, 2010

Dave Cross

davblog: Been Away

Colosseum, RomeIt's over a month since I've posted anything here. Sorry about that. For the first half of August I was in Italy. The first week, I was speaking at a conference in Pisa and after that we spent a few days in Rome and Venice. I took more than a few photos and they're slowly making their way onto my Flickr page. They should all be up there in a week or so (although, having said that, I still haven't sorted out the photos from last year's holiday in the Baltic).

Rather pleased with the way this photo of the Colosseum came out. But given a half-decent camera, an ancient monument and the Italian flair for lighting there probably wasn't much that could go wrong.

Not quite sure what happened to the rest of August though...

by Dave Cross at September 02, 2010 05:46 PM

August 26, 2010

Dave Cross

perl hacks: Net::Songkick

Sometimes it's good to just take a new idea and hack on it for a couple of hours to see what happens. That's what I've done this evening.

I've been using Songkick for a while. Songkick is a web site that tracks users' attendance at gigs. I've been tracking the gigs I've been going to as well as trying to fill in over thirty years of old gigs.

I've known for some time that Songkick has an API, but until yesterday the API has been for invited partners only. But yesterday on Get Satisfaction they announced that it was now public.

The public API doesn't do that much yet. There are only four documented calls. But it's already useful and I'm sure it will gain more functionality quickly.

And this evening I've spent some time writing a very simple Net::Songkick module. This is really just a proof of concept, but I've got big plans for improving it. And I can already write a useful program like this:

#!/usr/bin/perl

use strict;
use warnings;

use XML::LibXML;
use Net::Songkick;

my $user = shift || 'davorg';
my $sk = Net::Songkick->new({
  api_key => $ENV{SONGKICK_API_KEY}
});

my $xml = $sk->get_upcoming_events({
  user => $user,
});

my $xp = XML::LibXML->new->parse_string($xml);

foreach ($xp->findnodes('//event/@displayName')) {
  print $_->to_literal, "\n";
}

If you have any interest in gigs then I highly recommend Songkick to you. And if you like attending gigs and hacking Perl (although not necessarily at the same time) then why not give Net::Songkick a try. All you'll need is an API key from Songkick.

There's a Github repository too; if you feel like hacking on it...

by Dave Cross at August 26, 2010 05:07 AM

August 23, 2010

Dave Cross

perl hacks: Learning About Traits

I've been teaching basic Moose in my training courses for several years now. And, as I've mentioned before, I've been slowly converting some of my CPAN modules to use Moose. But there are still bits of Moose that I haven't really needed to get to grips with.

One such area is Moose's support for Traits. Oh, I knew vaguely what they were and I understood why you might use them. But I'd never implemented a system using traits, so my knowledge about how you'd actually use them was a bit shaky to say the least.

But over the last few days I've learned quite a lot about how to use traits. And I've had to learn it pretty quickly.

It all started a few weeks ago when I got a github pull request from Oliver Charles. Oliver had taken a fork of my Perlanet repository and had massively refactored the codebase so that all the clever bits were implemented as traits.

What this means is that the core Perlanet code is pretty dumb. In order to do anything really useful with it to need to add in some traits. There are traits to read the configuration from a YAML file, traits to carry out various kinds of cleaning of the input and a trait to produce the output using the Template Toolkit. There are also traits to handle caching and OPML generation. All in all it makes the code far nicer to work on.

Oh, and there's a Perlanet::Simple module which uses all of the traits required to implement the Perlanet behaviour that users currently expect.

There were a few problems with Oliver's initial version. Some of the dependencies weren't quite right. But we soon fixed that and last week I finally released Perlanet 0.47 which implemented these changes.

Then I installed it on the server which hosts most of my planets. And everything broke.

So I've spent a lot of the weekend fixing these issues. Part of it was that Oliver's changes assumed some configuration file changes that I hadn't implemented. I changed his changes so that they worked with the existing configuration settings (we don't want users having to change configuration files unnecessarily). Other changes were harder to track down. I particularly enjoyed one where no feeds were fetched unless the user turned on OPML support. I learned a lot about how traits worked by tracking that one down.

But it all seems to be fixed now. Perlanet version 0.51 is available on CPAN and it will hopefully be a lot easier to customise to your needs. I hope we'll see a number of other Perlanet traits appearing over the next few months.

And, most importantly, I've learnt a lot about traits. I think I understand them now.

If you want to learn traits, I can highly recommend asking someone to implement traits in one of your projects. And it's even better if they do it in a slightly broken way so that you need to debug it.

by Dave Cross at August 23, 2010 08:41 AM

August 22, 2010

Gábor Szabó

Fundamentals of Perl training in October, 2010, in Ramat Gan

After a long period that I was giving only on-site classes finally I decided that it might be time to start offering the "public registration" classes as well.

It is a lot more work to organize such class as I need to be in touch with several customers and there were cases when people cancelled their participation in the last minute but recently several companies indicated that they would like to send 1-2 people to such class so I hope it won't be that hard

The syllabus of the Fundamentals of Perl training is on the web site of PTI but actually the whole material can be found on my web site.

by Gabor Szabo at August 22, 2010 08:13 PM