Your comfort language

Your comfort language


I've been programming in Perl for years - over ten now in fact - and I've written numerous books and articles on Perl and Perl programming. I've also worked with Python and written books and articles on Python programming, including a guide to migrating Perl applications to the Python language. For a while I really saw Python as an alternative to Perl, but after so many years and experience with Perl and what was possible with the language it is difficult to move on from the 'Perl comfort zone'.

That's not to say I haven't tried alternatives; the march of free software has lead to a huge number of alternatives coming on to the market that are adopted, enhanced and extended. Ruby is a good example of a language that has, almost, appeared out of nowhere and captured the imagination of a huge number of people, particularly due to the Ruby on Rails framework.

I spent years working with Rebol, and I tried Ruby years before it became as popular as it is now (both languages featured in my XML Processing with Perl, Python and PHP title, published back at the end of 2001).

I still like all of these languages, and I'm loving Ruby on Rails at the moment, but 99% of the time, if I need to do something, I do it in Perl.

Is this a bad thing? Shouldn't I have moved on from the comfort of 10 years of Perl programming to one of the newer, flashier, alternatives?

Well, Perl isn't a bad language. There's an interesting piece at O'Reilly: How does a programming language stagnate?, which uses Perl as a base for the discussion, largely because of the perceived issues with the 'ever imminent' release of Perl 6.

I don't think Perl has stagnated; the power of Perl is in the fact that it is (a) free software, and (b) that it is extensible. I use modules from CPAN, I write my own, but never, ever, do I feel in any way restricted or limited in what I do. Sure, there are things that could be improved about the language, but nothing that really stops you from doing what you want.

So if there is nothing wrong with Perl (and even if it has stagnated), why should I move on to something that is, by others, perceived as better?

Let's think about some reasons why you might change language:

  1. Support for new features or technology - well, Perl is supported on just about every platform I know, and in terms of features and functionality, there's nothing that cannot be accessed through or from Perl with a suitable module.
  2. Lack of support - this seems unlikely to happen any time soon, given the existing user base.
  3. Lack of development - Perl is still actively maintained, and, as a free software product, I could pick up and fix bugs any time I liked if I needed to.

I know these rules apply to other languages too, and again, one of the key elements about most of the languages making the news at the moment is that the element making the news is just an extension or adaptation of the original core principles.

Perl may be my comfort zone, but it works, it's stable, and I know how to do everything I need to (often in both efficient and inefficient ways) and I see no reason in moving off any time soon, no matter how convincing the argument. Of course, this is in some ways the complete opposite of my thoughts on GNU/Linux.

Of course, if somebody has some convincing arguments one way or another, I'm open to suggestion; I just can't make any guarantees to actually convert!

Category: 

Comments

Alan Berg's picture
Submitted by Alan Berg on

Hey, I like Perl as well. If I need to get a job done quickly there, Perl is. However, for larger code bases I find it difficult to maintain readable code. Java is more verbose and to some less lovable but the responsibilities in a team of coders is easier to divide. I suppose managers feel safer with Java. So how do you remove the readability kink in Perl and leave the rest?

Terry Hancock's picture

Well, I definitely relate to the "comfort language" concept. I think that unless you are a professional programmer, the effort to remember more than two or three key languages is just too much trouble for most people.

Knowing that about myself, I decided Python was a nice place to be. I was able to learn it really fast, and more importantly, I find that I can easily pick up tasks I was working on "a month or two ago" (usually means "9 months to 2-1/2 years" when I actually check the calendar).

I tried to learn Perl a few times, then finally took a course in it at work. I didn't see much of anything I couldn't do more easily and more readably in Python.

I felt like I might've appreciated the course except that Python had spoiled me -- I couldn't help thinking that Perl was actively designed to be obtuse and difficult on things that in Python are easy like breathing.

I actually did learn some nice tricks with Perl on the command line, but the truth is, the overhead in remembering yet another language versus just doing the same thing in Python wasn't worth the difference.

So I'm not really surprised that people can get stuff done in Perl, but I feel it takes a bigger learning commitment than Python (don't know about Ruby).

Likewise, though, I didn't find much in Java or Lisp to draw me.

My only complaint about Python is that the range of libraries is not as great as for Perl or Java.

The bottom line is, though, I'm just not going to spend the time learning those languages. Python's easy for me, so I'm going to stick to it. If I were a professional programmer, I might take a different attitude, but as an amateur, I don't really feel the need.

I'll probably occasionally dabble with alternatives as exploratory play. But Python has replaced C as my most useful tool, and I don't think that's going to change anytime soon (not for me, anyway). I still hold out hope that I'll find something for which C leaps out as the best solution, but I just don't seem to be doing any of that kind of stuff anymore. And I think I'll politely avoid the subjects of Fortran and BASIC, though I wrote quite a bit of those once upon a time, too.

So on the one hand, I don't agree with your choice of language, but I understand your attitude about it very well.

Marza's picture
Submitted by Marza on

A "comfort language" is a great description for Perl. It gives me the feeling I can accomplish things even though there are many people that are superior to me.

I have considered Python, Ruby, PHP and VBscript. Have books on them on my shelf but really haven't made the effort to learn them. Perl does just about anything for my needs and it's safer to use what you know versus what you could know.

There is the fact that I have to use what the others could support. They don't understand the other languages and could hack there way into fixing a Perl script.

Perl replaced shell scripts for me. I used to write for the shells but not anymore. Perl is far more comfortable.

I guess I will have to motivate ( more like kick ) myself into playing with Python and PHP.

Ryan Cartwright's picture

A colleague consistently refers to me as a "Perl guy" even though I regularly code in other languages and have never really espoused the view that Perl is the *only* way to go. I think it's because he has a dislike of/limited patience with Perl and I don't. It used to bug me but on reading this I realised that Perl is my "comfort language".

I find myself turning to Perl before other languages and the times when I've written in other ones are times when I've considered Perl first and eventually settled on the other language. When I have a task to be done, some code to be written, perl is always on my list of languages to write it in. Even when considering scripts for sysadmin work (backup scripts etc.), perl is always considered and often used.

Why Perl - first bit of real-world coding I did I guess and I suppose it stuck. And now I am stuck. Although other languages may be better suited to the task, I can write much quicker in Perl than other languages. This is probably because I am familiar with it but you know what? I like writing in Perl and "comfort" exactly sums up how I feel when I am.

Author information

Martin Brown's picture

Biography

Martin “MC” Brown is a member of the documentation team at MySQL and freelance writer. He has worked with Microsoft as an Subject Matter Expert (SME), is a featured blogger for ComputerWorld, a founding member of AnswerSquad.com, Technical Director of Foodware.net and, and has written books on topics as diverse as Microsoft Certification, iMacs, and free software programming.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!