Monday 9 April 2012

Perl QA Hackathon

Last weekend I was in Paris for the Perl QA Hackathon, a free of charge coding workshop for people involved in Quality Assurance, testing, packaging, CPAN, and other related projects.

I had the best time, met a lot of old friends and made several new ones as well. And we got so much done! It's amazing the amount of work you can do just by sitting next to fellow hackers with the same goals. Coding, debugging, design, feature requests, decision-making, if you had questions or needed help or feedback, all you had to do was look around the room and find the authors/maintainers for a quick tête-à-tête.
Schwern and Apeiron looking at some code
The hackathon was responsible for over 1 thousand man-hours of work on the Perl toolchain ecosystem in just 3 days, and none of that would be possible without all the great companies and organizations supporting the event: The City of Science and Industry,, Dijkmat, DuckDuckGo, Dyn, Freeside Internet Services, Hedera Technology, Jaguar Network, Mongueurs de Perl, Shadowcat Systems Limited, SPLIO, TECLIB’, Weborama, and $foo Magazine. There were also a lot of amazing people who made donations themselves, like Martin Evans, Mark Keating, Prakash Kailasa, Neil Bowers, 加藤 敦 (Ktat), Karen Pauley, Chad Davis, Franck Cuny, 近藤嘉雪, Tomohiro Hosaka, Syohei Yoshida, 牧 大輔 (lestrrat), and Laurent Boivin. Thank you!

Many thanks are also in order to Laurent Boivin (elbeho), Philippe Bruhat (BooK) and the Mongueurs de Perl, who did an incredible job organizing the event and hosting/feeding us. Merci beaucoup! :-)

You probably already read about some of the great things that happened there. I guess it's my turn to share:

I got there thursday night, after just a couple of minutes lost at Gare du Nord trying to find the right Metro track, nothing my poor french (and a lot of pointing at maps/signs) couldn't solve. I shared the hotel room with Leon Timmermans, who arrived just a few minutes after I had settled in. Turns out Leon is not only a great Perl hacker, but also a very nice guy.

I was a little apprehensive about waking up in time - I want to say "jetlag" here, but truth is I'm just not really a morning person. Fortunately, the excitement of having a joint hacking session with several of my Perl heroes was much greater than my will to stay in bed.

After talking to a few people and finding a nice spot to settle, I was ready to start hacking. I've been meaning to try and add CPAN Testers' support to Miyagawa's great cpanminus for quite a while now, and as it turned out so did he! We talked about some of the details and he was kind enough to help me through part of the cpanminus source code, as we discussed the implementation details.

The first draft of the build.log parser was finished on that same day, so all I had to do was send the email, push things to CPAN and move to my next target, right? Wrong!

As it happens, the CPAN Testers is much more than what is exposed to module authors and users. Its amazing reports and statistics are the result of a delicate and intricate mix of modules, protocols and systems that have to work on all sorts of environment and talk to each other all the time. I have the utmost respect and admiration for people like Barbie, Andreas König, David Golden, BinGOs and Ricardo Signes, and this only increased as I dug deeper and deeper on CPAN Testers' internals.

David and Barbie patiently explained to me all the bits and pieces I needed to know, and about how a lot of the things that should be common to all CPAN Tester's clients were currently scattered around, some even with different implementations, and how great it would be if all clients - including my new cpanminus one - could share all that from a since module. They wanted to do this since the QA Hackathon in 2009, but never got around to it. I got a round tuit :-)
If we could pull this off, it would not only mean life getting much easier for the CPAN Testers' clients, but also that we'd finally be able to create a next generation system to take full advantage of the power of Metabase, sending even more information (and in a much more structured manner) to the infrastructure.


This module aims to provide common utilities to CPAN Tester's clients, populating all Metabase::Facts and getting them ready to be sent via Test::Reporter. It even composes the legacy email for you with the data you provide. Code is already on github, and I'll push it to CPAN as soon as it's stable and ready for consumption.


As work on CPAN::Testers::Common::Client started to take shape, I was able to plug it into the build.log parser and see it come to life. Code is pretty raw at this point as I want to make sure it's doing its thing correctly before making an actual application out of it - and before sending data to the servers! If you want to help, I encourage you to try it out and tell me whether it worked or blew up. I can be found on as "garu", or you can just file a bug report (in which case, please attach the unparsable build.log file if you can).

Here's how to do beta-test it:

1. download and install CPAN::Testers::Common::Client from github;
2. download App::cpantesters from github (no installation yet);
3. mkdir /tmp/reporter

After that, just use cpanm to install modules as you normally would. After each attempt, whether it passed or failed, go to App::cpantesters' base directory and do:

   perl -Ilib bin/

You should see some debugging info on the terminal, and after it's done you can see the reports it generated in /tmp/reporter. The files are plain text, so just open them in your favourite text editor and make sure everything seems ok!


The modules above are not ready for general public consumption by the time of this writing - which is why they write to disk instead of sending to CPAN Testers. I still need to coordinate with Andreas whether the email itself is parseable, and with him, Barbie, David and BinGOs as to adapt the CPAN Testers toolchain to use CTCC, send/receive the data from new Metabase Facts, and maybe extracting even more "moving parts" into CTCC, and now that the QA Hackathon is over it might take a bit more time. But it was already a great step forward!

All work and no play?

Every night after the hackathon we'd get together for dinner and hung out afterwards. I got a chance to see a 3D printer in action, play with the new Galaxy Tab, talk like a pirate (Arrrr! Thanks Wendy!), drink some Chartreuse, give a whole new meaning to my cleric's "turn undead" ability during a very cool Role Playing session, and travel from Stalingrad to Oberkampf (you had to be there).

I also learned a lot just by listening to some of the conversation that went by, and got a chance to talk to some really smart people about their very cool projects, some which I might even tackle in the near-ish future.

Oh, and yes. There were pictures =)

See you next year in the UK!