November 17, 2007

Does anyone use Perl anymore?

Always start with a provocative title, thats what I remember someone saying. Anyhow, I was thinking about this a few days ago when I was forced to to figure out something I had written 5+ years ago (the problem of working at the same company for almost 10 years is that you are constantly forced to fix the crap you created years ago -- the joy is when something you wrote years ago actually impresses you). Now I won't say this particular piece of code did anything amazing, but back then the only hooks the application offered was the ability to execute some Perl code. And after spending an hour or so with my fairly well commented (and very non-Perlesque code) I got to thinking about why anyone would want to program in this read-only language.

We, well not me, but the programming world in general, has been waiting for Perl 6 for what seems like a decade. 7+ years is a long time to wait for anything (ask Microsoft about that). And 7+ years in the scripting language space is an eternity (hell there is even a programming language for cats now). Everything that Perl can do, Ruby can do (even the new kid on the block back then, Python is taking a back seat to Ruby, at least in trendiness). And Perl 5 is still stuck with write-only code, a truly bizarre object system (inside out objects, blessing, oh my!), and why oh why can't a variable figure out how you want to access it (%@$, looks like I am swearing in cartoon). Perl's once unassailable strength: CPAN, has been duplicated in PEAR for PHP, RubyGems for Ruby, hubris for Python, and Google and others (krugle, koders, codase) for C# and every other language I use.

When I started in this business, the web was a new frontier where CGI was written in Perl (or even C), and boy did Perl look easy compared to writing CGI or ISAPI scripts (yes, I have written a few ISAPI scripts in my day -- why did Microsoft make everything in Visual C++ an impossible tangle of Wizards and generated code that if you didn't work with it every second of every day, you spent most of your time with a head in manual). This was the days of altavista.digital.com, yahoo.com, excite.com and when the last episode of Sienfield had more advertising revenue than an entire year of advertising on the internet.

Not to be the crotchety old man, but I remembering for my first Co-op job, I researched what was available for creating a web application. The choice was between Internet Application Servers (yup that was what they were called back then) where there was Borlands Intrabuilder, ASP 1.0 (which we could never get connected to the Oracle Database running on VMS), and Cold Fusion. The other choice was client side Java applets, which Oracle was pushing at the time -- the idea here was that standard Oracle forms (oh Oracle forms, how I hated thee) could be compiled into Java bytecode that would be sent to the client web browser and run as an applet. Now this is back when everyone was on dialup, and even within the facility I worked in over ethernet it would take 5 minutes to get these suckers to pop up (if they would), and it only ever worked if you had the version of Java that Oracle packaged with their Java forms, and only one Windows (never got it working on Unix, VMS or a Mac).

So I ended up sticking them with Intrabuilder, which probably would have been fine if this wasn't shortly beforethe point in history that Borland decided to self destruct.

Anyhow, when I arrived fresh on the scene in job world, there was two ways you could work on the web. Dreaded ASP on the Windows side, or Perl on the Unix side. Then I landed at a company that had bet its future on Linux and this crazy little language called PHP/FI. Every now and then I was dragged into Perl (and still am), but oh how I am glad that the company I work for (funny, they haven't updated much on their website in the past 10 years I have been working there) was using PHP and not Perl.

Not that I work all that much in the web space anymore, and not that PHP is without faults...

No comments: