ntoll.org

(Everything I say is false...)
home | about | articles | presentations | cv | contact

Learning Erlang..? Why...?

Monday 30 June 2008 (02:03PM)

I spent last week at two events:

  1. A beginners Erlang course given by Richard Carlsson on Monday to Wednesday, and
  2. The Erlang eXchange conference (sic) for the rest of the week.

As the Erlang site states Erlang is a functional programming language with an emphasis on concurrency, distribution, robustness, "soft" real-time (where response times are required within milliseconds), hot code upgrades, incremental code loading and external interfaces to connect to the outside world.

Why am I, someone who writes C# code for an investment bank, interested in this? There are three reasons:

  1. Self improvement: I'm always trying to expand my horizons, learn new things and challenge my own habits and world view. Erlang is an exploration of a completely new style of programming – think of it as personal development for the software developer in me.
  2. The next big thing™: What everyone is looking for… It seems to me that Erlang is where Ruby was four years or so ago (pre-Rails) – on the cusp of transforming from a niche language to something mainstream and "in demand". What is the reason for this transformation? From my newbie perspective I can see that:
    • Because of the way the Erlang language is designed, source code is relatively short and easy to understand (compared to my experience of writing C-like programming languages) and is thus faster to write and easier to maintain (and therefore cheaper and more fun).
    • The move to multi-core architectures to speed things up means concurrency is now a very big issue. Erlang has an excellent and easy to understand means of dealing with concurrency (based on the so-called "actor" model, isolation and message passing). This is in contrast to most other languages that use threading, locks and shared resources – a methodology that is harder to get right and a nightmare to debug (I know this from bitter experience). As Erlang gets this sort of thing right I want to exploit concurrency in the simplest and most effective way possible.
    • You get a lot for "free". The OTP libraries and other modules that come with the Erlang language provide lots of re-usable functionality – meaning developers don't have to constantly write so-called "boiler-plate" code before implementing the functionality the software was actually designed to fulfill. As most languages have large and feature rich libraries associated with them this aspect of Erlang isn't a differentiator – rather evidence that it is a mature and actively maintained language.
    • Buzz. There is a book, a movie and lots of articles, blogs and websites out on the net. Erlang is starting to get noticed and I think it only a matter of time until a "killer" application arrives (a la "Rails" on Ruby) to suck more developers into using it.
  3. Free Software / Open Source: My interest in programming started after I installed Redhat 5 on an old 486 PC my father-in-law gave me back in the day… My commercial experience is completely within the proprietary world of .NET. I'd like to get commercial experience using free software (not the oxymoron it might look).

The course I mentioned at the start was great fun and Richard is an excellent teacher and obviously an expert in the field. All of us went away enthused and wanting more. Luckily there was more… the Erlang eXchange.

This was a relatively small affair but I got to meet lots of interesting people and see some of the cool things that have been done with Erlang. Richard took some photos that can be found here and Podcasts can be found at the Erlang eXchange website.

So what happens next..?

As those of us on the beginners track soon realised, we need to keep learning and practice our newly acquired skills. As a result, I'm devouring Joe Armstrong's book whilst on the train into work and we've organised ourselves a site on Google and intend to set projects for each other to keep us motivated and on track.

My first challenge to the rest of the group is to create a simple IRC-bot server:

Why do an IRC bot? I can think of several good reasons:

I'll keep you posted how I get on.