Monthly Archives: October 2009

Learn Perl in London

I’m astonished to realise that I hadn’t already mentioned the three days of Perl training that I’m going to be running in central London next month. So please excuse a quick plug.

The training is running from 24th – 26th November and there are three separate one-day courses covering beginner, intermediate and advanced topics. If you’re wondering what subjects will be covered on each of the days then there’s a handy list on the web site. The courses are designed to be standalone, but they also work well together if you wanted to do two (or even all three) of them together.

The courses will be held at the Imperial Hotel in Russell Square. Each day’s course costs £339.25 (inc VAT). That includes lunch.

The classes will be run lecture style, but there will be plenty of time in the breaks for you to try stuff out if you want to bring a laptop with you.

If you want to improve your Perl (or you want your colleagues to improve their Perl) then please think about signing up.

Update: It appears that there are only a tiny number of places left on the Intermediate course and not many more on the other two days – so I strongly recommend booking soon.

Speaking in Milton Keynes

Last Thursday I went to visit the nice people at Milton Keynes Perl Mongers. I think I’ve spoken at one of the technical meetings every year since they started holding them in 2006. I always enjoy speaking to MK.pm. They’re a small and friendly group. And they always make me feel really welcome.

This time I tried something a bit different. I had a few talks prepared that I’d given earlier this year, but on their mailing list I asked them to suggest what they wanted me to talk about. After a bit of discussion they came up with a few interesting suggestions and I agreed to present two of them. And, interestingly they came up with two talks that I would never have considered writing.

The talks seemed to go down pretty well and the slides are now available on Slideshare. They probably won’t work quite so well without me waffling on in front of them, but you might find them interesting.

  • Maintaining CPAN Modules – the tools and techniques that I use to maintain my small selection of CPAN module
  • Perl Training – Some experiences, anecdotes and vague conclusions drawn from the right years that I’ve been running Perl training courses

I found it an interesting experience writing talks that I hasn’t planned to write. It’s one that I hope to repeat in the future. Perhaps conferences should consider changing the way that Calls for Papers work. Maybe they should add a checkbox which means “I don’t care what I talk about – please give me a title.”

A Subway Metaphor

Many years ago I read a science fiction story which has always stayed with me – although I’m buggered if I can remember the title or the author.

It was set in the not too distant future. Another new line was about to be opened on the New York City Subway [In the comments Rozallin points out that it was, in fact, probably Boston and not NYC]. Mathematicians were warning that the line shouldn’t be opened as every new line increased the complexity of the network and they had calculated that opening this particular line would push the network over some limit and would make it theoretically unsolvable. They worried that the safety of passengers couldn’t be guaranteed if they were travelling on an unsolvable graph.

Of course, the mathematicians were ignored. And, of course, trains started going missing soon after the line was opened. And that’s where our hero (a kind of topological Indiana Jones, if I recall correctly) came in.

For some reason, that’s the image that sometimes pops into my head when I’m working on large application that has had random pieces of code added to it by various people over long periods of time. I worry that the system will eventually become so complex that any train (or, more likely, CPU) that is set running on it will vanish into the depths of complexity, never to be seen again.

I had that feeling particularly strongly this afternoon. This system really needs to be brought under control.

Perlanet Update

Maybe it’s just me, but when I know that people are using my code it galvanises me into improving it. Following the discovery that people were actually using Perlanet, I’ve made quite a few releases over the last week or so. I thought people might be interested in what I’ve been doing.

Release 0.30 was a big one. I incorporated a lot of the improvements that Alex had made in his fork. Most important was probably switching to URI::Fetch instead of LWP::UserAgent. This means that we can now cache the feeds and only re-request them when they have changed.

Release 0.31 documented the caching feature. It also removed some annoying debugging output unless the program was running in a console. I also tweaked the output for failed requests and thereby introduced a nasty bug that wasn’t fixed for some days.

Release 0.32 added some better help for the ‘perlanet’ command line program and added a lot more of Alex’s fixes and improvements. I also tried running the code through both ‘perltidy’ and ‘perlcritic’ and made some changes based on their suggestions.

Release 0.33 featured a much improved test suite. It also fixed the nasty bug that I introduced in 0.31. If you were using a cache and a feed hadn’t changed from the previous request then it wasn’t processed at all. I found this bug whilst working on the test suite. Testing is good, boys and girls!

Release 0.34 went out in the last hour. Overnight I got a bug report about the caching support. I’ve been using CHI to provide caching, and because not everyone wants to use caching I had marked it as an optional dependency in Build.PL. But I was loading it in the code whether or not it was being used. So if you didn’t have it installed, Perlanet didn’t work at all. I’ve now made it truly optional – it’s only loaded if required. And if you try to use caching but don’t have CHI installed everything still works – just without a cache.

That got me thinking. And the version currently in github applies the same principle to OPML support using XML::OPML::SimpleGen. Not everyone wants to generate an OPML file, so I shouldn’t force everyone to install that module. That will be in release 0.35 which will go out in the next couple of days. I’m also thinking of doing the same for the HTML::Tidy[1] and HTML::Scrubber support.

I still have some more of Alex’s patches to apply. But I’m considering how to make things like filter support into an optional add-on. I’ve tried to get some discussion of these features going on the Perlanet mailing list. If you’re interested in Perlanet, please subscribe to the list and get involved in the discussions.

[1] I should point out that Perlanet already has support for HTML::Tidy, but installing HTML::Tidy is a bit of a black art currently. The RT queue seems to imply that the module has been abandoned. Does anyone want to offer to take it over from Andy?