April 17, 2006 - Helping others write better Perl

Something I think we can all do in the Perl community is help spread the knowledge of how to use this marvelous tool. There are so many layers to the onion, and some people may only know about the outermost layer.

The other day I saw an entry in Erica Sadun's blog where she'd hacked together a quick Perl program for some user interaction that then generates URLs and fires up Safari. It worked, but it wasn't a good example of good Perl.

So I cleaned it up a bit, using a more readable hash constructor, proper regex matching, and of course added "use warnings" and "use strict" for ease of future maintenance. I then sent a nice, non-pushy email to Erica saying "Here's an updated version that you might be interested in. Here's what I updated, and why, and how it's useful to you as a programmer."

Erica was very appreciative, and posted the new version. Now we have some improved code out there, in a pretty visible place.


So, would you consider this to go along the same lines as promoting "Perl Best Practices"? I've started reading through the book and have started changing some of how I code now.

contributed by Jeremy Fluhmann on April 18, 2006 8:46 PM


I guess it's kind of like that. I don't think that Erica needed to get a copy of Damian's book. That's probably a few layers deeper into the onion than would be useful for her. But I would bet that strict and warnings were new to her, and those themselves are crucial for people to know about.

contributed by Andy Lester on April 18, 2006 10:07 PM


If you've got the time you can use http://google.com/blogsearch_feeds?hl=en&q=%22perl%22&btnG=Search+Blogs&scoring=d&num=10&output=atom which is a google blog search for "perl" by date as an RSS feed. I've been watching this to see if there are new Perl blog entries that might need help.

contributed by Randal L. Schwartz on April 21, 2006 1:42 PM


Randal, I think i read that a while ago from you. I started doing the same thing for chinese blog on Perl after that.
I like it :)

contributed by Qiang on April 25, 2006 6:39 AM

Tags:

Something I think we can all do in the Perl community is help spread the knowledge of how to use this marvelous tool. There are so many layers to the onion, and some people may only know about the outermost layer.

The other day I saw an entry in Erica Sadun's blog where she'd hacked together a quick Perl program for some user interaction that then generates URLs and fires up Safari. It worked, but it wasn't a good example of good Perl.

So I cleaned it up a bit, using a more readable hash constructor, proper regex matching, and of course added "use warnings" and "use strict" for ease of future maintenance. I then sent a nice, non-pushy email to Erica saying "Here's an updated version that you might be interested in. Here's what I updated, and why, and how it's useful to you as a programmer."

Erica was very appreciative, and posted the new version. Now we have some improved code out there, in a pretty visible place.


So, would you consider this to go along the same lines as promoting "Perl Best Practices"? I've started reading through the book and have started changing some of how I code now.

contributed by Jeremy Fluhmann on April 18, 2006 8:46 PM


I guess it's kind of like that. I don't think that Erica needed to get a copy of Damian's book. That's probably a few layers deeper into the onion than would be useful for her. But I would bet that strict and warnings were new to her, and those themselves are crucial for people to know about.

contributed by Andy Lester on April 18, 2006 10:07 PM


If you've got the time you can use http://google.com/blogsearch_feeds?hl=en&q=%22perl%22&btnG=Search+Blogs&scoring=d&num=10&output=atom which is a google blog search for "perl" by date as an RSS feed. I've been watching this to see if there are new Perl blog entries that might need help.

contributed by Randal L. Schwartz on April 21, 2006 1:42 PM


Randal, I think i read that a while ago from you. I started doing the same thing for chinese blog on Perl after that.
I like it :)

contributed by Qiang on April 25, 2006 6:39 AM

Post a comment

If you have an OpenId URL, you can enter it here to post comments on this site.

Category

This page contains a single entry from the blog posted on April 17, 2006.

Many more entries can be found on the main index page or by looking through the archives.

Powered by
Socialtext