<?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>h4x</title>
	<atom:link href="http://h4x.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://h4x.co.uk</link>
	<description>The useless ramblings of a web developer.</description>
	<lastBuildDate>Tue, 10 Aug 2010 09:32:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Wheel building</title>
		<link>http://h4x.co.uk/2010/08/10/wheel-building/</link>
		<comments>http://h4x.co.uk/2010/08/10/wheel-building/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 09:32:24 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[MTB]]></category>
		<category><![CDATA[wheel]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=87</guid>
		<description><![CDATA[My 4X bike has some pretty abused wheels so after almost two years I&#8217;ve decided to replace the rims (and spokes). I could take my hubs into a bike shop and get them to build up the wheels but as I can get the rims cheap I decided to give it a go &#8211; how [...]]]></description>
			<content:encoded><![CDATA[<p>My 4X bike has some pretty abused wheels so after almost two years I&#8217;ve decided to replace the rims (and spokes). I could take my hubs into a bike shop and get them to build up the wheels but as I can get the rims cheap I decided to give it a go &#8211; how hard can it be?</p>
<p><img class="aligncenter size-medium wp-image-89" title="New Mavic 719 front wheel" src="http://h4x.co.uk/wp-content/uploads/2010/08/40884_419828159727_510989727_4499940_5806064_n-300x223.jpg" alt="" width="300" height="223" /></p>
<p>There is a huge collection of wheel building information on the internet, the best resource being <a title="Sheldon Brown wheel building guides" href="http://www.sheldonbrown.com/wheelbuild.html" target="_blank">Sheldon Brown&#8217;s website</a>. So after two evenings I managed to strip down my front wheel and build up the new rim on the old hub. It was surprisingly easy to get the wheel straight, round and dished correctly. The only thing I am unsure about is the tension of the spokes. The first ride on it will be a 4X race so it wont exactly be getting a kind ride in period.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2010/08/10/wheel-building/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Printing webpages</title>
		<link>http://h4x.co.uk/2010/08/10/printing-webpages/</link>
		<comments>http://h4x.co.uk/2010/08/10/printing-webpages/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 09:03:03 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Genreal]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[bit-tech]]></category>
		<category><![CDATA[odd]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=77</guid>
		<description><![CDATA[I noticed something odd this morning; no, actually I noticed it a while ago but I&#8217;ve just decided to share it. People that read bit-tech don&#8217;t seem to use their browsers print button. Instead they really like using the &#8216;Print&#8217; link we&#8217;ve put on the page from AddThis.com. AddThis email me statistics periodically and every [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed something odd this morning; no, actually I noticed it a while ago but I&#8217;ve just decided to share it. People that read bit-tech don&#8217;t seem to use their browsers print button. Instead they really like using the &#8216;Print&#8217; link we&#8217;ve put on the page from AddThis.com.</p>
<p style="text-align: center;"><a href="http://h4x.co.uk/wp-content/uploads/2010/08/addthis-analytics.gif"></a><a href="http://h4x.co.uk/wp-content/uploads/2010/08/addthis-analytics.gif"></a><a rel="lightbox" href="http://h4x.co.uk/wp-content/uploads/2010/08/addthis-analytics.gif"><img class="aligncenter size-medium wp-image-80" title="AddThis Services Analytics" src="http://h4x.co.uk/wp-content/uploads/2010/08/addthis-analytics-300x139.gif" alt="" width="300" height="139" /></a></p>
<p style="text-align: left;">AddThis email me statistics periodically and every time the &#8216;Print&#8217; link is the most popular, by a huge margin, and it&#8217;s not even the first option on the page. I wonder what people did before we added the print link on article pages!</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2010/08/10/printing-webpages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bit-tech gets it&#8217;s own blog</title>
		<link>http://h4x.co.uk/2009/01/30/bit-tech-gets-its-own-blog/</link>
		<comments>http://h4x.co.uk/2009/01/30/bit-tech-gets-its-own-blog/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 15:23:59 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[bit-tech]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=74</guid>
		<description><![CDATA[Just a quick note to say that we have launched the bit-tech blog. It&#8217;s been custom written for the site and is quite neatly tied into the CMS and overall site.]]></description>
			<content:encoded><![CDATA[<p>Just a quick note to say that we have launched the <a href="http://www.bit-tech.net/blog/">bit-tech blog</a>.</p>
<p>It&#8217;s been custom written for the site and is quite neatly tied into the CMS and overall site.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2009/01/30/bit-tech-gets-its-own-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A little math problem</title>
		<link>http://h4x.co.uk/2009/01/07/a-little-math-problem/</link>
		<comments>http://h4x.co.uk/2009/01/07/a-little-math-problem/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 10:25:02 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Genreal]]></category>
		<category><![CDATA[maths]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=40</guid>
		<description><![CDATA[I was catching up on a developer blog this morning when I came across a post about probability of girls and boys. The problem that was asked is: Let&#8217;s say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person [...]]]></description>
			<content:encoded><![CDATA[<p>I was catching up on a developer blog this morning when I came across <a href="http://www.codinghorror.com/blog/archives/001204.html">a post about probability of girls and boys</a>. The problem that was asked is:</p>
<blockquote><p><em>Let&#8217;s say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. <strong>What are the odds that person has a boy and a girl?</strong></em></p></blockquote>
<p>The correct answer is 2/3 but initially I fell into the trap of thinking it was 1/2. I want to clarify why this is the case in an attempt to convince my own brain why it was wrong.</p>
<p>The explanation and comments over on Coding Horror say a lot of things but what I&#8217;m going to do is explain how I convinced myself of the correct answer.</p>
<p>&#8212;&#8211;</p>
<p>Let&#8217;s start some basic probability.</p>
<p>The probability of a mother giving birth to a girl is 1/2, and the probability of a boy is 1/2.</p>
<p>The probability of a mother giving birth to a girl and then a girl is 1/2 * 1/2 = 1/4.</p>
<p>The probability of a mother having two children of the same sex is 1/4 (two girls) + 1/4 (two boys) = 1/2.</p>
<p>&#8212;&#8211;</p>
<p>Now let&#8217;s think about the question.</p>
<p>The mother can give birth to two children in 4 different ways, BB, BG, GB, GG (B = Boy, G = Girl).</p>
<p>We&#8217;ve been given the information that <strong>one of the children is a girl</strong>. Three of the states where at least one of the children is a girl and two of those also contain a boy. Hence we can say the probability of the other child being a boy is 2/3.</p>
<p>At least that&#8217;s how I understand it.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2009/01/07/a-little-math-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thanks Ruby &#8211; Array zip fail</title>
		<link>http://h4x.co.uk/2008/12/12/thanks-ruby-array-zip-fail/</link>
		<comments>http://h4x.co.uk/2008/12/12/thanks-ruby-array-zip-fail/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 16:33:07 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=33</guid>
		<description><![CDATA[After updating rails from 2.0.2 to 2.2.2 on the bit-tech CMS this week I discovered a bug that had cropped up in one of my controllers where I was calling zip to join a a has_many collection with a couple of arrays and iterate through them. The code that was working fine now did something [...]]]></description>
			<content:encoded><![CDATA[<p>After updating rails from 2.0.2 to 2.2.2 on the bit-tech CMS this week I discovered a bug that had cropped up in one of my controllers where I was calling zip to join a a has_many collection with a couple of arrays and iterate through them. The code that was working fine now did something like the following.</p>
<p><span style="font-family: -webkit-monospace;">&gt;&gt; g.groups.zip([1,2], [3,4]) {|a,b,c| p a.inspect + &#8216;, &#8216; + b.inspect + &#8216;, &#8216; + c.inspect }<br />
&#8220;[#&lt;Group id: 1&gt;, 1, 3], nil, nil&#8221;<br />
&#8220;[#&lt;Group id: 2&gt;, 2, 4], nil, nil&#8221;</span></p>
<p>This is strange, I can no longer access the three elements of the array directly in the block. So I tried the following</p>
<p><span style="font-family: -webkit-monospace;">&gt;&gt; g.groups.to_a.zip([1,2], [3,4]) {|a,b,c| p a.inspect + &#8216;, &#8216; + b.inspect + &#8216;, &#8216; + c.inspect }<br />
&#8220;#&lt;Group id: 1&gt;, 1, 3&#8243;<br />
&#8220;#&lt;Group id: 2&gt;, 2, 4&#8243;</span></p>
<p>As you can see this solved the problem, but I was confused why there was a difference so I executed&#8230;</p>
<p><span style="font-family: -webkit-monospace;">&gt;&gt; g.groups.class<br />
=&gt; Array</span></p>
<p>Why when I cast it to an Array, from an Array, is it acting differently? Rails must have done something to the Array class that is returned by the has_many relationship.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2008/12/12/thanks-ruby-array-zip-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekend Riding</title>
		<link>http://h4x.co.uk/2008/11/03/weekend-riding/</link>
		<comments>http://h4x.co.uk/2008/11/03/weekend-riding/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 13:01:22 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[MTB]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/2008/11/03/jamie/</guid>
		<description><![CDATA[Jamie Originally uploaded by Dom Wrapson Went riding this weekend with Dom and some guys from ChocolateFoot. Discovered some new lines down Surrey hill I&#8217;d not ridden before with some sweet berms and tables. Came back plastered in mud but it was a great ride.]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 10px; margin-bottom: 10px;"><a title="photo sharing" href="http://www.flickr.com/photos/domwrapson/2992840808/"><img style="border: solid 2px #000000;" src="http://farm4.static.flickr.com/3252/2992840808_d96e4f8e27_m.jpg" alt="" /></a></p>
<p><span style="font-size: 0.9em; margin-top: 0px;"><br />
<a href="http://www.flickr.com/photos/domwrapson/2992840808/">Jamie</a></p>
<p>Originally uploaded by <a href="http://www.flickr.com/people/domwrapson/">Dom Wrapson</a><br />
</span></div>
<p>Went riding this weekend with Dom and some guys from ChocolateFoot.</p>
<p>Discovered some new lines down Surrey hill I&#8217;d not ridden before with some sweet berms and tables.</p>
<p>Came back plastered in mud but it was a great ride.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2008/11/03/weekend-riding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dennis aquires bit-tech.net</title>
		<link>http://h4x.co.uk/2008/10/28/dennis-aquires-bit-technet/</link>
		<comments>http://h4x.co.uk/2008/10/28/dennis-aquires-bit-technet/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 18:00:13 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Genreal]]></category>
		<category><![CDATA[bit-tech]]></category>
		<category><![CDATA[Dennis]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=29</guid>
		<description><![CDATA[It&#8217;s the end of an era really. Since I can remember I&#8217;ve been a core part of bit-tech. I joined the website when Koolvin, Moose, RTT and myself looked after the site featuring Koolvins mods and a few guides and reviews. The team behind the site has evolved from the core and the site formed [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s the end of an era really.</p>
<p>Since I can remember I&#8217;ve been a core part of bit-tech. I joined the website when Koolvin, Moose, RTT and myself looked after the site featuring Koolvins mods and a few guides and reviews. The team behind the site has evolved from the core and the site formed a company in 2005. I developed the current site and CMS over a year ago and it&#8217;s been evolving ever since.</p>
<p>bit-tech moved into new premises in April this year and now the company has been <a title="Dennis Publishing aquires bit-tech.net" href="http://www.bit-tech.net/news/2008/10/20/dennis-publishing-acquires-bit-tech/1" target="_blank">sold to Dennis Publishing</a>. I am no longer a shareholder and at some point in the future we shall be moving to the Dennis headquaters in London</p>
<p>I will be integrating with the Dennis development team over the next six months and hopefully the site will see some positive moves forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2008/10/28/dennis-aquires-bit-technet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8230; game development</title>
		<link>http://h4x.co.uk/2008/10/01/game-development-2/</link>
		<comments>http://h4x.co.uk/2008/10/01/game-development-2/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 13:42:17 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[fail]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=27</guid>
		<description><![CDATA[Well that didn&#8217;t even get off the ground. I&#8217;m now busy trying get more airtime on my mountain bike.]]></description>
			<content:encoded><![CDATA[<p>Well that didn&#8217;t even get off the ground.</p>
<p>I&#8217;m now busy trying get more airtime on my mountain bike.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2008/10/01/game-development-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Game Development</title>
		<link>http://h4x.co.uk/2008/05/22/game-development/</link>
		<comments>http://h4x.co.uk/2008/05/22/game-development/#comments</comments>
		<pubDate>Thu, 22 May 2008 08:31:16 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Pacifist]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=24</guid>
		<description><![CDATA[For a long time I&#8217;ve wanted to sit down and code a game but until now I&#8217;ve never really taken the time to learn anything about it and I&#8217;ve never had a good idea for a game. Joe has recently put together a concept for a game called Pacifist and since I&#8217;m quite keen to learn the [...]]]></description>
			<content:encoded><![CDATA[<p>For a long time I&#8217;ve wanted to sit down and code a game but until now I&#8217;ve never really taken the time to learn anything about it and I&#8217;ve never had a good idea for a game. <a title="Joe Martin" href="http://joemartin.wordpress.com/" target="_blank">Joe</a> has recently put together a concept for a game called <a title="Pacifist" href="http://wiki.willblackmore.co.uk/doku.php" target="_blank">Pacifist</a> and since I&#8217;m quite keen to learn the process of creating games I&#8217;ve volunteered myself to help with the programming. A team of forum members have decided to use Microsoft&#8217;s XNA Framework to build the game which suites me since I&#8217;m much more fluent with C# than C++.</p>
<p>I just hope it&#8217;ll get off the ground!</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2008/05/22/game-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Diverging paths</title>
		<link>http://h4x.co.uk/2008/04/18/diverging-paths/</link>
		<comments>http://h4x.co.uk/2008/04/18/diverging-paths/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 20:18:40 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[optimise]]></category>
		<category><![CDATA[reusable]]></category>

		<guid isPermaLink="false">http://h4x.co.uk/?p=22</guid>
		<description><![CDATA[The path of optimised code can lead in the opposite direction to that of reusable code.]]></description>
			<content:encoded><![CDATA[<p>The path of optimised code can lead in the opposite direction to that of reusable code.</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x.co.uk/2008/04/18/diverging-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
