Defending Perl

I stand here today not to condemn Perl, but to defend it… Perl

And when I say “Perl” I want you to feel free to substitute any other language you see fit… Visual Basic, Fortran, Lisp, COBOL, Smalltalk, or even… Java.

I was given a programming assignment this week. Given a list of 2000 names, I was to provide 400 names randomly. (Yes, this was for work, and was a real-world assignment, not just some exercise.) I proceeded to open my ~/scripts folder, which contains well over 1,000 Perl scripts, and grabbed some existing code, and wrote some new code, and ran a few tests, and quickly had the list of 400 names.

I used Perl because it worked for me. I probably could have written in it PHP (as it’s another language I am pretty comfortable with) but since I’m more familiar with Perl, and have done very similar thing before with Perl, and had a gigantic library (nearly 15 years worth) of Perl scripts to pull from… I used Perl.

I’m sure others could tell stories just like this substituting Java, or Python, or Erlang, or whatever they have around, that they are the most familiar with… and that’s fine.

This is about using the appropriate tool for the job, and this case, with the job being performed by me, the tool was Perl.

I wasn’t creating some new framework, or building upon an existing application, or pushing some code to GitHub that I wanted others to collaborate on… it was a quick ‘n dirty task that needed to get done as fast as possible.

Much of the programming world (maybe it’s mostly in the web-programming world) gets hung up on the latest and greatest. There’s a chance that using Ruby someone could have completed this task in half the time… but that person would not have been me, as I’ve spent probably less than an hour using Ruby and I’m not familiar enough with it to bang out the needed code quickly. I’d like to have some time to dig into Ruby (or, whatever, pick a language) and get familiar enough with it to use it effectively, but I don’t know when that will happen.

I’m not even a programmer… I’m a hacker, and I think Perl is a hacker’s language. Make something work. Solve a problem. Do it quickly, and move on.

To some degree you could say I’m trapped in Perl, because it is so easy for me to get what I want done quickly, and yeah, there’s a module for almost everything… Where I mainly feel the pain is when I look for example code and narrow my search to Perl (or PHP) because I’m most familiar with them. I needed some code this week to do some serial port communication, and found only one good example written in Perl. I should probably task myself with re-writing the code in Ruby, or Python, or some other language I’m not as comfortable with as an exercise in forced learning.

And then there’s a part of me that just says “screw it, I’m gonna work with what I know, and get things done, and move on.”


BarCampMilwaukee5: An Intro to Ruby on Rails

This is the “Intro to Ruby on Rails” session from BarCampMilwaukee5 which took place on October 2nd/3rd, 2010 at Bucketworks in Milwaukee, Wisconsin.

Stephen Anderson of Bendyworks was the presenter for this session. You can find Stephen on Twitter as @bendycode.

Since there was a code demo that went along with this session, I’m not sure how useful this will be for people that missed it… anyway, here it is!

You can also download an MP3 file if you’d like. (And for our freedom loving friends, enjoy an Ogg file.)

Also, if you want to get all of the audio automagically downloaded podcasting style, subscribe to the feed. I’ll add in more BarCamp stuff as I get it all edited and published.


Java/Ruby Joke

Hey, I’ve got a joke for you!

Q: What do you call a future Ruby programmer?

A: A Java programmer!

(Check back in a year and see how this joke has aged…)


Damn Excel!

Face it, even though Excel is a spreadsheet, the vast majority of users think it’s a database. Sure, why not? It’s got columns and rows and you can type data into it. Isn’t that what a database is?

In the olden days it was common to let people think this way, and then just dump the data out to a tab-delimited file and use Perl to rip through it. That was the olden days, because now we’re used to the new days, and Spreadsheet::ParseExcel

The Spreadsheet::ParseExcel module makes it pretty easy, and those people can keep sticking their data into Excel, and we’ll keep right on ripping it out with Perl. (Thanks Kawai Takanori!)

Even after all these years, when PHP and Java got bigger and stronger, and Ruby showed up and what not, Perl is still a great language for processing text and data, mainly due to the huge amount of useful modules available.