Perl

Encouraging newcomers to stick with Perl

We’ve recently hired our first group of graduate developers, and they’re currently undertaking a graduate programme where they will work with various technical teams in different disciplines. As a member of the Perl group, I’m obviously hopeful that they’ll enjoy their time using Perl, and that they might be excited enough by using Perl, and the work we do with it, to want to stick with Perl after they finish the graduate scheme.

Continue reading

Perl

Unicode Perl Best Practices

The following are notes I took during a Unicode tech talk by Dave Cross.

What’s the problem?

ASCII has 128 characters. Extended ASCII character sets can have 256 characters, e.g. ISO-8859-1. This is the limit of one byte.

Unicode has 110,000 characters; we need more bytes!

UTF-8

UCS (Universal Character Set) Transformation Format – 8 bit; represents Unicode characters as 1 – 4 bytes and is the de facto standard encoding on the web. It also has excellent support in Perl (as of 5.14).

Continue reading

Architecture

Partial deployment with feature switches

What

The idea of feature switches is neither new nor complicated; devop’s darlings Etsy and Flickr have been talking about them in the context of continuous deployment for a while.

Essentially, what it boils down to is merging part-complete features into your master code branch before the work is ready for some, or all, users. These features are then kept “in the dark” until such time as the feature is completely ready, when it’s switched on for all to see.

Continue reading

Operations

A brief look at application-level metrics

We have a large collection of system metrics created by our techops teams, but we (the developers) are less good at thinking about application-level metrics. I’ve decided to investigate different methods for collecting metrics from our applications.

A Very Quick Introduction To Application Metrics

Take a minute to think about monitoring and metric collection; what comes to mind…?
CPU usage? Memory usage? Free disk space?

These are all very important metrics to collect, but they’re obviously very low-level metrics.

Continue reading

Perl

Rapid API prototyping with Dancer and DBIx::Class

Screenshot of NAP Trending, a hack day project

Thursday and Friday last week were hack days here at NAP HQ, which is a time to work on anything you like, so long as it’s vaguely business related. The project I embarked on (see screenshot above) required an API and I thought this would be a good opportunity to use Dancer at work.

Dancer is a micro-framework inspired by the likes of Sinatra et. al. The primary goal is to provide developers with a simple DSL for handling HTTP requests:

#!/usr/bin/env perl
use Dancer;

get '/' => sub {
    "Hello World!"
};

dance;

This makes it well suited for rapidly prototyping APIs and other sorts of HTTP related applications.

Continue reading

Perl

Recollections from YAPC::EU 2011

A few weeks ago five Perl developers, myself included, were lucky enough to be sent to the annual Perl conference YAPC::EU. YAPC::EU was a four track conference, held over three days, in the Eastern European city of Riga, in Latvia.

The theme of the conference was “modern Perl” and I was organised enough to take some notes during the talks I attended.  For the benefit of those unable to attend, here’s what I saw and heard.

Continue reading