<div dir="ltr"><div style><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">I sent most of the below off-list to Glyph earlier, as my comments were a bit half-assed and I'm not really (or not at all) a Twisted contributor. Glyph suggested I mail them to the list anyway, and to try adding some more concrete reasons for being +1 on the suggested change.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">---  [ Original mail ]</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></span></div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">I'm +1 bigtime on moving towards git/github. I really dislike git, but it gets the job done, and github is awesome. Github changed the way we work, it removed a ton of friction and overhead in reviewing (you're right, the click to comment on a diff is really convenient). I don't have too many complaints about the ticket system, but sure it could be better. The really impressive thing about Github is how incredibly quickly they move. It gets better and better and better all the time.  We migrated away from svn + trac to bzr + launchpad and finally to git + github. The latter blows the former away massively, IMO.  I'm not trying to give formal quantitative feedback, just my subjective opinion.  I've also felt for ages that there's too much overhead in trying to contribute to Twisted. I'm a lazy/selfish kind of member of the Twisted community, and when I'm faced with the thought of having to set up all that old-fashioned (from my POV) machinery like svn and combinator and what-not to think about really contributing or running tests or whatever, some part of me just thinks "no, no, no, I'm not going back to that world".  (see above re lazy, if that wasn't clear).</span><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">OK, sorry for a bit of a rambling subjective mail. I'm sure you've heard all this before. The funny thing about these changes is that before you make them you always think things are pretty much fine. After you make them you wonder how you ever lived with the old system.  That may not be the case here for you or for you & the Twisted community, but it certainly was for me with the move to github.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">---</div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Glyph> Maybe you could be a bit more specific as to the steps that Github eliminates, and _concrete_ ways in which it is more efficient.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">I'd say there are probably dozens of ways in which Gthub improved things for us. Many of them are minor, of course, but they all add up and the usability difference between Github and Trac or Launchpad is extreme.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Ease of use and the anticipated amount of effort something is going to take are very important aspects of tools, in my opinion. If you know some action - like starting a review or branching or merging or commenting etc. - is going to take a certain amount of effort, that correlates (unless you're being paid or doing this out of some extreme reason, like being a core dev on a project) with how likely you are to do it. (E.g., making branches - it was possible in sccs, in rcs, in cvs, in svn, but.... oh, the pain! When making branches *and merging them* became so extraordinarily simple and pain free, it changed the way people worked.)  As I said above, I'm a lazy/selfish Twisted onlooker. Many has been the time when I'd have been happy to chip in on something (e.g., last week someone was asking for some reviewing help) but the thought of getting the required machinery in place, and using it, even if it's just svn (ugh, ugh, ugh) stops me.  That's a feeling I've had about Twisted many times over the last years. It's the feeling I have when someone asks me to go back to helping them on some old perl code - you just don't wanna go there :-) It's ugly and not fun.  Sorry if these are wimpy reasons, but to me usability friction (real or perceived) is very important. </div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">A very nice thing about Github is that you can have conversations about the diff right on the page, inline, where the diff is shown. You don't need to download the branch, to use the command-line (and i LOVE the command line BTW), or to do anything like that. Github is smart enough to hide the discussion once a subsequent commit comes in that addresses the line being discussed (sure, that could go wrong but in practice it doesn't seem to).  One click to merge branches is great - in fact we made a rule that merging is always done via Github. Adding of milestones and labels to issues is smooth, as is viewing various simple subsets of issues. The project activity graphs in Github are very interesting. GFM (Github flavored markdown) is really easy to use and the results are attractive. Gists are great. It's nice being able to have a wiki that's also just a repo. I very much like the "pull requests are a place where discussion takes place" approach - as opposed to holding that pull requests are just where branches go when they're "finished" and ready to be merged. BTW, it's very interesting to read about how the folks at Github use Github themselves [1, 2]. The workflow we developed is very similar, only slightly more complex. If people want more examples, I can try to go more systematically through my usage of Github & say more.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">As mentioned above, Github moves (improves) incredibly quickly. They put pretty much every other project I know to shame (including all of mine) in terms of how fast they get stuff done and improve the product and how attractively it's done. In comparison, Trac and Launchpad felt static, butt-ugly, and like they virtually never improved. Github gets better underneath you all the time.  E.g., you happen to be sitting on a page looking at a pull request, and it updates dynamically without you needing to reload. The pull request is merged maybe, or the author pushes into the branch again, or conflicts with master get resolved by someone and the page updates. Little things, but they work damned well and make using the site a pleasure.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">I can't resist adding: a friend in IRC just said re this thread: "<span style="font-family:arial;font-size:small">2003 called and asked for their shitty tools back."</span></div>








<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Terry</div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">[1] <a href="http://scottchacon.com/2011/08/31/github-flow.html">http://scottchacon.com/2011/08/31/github-flow.html</a></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
[2] <a href="https://github.com/blog/1124-how-we-use-pull-requests-to-build-github">https://github.com/blog/1124-how-we-use-pull-requests-to-build-github</a></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jun 3, 2013 at 9:59 PM, Glyph <span dir="ltr"><<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Twisted developers,<div><br></div><div>This weekend I had a discussion with many Twisted developers, both local to and visiting San Francisco.  The topic came up of how to get more long-term contributors to participate more regularly in the project - particularly, doing code reviews, but also, developing and contributing to complex fixes and features that new contributors might not be able to tackle.</div>
<div><br></div><div>One suggestion that almost everybody made immediately was: we should use Github for code reviews.</div><div><br></div><div>In the past, I've heard this suggestion given mainly as a way to <i>contribute more code</i>, which does not appeal to me, since we are already swamped reviewing all the code that is currently being contributed.</div>
<div><br></div><div>This time, however, it's been pitched as a way to get people to <i>do more reviews</i>, which I'm keenly interested in.  Why would people do more reviews on Github?  In a nutshell, it's a lot less work.  Here are some reasons why:</div>
<div><br></div><div><ul><li>Instead of having to run 'force-builds' on the command line, or load a buildbot status page, Github has a way for a build system to report build success automatically, so you can see immediately within a pull request if the changes that it proposes are "good to merge".  You can see this at work with Travis here: <<a href="https://github.com/twisted/klein/pull/11" target="_blank">https://github.com/twisted/klein/pull/11</a>>.  Originally I thought that this was a Travis-CI feature, but have since learned that this is apparently easy - trivial even - to hook up to Buildbot, since it's a simple HTTP API to invoke when a build completes, and there is even some existing buildbot infrastructure (deployed by Django, among others) to automate it.</li>
<li>Instead of having to describe each patch location so that you can comment on it in a single message, if you want to put a comment on a particular part of a diff in a Github pull request, you can just click on it and start typing.</li>
<li>In addition to the diff, it's reasonably easy to see the code in context on the web, which is faster than getting it into one's local development environment.</li><li>If a review is successful, instead of having to have a local development environment, a committer can just hit the "approve" button and it's landed immediately.</li>
</ul><ul><li>Instead of having to read through all history ever to see what's still relevant, a pull request will hide comments that address outdated diffs, allowing the change author to easily see what remains.</li></ul>
</div><div><br></div><div>These advantages are not comprehensive, but they're the more significant ones I remember from this discussion.</div><div><br></div><div>A prerequisite for using Github for code reviews would be using Git rather than Subversion.  Luckily there's not much work to do in this area, thanks to Tom's excellent work on the Git import and automatic Github mirror.  As a bonus, by using Git instead of Subversion, we can start properly recording merge metadata.</div>
<div><br></div><div>In this discussion, Alex Gaynor pointed out that Django has a hybrid workflow where they still use Trac for bug tracking, and Github for code review.  We would therefore <i>not</i> need to come up with a way to migrate all of our tickets to Github issues (which seems, oddly, to be fairly unpopular even among those who like github a lot).</div>
<div><br></div><div>What would need to happen in order for this to take place?</div><div><br></div><div><ol><li>We'd need some consensus (hence this message).</li><li>We'd need to update the release process <<a href="http://twistedmatrix.com/trac/wiki/ReleaseProcess" target="_blank">http://twistedmatrix.com/trac/wiki/ReleaseProcess</a>> and our development documentation <<a href="http://twistedmatrix.com/trac/wiki/BasicGuideToContributingCode" target="_blank">http://twistedmatrix.com/trac/wiki/BasicGuideToContributingCode</a>> to refer to the relevant Git commands rather than Subversion commands.</li>
<li>We'd need a redirect from <<a href="http://twistedmatrix.com/trac/browser/" target="_blank">http://twistedmatrix.com/trac/browser/</a>> and <<a href="http://twistedmatrix.com/trac/changeset/" target="_blank">http://twistedmatrix.com/trac/changeset/</a>> that would point at <<a href="https://github.com/twisted/twisted" target="_blank">https://github.com/twisted/twisted</a>> and <<a href="https://github.com/twisted/twisted/commits/" target="_blank">https://github.com/twisted/twisted/commits/</a>> respectively.</li>
<li>We'd need a Github web hook that could poke Buildbot to kick off commits.</li><li>We'd need Buildbot integration to update Github pull requests with build results when builds complete.</li><li>We'd need someone to install git rather than bzr on all the buildbots, and update the configuration of the builders to get the code from a git rather than Subversion URL.</li>
<li>Someone will need to convert every open ticket in review to a pull request.</li></ol><div><br></div><div>I do anticipate some objections.</div><div><br></div><div>One objection is that each of the above tasks is going to take some work.</div>
<div><br></div><div>I am fairly confident that some of the people who have educated me here will step forward to volunteer to do it.  Please reply to this message if you'd like to volunteer, saying what you'd like to volunteer to do.  If not, then I guess that objection stands :-).</div>
<div><br></div><div>Another is that this might not be worth that investment of effort.  This is why it was nice to have Alex contributing to the discussion: Django did basically this very change (right down to the "Trac for tickets / Github for pull requests" distinction), at a much higher scale than we have, and as he described it the change was *well* worth it.</div>
<div><br></div><div>Another objection is that Github is proprietary software, and an externally-maintained service that we'd be depending upon.</div><div><br></div><div>One solution to the "proprietary software" thing is the availability of the MIT-licensed <<a href="http://gitlab.org" target="_blank">http://gitlab.org</a>>.  It's a largely feature-complete clone of Github; if, for some reason, we need to migrate away from Github in a hurry, it will be relatively painless to set up Gitlab instead, and the fact that Git is a DVCS means every contributor will serve as a backup.  The main reason I would not suggest just deploying it is that it creates another sticky infrastructure-management problem, and while Braid is great, I'd prefer to avoid creating <i>more</i> work in that area.  Github also has APIs for literally all of their features, so we can create a backup script.</div>
<div><br></div><div>(Also worth noting: Gitlab is an open-source competitor to Github, but they still trust Github enough to <<a href="https://github.com/gitlabhq/" target="_blank">https://github.com/gitlabhq/</a>> host their own development there.)</div>
<div><br></div><div>Finally, my own minor concern: Github has no notion of a "code review" as a unit of work.  A pull request is just "open" until it is "closed".  Closing pull requests to request changes would be jarring to the cultural norms associated with Github's UI.  All the github users I've spoken with, even those who follow processes which are effectively identical to Twisted's, have assured me that this is not really an issue.  A code review is "accepted" when you merge it; it's "rejected" if the pull request is still open but has some comments on it.  This will make porting over <<a href="http://twistedmatrix.com/highscores/" target="_blank">http://twistedmatrix.com/highscores/</a>> a bit challenging, but I think it would be worth letting that break for the time being.</div>
</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-glyph</div></font></span></div><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br></div>