New lease of life for Yahoo::Search

I’ve recently started looking into geocoding in perl. We’re currently using some old hand-coded logic to query the Yahoo Search API. I wanted to switch to Geo::Coder::Yahoo but I noticed that that depended on Yahoo::Search which hadn’t been updated since March 2007 and had accumulated a number of bug reports (which may well be closed by the time you read this).

Several related to the fact that Yahoo::Search didn’t handle Unicode properly when using its default internal XML parser (instead of the optional XML::Simple which does the right thing, but slowly).

What happened next makes a nice little example of getting things done in the Open Source world… Continue reading

NYTProf v4 – Now with string-eval x-ray vision!

I released Devel::NYTProf v3 on Christmas Eve 2009. Over the next couple of months a few more features were added. The v3 work had involved a complete rewrite of the subroutine profiler and heavy work on much else besides. At that point I felt I’d done enough with NYTProf for now and it was time to focus on other more pressing projects.

Over those months I’d also started working on enhancements for PostgreSQL PL/Perl. That project turned into something of an epic adventure with more than its fair share of highs and lows and twists and turns. The dust is only just settling now. I would have blogged about it but security issues arose that led the PostgreSQL team to consider removing the plperl language entirely. Fortunately I was able to help avoid that by removing Safe.pm entirely! At some point I hope to write a blog post worthy of the journey. Meanwhile, if you’re using PostgreSQL, you really do want to upgrade to the latest point-release.

One of the my goals in enhancing PostgreSQL PL/Perl was improve the integration with NYTProf. I wanted to be able to profile PL/Perl code embedded in the database server. With PostgreSQL 8.4 I could get the profiler to run, with some hackery, but in the report the subroutines were all __ANON__ and you couldn’t see the source code, so there were no statement timings. It was useless.

The key problem was that Devel::NYTProf couldn’t see into string evals properly. To fix that I had to go back spelunking deep in the NYTProf guts again; mostly in the data model and report generation code. With NYTProf v4, string evals are now treated as files, mostly, and a whole new level of insight is opened up!

In the rest of this post I’ll be describing this and other new features.

Continue reading

Relaxed Perl Myths in Ann Arbor

Speaking of belated screencasts, I also haven’t blogged about my visit to the Ann Arbor Perl Mongers in Michigan.

The Ann Arbor Perl Mongers group was being restarted (after a 10 year gap) by the TigerLead tech team. I’m working for TigerLead and was going to be in Ann Arbor for a meeting so they asked me to give a couple of talks: Devel::NYTProf and Perl Myths.

I like giving talks at events like these because there’s no set time limit and the audience is more relaxed (the free pizza probably helped).

I’ve uploaded a screencast of the Perl Myths talk. As usual it covers the Perl jobs market, CPAN, best practices, power tools, community and perl6. At almost 1 hour 20 minutes it’s significantly longer than my usual, more rushed, 40 minute version given at conferences and includes 15 minutes of Q & A at the end.

Screencasts from the Italian Perl Workshop 2009

I’ve just been updating the page where I keep links to my presentations and noticed that, not only had I not updated the section for the 2009 Italian Perl Workshop, but I hadn’t even uploaded the screencasts I’d made.

So, with apologies for the delay, here’s my entry for IPW09, with the links to the uploaded screencasts:

had a great time at IPW08 and was delighted to be invited back for IPW09, which was another great success. My contributions were two talks. The first was called “DBI Oddmenti” and covered DBD::Gofer (16 minute screencast), DBI::Profiler (7 minute screencast), and DBDI a key component of a future DBI for Perl 6 (5 minute screencast). The second was “State-of-the-art Profiling with Devel::NYTProf” (40 minute screencast).

With 30 talks from 20 speakers on 2 tracks, IPW09 was another success for the Italian Perl Association, which was formally incorporated at the event. I’m confident that YAPC::EU 2010 is in safe hands.

I’m really looking forward to YAPC::EU. We’re combining the conference with our family summer holiday. We’ll be staying in a cottage in the village of Calci a few miles outside Pisa.

“Help Saving MySQL!”

Michael “Monty” Widenius, the creator of MySQL, has asked me, among many others, to help spread the word about an imminent decision by the European Commission on the Oracle merger with Sun.

Why should you care? Monty’s view, along with others, is that Oracle has much more to gain from neglecting MySQL than it has to gain from enhancing it.

Why should you act now? It seems that “Oracle has instead contacted hundreds of their big customers and asked them to write to the EC and require unconditional acceptance of the deal.” To balance this the European Commission needs to hear voices from the other side of the story. The European Commission is due to make a decision in just a couple of weeks.

What should you do? Read Monty’s post and act on it, if you so choose.

Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

I’m working with PostgreSQL for my day job, and liking it.

We’re fairly heavy users of stored procedures implemented in PL/Perl, with ~10,000 lines in ~100 functions (some of which have bloated to painful proportions). This creates some interesting issues and challenges for us.

There’s a window of opportunity now to make improvements to PL/Perl for PostgreSQL 8.5. I’m planning to work with Andrew Dunstan to agree on a set of changes and develop the patches.

As a first step along that road I want to map out here the changes I’m thinking of and to ask for comments and suggestions.

Continue reading

The Voyage

We saw Johnny Duhan in a very small, intimate, concert in Ennis last year. Last weekend we saw Christy Moore in concert in Limerick. This song, written by Johnny Duhan and sung by Christy Moore, has always struck a cord with me.

I am a sailor, you’re my first mate
We signed on together, we coupled our fate
Hauled up our anchor, determined not to fail
For the hearts treasure, together we set sail

With no maps to guide us we steered our own course
Rode out the storms when the winds were gale force
Sat out the doldrums in patience and hope
Working together we learned how to cope

Chorus:
Life is an ocean and love is a boat
In troubled water that keeps us afloat
When we started the voyage, there was just me and you
Now gathered round us, we have our own crew

Together we’re in this relationship
We built it with care to last the whole trip
Our true destination’s not marked on any charts
We’re navigating to the shores of the heart

Chorus 2x

– Johnny Duhan

Here’s a video of Christy Moore and Johnny Duhan talking about the song and singing it together.