<?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>Conceptric &#187; BDD</title>
	<atom:link href="http://www.conceptric.co.uk/tag/bdd/feed" rel="self" type="application/rss+xml" />
	<link>http://www.conceptric.co.uk</link>
	<description>Ideas and Applications</description>
	<lastBuildDate>Sat, 31 Jul 2010 20:30:17 +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>Evolving style after six months on Rails</title>
		<link>http://www.conceptric.co.uk/evolving-style-after-six-months-on-rails.htm</link>
		<comments>http://www.conceptric.co.uk/evolving-style-after-six-months-on-rails.htm#comments</comments>
		<pubDate>Thu, 04 Feb 2010 17:31:08 +0000</pubDate>
		<dc:creator>James Whinfrey</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.conceptric.co.uk/?p=331</guid>
		<description><![CDATA[It's coming up to 6 months since I announced my transition from PHP to Ruby and I'm really getting the hang of my new web development toolkit by working on a personal project.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ruby-lang.org/en/">Ruby</a> which is an interpreted programming language, often called a scripting language, that I&#8217;ve been using alongside BASH for automating tasks on my Mac. Call me slow&#8230; no don&#8217;t, I&#8217;m quite sensitive, but I only recently coupled this with the Rails web <a href="http://en.wikipedia.org/wiki/Software_framework">software framework</a> and started working on a Ruby on Rails web application.</p>
<p>There&#8217;s no better way to learn a new language than to actually use it in real life. My Nature Notes started as a project for my partner in PHP, CodeIgniter actually, but progress was slow due to an enjoyment deficit.</p>
<p>Testing is the main reason that I grew unhappy with PHP, most of the tools were there, but the integration was patchy: the basics are all there in Ruby and it&#8217;s associated development frameworks and integrating new packages via ruby gems or plugins is simple.</p>
<p>I started using the built-in Rails testing tools, but for no particular reason I&#8217;ve moved on to <a href="http://rspec.info/">RSpec</a> for unit and functional Rails model and standalone Ruby code testing coupled with <a href="http://cukes.info/">Cucumber</a> based integration testing. I&#8217;ve found that I need both.</p>
<p>Cucumber tests try to exercise the whole software stack &#8211; views, controllers, models and even the database. The use of natural language makes it easier to translate user stories into the appropriate tests, though it still needs some discipline to ensure that the edge cases are covered: I don&#8217;t think clients could write these as acceptance tests. </p>
<p>Involving the whole stack makes tests a little brittle, how specific is too specific? I&#8217;ve managed to break tests by removing fullstops (periods) from the rendered HTML! </p>
<p>I think that this is where unit and functional testing with RSpec at the model level is indispensable. I test model associations, validations and custom business logic in that order, I draw the limit at all the ActiveRecord <abbr title="Create Read Update Delete">CRUD</abbr> functionality.</p>
<p>I&#8217;ve found that the development environment hasn&#8217;t really changed in the move, the same basic toolkit does PHP and Ruby.</p>
<p>I regularly use several code version control systems including Subversion, Git and Mercurial. Recently though I&#8217;ve increasingly turned to Git and GitHub. Like most good tools the more you use it the more attached you become, so I&#8217;ll have to force myself to use the equally fine Mercurial again soon. I love these distributed tools.</p>
<p>TextMate is my editor of choice for Rails development. I&#8217;ve tried to use Netbeans <abbr title="Integrated Development Environment">IDE</abbr>, I use this for Java, but it seems like overkill. TextMate is quicker, simpler and provides the tools I need via the a range of bundles. </p>
<p>I have to admit that the code syntax highlighting is the most useful feature because I like using the command line too much, but I&#8217;m increasingly using code completion and I&#8217;m going to try the <a href="http://code.google.com/p/zen-coding/">Zen coding</a> bundles for HTML and CSS, I don&#8217;t like the default tools much.</p>
<p>That&#8217;s a round up of my current practice, more about the resulting software once I&#8217;ve decided to move on to a public beta.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.conceptric.co.uk/evolving-style-after-six-months-on-rails.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How does behaviour drive development?</title>
		<link>http://www.conceptric.co.uk/how-does-behaviour-drive-development.htm</link>
		<comments>http://www.conceptric.co.uk/how-does-behaviour-drive-development.htm#comments</comments>
		<pubDate>Thu, 12 Nov 2009 13:25:23 +0000</pubDate>
		<dc:creator>James Whinfrey</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[processes]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.conceptric.co.uk/?p=310</guid>
		<description><![CDATA[Behaviour Driven Development (BDD) is an adaptation of earlier Test Driven practices (TDD) that's growing on me, but it's raised an interesting problem: the order in which to describe desired behaviour so that it actually drives development.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve only recently started dabbling in <abbr title="Behaviour Driven Development">BDD</abbr> using <a href="http://railscasts.com/episodes/155-beginning-with-cucumber">Cucumber and RSpec in Rails</a> applications. It feels quite different to the <abbr title="Test Driven Development">TDD</abbr> practices I&#8217;ve adopted before in Java, PHP or Ruby. </p>
<p>It feels like I&#8217;m starting from the top of the software stack and working down from broad specifications, creating code as I go, rather than up from fine grained models based on specific unit tests. Is this a reductionist approach?</p>
<p>When writing my features and scenarios I&#8217;ve noticed a tendency to follow the <abbr title="Create Read Update Delete">CRUD</abbr> acronym common in data access layers: Create Read Update and Delete. The order of these processes is significant and my reasoning goes something like this&#8230;&#8230;</p>
<p>I can&#8217;t really expect to read the contents of an entity before I&#8217;ve generated the code to create it. Now I&#8217;ve created it, I&#8217;m not going to try to edit this same entity unless I can actually read it. I can read what I&#8217;ve got, but I might want to edit those contents, and delete comes last&#8230;&#8230; because it just does, I guess the order of &#8220;UD&#8221; is negotiable, but this way it&#8217;s easier to pronounce.</p>
<p>You get the general picture, but this is just the approach I&#8217;ve adopted through trial and lots of error. It&#8217;s far from perfect, so how do you use behaviour to lead the code?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.conceptric.co.uk/how-does-behaviour-drive-development.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
