<?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; git</title>
	<atom:link href="http://thecodetrain.co.uk/tag/git/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>Sun, 03 Apr 2011 18:15:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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>
		<item>
		<title>Five ways to make offline working easier</title>
		<link>http://thecodetrain.co.uk/2008/10/five-ways-to-make-offline-working-easier/</link>
		<comments>http://thecodetrain.co.uk/2008/10/five-ways-to-make-offline-working-easier/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 18:15:14 +0000</pubDate>
		<dc:creator>Neil Crosby</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[distributed version control]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[marsedit]]></category>
		<category><![CDATA[offline]]></category>
		<category><![CDATA[php function index]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=129</guid>
		<description><![CDATA[<p>Nowadays an &#8220;always on&#8221; existence is far less of a pipe dream than it was even a year ago.  Usable wireless hotspots have popped up everywhere and many of us have data tariffs on our mobile phones.  It&#8217;s no surprise then that many people simply expect to always have a network connection and become flummoxed when this is taken away from them.</p>

<p>Not having a connection to the outside world shouldn&#8217;t be a blocker to getting work done though.  On my commute to and from work I have no internet connection available to my laptop and it really doesn&#8217;t stop me from getting anything done.  In fact, being disconnected from the cloud actually helps to free my mind and reduce the distractions that so often occur when I am connected.</p>

<p>A few people have asked me what my setup is for working on the train, so here&#8217;s a brief rundown of what I have on my laptop:</p>

<h3>A Development Environment</h3>

<p>For me, this is <a href="http://www.mamp.info/en/index.php">MAMP</a>, a simple installation LAMP setup for the Mac.  I personally currently run MAMP Pro, which costs money but gives me an easy interface for creating Virtual Hosts which I find very handy.</p>

<h3>Documentation</h3>

<p>Just as important as the development environment is the documentation to go with it.  If there&#8217;s a language or tool that you use that has documentation available for it then download it &#8211; you&#8217;ll regret your decision not to if you need it and you&#8217;re away from a network connection.</p>

<p>Because I write a lot of PHP and it&#8217;s a little inconsistent in its naming conventions I&#8217;m constantly in and out of the documentation.  I find the <a href="http://www.artissoftware.com/phpfi/">PHP Function Index</a> application invaluable on the train, as it makes the PHP documentation searchable and also allows you to download and keep an offline copy of all the user comments from PHP.net.</p>

<h3>MarsEdit</h3>

<p>Right now I&#8217;m working in <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a>, the really rather nice blog entry writing tool.  It allows me to write entries for multiple blogs, store them locally and sync with the blog servers when I have a network connection.  It has built in support for Markdown (which matters to me) and gives a nice preview of your entries as you write them.  I really wish it would let me turn on a column to show the &#8220;Post Status&#8221; of my entries though &#8211; it would make finding the half finished things so much easier.</p>

<h3>Git</h3>

<p>I&#8217;ve only just started using git (check out <a href="http://github.com/NeilCrosby">my profile on GitHub</a>), but it&#8217;s looking like it should fit my usage nicely.  Working on the train means that there are plenty of times when I solve a problem and then want to move on to a new one.  With my previous setup of an SVN server on a completely separate machine I couldn&#8217;t commit my code before starting the second problem.  With git though, I can commit any changes I want locally and then upload them to an external server later at my leisure.  Apparently, I can even use git on the train for intermediary commits and then commit back to my normal SVN repository when I get home.</p>

<h3>A backup network connection</h3>

<p>Of course, there are times when you really do need a network connection and then a phone with a decent data plan really comes in handy.  On those occasions though Sod&#8217;s Law will apply and you won&#8217;t have any signal.  When that happens I just sit back, relax and move onto something else.</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>Nowadays an &#8220;always on&#8221; existence is far less of a pipe dream than it was even a year ago.  Usable wireless hotspots have popped up everywhere and many of us have data tariffs on our mobile phones.  It&#8217;s no surprise then that many people simply expect to always have a network connection and become flummoxed when this is taken away from them.</p>

<p>Not having a connection to the outside world shouldn&#8217;t be a blocker to getting work done though.  On my commute to and from work I have no internet connection available to my laptop and it really doesn&#8217;t stop me from getting anything done.  In fact, being disconnected from the cloud actually helps to free my mind and reduce the distractions that so often occur when I am connected.</p>

<p>A few people have asked me what my setup is for working on the train, so here&#8217;s a brief rundown of what I have on my laptop:</p>

<h3>A Development Environment</h3>

<p>For me, this is <a href="http://www.mamp.info/en/index.php">MAMP</a>, a simple installation LAMP setup for the Mac.  I personally currently run MAMP Pro, which costs money but gives me an easy interface for creating Virtual Hosts which I find very handy.</p>

<h3>Documentation</h3>

<p>Just as important as the development environment is the documentation to go with it.  If there&#8217;s a language or tool that you use that has documentation available for it then download it &#8211; you&#8217;ll regret your decision not to if you need it and you&#8217;re away from a network connection.</p>

<p>Because I write a lot of PHP and it&#8217;s a little inconsistent in its naming conventions I&#8217;m constantly in and out of the documentation.  I find the <a href="http://www.artissoftware.com/phpfi/">PHP Function Index</a> application invaluable on the train, as it makes the PHP documentation searchable and also allows you to download and keep an offline copy of all the user comments from PHP.net.</p>

<h3>MarsEdit</h3>

<p>Right now I&#8217;m working in <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a>, the really rather nice blog entry writing tool.  It allows me to write entries for multiple blogs, store them locally and sync with the blog servers when I have a network connection.  It has built in support for Markdown (which matters to me) and gives a nice preview of your entries as you write them.  I really wish it would let me turn on a column to show the &#8220;Post Status&#8221; of my entries though &#8211; it would make finding the half finished things so much easier.</p>

<h3>Git</h3>

<p>I&#8217;ve only just started using git (check out <a href="http://github.com/NeilCrosby">my profile on GitHub</a>), but it&#8217;s looking like it should fit my usage nicely.  Working on the train means that there are plenty of times when I solve a problem and then want to move on to a new one.  With my previous setup of an SVN server on a completely separate machine I couldn&#8217;t commit my code before starting the second problem.  With git though, I can commit any changes I want locally and then upload them to an external server later at my leisure.  Apparently, I can even use git on the train for intermediary commits and then commit back to my normal SVN repository when I get home.</p>

<h3>A backup network connection</h3>

<p>Of course, there are times when you really do need a network connection and then a phone with a decent data plan really comes in handy.  On those occasions though Sod&#8217;s Law will apply and you won&#8217;t have any signal.  When that happens I just sit back, relax and move onto something else.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecodetrain.co.uk/2008/10/five-ways-to-make-offline-working-easier/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

