<?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>just in ram &#187; Books</title>
	<atom:link href="http://justinramel.com/tag/books/feed/" rel="self" type="application/rss+xml" />
	<link>http://justinramel.com</link>
	<description>A list of stuff I should remember but never do</description>
	<lastBuildDate>Sat, 24 Jul 2010 10:14:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Books + Head First C# + Lab 1 Solution</title>
		<link>http://justinramel.com/2008/01/03/books-head-first-c-lab-1-solution/</link>
		<comments>http://justinramel.com/2008/01/03/books-head-first-c-lab-1-solution/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 20:52:00 +0000</pubDate>
		<dc:creator>Justin Ramel</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/2008/01/03/books-head-first-c-lab-1-solution/</guid>
		<description><![CDATA[I&#8217;ve been reading through the new Head First book Head First C#
which appeared on Safari just before Christmas. I&#8217;ve been a fan of the Head Fist books ever since reading their best selling Head First Design Patterns book. This particular book is aimed at beginners / hobbyists so I&#8217;m not exactly the target audience but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading through the new Head First book <a href="http://www.amazon.com/gp/product/0596514824?ie=UTF8&amp;tag=justinramelco-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596514824">Head First C#</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=justinramelco-20&amp;l=as2&amp;o=1&amp;a=0596514824" border="0" alt="" width="1" height="1" /><br />
which appeared on <a href="http://search.safaribooksonline.com/home" target="_blank">Safari</a> just before Christmas. I&#8217;ve been a fan of the Head Fist books ever since reading their best selling <a href="http://www.amazon.com/gp/product/0596007124?ie=UTF8&#038;tag=justinramelco-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596007124">Head First Design Patterns</a><img src="http://www.assoc-amazon.com/e/ir?t=justinramelco-20&#038;l=as2&#038;o=1&#038;a=0596007124" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> book. This particular book is aimed at beginners / hobbyists so I&#8217;m not exactly the target audience but hey it covers C# 3 so its got to be worth at least a skim.</p>
<p>I was pleased to see they&#8217;ve added a new feature to the head first series namely lab sections. There are 3 lab sections in the book which are basically specifications for mini games, the idea being the reader creates the games using their newly acquired C# skills. I though this was a great idea and having a lot of spare time in front of my laptop over the Christmas (due to a very <a href="http://justin.ramel.googlepages.com/ankle.jpg" target="_blank">sore ankle</a>) I did the first of the labs &#8220;A day at the races&#8221;.</p>
<p>I used the lab as an exercise in <a href="http://behaviour-driven.org/" target="_blank">Behaviour Driven Development (BDD)</a> which I&#8217;d recently read about <a href="http://dannorth.net/introducing-bdd" target="_blank">here</a> and <a href="http://codebetter.com/blogs/david_laribee/archive/2007/12/17/approaching-bdd.aspx" target="_blank">here</a>. I also got to try out a Test Data Builder I&#8217;d read about <a href="http://nat.truemesh.com/archives/000714.html" target="_blank">here</a>. Now I&#8217;m not convinced I hit the nail on the head with the BDD as my solution wasn&#8217;t created in a <span style="text-decoration: line-through;">test</span> behaviour first manor. This was mainly due to the fact the book provides you with the shell of a solution to keep things nice and simple for beginners. Never the less it was a good fun doing the lab it&#8217;s a great way to try out new techniques.</p>
<p>All in all the BDD experience was pretty good not sure about the code duplication in the context setup but you got to love the way the descriptive contexts and method names combine to read like a sentence:</p>
<p><img src="http://justin.ramel.googlepages.com/bdd.gif" alt="" /></p>
<p>Also the Test Data Builder is a really flexible way to create test data using a fluent interface which again is really easy to read:</p>
<p><code>myGuy = new GuyBuilder().WithName("Joe").AndCash(50).Build(); </code></p>
<p>You can download the solution <a href="http://justin.ramel.googlepages.com/lab01.zip" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinramel.com/2008/01/03/books-head-first-c-lab-1-solution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
