Helping others write better Perl
Mon, 17-Apr-2006 by
Andy Lester
edit post
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.
Category:
(none)
Comments (4)
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.
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.
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.
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 :)