FaceBook  Twitter  

Is Perl losing its shine as it now needs to compete with many other alternative programming languages? Can Perl be considered a good career choice today? To find out, we have interviewed an experienced Perl developer and Geekuni founder Andrew Solomon.

Q1. Can you tell us a little bit about yourself?

I was born in Sydney, Australia and my first experience of programming was writing code to generate Mandelbrot fractals on my mother's computer. In my mid-teens I was brain washed by popular science (mostly theoretical physics) but when I started at university my passion for physics was nipped in the bud after a term in the lab and the realization that most theory comes from observation of the world around us. As a result, I wound up doing a PhD in pure mathematics – which I relished since the only constraints were a few axioms which left great scope for creativity. After that I spent the best part of a decade taking academic jobs in Sydney, St Andrews and Vancouver pursuing every opportunity to experience other cultures, visiting colleagues in Austin, Paris, Beijing, Saint Petersburg and many interesting places in-between. It was a lot of fun and I really enjoyed doing research and teaching, with quite a lot of it in computer science and programming.

On a flight to Berlin in 2004 I met someone special who turned out to live in London. Since then I've gradually settled down in London and got a stable job as a software developer. That said, teaching is still my passion and I'm now doing that at my own online school - Geekuni.

Q2. Why have you become a Perl Developer?

In 2002 I got a tenured position along with a proper job to do – teaching first year students the Linux command-line interface (with some computer science thrown in for good measure).

Now that's not as easy as it might sound. In my day as a student, the only thing we had to work on was a Unix box and the command-line. Because that was all we had, we were immersed in it and picked it up fairly quickly. Nowadays, students have their Windows/Mac/Linux GUI, various mobile devices, Google Glass and other bionic transplants, so they have much less time to spend on the CLI.

Anyway, I inherited this class of 350 students (with a failure rate I can't put in writing for legal reasons) where the marks were obtained by printing out the logs of their command-line practical exams and having them read by 8 sweaty tutors trapped in a room for 2 days.

After one semester of this insanity I decided there must be a better way. I put together software to automate their assessment, test them weekly and give them instant feedback. This kept the students totally engaged (after all, they were getting marks!) and by the end of the semester they were writing fairly advanced Bash scripts and the pass rate was a healthy 80%. And how did I do it? With only three weeks to do it, it had to be quick and dirty. That's where my romance with Perl began.

Q3. Do you see Perl as a good career choice today? In other words, would Perl be something to be considered as a worthwhile career choice today for a recent graduate or someone with no programming experience?

These are actually three quite separate questions. The first question - Is Perl a good career choice? Definitely. There are quite a few jobs requiring competence in Perl, and the salary is excellent because Perl developers are hard to find.

La commedia illumina Firenze on the wall of Florence Cathedral, Santa Maria del FioreWhy is it hard to find Perl developers? This is because Perl is very rarely part of a university's curriculum. To understand why this is, let's first consider what programming really is. A software developer's brain works on various levels, like in Dante's Comedy they design in a very pure and abstract 'Paradiso' of algorithms, data types and architectures, descending into the 'Purgatorio' of writing code and further into the 'Inferno' of bending and corrupting the language to achieve their most ambitious expressions of creativity.

The problem with Perl is that the language is so flexible that it's very easy to slip into the Inferno. But rather than just Dante's Nine Circles of Hell, Perl is more like an onion – there's a multitude of layers of perversity to which you can descend in order to make the computer submit to your desires. It seems no coincidence to me that the Perl Foundation's logo is an onion.

For this reason, if you've already done software development in more restrained languages (through a degree or hands on experience) with a clear vision of the Paradisio, learning Perl will be a very powerful tool from which you'll get an even deeper understanding of the pure concepts which drive good software design. This answers the second question - Perl is indeed a good career choice for a graduate or a developer with experience in another language. As to Perl being the first language to learn - only with a very caring mentor who constantly reminds you to compare your code with the abstract principles you're trying to represent.

Q4. Do you think of the Python programming language as Perl’s competitor?

Definitely. They are both in the category of high level scripting languages and they are used in the same application domains. As you can see from the graph below Perl was quite dominant until 2012 but from 2009 Python has been growing and, quite recently, overtook Perl. The background to this chart is that initially, Perl was the only language of its kind. With the dot-com boom there were a lot of entrepreneurs with little to no programming experience using Perl to bring about large companies, many of which – due to the founders' inexperience in programming combined with Perl's flexibility in giving them enough rope to hang themselves – have moved their code base to safer grounds.
python vs perl vs ruby comparison trend

What we don't see on this chart, though, is that from 2009 Perl has made a big turn around to become Modern Perl with:
  • a regular release cycle of the Perl core providing new features (while maintaining backward compatibility);
  • packages contributed by the broader Perl community inspired by other languages to provide object oriented systems, web frameworks, ORM database interfaces;
  • repository management infrastructure such as Pinto and Perlbrew
My observation is that completely new Perl based systems are being developed and I would imagine the job trends will reflect this before long.

Q5. What are Perl’s main strengths and weaknesses?

A similar question came up on LinkedIn where a recruitment agent was trying to understand why Perl has such passionate developers. My view is that Perl's strength is its established and active community which maintains Perl and CPAN and have lots of workshops, conferences and social gatherings.

One strength which is also a weakness is the sheer flexibility the language provides enabling the inexperienced developer to get tangled in knots. A definite weakness is that there aren't nearly enough Perl courses online and offline due to the challenge of teaching such a flexible language.

Q6. In what technology areas is Perl most used today and how do you think this will change in the near future?

These are some descriptions of a few of the ways people might use Perl at a technical level:
  • Web sites and Web services - where systems talk to each other over the web without necessarily making use of web browsers
  • Data munging and analysis
  • System administration
The sectors in which these technologies are used include:
  • Financial services
  • Telecommunications
  • e-Businesses – such as online retail and search engines
  • Biotech research and development - managing genetic sequencing
But this is my own very limited and skewed view of what's out there. To see how diverse the technologies and applications are have a look at: In terms of the future? From my own perspective as a Web developer, the technologies which are rapidly evolving are those which enable the integration of many components in different languages whether it be combining jQuery and Bootstrap into the front-end or calling other web services from the back end – and this is one of the main focal points of when I'm teaching Web development.

Q7. The low level system administration and automation in many aspects relies on scripting languages like Perl, Bash or Python. Do you think that Configuration Management systems like Puppet or Chef will reduce the demand for Perl?

At the turn of the millennium configuration management and monitoring – if it was there at all – typically consisted of a set of scripts and cron jobs written in Bash, Python, Ruby or Perl which were (metaphorically) holding together production systems with chewing gum and sticky tape.

For that reason, the emergence of new system administration frameworks like Puppet and Chef for configuration, and Ganglia and Nagios for monitoring make it possible – with only a moderate amount of effort – to deploy and scale systems predictably, and be alerted if things go awry.

Now while I say 'a moderate amount of effort' the truth is that you still need to write scripts. Only the system's administrators and developers know the details of deployments and metrics needed for their systems. The system administration frameworks are simply there to provide structure for how these scripts are run, and take out the most elementary, boring and repetitive aspects of the work.

In summary a system administrator still needs to know scripting languages and also how to build a framework around their systems.

Q8. How would you compare Perl’s Dancer framework with Python’s Django?

Perl's Dancer and Python's Django are two examples of Web frameworks. Packages which do all the low level details like HTTP headers so that the developer can work with a high-level conceptual representation of the system with notions of url paths, sessions and GUI templates.

Now this is where Django and Dancer part company. Django is designed to be a large framework with a database ORM built into it. Using Django to put together a minimalist site with a 'Hello World' page requires some thought (as explained in this article ). Perl's equivalent to Django is Catalyst which has bells and whistles to account for every imaginable use of a web system (and some which you probably can't imagine!:).

On the other hand Perl's Dancer framework was designed to be light-weight and produce a website with 6 lines.
#!/usr/bin/perl
use Dancer;
 
get '/hello/:name' => sub {
    return "Why, hello there " . param('name');
};
 
dance;
Python's Flask was inspired by Dancer and has similar goals. Flask and Dancer are referred to as microframeworks. I like teaching Dancer because there's a very close mapping of the code to the high level concepts without any distracting detail, so people understand and implement Web systems very quickly.

Q9. In your opinion, what has been the biggest change Perl encountered in the last decade?

I think it's the advent of Modern Perl. If you read this article it means two different things, both of which I regard as important.

First is the explosion of CPAN packages which provide the tools to model one's code on modern concepts such as Web frameworks, database ORMs and Object Oriented constructs. The second is the advance of the core Perl language to enable cleaner coding practices for more maintainable and performant code.

Q10. One of Perl’s big advantages is the CPAN library. Can you provide any information which would portray a current CPAN library growth?

Just to get the reader up to speed, CPAN is to Perl what the PyPI is to Python and RubyGems is to Ruby – an online repository where developers can share their open source packages with the developer community.

Now you're probably going to look at this graph from modulecounts.com and say “Oh dear! Perl's been overtaken by Python and Ruby – there's no point coding in Perl.”

python vs perl vs ruby modules count
In reality, the fact that CPAN is not growing too fast is a big plus for Perl. (You'll see on Slashdot that this isn't a radical view). Read on for my explanation of why this chart puts Perl in a good light.

A repository gets a new package when a developer sees that the functionality they need hasn't been implemented, or they can see a better way of doing it. They then implement their solution and contribute a new package. I see two reasons why this doesn't happen at an explosive rate in the Perl community.

The first reason is that there are quite a few modules which are so well managed and maintained that they are usually a step ahead of most developers' needs. And when a new need does arise, they are engineered well enough to accommodate improvements and support extensions. For example, I haven't seen any competitors for Perl's ORM DBIx::Class which is maintained by many developers. By contrast Python has at least 6 ORMs pursuing different priorities, inviting a single package to use more than one of them for different use cases.

The other reason is the Perl language itself. It's so expressive and flexible that a single package can be implemented to provide a huge amount of functionality. For this reason, I've never had to create a new CPAN package myself. Last year I almost published a package – Hash::Censor for removing confidential data from a hash/associative array before dumping it in the logs. As I was about to put it on CPAN, I discovered another package Data::Rmap was a much more general package that did everything I needed – and more – with less code than the package I'd written.

Here's a simple example of Data::Rmap doing magic:
#!/usr/bin/perl

use strict;
use warnings;
use Data::Dumper;
use Data::Rmap ':all';

my $rh_config = {
  convoluted => [
    'configuration',
    'data',
    'containing',
    {
      username => 'and',
      password => 'secret1'
    } 
  ],
  password => 'secret2'
};

my $data = rmap_to {
  foreach my $key (keys(%$_)) {
    if ($key eq 'password') {
      $_->{password} = '*** CENSORED ***';
    }
  }
} HASH, $rh_config;

print Dumper $rh_config;

=head2 The output

$VAR1 = {
          'password' => '*** CENSORED ***',
          'convoluted' => [
                            'configuration',
                            'data',
                            'containing',
                            {
                              'password' => '*** CENSORED ***',
                              'username' => 'and'
                            }
                          ]
        };

=cut

Q11. What would be the most significant change when comparing current Perl 5 with the upcoming Perl 6 release?

Please don't think of Perl 5 and Perl 6 as different versions of the same language – they are altogether different languages. Perl 6 is essentially a non-backward compatible R&D project kicked off in 2000. Perl 5 is still progressing with regular releases and CPAN packages – many of which (such as Moose – Perl's main OO system) are inspired by Perl 6. At least in the medium term, whenever people talk about Perl jobs they'll be talking about Perl 5.

Q12. What direction would you recommend to all job seekers looking for a Perl job with no working Perl programming experience?

First, learn Perl. There are lots of tutorials for learning Perl and I'm also providing on-line training at Geekuni.

To see where Geekuni's coming from - when I'm learning something new, my approach is to have a well defined end-goal in mind, then I learn the details as I solve problems to get to that point. In Geekuni I present Perl with this approach. I give the students well defined projects – building a search engine and an online game – and provide a breadcrumb trail of things to learn to achieve these goals. I've automated a lot of feedback so that the students don't get stuck on silly errors.

Once you're on top of the topics I've listed as the Perl Essentials you should start applying for jobs. Have a look here and on the various job search engines such as LinuxCareers the owner of this esteemed publication. Now don't spend all your time applying for jobs. It can be stressful and you're likely to be waiting for some time while recruitment agents and HR departments put you in touch with your potential boss. Instead, use your spare time acquiring real world experience. You might get involved in one of these projects: or just find your favourite CPAN module and ask the author for a bug or feature to work on.

BE FIRST TO READ LINUXCAREER'S ARTICLES. Subscribe to the LinuxCareer's newsletter for more articles like this, updates of the IT skills watch and other career related content.

Who are we?

LinuxCareer.com is not affiliated with any local or international company, nor is it a recruitment or employment agency. We specialise in Linux based careers and closely related Information Technology fields by providing careers advice and latest employment opportunities.

JOIN LINUXCAREER

You can also get involved in the LinuxCareer project by participating on our FORUM or SUBMITTING A LINUX ARTICLE. We offer a range of privileges to our authors and good company.