Perl is going away? No way Jose.

Friday, April 11th, 2008

Unbeknown to me, some people have been asserting that Perl’s heyday has come and gone.  Sterling Hanenkamp and Kevin Marshall have posted a fair rebuttal over at perlbuzz.com.  I thought I’d tag on a bit to what Kevin and Sterling brought up.

Truly great languages do receive updates less frequently as they age.  That’s because such a large base of programmers have learned the earlier libraries and being the bright chaps they are, they requested more and more features.  Until at a certain point the product becomes so eminently usable that very little else needs to be added for most users.

Now there are going to be specific requirements for each project and that’s where the development comes in.  But god bless these bright chaps, because not only do many Perl programmers write this custom code, but they frequently check it back into CPAN as modules.

So other people who program similar projects with these precise requirements don’t have to reinvent the 7-spoke, 16″, lithium-greased, carbon steel wheel.  You see, Perl provided the wheel to everyone who worked with the base language.  But not everyone needs a 7-spoke, 16″, lithium-greased, carbon steel wheel.  Especially when they’re writing really secure code that has to be analyzed line by line for security risks.  Or if they want to write really small code that will work on a mobile phone or embedded code.

Why is this good for business?

Do you really want your programmers to have to re-learn their code-base every 5 years?  I knew lots of people who used to know how to do some Visual C++ and Visual Basic development back in the .com days.  Then along came Java.  In the midst of this came a lot of middleware that provided common libraries for programmers.  And then came .net.  Now, most Java developers don’t do Microsoft stuff, but these days some .net guys do perl and some java guys do some .net.

But trying to find and hire people that will mesh with whatever mix of code your shop is currently running is difficult for technical managers.  It’s completely impossible for HR and non-technical managers.

Now I’m not saying that hiring Perl developers is necessarily any easier.  And I’m not trying to be a Luddite either.  All I’m saying is that new revisions of products come out when current needs aren’t being met.  So we haven’t needed another Perl for a while now.

And Sterling hits on a brilliant point about how poorly the TIOBE index measures current market needs or the current state of code development.  Go figure that a free language doesn’t have a bunch of PR geeks hiring Search Engine Optimization guys to drive up the results of people’s searches.  Microsoft and Sun are literally spending millions of dollars to try in tilt these sort of comparison’s in their favor because it helps them make money.  Then we have to spend our money to learn the new skills, license the new libraries, call for support on their poorly written new projects, etc. etc.

In summary, Perl still kicks much ass and it’s not going anywhere any time soon because the price is right, it does the heavy lifting, has a good community full of nice people like the Perl Monks and Larry Wall is god.

A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
Antoine de Saint-Exupery

Livejournal autoposting

Sunday, June 19th, 2005

People always seem semi-surprised that I autopost in some journals and communities. I do it because I’m forgetful and compulsive. Anyhow, should you feel the same need, here’s how I’m doing it.

Also, note, portions of this code were wrote by Emmie P. Lewis. Don’t who she/he is, but thanks for sharing, so now I’m doing the same.

[root@localhost root]# cat /dancron/ljPost.pl
#!/usr/bin/perl

#===============================
# How to send email with Net::SMTP
# Copyright 2000, Emmie P. Lewis
# Created 02/20/00
#===============================
# This script is designed to show
# how to use Net::SMTP to send
# email from a Perl script.
#===============================
# Modified by Daniel J. Doughty <daniel.j.##**!!@gmail.com>
# Now it sends a post to livejournal.com via Emmie’s code.
# Modified early 2005
#==================================

use Net::SMTP;
use Getopt::Std;

# WARNING. This is a hardcoded value. You can tell I meant to catch it via a flag, but haven’t implemented it. Feel free to fix or hardcode your own community here.
$opt_c = “some_community_name”;

getopts(’s:b:i:c:’);

#debugging stuff
#print $opt_s;
#print $opt_b;
#print $opt_i;

chomp $opt_c;
#print $opt_c;

#print “Content-type: text/plain”, “\n\n”;

# This debug flag will print debugging code to your browser,
# depending on its value
# Set this to 1 to send debug code to your browser.
# Set it to 0 to turn it off.

my $DEBUG = 0;

if($DEBUG)
{
$| = 1;
open(STDERR, “>&STDOUT”);
}

# Another hard-coded value.
# Set this variable to your smtp server name
my $ServerName = “smtp-server.kc.rr.com”;

# Create a new SMTP object
# This is the debug option
#$smtp = Net::SMTP->new($ServerName, Debug => 1);
$smtp = Net::SMTP->new($ServerName, Debug => 0);

# If you can’t connect, don’t proceed with the rest of the script
die “Couldn’t connect to server” unless $smtp;

# Initiate the mail transaction
# Your “real” email address
# Another hard-coded value
my $MailFrom = “yourname\@yoursmtphost.com”;

# Recipient’s “real” email address, yup, you guessed it. Hard-coded. AND PAY REAL CLOSE ATTENTION HERE. REPLACE THE 1234 WITH YOUR OWN PIN THAT YOU SET UP AT LIVEJOURNAL.COM
my $MailTo = “someljname.$opt_c+1234\@post.livejournal.com”;

$smtp->mail( $MailFrom );
$smtp->to( $MailTo );

# Start the mail
$smtp->data();

# Send the header
# This address will appear in the message
# Same as the note above. I don’t know why this is repeated. She did it, not me.
$smtp->datasend(”To: someusername.$opt_c+1234\@post.livejournal.com\n”);

# So will this one
$smtp->datasend(”From: someemailname\@somehost.com\n”);
$smtp->datasend(”Subject: $opt_s\n”);
$smtp->datasend(”\n”);
$smtp->datasend(”lj-userpic: $opt_i\n”);
$smtp->datasend(”\n”);

# Send the body.
$smtp->datasend(”$opt_b\n\n”);

# Send the termination string
$smtp->dataend() ;

# Close the connection
$smtp->quit();

Here’s the crontab entry I use to call it. It accepts 3 flags, -s for subject, -b for the body and -i for the image to post with. This image tag must already be uploaded and named correctly. If you post the wrong image name, it will just use your default image, if you have one.

29 17 */7 4-9 * /dancron/ljPost.pl -s “SUBJECT” -b “Body of text” -i “can’t remember what this flag is for”

something I’ve been monkeying around with

Saturday, February 26th, 2005

1. Install Fedora Core 3.(do not install the graphics libraries…freetype-devel, gd-devel, libpng-devel, libjpeg-devel, xorg-x11-devel)
2. Update my /etc/yum.conf:

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://mirrors.xmission.com/fedora/core/3/i386/os/

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://mirrors.xmission.com/fedora/core/updates/3/i386/

3. Install Gyum and update
4. install gnome-desktop-devel.i386, gd-devel.i386, libpng-devel, libjpeg-devel, perl-Compress-Zlib.i386

New ultra-high speed cable modems in KC

Sunday, November 28th, 2004

So for another $50 a month I could double my download speeds. Upload only moderately increases from 384 to 512. I considered it, because my recent work stuff has really been waxing my throughput. ULing a 800MB file to sun is a pain, FYI.

The price increase is only supposed to be $25, but since it would break the package I’m in, it would really cost me $50. It’s money better spent in other areas at the moment.

I also talked to the Time Warner gal about the new Hidef DVR that has a 160GB HDD in it. The new DVR only runs a nickel more a month. I’m probably going to take my box in sometime next week and see if I can get some more capacity out of this deal.

As a sort of side note…I’ve got a new pet project that I’m considering working on. It’s really just an extension of many of my other projects. Controlling my life through computers.

I’m interested in a HAL type interface. I’d like a system that can query and respond verbally. You know, a “What time would you like a wake-up call?” kind of thing. I initially just started jaunting down the linux possibilities. But with a little thought I’ve decided I should see if anyones making any progress on this area in Perl.

a quite useful script in emailing via perl & smtp

Wednesday, October 13th, 2004

http://perl.about.com/library/weekly/aa022000d.htm