Thursday, August 13, 2009

Just A Throw Away Line

It's fascinating to me how serendipitous life often is. We just attended a week long World Religions Encounter, including hour upon hour of lectures and site visits for exposure to beliefs ranging from Wiccan to Zoroastriansim, and of all the things said and experienced there the thought that struck me most forcefully came from a casual comment made by a fellow conference-goer during a bus tour: "The larger our island of knowledge, the longer the shore of uncertainty."

Friday, July 31, 2009

The end of the scientific pier

"We've entered into this very difficult space. Where we have learned enough to know that we know much less than we thought."
--Robert Krulwich, After Life, Radio Lab, WNYC

Thursday, July 30, 2009

Perl, Catalyst: $100M in sales this year

If I'm reading this spreadsheet correctly, it appears our $work website is on pace to book just shy of $100 million this year. Thanks Linux, GNU, Apache, Perl, CPAN!

Open source: A cast of thousands paying my mortgage, one patch at a time. I'm glad I can pitch in in small ways too! :)

Friday, July 17, 2009

Chiselling chunks off of BioPerl

There's been renewed conversation about breaking BioPerl up into smaller distributions. I'm trying to help, citing the Catalyst development model as an example of how the world could be better.

For some values of 'better'. -grin-

Wednesday, June 17, 2009

perl5 introspection (thanks Moose!)

Many dynamic languages have a way to get a list of all methods for an object built into them.

I don't think perl5 does. But Moose adds it. :)
$ cat j.pl
package X;
use Moose;
sub dosomething1 {}
sub dosomething2 {}
sub dosomething3 {}

package main;
my $x = X->new();
print join ", ", sort $x->meta->get_all_method_names;
print "\n";

$ perl j.pl
BUILDALL, BUILDARGS, DEMOLISHALL, DESTROY, DOES, does,
dosomething1, dosomething2, dosomething3, dump, meta, new
Neato. :)

More info on Moose: http://moose.perl.org

Monday, May 18, 2009

Perl, Template Toolkit, and GraphViz

Our largest Catalyst application (ssl.omnihotels.com) is composed of 184 templates. I get lost sometimes while template diving, and forget the parent node(s) of my current node.

Inspired by The Perl Review Issue 4.1, I decided to give GraphViz a stab. To my surprise, I got it working very quickly. I wrote a quick CGI hack that lets me click on any of my templates from a list on the left, and it draws an INCLUDE diagram of all downstream templates for me. Here's a screen shot of the CGI in action:

Pretty slick, huh? Here's what it drew for our wrapper.tt, which is the parent of many of our templates:

You could throw the same crude implementation at any tree, really. I think I'll try all the use statements in our in-house perl code base next. :)

The source code is here: http://github.com/jhannah/sandbox/graphviz. Enjoy!

Tuesday, May 5, 2009

wget mysqltuner.pl

Oh, that's cute. The DNS domain mysqltuner.pl is set up to a redirect to the text version of the program mysqltuner.pl. I hadn't seen that trick before. :)

mysqltuner.pl is a pretty slick little program with color ASCII output to give you a quick rundown of the status of, and suggestions of how to improve, the health of your MySQL databases. I like it. :)