<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Code Train &#187; github</title>
	<atom:link href="http://thecodetrain.co.uk/tag/github/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecodetrain.co.uk</link>
	<description>Where Neil Crosby talks about coding on the train...</description>
	<lastBuildDate>Wed, 18 Aug 2010 18:22:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>GitHub Inactive Repository Demoter, a GreaseMonkey Script</title>
		<link>http://thecodetrain.co.uk/2009/03/github-inactive-repository-demoter-a-greasemonkey-script/</link>
		<comments>http://thecodetrain.co.uk/2009/03/github-inactive-repository-demoter-a-greasemonkey-script/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 09:59:12 +0000</pubDate>
		<dc:creator>Neil Crosby</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[scratching an itch]]></category>

		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=217</guid>
		<description><![CDATA[<p>One of the things that&#8217;s been annoying me recently about <a href="http://github.com">GitHub</a> is the way that a user&#8217;s repositories are presented on their profile page.  Take <a href="http://github.com/NeilCrosby">my profile page</a> for example — I have 16 repositories, but only 5 of them have had any active development over the last month.  To my mind those ones are the most important on the page, and  as such should be given pride of place.  The others should be pushed down the page into their own section.</p>

<p>So, using the wonders of <a href="https://addons.mozilla.org/en-US/firefox/addon/748">GreaseMonkey</a>, that&#8217;s what I did with a spare half an hour yesterday evening.  The <a href="http://github.com/NeilCrosby/github-inactive-repository-demoter/tree">demoter script</a> I wrote is very simple — it looks for the first element on the page with a class of &#8220;projects&#8221;, then checks the last changed date of each of the projects contained within.  If any of them contain a date that&#8217;s more than a month old then a quick <code>appendChild</code> of the original node onto the new &#8220;demoted&#8221; list moves it across.  A heading is added before the new &#8220;demoted&#8221; list to explain what this new list contains, and we&#8217;re all done.</p>

<p>So far I&#8217;ve noticed one &#8220;bug&#8221; with this script.  Normally, when GitHub displays information about a project, it&#8217;s the last changed date of the project that&#8217;s displayed.  Unfortunately, if the user has forked a repository, it seems that the date displayed is when the repository was forked rather than the last time it was edited.  Even if the fork happened months ago, and since then the user has made many edits themselves it&#8217;s still the fork date that&#8217;s displayed.  You can see this in action on <a href="http://github.com/bradleywright">Brad&#8217;s profile page</a> on the &#8220;homedir&#8221; project.</p>

<p>Short of GitHub exposing the actual last edited date on the page itself there is one other possible possibility for getting hold of a last edited(ish) date.  For each of the project activity sparklines, GitHub makes a call back to the server to grab a chunk of parseable data.  It might be possible to grab hold of that data using GreaseMonkey, but that&#8217;s a problem I leave to the enterprising reader.  If you do solve the problem, please do fork my code and send a pull request — I&#8217;d love to have this solved in the script.</p>

<p>If you fancy having this &#8220;Inactive Repository Demotion&#8221; functionality on GitHub, all you have to do is <a href="http://github.com/NeilCrosby/github-inactive-repository-demoter/tree">download the script</a>.  Oh, and whilst you&#8217;re at it, don&#8217;t forget to follow the repository so you can be told of any updates or bugfixes.</p>

<p>EDIT:</p>

<p>As it turns out, I should probably be a little more explicit about how to install the script.  First, download the entire repository as a zip or tgz.  Open it up, and then open the script up in Firefox.  The GreaseMonkey script will then install.</p>
<div style="display:block"><small><em><a href="http://neilcrosby.com">Neil Crosby</a> also blogs at about t-shirts at <a href="http://iwearcotton.com">I Wear Cotton</a>, writes <a href="http://thetenwordreview.com/users/workingwithme">Ten Word Reviews</a>, and uploads <a href="http://www.flickr.com/photos/thevoicewithin/">photos</a> to flickr.  You can follow a combined feed of posts at <a href="http://neilcrosby.com/">NeilCrosby.com</a>.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>One of the things that&#8217;s been annoying me recently about <a href="http://github.com">GitHub</a> is the way that a user&#8217;s repositories are presented on their profile page.  Take <a href="http://github.com/NeilCrosby">my profile page</a> for example — I have 16 repositories, but only 5 of them have had any active development over the last month.  To my mind those ones are the most important on the page, and  as such should be given pride of place.  The others should be pushed down the page into their own section.</p>

<p>So, using the wonders of <a href="https://addons.mozilla.org/en-US/firefox/addon/748">GreaseMonkey</a>, that&#8217;s what I did with a spare half an hour yesterday evening.  The <a href="http://github.com/NeilCrosby/github-inactive-repository-demoter/tree">demoter script</a> I wrote is very simple — it looks for the first element on the page with a class of &#8220;projects&#8221;, then checks the last changed date of each of the projects contained within.  If any of them contain a date that&#8217;s more than a month old then a quick <code>appendChild</code> of the original node onto the new &#8220;demoted&#8221; list moves it across.  A heading is added before the new &#8220;demoted&#8221; list to explain what this new list contains, and we&#8217;re all done.</p>

<p>So far I&#8217;ve noticed one &#8220;bug&#8221; with this script.  Normally, when GitHub displays information about a project, it&#8217;s the last changed date of the project that&#8217;s displayed.  Unfortunately, if the user has forked a repository, it seems that the date displayed is when the repository was forked rather than the last time it was edited.  Even if the fork happened months ago, and since then the user has made many edits themselves it&#8217;s still the fork date that&#8217;s displayed.  You can see this in action on <a href="http://github.com/bradleywright">Brad&#8217;s profile page</a> on the &#8220;homedir&#8221; project.</p>

<p>Short of GitHub exposing the actual last edited date on the page itself there is one other possible possibility for getting hold of a last edited(ish) date.  For each of the project activity sparklines, GitHub makes a call back to the server to grab a chunk of parseable data.  It might be possible to grab hold of that data using GreaseMonkey, but that&#8217;s a problem I leave to the enterprising reader.  If you do solve the problem, please do fork my code and send a pull request — I&#8217;d love to have this solved in the script.</p>

<p>If you fancy having this &#8220;Inactive Repository Demotion&#8221; functionality on GitHub, all you have to do is <a href="http://github.com/NeilCrosby/github-inactive-repository-demoter/tree">download the script</a>.  Oh, and whilst you&#8217;re at it, don&#8217;t forget to follow the repository so you can be told of any updates or bugfixes.</p>

<p>EDIT:</p>

<p>As it turns out, I should probably be a little more explicit about how to install the script.  First, download the entire repository as a zip or tgz.  Open it up, and then open the script up in Firefox.  The GreaseMonkey script will then install.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecodetrain.co.uk/2009/03/github-inactive-repository-demoter-a-greasemonkey-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Last Genius &#8211; A last.fm hack day project</title>
		<link>http://thecodetrain.co.uk/2008/12/last-genius-a-lastfm-hack-day-project/</link>
		<comments>http://thecodetrain.co.uk/2008/12/last-genius-a-lastfm-hack-day-project/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 11:02:13 +0000</pubDate>
		<dc:creator>Neil Crosby</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[genius]]></category>
		<category><![CDATA[genius playlists]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hack day]]></category>
		<category><![CDATA[last.fm]]></category>

		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=182</guid>
		<description><![CDATA[<p>Gosh, it&#8217;s thursday already?  Last Sunday I attended <a href="http://last.fm">last.fm</a>&#8217;s first open <a href="http://www.last.fm/group/Hack+Day">Hack Day</a> near Brick Lane in London with the intention of building a system to allow creation of Genius Playlists using last.fm&#8217;s data.</p>

<p>For those of you who aren&#8217;t sure, a Genius Playlist is a playlist of music that all &#8220;works together&#8221; that&#8217;s created from one seed track of the user&#8217;s choice.  Essentially, it&#8217;s a shortcut to creating playlists of stuff that suits how you&#8217;re feeling at that moment, rather than you having to go to the trouble of creating the playlist yourself.</p>

<p>Whilst I was initially sceptical of how well this would work (I&#8217;ve worked in this problem space before, so I know it isn&#8217;t awesomely easy), since iTunes gained this feature in v8 I&#8217;ve become more and more reliant on it.  My reliance has been so great that I&#8217;ve expected the feature in all the other music based services I use.  For example, when I started using <a href="http://spotify.com">Spotify</a>, one of the first things I did without thinking was to start playing  a track that I wanted to listen to and then look for the &#8220;genius&#8221; button to see what else Spotify would try and play for me.  It upset me that this feature wasn&#8217;t there.  Sure, Spotify and last.fm allow you to play radio stations based on a certain genre, artist or tag, but that misses a piece of perceived control that starting with a chosen song implies.</p>

<p>So, for last.fm&#8217;s hack day I decided to hack together a genius playlist creator.  After all, <a href="http://last.fm/api">last.fm&#8217;s API</a> supplies the <a href="http://www.last.fm/api/show?service=319">track.getSimilar</a> method, which pretty much gives all the data you need for a genius playlist.  </p>

<p>There were a few hurdles to get through though.  First up was playlist creation and playback itself.  It turns out that in last.fm-world you can only create actual playlists if you&#8217;re a paid subscriber to the service.  That&#8217;s not a dealbreaker for me, so I paid my £1.50 for a month&#8217;s subscription to see how it went.  Unfortunately, at that point I realised that whilst I could now create playlists, I could only play them back if they had at least 45 songs in them by at least 15 different artists.  Oh, and I could only play them back in shuffle mode.  On the website.  Not in the desktop app or on the iPhone.  Somewhat sub-optimal.</p>

<p>So, I went back to the drawing board.  If I couldn&#8217;t do playlists how I wanted in last.fm, how about if I found the data I wanted in last.fm and then used Spotify to play it?  Unfortunately, Spotify doesn&#8217;t yet have an API, so this also proved impossible.</p>

<p>Scratch Plan B then.  Thankfully, I did have a Plan 9 available to me &#8211; last.fm&#8217;s ability to autostart tracks on the website by adding <code>?autostart</code> to the end of any song page URL.  Using this ability, I reckoned, I would be able to create a page containing a list of songs that could then be played in a browser window by loading up the individual song pages in a hidden iframe.  Simplicity itsef, and as if by magic it actually worked!</p>

<p>There was, of course, more magic that went into creating Last Genius.  Not all songs on the site are available to stream, and of those that are not all of them are full length tracks.  Because I was playing the songs in iframes I had no way of knowing when a song had actually ended.  I had to make sure that you didn&#8217;t end up hearing the same song twice in a playlist.  All these things and more were hacked around during the hack day, and in the end I had something that actually worked.</p>

<p>The end result was a bookmarklet that you can stick into your browser toolbar and click to create a genius playlist any time you want.  Just make sure you&#8217;re on a Last.fm song page and a playlist will be created for you.  If you&#8217;re not on a song page, lets just say that the system will try and find you some music that it reckons you&#8217;ll like.</p>

<p><a href="javascript:void(window.open('http://projects.thecodetrain.co.uk/last-genius/playlist.php?url='+location.href,'mywin','left=20,top=20,width=700,height=300,toolbar=0,resizable=1'));">Last Genius</a> bookmarklet &#8211; drag onto your toolbar.</p>

<p>All I ask is that you remember that this is a hack.  It&#8217;s only tested in Firefox 3 on the Mac, because during a hack day you don&#8217;t have time to make everything work everywhere (it&#8217;ll probably work elsewhere, I just haven&#8217;t tested yet).  Because Last Genius has to make quite a few calls back to the mothership to set itself up, it might also take a little while to start up.  Just be patient.  For what it&#8217;s worth, I have plans to improve this over Christmas.</p>

<p>Because this is a toy I want for myself I plan to spend a bit more time making it nicer.  With that in mind, if you have any ideas for things that will make it better, please let me know.  Likewise, <a href="https://github.com/NeilCrosby/last-genius/tree">the source code</a> is up on GitHub, so please go fork it and make improvements.  Anything awesome I&#8217;ll very happily merge back into the trunk.</p>
<div style="display:block"><small><em><a href="http://neilcrosby.com">Neil Crosby</a> also blogs at about t-shirts at <a href="http://iwearcotton.com">I Wear Cotton</a>, writes <a href="http://thetenwordreview.com/users/workingwithme">Ten Word Reviews</a>, and uploads <a href="http://www.flickr.com/photos/thevoicewithin/">photos</a> to flickr.  You can follow a combined feed of posts at <a href="http://neilcrosby.com/">NeilCrosby.com</a>.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>Gosh, it&#8217;s thursday already?  Last Sunday I attended <a href="http://last.fm">last.fm</a>&#8217;s first open <a href="http://www.last.fm/group/Hack+Day">Hack Day</a> near Brick Lane in London with the intention of building a system to allow creation of Genius Playlists using last.fm&#8217;s data.</p>

<p>For those of you who aren&#8217;t sure, a Genius Playlist is a playlist of music that all &#8220;works together&#8221; that&#8217;s created from one seed track of the user&#8217;s choice.  Essentially, it&#8217;s a shortcut to creating playlists of stuff that suits how you&#8217;re feeling at that moment, rather than you having to go to the trouble of creating the playlist yourself.</p>

<p>Whilst I was initially sceptical of how well this would work (I&#8217;ve worked in this problem space before, so I know it isn&#8217;t awesomely easy), since iTunes gained this feature in v8 I&#8217;ve become more and more reliant on it.  My reliance has been so great that I&#8217;ve expected the feature in all the other music based services I use.  For example, when I started using <a href="http://spotify.com">Spotify</a>, one of the first things I did without thinking was to start playing  a track that I wanted to listen to and then look for the &#8220;genius&#8221; button to see what else Spotify would try and play for me.  It upset me that this feature wasn&#8217;t there.  Sure, Spotify and last.fm allow you to play radio stations based on a certain genre, artist or tag, but that misses a piece of perceived control that starting with a chosen song implies.</p>

<p>So, for last.fm&#8217;s hack day I decided to hack together a genius playlist creator.  After all, <a href="http://last.fm/api">last.fm&#8217;s API</a> supplies the <a href="http://www.last.fm/api/show?service=319">track.getSimilar</a> method, which pretty much gives all the data you need for a genius playlist.  </p>

<p>There were a few hurdles to get through though.  First up was playlist creation and playback itself.  It turns out that in last.fm-world you can only create actual playlists if you&#8217;re a paid subscriber to the service.  That&#8217;s not a dealbreaker for me, so I paid my £1.50 for a month&#8217;s subscription to see how it went.  Unfortunately, at that point I realised that whilst I could now create playlists, I could only play them back if they had at least 45 songs in them by at least 15 different artists.  Oh, and I could only play them back in shuffle mode.  On the website.  Not in the desktop app or on the iPhone.  Somewhat sub-optimal.</p>

<p>So, I went back to the drawing board.  If I couldn&#8217;t do playlists how I wanted in last.fm, how about if I found the data I wanted in last.fm and then used Spotify to play it?  Unfortunately, Spotify doesn&#8217;t yet have an API, so this also proved impossible.</p>

<p>Scratch Plan B then.  Thankfully, I did have a Plan 9 available to me &#8211; last.fm&#8217;s ability to autostart tracks on the website by adding <code>?autostart</code> to the end of any song page URL.  Using this ability, I reckoned, I would be able to create a page containing a list of songs that could then be played in a browser window by loading up the individual song pages in a hidden iframe.  Simplicity itsef, and as if by magic it actually worked!</p>

<p>There was, of course, more magic that went into creating Last Genius.  Not all songs on the site are available to stream, and of those that are not all of them are full length tracks.  Because I was playing the songs in iframes I had no way of knowing when a song had actually ended.  I had to make sure that you didn&#8217;t end up hearing the same song twice in a playlist.  All these things and more were hacked around during the hack day, and in the end I had something that actually worked.</p>

<p>The end result was a bookmarklet that you can stick into your browser toolbar and click to create a genius playlist any time you want.  Just make sure you&#8217;re on a Last.fm song page and a playlist will be created for you.  If you&#8217;re not on a song page, lets just say that the system will try and find you some music that it reckons you&#8217;ll like.</p>

<p><a href="javascript:void(window.open('http://projects.thecodetrain.co.uk/last-genius/playlist.php?url='+location.href,'mywin','left=20,top=20,width=700,height=300,toolbar=0,resizable=1'));">Last Genius</a> bookmarklet &#8211; drag onto your toolbar.</p>

<p>All I ask is that you remember that this is a hack.  It&#8217;s only tested in Firefox 3 on the Mac, because during a hack day you don&#8217;t have time to make everything work everywhere (it&#8217;ll probably work elsewhere, I just haven&#8217;t tested yet).  Because Last Genius has to make quite a few calls back to the mothership to set itself up, it might also take a little while to start up.  Just be patient.  For what it&#8217;s worth, I have plans to improve this over Christmas.</p>

<p>Because this is a toy I want for myself I plan to spend a bit more time making it nicer.  With that in mind, if you have any ideas for things that will make it better, please let me know.  Likewise, <a href="https://github.com/NeilCrosby/last-genius/tree">the source code</a> is up on GitHub, so please go fork it and make improvements.  Anything awesome I&#8217;ll very happily merge back into the trunk.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecodetrain.co.uk/2008/12/last-genius-a-lastfm-hack-day-project/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Why git?</title>
		<link>http://thecodetrain.co.uk/2008/11/why-git/</link>
		<comments>http://thecodetrain.co.uk/2008/11/why-git/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 08:20:23 +0000</pubDate>
		<dc:creator>Neil Crosby</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[head conference]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[vcs]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=149</guid>
		<description><![CDATA[<p>As should be obvious by now, I write most of my code whilst I&#8217;m on the train.  Up until a couple of weeks ago I&#8217;d been using Subversion as my Version Control System running on a remote server, but this had never sat completely easily with me because I had to wait until I got home (and got a network connection) to be able to make all my commits from the journey.</p>

<p>So, &#8220;why didn&#8217;t you just run a Subversion repository on your local machine?&#8221;, I hear you cry.  The answer is simple &#8211; I wanted to make sure I had the code backed up off-site and easily accessible from different machines.  I also occasionally collaborate with others on the code I write, so having the repository on my local machine that only tends to be on when I have no network connection would be a bit of a non-starter as well.</p>

<p>Now, I&#8217;d been aware of git (and also bazaar) for over a year, but had never taken the time to look at them properly.  The reason was that whilst I wasn&#8217;t particularly happy with the fact that I had to hold my commits in my head until I got home with svn I had been able to work this way and get things done.  I was also not convinced by what I considered &#8220;fad&#8221; Version Control Systems, and I didn&#8217;t relish the prospect of moving from one to another.  This all changed for me when I watched Robert Lee-Cann&#8217;s <a href="http://www.headconference.com/">&lt;head> conference</a> <a href="http://www.headconference.com/speakers/robert-lee-cann/">talk about git</a>.  Although more in the style of a Barcamp (rather than conference) talk, Leeky&#8217;s session was far and away the one that I gained most from over the course of the event.  The tipping point for me was that I could, if I wanted to, use git on the train to do intermediary commits and then commit back to svn when I got home.  This fitted my mental model, and I was happy.</p>

<p>Of course, things didn&#8217;t quite happen that way.  I started using git with <a href="http://github.com">GitHub</a> as <a href="http://github.com/NeilCrosby">my remote repository</a> for a couple of minor projects, decided I really got on with git in the limited way I was using it and decided to move across wholesale from svn.</p>

<h3>Github</h3>

<p>A big part of the reason I fell in love with git was GitHub.  Ostensibly, GitHub is just a place to publicly store your code, but that word &#8220;publicly&#8221; is so very important.</p>

<p>One of the things that I wanted to do when I moved from <a href="http://www.workingwith.me.uk">Working With Me</a> to <a href="http://thecodetrain.co.uk">The Code Train</a> was create a sandbox area where I could make my half finished code public and allow people to fiddle with it and use it.  Previously I&#8217;ve been much more likely to sit on code for months at a time, willing it to become more stable and generalised before pushing it out to the public, meaning that so many of the ideas and hacks I play with don&#8217;t make it out into the real world to be fiddled with by others.  It turns out that I don&#8217;t need to create that special section of my site any more &#8211; with GitHub I get it for free!  Now, whenever I start hacking on something, however small it may be, I&#8217;ll immediately start a new git repository and stick it up onto GitHub.</p>

<p>There are quite a few benefits to working this way:</p>

<ul>
<li><p>I get to benefit from the eyes of people I work with and greatly respect.  </p>

<p>Whilst most of the code I stick up will be hacky in nature having other people be able to look at the things that interest them means that bugs, issues and mis-thinkings are much more likely to get picked up on.  I love the idea of code reviews, and using GitHub is yet another, informal, way of allowing them to happen.</p></li>
<li><p>I get to share what I&#8217;m working on publicly, which might just help someone, somewhere.</p>

<p>Just because I don&#8217;t think that something is ready for production use doesn&#8217;t mean that what I&#8217;ve done won&#8217;t be useful so someone out there.  Whether it&#8217;s useful in solving a problem, or they just decide to use it wholesale, that&#8217;s all good.</p></li>
<li><p>I get added incentive to improve my code.</p>

<p>Because there is the opportunity for so many eyes to be watching the code that I&#8217;m producing I feel a greater urge to improve it more quickly.  I see this as a game that I get to play, and by playing it everyone&#8217;s a winner.  </p>

<p><a href="http://mikewest.org/">Mike</a> introduced me to <a href="http://calendaraboutnothing.com/">Calendar About Nothing</a> which similarly turns writing code into a game.  Calendar About Nothing attempts to add incentive to writing code by giving you your own <a href="http://calendaraboutnothing.com/~NeilCrosby">personal calendar</a> that has each day crossed off as you commit public code to GitHub.  The idea is to build up longer and longer unbroken chains of committing code to the public good each and every day.  As well as the personal incentive of making your chain longer, the site also has lists of people with the longest chains currently and of all time.  The longest chain of all time is currently at 59 days.  My aim is to make it to 60 days of committing public code which actively makes something better.</p></li>
</ul>

<p>So there you go &#8211; I&#8217;m loving git, and I&#8217;m loving GitHub.  If you want to check out the projects I&#8217;m working on, head on over to <a href="http://github.com/NeilCrosby">my GitHub profile</a>.  </p>

<p>Probably the most interesting projects I&#8217;m working on right now are:</p>

<ul>
<li><p><a href="http://github.com/NeilCrosby/wikislurp/tree/master">WikiSlurp</a> &#8211; a tool to pull HTML formatted data out of Wikipedia.</p></li>
<li><p><a href="http://github.com/NeilCrosby/multi-level-vcards/tree/master">Multi Level vCards</a> &#8211; use your vCard to publish information to the web, allowing only certain people to see your more sensitive data.</p></li>
<li><p><a href="http://github.com/NeilCrosby/twitbot/tree/master">TwitBot</a> &#8211; a tool to allow easy creation of bots for use on twitter.</p></li>
</ul>

<p>So, what are you waiting for?  Get yourself onto GitHub and lets see the code you&#8217;re writing!  Oh yes, and don&#8217;t forget to read what <a href="http://mikewest.org/2008/11/i-love-github">Mike</a> and <a href="http://dynamicflash.com/2008/11/do-it-in-public/">Steve</a> have to say on the subject of GitHub too.</p>
<div style="display:block"><small><em><a href="http://neilcrosby.com">Neil Crosby</a> also blogs at about t-shirts at <a href="http://iwearcotton.com">I Wear Cotton</a>, writes <a href="http://thetenwordreview.com/users/workingwithme">Ten Word Reviews</a>, and uploads <a href="http://www.flickr.com/photos/thevoicewithin/">photos</a> to flickr.  You can follow a combined feed of posts at <a href="http://neilcrosby.com/">NeilCrosby.com</a>.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>As should be obvious by now, I write most of my code whilst I&#8217;m on the train.  Up until a couple of weeks ago I&#8217;d been using Subversion as my Version Control System running on a remote server, but this had never sat completely easily with me because I had to wait until I got home (and got a network connection) to be able to make all my commits from the journey.</p>

<p>So, &#8220;why didn&#8217;t you just run a Subversion repository on your local machine?&#8221;, I hear you cry.  The answer is simple &#8211; I wanted to make sure I had the code backed up off-site and easily accessible from different machines.  I also occasionally collaborate with others on the code I write, so having the repository on my local machine that only tends to be on when I have no network connection would be a bit of a non-starter as well.</p>

<p>Now, I&#8217;d been aware of git (and also bazaar) for over a year, but had never taken the time to look at them properly.  The reason was that whilst I wasn&#8217;t particularly happy with the fact that I had to hold my commits in my head until I got home with svn I had been able to work this way and get things done.  I was also not convinced by what I considered &#8220;fad&#8221; Version Control Systems, and I didn&#8217;t relish the prospect of moving from one to another.  This all changed for me when I watched Robert Lee-Cann&#8217;s <a href="http://www.headconference.com/">&lt;head> conference</a> <a href="http://www.headconference.com/speakers/robert-lee-cann/">talk about git</a>.  Although more in the style of a Barcamp (rather than conference) talk, Leeky&#8217;s session was far and away the one that I gained most from over the course of the event.  The tipping point for me was that I could, if I wanted to, use git on the train to do intermediary commits and then commit back to svn when I got home.  This fitted my mental model, and I was happy.</p>

<p>Of course, things didn&#8217;t quite happen that way.  I started using git with <a href="http://github.com">GitHub</a> as <a href="http://github.com/NeilCrosby">my remote repository</a> for a couple of minor projects, decided I really got on with git in the limited way I was using it and decided to move across wholesale from svn.</p>

<h3>Github</h3>

<p>A big part of the reason I fell in love with git was GitHub.  Ostensibly, GitHub is just a place to publicly store your code, but that word &#8220;publicly&#8221; is so very important.</p>

<p>One of the things that I wanted to do when I moved from <a href="http://www.workingwith.me.uk">Working With Me</a> to <a href="http://thecodetrain.co.uk">The Code Train</a> was create a sandbox area where I could make my half finished code public and allow people to fiddle with it and use it.  Previously I&#8217;ve been much more likely to sit on code for months at a time, willing it to become more stable and generalised before pushing it out to the public, meaning that so many of the ideas and hacks I play with don&#8217;t make it out into the real world to be fiddled with by others.  It turns out that I don&#8217;t need to create that special section of my site any more &#8211; with GitHub I get it for free!  Now, whenever I start hacking on something, however small it may be, I&#8217;ll immediately start a new git repository and stick it up onto GitHub.</p>

<p>There are quite a few benefits to working this way:</p>

<ul>
<li><p>I get to benefit from the eyes of people I work with and greatly respect.  </p>

<p>Whilst most of the code I stick up will be hacky in nature having other people be able to look at the things that interest them means that bugs, issues and mis-thinkings are much more likely to get picked up on.  I love the idea of code reviews, and using GitHub is yet another, informal, way of allowing them to happen.</p></li>
<li><p>I get to share what I&#8217;m working on publicly, which might just help someone, somewhere.</p>

<p>Just because I don&#8217;t think that something is ready for production use doesn&#8217;t mean that what I&#8217;ve done won&#8217;t be useful so someone out there.  Whether it&#8217;s useful in solving a problem, or they just decide to use it wholesale, that&#8217;s all good.</p></li>
<li><p>I get added incentive to improve my code.</p>

<p>Because there is the opportunity for so many eyes to be watching the code that I&#8217;m producing I feel a greater urge to improve it more quickly.  I see this as a game that I get to play, and by playing it everyone&#8217;s a winner.  </p>

<p><a href="http://mikewest.org/">Mike</a> introduced me to <a href="http://calendaraboutnothing.com/">Calendar About Nothing</a> which similarly turns writing code into a game.  Calendar About Nothing attempts to add incentive to writing code by giving you your own <a href="http://calendaraboutnothing.com/~NeilCrosby">personal calendar</a> that has each day crossed off as you commit public code to GitHub.  The idea is to build up longer and longer unbroken chains of committing code to the public good each and every day.  As well as the personal incentive of making your chain longer, the site also has lists of people with the longest chains currently and of all time.  The longest chain of all time is currently at 59 days.  My aim is to make it to 60 days of committing public code which actively makes something better.</p></li>
</ul>

<p>So there you go &#8211; I&#8217;m loving git, and I&#8217;m loving GitHub.  If you want to check out the projects I&#8217;m working on, head on over to <a href="http://github.com/NeilCrosby">my GitHub profile</a>.  </p>

<p>Probably the most interesting projects I&#8217;m working on right now are:</p>

<ul>
<li><p><a href="http://github.com/NeilCrosby/wikislurp/tree/master">WikiSlurp</a> &#8211; a tool to pull HTML formatted data out of Wikipedia.</p></li>
<li><p><a href="http://github.com/NeilCrosby/multi-level-vcards/tree/master">Multi Level vCards</a> &#8211; use your vCard to publish information to the web, allowing only certain people to see your more sensitive data.</p></li>
<li><p><a href="http://github.com/NeilCrosby/twitbot/tree/master">TwitBot</a> &#8211; a tool to allow easy creation of bots for use on twitter.</p></li>
</ul>

<p>So, what are you waiting for?  Get yourself onto GitHub and lets see the code you&#8217;re writing!  Oh yes, and don&#8217;t forget to read what <a href="http://mikewest.org/2008/11/i-love-github">Mike</a> and <a href="http://dynamicflash.com/2008/11/do-it-in-public/">Steve</a> have to say on the subject of GitHub too.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecodetrain.co.uk/2008/11/why-git/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
