The PITA Threshold: GitHub vs. CPAN
I recently attended an excellent talk by GitHub founders, about the history and rapid success of GitHub. The talk was highly entertaining and informative, and also brought forth a concept I've often encountered but didn't have a name for. As the time of this writing, there are only 61 Google hits and 22 Yahoo! Search hits for it: the pain-in-the-ass threshold.
The Pain-In-The-Ass threshold is where one draws the line and says "I give up" after making a certain amount of effort.
In the particular case of GitHub, what propelled its tremendous success was the ease with which a user could contribute to a project. The talk showed how after several projects moved from Google Code to GitHub, their contributions simply skyrocketed. That was because casual contributors could now easily fork the project, make their changes, then issue a pull request. With Google Code, making a contribution was much more complicated.
- Has been online for about a year
- 46,000 public repos
- 17,000 in the last month
- 6,200 have been forked at least once
- 4,600 merged from fork
- 75% of forked projects have work contributed back
- 18,000 projects with at least one watcher
- 25% get outside contributions
- 90,000 unique public repositories,
- of which 10,000 in the last month
- 12,000 repositories have been forked at least once,
- for a total of 135,000 repositories.
If you just to preserve existing newlines but...
It's a one-word typo. But this is how long it took me to attempt to fix it:
- find the module author
- e-mail him
- wait a day - no reply
- go on #p5p, where I was told that he hasn't been heard of in a while
- scour the Internet for his other e-mail addresses
- e-mail him again
- get some distracted reply
Since Text::Wrap is in core, I then took the other route, and in roughly 10 minutes,
- I forked the Perl GitHub repo
- patched the typo
- committed, pushed, and issued a pull request
If the example above doesn't convincingly explain why I'm proposing that, here's my current conundrum:
I was using Test::Differences for its table output format, which is very useful for when you have two large pieces of text that don't match and you need to find out exactly how. The only problem with Test::Differences is that it can't wrap lines that are too long, and the table output in those cases looks completely messed up in the terminal.
It turned out that I wasn't the first to encounter the problem - someone else submitted a comprehensive patch for a maximum width option in the Text::Diff dependency, 3 years ago. Text::Diff has 6 bugs in total on RT, one of which has been submitted in 2004 and is an easy fix. However, Text::Diff hasn't been updated since 2002!
This, I think, illustrates CPAN's PITA threshold problem again. Here is a project that has generated interest, but which is now stuck, because of how CPAN contributions work. Quote:
In some circumstances, we can grant co-maintenance permissions to you or others if the current maintainer of a module has entirely disappeared. You have to understand that is not a decision we make lightly. We are essentially giving write access to somebody else's work to third parties without explicit consent from the missing author. Since almost all code on CPAN has a free license, this is likely unproblematic from a legal point of view, but any violation of a contributor's trust in the PAUSE/CPAN mechanisms is a serious blow against the work of everybody who contributes to CPAN. For this reason, we try to tread very lightly, make the least possible use of the administrative privileges and attempt to protect voluntary contributors like yourself or the author of the module at hand from any unnecessary burden.
This is a very respectful policy, except that it seems written 15 years ago, when social coding was way less popular, and the quest for personal glory trumped the desire to collaborate. It also assumes that the module author must have a really hard time accepting contributions. With CPAN though, this is quite true. As a module author, one has to:
- keep an eye on RT in case its email notifications end up as spam
- review the ticket
- no patch? -> forget about the issue (often)
- if there's a patch, download it, try to to apply it (that is, if you're not simply oblivious to it)
- build a new module version and publish it
Now if module sources were on GitHub, any contribution is ALREADY in the form of a patch. In case of a typo like the one in Text::Wrap, the author can even accept it online with one click. For a more complex patch, with 5 git commands, the module maintainer can check out the patch and merge it in the mainline after reviewing it and passing tests:
$ gh network fetch $ git checkout -b testpatch $ git merge user/branch $ ... tests ... $ git checkout master $ git merge testpatch
Under the PITA Threshold? You bet.
In the meantime, I found out that there exists a recent project aiming to "make trivially easy the process of grabbing any distribution off CPAN, stuffing it in a local git repository and, once gleeful hacking has been perpetrated, sending back patches to its maintainer": Git::CPAN::Patch.
Showing changes from previous revision.