Kickin’ it old school.
I started writing web applications around 1997. On Solaris. Using Netscape’s web server. In Perl.
My LinkedIn profile starts thusly:
I began working with LAMP back in the days where the men were men and we ate Perl for breakfast. Installing Linux with 40 floppy disks puts hair on your teeth. One thing led to another, and before I knew it I was living with an E-Commerce system. What can I say? I was young and needed the money.
Around 2001 I took a departure from the web world to work on enterprise and desktop software. Sure, I slung a little web code here and there, but I didn’t track the technology landscape like I did back in the good old days.
When looking at founding Directed Edge, it was time to re-approach the web and get back on friendly terms. Like an old-timer desperately trying to identify all that is hip, I set out to figure out what the cool kids were doing.
Python with Django and Ruby on Rails.
I learned bits of Python and Ruby, things I’d been meaning to learn for ages. Ruby’s syntax and I didn’t hit it off at first, so I spent a couple days reading Learning Python, which had been sitting on my shelves for a few months.
But friends, home is where the heart is, and even after getting a reasonable grasp on Python I kept going back to Perl. There are two reasons for this:
CPAN. Oh, sweet, sweet CPAN.
The CPAN has grown so large and comprehensive over the years that many people learning Perl seem to elevate it to a sort of mythical status, and express surprise when they begin to encounter topics for which a CPAN module doesn’t exist already.
-Wikipedia article on CPAN
CPAN is huge, easy to search, well documented, and trivial to deploy. Need some code to do TLS authenticaed SMTP tranfers? Trivial. Need a WSDL compiler to work with an old SOAP API? Up and going in a few minutes. Need to test a REST API with a really mature HTTP implementation? It’s there. Need code for quickly generating mail routing code for feedback processing? Bingo. But wait — that’s all pretty common stuff, right? There are even CPAN modules for stuff like tracking quantum superpositions in quantum computing algorithms or quickly building genetic algorithm implementations (my two research areas in college). And all under the same roof.
And let’s back up one bit; for all of the perceived culture of sloppiness, I earnestly believe that Perl has the strongest documentation culture of any major programming language. By and large CPAN’s 12,000-something modules are rather well documented with examples and gotchas in addition to the basic API docs. As a special bonus as soon as you’ve installed them with the command line cpan tool (which automatically resolves dependancies, downloads, tests and installs) they’re available in your system’s man pages. The standard man pages for core language features are great, and well written to boot. The Camel Book will forever have a place on the gilded streets of O’Reilly’s hall of fame as possibly the most enjoyable to read 1000+ page technical book ever written.
Fast hacks, fast, quickly.
Combined with the power of CPAN, Perl just has something about it that makes gruesome, and gruesomely fast hacks possible. Much of this is owing to CPAN solving 75% of the universe’s problems for you from the get-go. But Perl is something of the Sicilian mobster of the programming world — it gets stuff done.
Add to that that it’s one of the speediest scripting languages performance-wise, and it’s great for quick-and-dirty hacks that programmers invariably have to come up with on a regular basis. Perl seems to be optimized for writing as little code as possible to get the job done.
What I’m not saying.
Most people talking about Perl are quick to groan about its ugliness. I’ll first note, most of them don’t know Perl, so it’s my earnest belief that much of that is fadiness. Perl can be well written, but its syntactic moral flexibility means that there’s a lot of ugly Perl out there. I’m not going to try to pass that off as a good thing. But a real Perl mensch can write Perl that’s as easy to read as code in most other popular programming languages.
I’m also not advocating doing large projects in Perl. In a decade of Perl slinging, it’s only happened a time or three that I written tools that were more than a couple thousand lines of code. (But again, the beauty lies in that I’ve rarely needed to.) Nothing particularly central to Directed Edge is written in Perl, but it’s been my Swiss Army Chainsaw on the fringes — converting data formats, processing simple forms, interfacing with databases — glue code, basically.
And there I have to say, despite wanting oh-so-desperately to be one of the Python cool kids, I think Perl is there to stay.