<?xml version="1.0"?>
<?xml-stylesheet href="/transform" type="text/xsl"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bs="http://purl.org/ontology/bibo/status/" xmlns:ci="https://vocab.methodandstructure.com/content-inventory#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" lang="en" prefix="bibo: http://purl.org/ontology/bibo/ bs: http://purl.org/ontology/bibo/status/ ci: https://vocab.methodandstructure.com/content-inventory# dct: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# xhv: http://www.w3.org/1999/xhtml/vocab# xsd: http://www.w3.org/2001/XMLSchema#" vocab="http://www.w3.org/1999/xhtml/vocab#" xml:lang="en">
  <head>
    <title property="dct:title">Pull Requests</title>
    <base href="https://doriantaylor.com/pull-requests"/>
    <link href="document-stats#EgTSvlmSnCV-7eraVVXvZI" rev="ci:document"/>
    <link href="elsewhere" rel="alternate bookmark" title="Elsewhere"/>
    <link href="this-site" rel="alternate index" title="This Site"/>
    <link href="http://purl.org/ontology/bibo/status/published" rel="bibo:status"/>
    <link href="" rel="ci:canonical" title="Pull Requests"/>
    <link href="lexicon/#EzqXIsriaILFcWjXdS7FbI" rel="dct:audience" title="Software Developer"/>
    <link href="person/dorian-taylor#me" rel="dct:creator" title="Dorian Taylor"/>
    <link href="person/dorian-taylor" rel="meta" title="Who I Am"/>
    <link about="./" href="3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="./" href="f07f5044-01bc-472d-9079-9b07771b731c" rel="alternate" type="application/atom+xml"/>
    <link about="./" href="this-site" rel="alternate"/>
    <link about="./" href="elsewhere" rel="alternate"/>
    <link about="./" href="e341ca62-0387-4cea-b69a-cdabc7656871" rel="alternate" type="application/atom+xml"/>
    <link about="verso/" href="3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="verso/" href="this-site" rel="alternate"/>
    <link about="verso/" href="elsewhere" rel="alternate"/>
    <meta content="pull-requests" datatype="xsd:token" property="ci:canonical-slug"/>
    <meta content="A pull request ensures a happy ending." name="description" property="dct:abstract"/>
    <meta content="2012-09-06T04:59:09+00:00" datatype="xsd:dateTime" property="dct:created"/>
    <meta content="pull-requests" property="dct:identifier"/>
    <meta content="2012-09-06T04:58:12+00:00" datatype="xsd:dateTime" property="dct:issued"/>
    <meta content="2012-09-06T05:07:22+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2012-09-07T15:34:25+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2022-05-31T04:18:52+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2022-05-31T15:10:50+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta about="person/dorian-taylor#me" content="Dorian Taylor" name="author" property="foaf:name"/>
    <meta content="summary" name="twitter:card"/>
    <meta content="@doriantaylor" name="twitter:site"/>
    <meta content="Pull Requests" name="twitter:title"/>
    <meta content="A pull request ensures a happy ending." name="twitter:description"/>
    <object>
      <nav>
        <ul>
          <li>
            <a href="betamaxed" rev="dct:references" typeof="bibo:Article">
              <span property="dct:title">Betamaxed</span>
            </a>
          </li>
          <li>
            <a href="//dorian.substack.com/p/setting-the-tone-for-an-anti-platform" rev="dct:references" typeof="bibo:Article">
              <span property="dct:title">Setting the Tone for an Anti-Platform</span>
            </a>
          </li>
          <li>
            <a href="document-stats#EgTSvlmSnCV-7eraVVXvZI" rev="ci:document" typeof="qb:Observation">
              <span>urn:uuid:8134af96-64a7-4095-8fbb-7ab695557bd9</span>
            </a>
          </li>
        </ul>
      </nav>
    </object>
  </head>
  <body about="" id="EoaqDiUApExufe_3liNk1L" typeof="bibo:Article">
    <p>The <a href="https://help.github.com/articles/using-pull-requests" title="Using Pull Requests &#xB7; github:help" rel="dct:references">pull request</a> easily the best process to emerge around <a href="http://en.wikipedia.org/wiki/Distributed_revision_control" title="Distributed revision control &#x2014; Wikipedia" rel="dct:references">distributed version control systems</a>, themselves easily the best thing to happen to version control, and one of the better things to happen to software development in general. What makes pull requests so powerful is that they make it <em>stupidly easy</em> for software authors to integrate improvements to their code. Moreover, distributed version control makes it stupidly easy for <em>me</em> to just make their code do what I want instead of cajoling them into doing it.</p>
    <p>Instead of begging in email lists, forums and bug trackers, trying to keep repositories synced, and sending diffs around, you just:</p>
    <ol>
      <li>Fork the author's repository on <a href="https://github.com/" title="GitHub" rel="dct:references">GitHub</a> or <a href="https://bitbucket.org/" title="BitBucket" rel="dct:references">BitBucket</a></li>
      <li>Fix and/or augment the code</li>
      <li>Write a test to prove it</li>
      <li>Push the repository back</li>
      <li>Issue a pull request to the author to merge your changes.</li>
    </ol>
    <p>If your changes don't suck, and the author isn't a knob, you will get your changes integrated. Bonus: an unwritten rule, baked into the infrastructure of the system, is that you're not on the hook to maintain them. We're talking about a one-time effort to irrevocably shape a tiny corner of the world in your image.</p>
    <p>Here is a list of open-source software&#x2014;so far only <a href="http://www.perl.org/" title="The Perl Programming Language - www.perl.org" rel="dct:references">Perl</a> modules&#x2014;that I've augmented this way:</p>
    <dl>
      <dt><a href="https://github.com/doriantaylor/XML-LibXML-LazyBuilder" rel="dct:references">XML::LibXML::LazyBuilder</a></dt>
      <dd>This is basically Perl's answer to Python's <a href="http://lxml.de/" title="lxml - Processing XML and HTML with Python" rel="dct:references">lxml.etree</a>, i.e. taking most of the work out of writing XML. The only problem is that it couldn't do namespaces or create things like comments or processing instructions, severely hampering its utility. So I fixed it.</dd>
      <dt><a href="https://github.com/doriantaylor/perlrdf" rel="dct:references">RDF::Trine</a></dt>
      <dd>The premier Perl RDF framework exhibited some funny behaviour in its parser, so I fixed it.</dd>
      <dt><a href="https://github.com/doriantaylor/text-vcard" rel="dct:references">Text::vCard</a></dt>
      <dd>This library for handling vCards didn't automatically encode or decode base-64 for things like images, so I fixed that.</dd>
      <dt><a href="https://bitbucket.org/doriantaylor/p5-rdf-rdfa-parser" rel="dct:references">RDF::RDFa::Parser</a></dt>
      <dd>This RDFa parser had some nasty bugs that were introduced with newer versions of it dependent libraries, so I fixed them.</dd>
      <dt><a href="https://bitbucket.org/doriantaylor/perl-xml-libxslt" rel="dct:references">XML::LibXSLT</a></dt>
      <dd>The go-to Perl XSLT processor didn't expose the <code>output_method</code> function which was in the C API, so I added it.</dd>
    </dl>
    <h2>A Note on Etiquette</h2>
    <p>Often the most compelling argument on how software ought to behave is to <strong>Just Fix It&#x2122;</strong> and ship the code. This isn't to say, however, that we should expect that authors should cooperate just because we wrote a patch. Plus, as an assurance that what you've written isn't garbage, and to further abridge the effort on the part of the original author, it is essential to include unit tests that cover your changes.</p>
    <h2>I Am Having Fun With This</h2>
    <p>The inception of collaborative development sites and the pull request has inspired me to don the hat of the open-source developer more often than I had expected. I am finding myself not only gaining materially from doing so, in the form of abridging my paid work, but also having a direct hand in making things better for everybody, which I appreciate.</p>
    <aside role="note" id="EKDlVxotpRAlOKaqUn-D7K">
      <p>If there was a VHS and a Betamax of the two major contenders in the code-sharing space, they would be GitHub and BitBucket, respectively. Unfortunately I've been using <a href="http://mercurial.selenic.com/" title="Mercurial SCM" rel="dct:references">Mercurial</a> since about 2007, since at the time I needed to interact with people who used Windows, which <a href="http://git-scm.com/" title="Git" rel="dct:references">Git</a> didn't support. Also, since Mercurial is written in <a href="http://www.python.org/" title="Python Programming Language &#x2013; Official Website" rel="dct:references">Python</a>, it was much cleaner to program for than Git. It was clear, however, that the two systems basically do the same thing. When GitHub gained steam, I was concerned I had backed the wrong horse until I discovered <a href="http://hg-git.github.com/" title="HG-Git Mercurial Plugin" rel="dct:references">Hg-Git</a>, which is an adapter from Mercurial to Git, enabling me to use the proverbial Betamax tapes in the proverbial VHS player, which clinched it for me.</p>
    </aside>
  </body>
</html>
