The Joy of Finding Your Code in Unexpected Places

Posted in: Technical Track

So there I am, on my morning bus ride, reading my copy of The Definitive Guide to Catalyst (keep your eyes peeled for the upcoming review of the book in the Perl Review).

I’m near the end, in Chapter 11, Catalyst Cookbook. As it is with most tech books, the last chapters are the most engrossing, as the gloves finally come of and the writers throw at you all the wonderful, mind-bending stuff that the rest of the book prepares you for.

The section I’m at is about the development process. Specifically, it shows how you can put hooks in your versioning system to automatically screen commits to conform to Perl::Critic and Perl::Tidy policies. The given example script uses Git, which is just dandy with me as it is my current VCS of choice. But there’s something . . .  funny about that script. The way the utility functions are stashed at the end after a

### utility functions ##############################

line. The choice of variable names. The comments. It all feels oddly familiar. And then my eyes fall on the line

exit 0 unless @dirty; # Alles gut

and everything falls into place. The script in the book is a wee bit different and has been improved upon, but its origin is unmistakable. Somehow, unexpectedly, a hack of mine found its way into publication. Fame, glory, and page 293 of the Catalyst book, I can finally claim ’em all as rightfully mine!

But, serendipitous glee aside, three important lessons lie in this little story.

1. Blog posts, great and small, the Perl Gestalt, it reads them all

All clever tricks, code snippets, and insights you come up with? Blog ’em. Even if you think they are only an itsy widdly little bit clever. Chances are, if there is a spark in there, it’ll ignite the mind of someone insaner than you are and ultimately result in something awe-inspiring. Or, more importantly, something awe-inspiring for which you’ll have bragging rights.

And don’t despair if your blog entries mostly go without comments. Provided that you are broadcast by an aggregator or two, people will read you. Silently, furtively, your thoughts will slip in the Perl subconscious like so many pumpkin seeds into autumn soil.

2. Code carries your DNA

No big discovery here, but it’s interesting to see how surprisingly easy it is to recognize one’s own code. One would think that nothing looks more like a line of code than another line of code, the same way nothing looks more like a baby emperor penguin than another one.

Yet, we do recognize ours by a curve of the beak, a specific timbre of the voice. Admittedly, Perl’s flexibility provides much more latitude for transposing our idiosyncrasies unto our digital babies. But then again, isn’t why a lot of us love Perl so much?

3. Some of my code made it into a Catalyst book!

I mean, seriously, how terminally cool is that?!


Interested in working with Yanick? Schedule a tech call.

4 Comments. Leave new

Martin Widlake
October 9, 2009 5:50 am

I would never have seen this post if it had not been on an aggregator, thus vindicating point one.

It is odd how things can come around. I was beta testing Oracle 10 many years back and got a call off the coordinator. I said it was going well, we had it installed and the database up in 20 minutes and then went into some technical details.

Oracle 10 went live and I kept seeing how “you can have it up and running in 20 minutes”. Was that me? Had someone else said it? I never decided.

Anyway, it was not true, the beta could be installed and running in 20 minutes, took us 3 days to get the production version to fly!

Yanick Champoux
December 4, 2009 3:15 pm

I would never have seen this post if it had not been on an aggregator, thus vindicating point one.

ah AH! :-)

It is odd how things can come around. [..]

How true. It seems that it’s not only impossible to know when fame will strike, it’s also almost guaranteed to come from an angle that would never have been expected. :-)


Nice story and very well written! You should write a book. And when you do, let me know, and I’ll show you where all my code snippets are! :-)

Yanick Champoux
December 4, 2009 3:10 pm

>Nice story and very well written!

Thanks! :-)

>You should write a book.

Well, aaaactually:

Although I doubt you’ll find a lot of code there. :-)


Leave a Reply

Your email address will not be published. Required fields are marked *