Don't Be Rude (and welcome to meta)

meta is the “meta” blog for blogs.perl.org. It deals with issues surrounding this blog and not about Perl itself.

Recently we’ve seen some strong comments from a few people and we (Dave Cross, Aaron Crane, Aristotle and Ovid) have discussed what to do about it. We’re pretty much in firm agreement that the right answer is to do nothing. For now. All of us agree that censorship is not something we care for but there have been some comments that are teetering over the line and are making blogs.perl.org a less pleasant place to be. So we refer you to the Blogger’s Code of Conduct

  • Responsibility for our own words
  • Nothing we wouldn’t say in person
  • Connect privately first
  • Take action against attacks
  • a) No anonymous comments OR b) No pseudonymous comments
  • Ignore the trolls
  • Encourage enforcement of terms of service
  • Keep our sources private
  • Discretion to delete comments
  • Do no harm
  • Think twice — post once

Why my()?

Bruce Gray will give a talk at YAPC::NA 2012 described as:

Why do you use “my” instead of “our”? When should you use “our”? Why not “use vars”?

Why does `use strict` catch “$typo”, but not “$Data::Dumper::typo”?

Why do *you* need to care about namespaces? And what are they really?

Why does your module name need to agree with your “package” statement? What happens if it doesn’t?

Most of the answers are easy to learn, but much harder to remember, so many Perl programmers end up doing the right thing only through repeated references to examples and docs.

The answers become both clear *and* memorable in this talk, via a rapid walk through the history of Perl. 

As we skim the timeline of key language elements, you will see the problems they were needed to solve, and understand where and how they should be used.

[From the YAPC::NA Blog.]

Missing cygwin1.dll Simple Fix: Put Cygwin in PATH

If you try running Cygwin from another program (say, the Ponderosa tabbed terminal emulator) and you get a "missing cygwin1.dll" error, you should check that you have put Cygwin into your Windows PATH environment variable. Cygwin does not do this by default.

(Documented in the Cygwin manual "Chapter 2. Setting Up Cygwin", section "Environment Variables" (but missed by me on the first pass).)

whack-a-mole

find the perl subroutine most in need of refactoring

fix it

repeat... virtuous whack-a-mole with https://github.com/wickline/whack

The Perl April Fools' Gag That Could Have Been

On my last entry, I told you that I have had an idea for a Perl-related April Fools' day gag, and that I would possibly reveal it on 2-April with a big disclaimer on top, just for kicks. Well, it's already 9-April, but I guess it is better late than never, right?

OK, here is the big disclaimer: THIS IS A JOKE. IT'S NOT SERIOUS. SO RELAX - IT IS NOT GOING TO HAPPEN SOON (AND HOPEFULLY WILL NOT EVER HAPPEN)..

OK, now let's move on to the gag itself:

Mojito Undocumented

Mateu Hunter will give a talk at YAPC::NA 2012 described as:

This talk will walk through some of the major features of Mojito, a web document system, that have not yet been documented:

  • nested formatters (markdown, POD, HTML etc)
  • document collections (grouping, ordering)
  • advent calendar view
  • pastie like support
  • commit diffs
  • CPAN recent synopsis feed

In addition, we’ll cover the design of Mojito which builds upon Modern Perl jewels such as Plack, Moo and Web::Simple

[From the YAPC::NA Blog.]

Vim report for Devel::Cover (Perl QA Hackathon) - part 2

At last week's QA Hackathon in Paris I put together a Vim report for Devel::Cover to show coverage information as Vim signs. See https://blogs.perl.org/users/paul_johnson/2012/03/vim-report-for-develcover-perl-qa-hackathon.html

Whilst nice, and somewhat useful, this was very much a proof of concept. It only worked for statement coverage, it wasn't particularly clever, nor was it particularly pretty.

I've just released Devel::Cover version 0.86 which solves a number of these problems. It shows all types of coverage data (that Devel::Cover knows about), it seems to be pretty usable (at least in the way I use vim), and it provides a way to customise it to make it pretty (I'm fairly happy with the way mine looks).

cov1.png

In this image you can see some of the features. The column on the left-hand side shows the coverage information. Five coverage criteria are displayed as:

P - Pod coverage
S - Statement coverage
R - Subroutine coverage
B - Branch coverage
C - Condition coverage

Dancer: Getting to Hello World

R Geoffrey Avery will give a talk at YAPC::Europe 2012 described as

When attempting to learn Dancer I ran into the problem that all the documentation started from "Here is a 'Hello World' script". But that was assuming many things were set up and configured and that just was not true, at least not on my server.

This is a collection of what I learned.

Painless RSS processing with Mojo

I wasn't looking forward to dealing with this XML feed because I hate anything that deals with XML. However, with Mojo's DOM stuff, I don't even have to know it's XML. Here's the interesting bits from a program that's not much larger than this snippet:

use Mojo::UserAgent;

my $ua = Mojo::UserAgent->new;
my $response = $ua->get( $feed_address )->res;

my @links = $response->
dom( 'item' )->
grep( sub { $_->children( 'title' ) !~ /.../ } )->
map( sub {
$_->
children('guid')->
map( sub { $_->text } )
} )->
each
;

Data::Printer - A New Look on Dumping Variables

Brenno de Oliveira will give a talk at YAPC::NA 2012 described as:

Data::Printer is a simple and powerful solution to viewing your complex Perl data structures.

Contrary to Data::Dumper and similars which stringify your data in a restrictive way so it can be eval’d back into your code, Data::Printer cares only about letting you easily see what’s in there using colors, filters, a lot of customization and no hassle.

In this talk I’ll showcase Data::Printer and walk through some of its main usage scenarios, customization, filters, and general tips for you to tame your variables!

[From the YAPC::NA Blog.]

MetaCPAN at the QA Hackathon

One week ago, I happily had the opportunity to be at the QA Hackathon in Paris. In the past I had been vaguely aware that the hackathon exists and I had some shadowy idea of what goes on at such a thing, but I just never considered getting involved. I didn't think it was very much related to the sorts of things I work on. Happily, it turns out that I was wrong.

First off, thanks!

CPAN Testers Summary - March 2012 - Brain Salad Surgery

So March ended on quite a high, following the 2012 QA Hackathon. With so many key people in one room, it was impressive to see how much got done. You can read reports from myself (parts 1 & 2), David Golden, Ricardo Signes, Miyagawa, Paul Johnson, Ovid and Dominique Dumont, and there were several tweets too, during and after the event, and the wiki also has a Results page. There was a significant number of uploads to PAUSE during and after the event too. And CPAN Testers has benefited hugely from the event.

Yet Another Society Website

So I did a search for Yet Another Society today and the first hit is http://www.yetanother.org. (No real surprise there.) I click the link and (surprise!) am greeted by a page that was last updated in 2003 and every link that doesn't point to static content is broken.

Who maintains http://www.yetanother.org these days? I emailed kevinm@yetanother.org (the only email address found) but it bounced.

At a minimum, it should redirect to http://www.perlfoundation.org. Ideally some of the original content would remain that explains the relationship between Yet Another Society and The Perl Foundation as well as relevant links to other parts of the Perl community.

Hackathon Extended!

Due to a cancellation by someone else using the building, we’ve been able to add an additional 40 seats to the Hackathon on June 11th and 12th before YAPC::NA 2012. So if you can make it into town early, and want to stop by, then by all means do so. We’ll officially have room for you. 

[From the YAPC::NA Blog.]

Behavior Driven Development in Perl

Testing is hard - not necessarily to do, but to start with - it is so hard, that yet I haven't started writing tests for my code and I considered this to be a handicap for me as a developer.

I've heard about this Behavior Driven Development stuff ( BDD ) and I said to give it a try.

After some research to see what is available for Perl, I found Pete Sergeant's Test::BDD::Cucumber module and although it's only at version 0.05, it is usable and functional.

Comming back to BDD, the main idea behind it is that your user stories are your tests. As an implication, you could get to the stage where your business analysts write your tests (with little, or even no developer intervention).

It is easier to be critical than correct

Ulrich Wisser will give a talk at YAPC::Europe 2012 described as

Perl::Critic can and should be used to greatly improve the quality of any Perl code. The only disadvantage of Perl::Critic is that it provides no history. I will show how .SE (the Swedish country code top level domain registry) uses Perl::Critic to improve code quality and how we mitigated Perl::Critic's disadvantage. Bonus: How to convince management to fund a Perl::Critic evaluation and improvement of your codebase.

Giving to TPF through Capital One

I'm not begging for money so much as begging other people to beg for money. Well, I'm not even doing that. I just noticed one way that people can give money to a charity.

Donate to YET ANOTHER SOCIETY with the Capital One No Hassle Giving Site.

This one goes to Yet Another Society, better known as The Perl Foundation

I just started using a Capital One credit card. If you don't travel internationally, you probably don't care about a card that has no foreign transaction fees. My particular version came with cash back instead of airline miles, so I looked into what rewards I could get. The rewards are lame, but there was a button to donate my "cash" to a charity without the redemption fees and so on. They even let me make a widget so other people could donate to that charity, including Yet Another Society, even though I don't represent that charity in any way.

I imagine similar credit cards do the same sort of thing, so maybe you have a bit of "cash" sitting there doing nothing. It's not enough to get something good, so it languishes. Meanwhile, there's a bug in Perl feeling really lonely because nobody will play with him.

YAPC Game Night

As many of you know, cPanel is sponsoring a game night at YAPC::NA 2012 with food and drinks for all.

To ensure that everyone has something to play The Perl Foundation, LiquidWeb, and The Game Crafter have teamed up to make custom Perl & YAPC themed playing cards that will be yours to take home as a keepsake of the event. The Game Crafter will also be providing a small amount of mini-poker chips in case any of you wish to start an impromptu poker tournament. 

All that said, we’d like to encourage you to bring your own games for YAPC Game Night. We know some people will be running the Pathfinder Role Playing Game. Others have said they’d like to do a LAN party perhaps playing Diablo III, Team Fortress 2, Left4Dead 2, or Portal 2. And others still have brought up the idea of various board games like Settlers of Catan, Apples to Apples, Carcassonne, Trivial Pursuit, Pandemic, Bang!, and more. Whatever your flavor, bring a game to YAPC!

[From the YAPC::NA Blog.]

Parse::RecDescent and number of elements read on the fly

I recently had to develop a small parser for some coworkers and I turned to Parse::RecDescent for handling it. The grammar was not particularly difficult to address, but it had some fields that behave like arrays whose number of elements is declared dynamically, so it's not generally possible to use the repetition facilities provided by Parse::RecDescent, because they require the number of repetitions to be known beforehand.

When the speed of light is too slow

I'm currently working on a Real Time Bidding system. Basically, when someone visits a Web page, that page may cause a bid request to be sent out to multiple ad bidders and they bid on who gets to place the ad. For my system, I have to respond withing 100 milliseconds to be eligible to participate in the auction. That's when life gets interesting.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.