Categories
Training

Introducing People to Perl

For most of last week I was out of London running three days of Perl training for… well, I probably shouldn’t name them, so let’s just call them a well-known British educational establishment. The photo above is a big clue.

The people I was training were IT support staff; the people who keep many of the organisation’s IT systems running. They were a mixture of sysadmins, DBAs and developers.  What they had in common was that at least part of their working life is spent looking after systems that are written in Perl and they had never before taken any formal training in the language.

In my experience, this is a pretty common situation. Because Perl is “just a scripting language”, I often come across people who are responsible for Perl programs but who have never been taught how the language works. Managers often seem to believe that people will absorb Perl knowledge just by being exposed to the code. And, of course, that’s partly true. On the face of it, Perl isn’t particularly hard to understand. If you have a grounding in other programming languages in the C/Algol family or you know a bit about Unix tools like awk, sed or Bash scripts you can certainly be productive in Perl.

But not as productive as you could be if you actually took the time to learn about the language.

In many ways, this is one of my favourite kinds of training. The course ran for three days and was adapted from my Introduction to Perl and Intermediate Perl courses. It’s a lot of fun taking the attendees right back to basic Perl and slowly building up their knowledge. The three days is an almost constant stream of “light-bulb moments” as students connect the concepts that I’m talking to code that they’ve seen in the systems they maintain. While it’s true that you can maintain a Perl program just using knowledge that you’ve worked out from reading the code, you become a lot more effective when you understand more of the underlying concepts.

On the other hand, it can be a slightly frustrating kind of course to run. In many cases, they code that these people are maintaining was originally written by people who had never really understood Perl and it has been maintained for years by people with even less knowledge of the language. So the code is a long way from the modern Perl that we’d all like to spend our days working on. This is often going to be monolithic code bases with no sign of a “use strict” or “use warnings”. Maintenance of this code is often seen as a low priority task that is only undertaken when changes are vital and it’s unlikely that anyone could ever take the time that would be required to raise the standards of this code.

But, nevertheless, I feel that over the last few days I have increased the average level of Perl knowledge in the world. There are eight more people who know how Perl references work (and why you might use them). That has to be a net win. And the fact that the organisation was happy to pay me to run the course must be seen as a positive. It means that they value the effectiveness of their developers.

I often hear people worried about the lack of people starting to use Perl. I’ve lost count of the number of developer managers or CTOs who have cited the lack of available Perl talent as the reason they are moving their development to other technologies. But there is another option. Employ people with good general Programming skills and run training courses that give them the more specific Perl skills that they mean.

I know a good trainer who would be happy to help!

Categories
Conferences

London Perl Workshop Report

(Photo above by Chris Jack)

Last Saturday was the annual London Perl Workshop. I should write up what happened before I forget it all.

I arrived at about 8:30 in the morning and was able to check in quickly – collecting a bit of swag which included a free t-shirt as I was a speaker. I then made my way up to the main lecture theatre in order to see Katherine Spice welcoming people to the day on behalf of the new team of organisers. After that headed off to the smaller lecture theatre to set up for my tutorial. There were a few differences from previous years. Firstly, I was giving a completely Perl-free tutorial (about on-page SEO techniques) and secondly, I had been moved out of the tutorial track and into one of the main talk tracks. As a side effect of that second change, I was also asked to trim my talk from my usual two hours to a more “talk-like” eighty minutes.

The talk seemed to go well. I got some interesting questions and a few people came up to me later in the day to tell me they had found it interesting useful (sometimes both!) The slides to the talk are available on SlideShare: Web Site Tune-Up – Improve Your Googlejuice.

Following that, I had time to see one talk before the coffee break and I chose Why learning a bit of Crypto is good for you‎ by Colin Newell. Colin gave a good (if, necessarily rather shallow) explanation of how learning a small amount of cryptography can help you improve the security of your systems.

Then it was was the morning coffee break. For the past few years, this break has traditionally included cakes which were supplied by a sponsor. When that didn’t look like happening this year, organiser Neil Bowers (with a gentle nudge from Leon Timmermans) came up with the idea of a community bake. And that’s what happened. A number of attendees baked cakes for us all. I had one of Neil’s blueberry muffins and it was lovely.

There was a slight change in the schedule after the coffee break. Matt Trout was unable to be at the workshop so, at the last minute, JJ Allen stepped in and gave his talk To delete or not to delete, that is the question‎, which was about some impending data protection laws which will affect all businesses. I stayed in the same room to see Neil Bowers explain The PAUSE Operating Model‎ and then JJ returned to talk about something completely different – Perl and Docker, sitting in a tree‎.  JJ’s company, Opus VL, have released some of their Docker infrastructure code to CPAN and I’m sure many people will find it useful.

Then it was lunchtime. I bought a sandwich from the university’s cafe and sat in the foyer talking to various friends who walked past.

I started the afternoon watching Paul Evans on ‎Devel::MAT updated‎. Devel::MAT is a development tool which aims to do for memory analysis what Devel::NYTProf does for profiling. It looks very useful. That was followed by Julien Fieggehenn’s talk Turning humans into developers with Perl‎. Julien doesn’t just train people in Perl, he acts as a mentor for them for a couple of months when they join his company, so he was able to talk in some detail about much wider issues than just choosing which topics to cover in a training course.

Talking about wider issues, I then saw Tom Hukins’ talk Development: More than Writing Code?‎ Tom is, of course, right that there’s more to being a good developer than just writing good code. This is a topic that I’m thinking of developing a training course on. Tom was followed by Paul Johnson giving good advice on Modernising A Legacy Perl Application.

The afternoon coffee break included some professionally baked pastries. They were also lovely, but don’t think they were appreciated quite as much as the morning’s community versions.

After the coffee break, we all gathered in the main lecture theatre for the plenary session. Ann Barcomb spoke about Fifteen Years of Contributing Casually‎. Ann was once a Perl developer. I first met her at the first YAPC::Europe in London in 2000 and she was then part of the organising team for the second YAPC::Europe in Amsterdam in 2001. But since then she has become a researcher into the sociology of the open source movement. You can read a lot of her research on her web site. Her talk illustrated her findings with some personal anecdotes about her own casual contributions to the Perl community. Everyone seemed to find it fascinating and the Q&A at the end of the talk showed every signs of turning into a full-scale discussion. On a personal level, it was great to catch up with Ann again about fifteen years after we had been in the same room together.

And then there were the lightning talks. They were their usual mixture of intriguing and entertaining. Mark Keating (enjoying his first LPW that he wasn’t organising) implored us to get involved in the Enlightened Perl Organisation. I announced a plan to publish more Perl books (of which, more later). I was particularly impressed by Kenichi Ishigaki who flew in from Japan just to give a lightning talk about his module Perl::PrereqScanner::NotQuiteLite.

After that, there were a few closing words from Neil Bowers and, in another innovation brought in by the new organisers, drinks were served on site rather than in a local pub. Of course, some people went off to a local pub after that as well.

As always, it was a great day. The new organising team seem to have hit the ground running and produced an impressive workshop. My thanks to the organisers, the volunteers, the speakers, the sponsors and all of the attendees.

I’m already looking forward to next year’s workshop.

Categories
Conferences

London Perl Workshop Klaxon

The London Perl Workshop is looking frighteningly imminent. It’s on November 25th – that’s less than three weeks away. All across the capital (and even further afield) if you listen hard you will hear the sounds of speakers frantically trying to get their talks ready.

That, at least, is how I have spent my weekend. I’m presenting a new training course at the workshop and I’ve been working hard on the slides for the last couple of days.

This new course is a bit of an experiment for me. It’s a completely Perl-free session. For most of this year, I’ve been working for a well-known property portal and the work I’ve been doing for them has concentrated on search engine optimisation and I’m going to take this opportunity to share some of my new-found knowledge with a room full of people.

I know what you’re thinking. SEO is either a) really dull keyword research or b) snake-oil. To be fair, I’ve seen both of those things, but that’s not what I’m going to be covering. I’d hate to be seen as either boring or a snake-oil salesman!

No, I’m going to be covering something that I think is far more interesting. The course will be all about making your web site more attractive to Google. And if Google likes your web site, they will crawl your site more often, extract more useful information from it and (hopefully) show your site in response to more user search queries. Getting your site to appear in more search results means more visitors and more visitors means a more successful web site.

I won’t be covering anything complicated. There’s nothing that you won’t be able to implement in a couple of hours. Anyone could use these techniques – but the point is that most people don’t. That’s why they work.

The schedule hasn’t been published yet, so I don’t know when I’ll be giving the talk, but I expect to have that information in the next few days. I do know that my slot is 80 minutes – that’s because the organisers have received a large number of high-quality proposals, so we all have to squeeze up a bit to fit in as many of them as possible.

The London Perl Workshop is one of my favourite conferences. The range of talks is always great. And it seems that this year’s workshop (which has a new organising team) is going to be no exception.

Hope to see some of you on 25th November.

Categories
CPAN

Drawing Traffic Lights With Perl

For a thing (that you may hear more about at some point in the future) I needed diagrams of traffic lights. But Google Image Search didn’t really have what I was looking for. Everything was either too realistic or not CC-licensed so I couldn’t use the images how I wanted.

So I decided to do it myself. But I’m not exactly artistic. I far prefer it when I can get computers to draw images for me. I’ve dabbled with SVG before and it seemed like the perfect tool for the job. And there’s a module from CPAN that makes it simple to create SVG images from Perl.

It only took an hour or so before I was drawing images like the one above – which was exactly what I was looking for.

Initially, I shared my code as a Gist, but since then I’ve extracted the useful bits into a module which I’ve uploaded to CPAN as SVG::TrafficLight. I’ve tried to make it as configurable as possible, so you should be able to use it for all your traffic light drawing needs as well.

Starting to use it is pretty simple.

The default sequence of lights shows the UK’s standard traffic light sequence (green,  amber, red, red and amber, green) but it’s simple enough to produce a different sequence (even one that you would never see on the roads).

If you read the documentation, you’ll see how you can customise pretty much anything in the diagram – the size of the lights, the padding between them, even the colours used.

Let me know if you find it all at useful. SVG is fun. I’ll think I’ll investigate it some more.

 

Categories
Programming

I Wrote Some Perl

Ok, yes, I’ve been writing Perl for over twenty years. But Perl 5.26 was released this week and for the first time, my name is mentioned in the release notes. Because I have not one, but two fixes in this release of Perl.

The first is this commit which fixes a piece of documentation to make it clear that grep() returns a list, not an array.

The second is this commit which fixes some sample code so that it runs without warnings under use strict.

It’s a small start, I admit, but I have a taste for it now. In a years time, I hope to report that I have more than two commits in Perl 5.28.

And you can help too. Instructions on how to contribute are in the perlhack manual page. There is more information in perlhacktips and perlhacktut.

The people working on Perl all do a great job. But it’s a hard job and it might just get a little easier if more of us helped out.