<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Clayton Lengel-Zigich</title>
	
	<link>http://www.claytonlz.com</link>
	<description>Ruby on Rails Developer</description>
	<lastBuildDate>Fri, 08 Jan 2010 02:58:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/claytonlengelzigich" /><feedburner:info uri="claytonlengelzigich" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Use Cucumber Table Transformations To Build Objects</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/rlhRpmmwvNY/</link>
		<comments>http://www.claytonlz.com/index.php/2010/01/cucumber-table-transformations/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 17:30:02 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[cucumber testing rails guide]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=397</guid>
		<description><![CDATA[Using Cucumber&#8217;s Table Transformations, you can easily build complex objects in a way that&#8217;s easy to read and understand for clients and developers alike.

My latest favorite feature of Cucumber are Table Transformations. I frequently use tables to build up complex objects and I&#8217;ve found that the regular old tables can be a little ugly, especially [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3>Using Cucumber&#8217;s Table Transformations, you can easily build complex objects in a way that&#8217;s easy to read and understand for clients and developers alike.</h3>

<p>My latest favorite feature of Cucumber are <a href="http://wiki.github.com/aslakhellesoy/cucumber/step-argument-transforms">Table Transformations</a>. I frequently use tables to build up complex objects and I&#8217;ve found that the regular old tables can be a little ugly, especially when your attribute names don&#8217;t make much sense on their own. I&#8217;ve also noticed that building up associations can be a little wonky, usually requiring more steps than seem necessary.</p>

<h4>Conventional Table Usage</h4>

<p>Let&#8217;s look at an example of how we could use a table, without transformations, to build up some objects for our scenario.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="">Scenario: Editing a Spirit
  Given I have a spirit with the following attributes:
    | spirit_type    | country_of_origin | age | brand        | lgcy_prod_sku | name       |
    | Scotch Whisky  | Scotland          | <span style="">12</span>  | The Balvenie | SC38181       | DoubleWood |
    | Scotch Whiskey | Scotland          | <span style="">12</span>  | The Macallan | SC38245       |            |</pre></td></tr></table></div>





<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="">Given /^I have a spirit with the following attributes:$/ do |table|
  table.hashes.each do |attributes|
    Spirit.create!<span class="br0">&#40;</span>attributes<span class="br0">&#41;</span>
  end
end</pre></td></tr></table></div>




<p class="alert">Be sure to use <code>create!</code> in your tests to prevent false positives (Thanks Aslak!)</p>

<p>Now this is all fairly simple, and it looks pretty easy to implement, but I see some problems. First, what if you were actually friends with your <span class="caps">DBA </span>(bear with me) and you knew better than to have an attribute in your model like <code>country_of_origin</code> or <code>spirit_type</code>. Chances are those are going to be used by many other records and should be pulled out and made into their own Models, <code>Country</code> and <code>SpiritType</code> respectively.<sup class="footnote"><a href="#fn1">1</a></sup></p>

<p>So what does our scenario look like with those two new models?</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="">Scenario: Editing a Spirit
  Given I have a country with the following attributes:
    | name     | continent |
    | Scotland | Europe    |
  And I have a spirit type with the following attributes:
    | name           |
    | Scotch Whiskey |
  And I have a spirit with the following attributes:
    | age | brand        | lgcy_prod_sku | name       |
    | <span style="">12</span>  | The Balvenie | SC38181       | DoubleWood |
    | <span style="">12</span>  | The Macallan | SC38245       |            |</pre></td></tr></table></div>




<p>It&#8217;s a little more complex, for sure, but it&#8217;s not totally unmanageable. However, the key part that&#8217;s missing is how to link the two spirits with their spirit types and countries of origin.</p>

<p>You could add some more steps, but then you&#8217;ve got a <a href="http://wiki.github.com/aslakhellesoy/cucumber/conjunction-steps-antipattern">conjunction step</a> which is inflexible and brittle.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="">  And the spirit named &quot;The Balvenie&quot; is from &quot;Scotland&quot; and is a &quot;Scotch Whiskey&quot;</pre></td></tr></table></div>




<p>You could go back to your original step, and try to do some behind-the-scenes stuff to map <code>country_of_origin</code> to the correct <code>country_id</code>, but that gets messy too.</p>

<h4>Transform Your Tables</h4>

<p>The first step to making good use of table transformations is to make your tables more readable. Start by change the header row of your table to use meaningful representations of the real attribute names.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="">Given I have a spirit with the following attributes:
  | Spirit Type    | Country  | Age | Brand        | Legacy Product Code | Name       |
  | Scotch Whisky  | Scotland | <span style="">12</span>  | The Balvenie | SC38181             | DoubleWood |
  | Scotch Whiskey | Scotland | <span style="">12</span>  | The Macallan | SC38245             |            |</pre></td></tr></table></div>




<p>We&#8217;ve turned that weird <code>lgcy_prod_sku</code> attribute into something that your Product Owner can make sense of and we&#8217;ve be able to add <code>Spirit Type</code> and <code>Country of Origin</code> back to the table. Now let&#8217;s look at the transformation that makes this all work.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="">Transform /^table:Spirit Type,Country,Age,Brand,Legacy Product Code,Name$/ do |table|
  table.hashes.map do |hash|
    spirit_type = SpiritType.create!<span class="br0">&#40;</span><span class="br0">&#123;</span>:name =&gt; hash<span class="br0">&#91;</span>&quot;Spirit Type&quot;<span class="br0">&#93;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>
    country = Country.create!<span class="br0">&#40;</span><span class="br0">&#123;</span>:name =&gt; hash<span class="br0">&#91;</span>&quot;Country&quot;<span class="br0">&#93;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>
    spirit = Spirit.create!<span class="br0">&#40;</span><span class="br0">&#123;</span>:age =&gt; hash<span class="br0">&#91;</span>&quot;Age&quot;<span class="br0">&#93;</span>,
                            :brand =&gt; hash<span class="br0">&#91;</span>&quot;Brand&quot;<span class="br0">&#93;</span>,
                            :lgcy_prod_sku =&gt; hash<span class="br0">&#91;</span>&quot;Legacy Product Code&quot;<span class="br0">&#93;</span>,
                            :name =&gt; hash<span class="br0">&#91;</span>&quot;Name&quot;<span class="br0">&#93;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>
&nbsp;
    <span class="br0">&#123;</span>:spirit_type =&gt; spirit_type, :country =&gt; country, :spirit =&gt; spirit<span class="br0">&#125;</span>
  end
end</pre></td></tr></table></div>




<p>The transformation step definition looks a lot like a regular table step definition. There is a regular expression, like anything else in Cucumber, that has the same values as the header row in the table from our scenario. Just like the table step definition we have a table object which is just an array of hashes. We can go through each hash, do the actual transformation, and then return something to our table step definition. We are using <code>map</code> (same as <code>collect</code>) to return an array of hashes, which is just what the table step definition is expecting.</p>

<p>You will also see that we&#8217;re creating three different records, which we are returning in the hash we create at the end. Let&#8217;s go through those step-by-step:</p>


<ol>
<li>Create a spirit type object from the <code>hash[&quot;Spirit Type&quot;]</code> value</li>
<li>Create a country object from the <code>hash[&quot;Country&quot;]</code> value</li>
<li>Create a spirit object from the several related hash values</li>
<li>Put all of our created objects into a hash</li>
</ol>



<p>While we&#8217;ve created the objects, we still need to create the associations. I like to leave this for the table step definition rather than the transformation since I think it&#8217;s more obvious what&#8217;s going on with the values when you&#8217;re viewing the table step.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="">Given /^I have a spirit with the following attributes:$/ do |table|
  table.each do |group|
    spirit = group<span class="br0">&#91;</span>:sprit<span class="br0">&#93;</span>
    associations = <span class="br0">&#123;</span>:country =&gt; group<span class="br0">&#91;</span>:country<span class="br0">&#93;</span>, :spirit_type =&gt; group<span class="br0">&#91;</span>:spirit_type<span class="br0">&#93;</span><span class="br0">&#125;</span>
    spirit.update_attributes<span class="br0">&#40;</span>associations<span class="br0">&#41;</span>
  end
end</pre></td></tr></table></div>




<p>There are at least a dozen ways to get the spirit associated with the country and spirit type, so don&#8217;t feel like you have to follow this pattern every time. Since we&#8217;ve sent our table an array of hashes we can iterate over each hash, <code>group</code>, and work with the individual rows. Here&#8217;s how:</p>


<ol>
<li>Extract the spirit object from the hash</li>
<li>Create another hash with the country and spirit type that Rails can make sense of</li>
<li>Use <code>update_attributes</code> to update the spirit object with the new associations</li>
</ol>



<h4>Transformation Tradeoffs</h4>

<p>We&#8217;ve been able to take our original multi-step scenario and simplify it to a single step. We are using the proper place, the step definitions, to do the associations and we have made our scenario much easier to read for non-developers working on the project. But what did we give up?</p>

<p>The biggest issue I&#8217;ve found with using table transformations is that they can be inflexible when you need to add more attributes to your dynamically created object. If you are writing features, using your table to setup objects and then realize that you need to add another attribute, you&#8217;re going to have to edit your table transformation step and how you create objects from the hash. When you take this a step further and try to have two different table definitions, you&#8217;ll be looking at having two nearly identical table transformations.<sup class="footnote"><a href="#fn2">2</a></sup></p>

<p>If you&#8217;re not already using regular old Cucumber tables to create objects, use this guide to get started. If you are using Cucumber tables to create objects, try to re-factor one of your scenarios and use the table transformation strategy. Once you start using Cucumber tables and table transformations you&#8217;ll instantly improve the readability, portability and efficiency of your steps.</p>


<p class="footnote" id="fn1"><sup>1</sup> Ignore for now the issues with <code>spirit_type</code> and Rails Single Table Inheritance</p>

<p class="footnote" id="fn2"><sup>2</sup> I&#8217;m guessing that there is some way you can get around this with regular expressions and to have more flexible transformation table steps, but I haven&#8217;t tried it yet.</p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/rlhRpmmwvNY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2010/01/cucumber-table-transformations/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2010/01/cucumber-table-transformations/</feedburner:origLink></item>
		<item>
		<title>Do You Make This Common Mistake When Estimating?</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/Pjy61qFwA5w/</link>
		<comments>http://www.claytonlz.com/index.php/2010/01/the-common-estimation-mistake/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 17:30:09 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[Estimating]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=388</guid>
		<description><![CDATA[There&#8217;s a common mistake that many software developers make when estimating projects. Here&#8217;s how you can avoid falling into this trap.

When estimating a project using the Planning Poker method, many developers like to use a baseline estimate for a given task. For example, many developers use CRUD, the creating, displaying, editing and deleting of a [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3>There&#8217;s a common mistake that many software developers make when estimating projects. Here&#8217;s how you can avoid falling into this trap.</h3>

<p>When estimating a project using the <a href="http://www.planningpoker.com/">Planning Poker</a> method, many developers like to use a baseline estimate for a given task. For example, many developers use <span class="caps">CRUD, </span>the creating, displaying, editing and deleting of a Model as their baseline estimate. Once they&#8217;ve got their baseline in mind, it makes it easier to estimate other stories that are more domain specific, or so it seems.</p>

<h4>Baseline Estimates are Broken</h4>

<p>When you&#8217;re using a task like <span class="caps">CRUD </span>as a baseline for your estimations, you can easily skew the estimations of the other stories in the project. Let&#8217;s say we&#8217;re using a 3 point baseline for <span class="caps">CRUD </span>stories.</p>


<ol>
<li>As a user I should be able to upload a profile photo &#8211; 2</li>
<li>As a user I should be able to <span class="caps">CRUD </span>movies I&#8217;ve seen &#8211; 3</li>
<li>As a user I should be able to send a private message to another user &#8211; 5</li>
<li>As a user I should be able to create a trivia quiz for a movie that I&#8217;ve seen &#8211; 8</li>
</ol>



<p>In this first example, the stories are probably estimated fairly well and compared to each other, the complexity is quite relative. What happens if we add a few more easy stories or a few more difficult stories?</p>


<ol>
<li>As a user I should be able to see a contact e-mail on the home page &#8211; 1</li>
<li>As a user I should be able download the menu as a <span class="caps">PDF </span>- 1</li>
<li>As a user I should be able to read a privacy policy &#8211; 2</li>
<li>As a user I should be able to <span class="caps">CRUD </span>restaurant reviews &#8211; 3</li>
</ol>



<p>With easier stories added, the <span class="caps">CRUD </span>story is definitely the most complex, but compared to the others it is significantly <em>more</em> complex than seeing a link on a page or viewing some text.</p>


<ol>
<li>As a user I should be able to <span class="caps">CRUD </span>portfolio photos &#8211; 3</li>
<li>As a user I should be able to signup for a paid recurring account &#8211; 8</li>
<li>As a user I should be able to make connections with other users via Facebook &#8211; 13</li>
<li>As a user I should be able to send a rocket to the moon &#8211; !</li>
</ol>



<p>When the other stories become much more complex, the <span class="caps">CRUD </span>task is again shown to be significantly different in complexity, this time in the other direction. In this group of stories its hard to imagine that managing portfolio photos is only two orders of magnitude away from a recurring payment e-commerce system.</p>

<h4>Relative Complexity Works</h4>

<p>Its important to estimate a group of stories so that the complexity of each story is relative to the next. In Mike Cohn&#8217;s <cite>Agile Estimating and Planning</cite>, he describes a method of estimating stories called &#8220;Analogy&#8221;. </p>

<blockquote><p>When estimating by analogy, the estimator compares the story being estimated with one or more other stories. If the story is twice the size, it is given an estimate twice as large.</p></blockquote>

<p>When you apply this technique to your estimation process, you will have a more coherent set of estimates. From this you will be more likely to determine an accurate estimated velocity and you will have a better overall sense for the scope of the project. </p>

<h4>Hurdles to Estimating by Analogy</h4>


<ul>
<li>Estimating all of your stories one by one makes it difficult to estimate a relative complexity as you only have the previously estimated stories with which to compare your current story. A group of especially simple or complex stories could be waiting towards the end of the sessions.</li>
<li>Estimators who are new to the agile estimation process might have difficultly estimating a story without a point of reference.</li>
<li>Estimating with a baseline can be a difficult habit to break since it provides a convenience and familiarity to the estimator.</li>
<li>Two seemingly similar projects may have a greater than expected difference in total number of story points, even though their velocities are relatively the same.</li>
</ul>

<img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/Pjy61qFwA5w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2010/01/the-common-estimation-mistake/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2010/01/the-common-estimation-mistake/</feedburner:origLink></item>
		<item>
		<title>The Secret to Awesome Agile Development</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/xfrGyVm4iVk/</link>
		<comments>http://www.claytonlz.com/index.php/2009/12/awesome-agile-development-secret/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:30:40 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=367</guid>
		<description><![CDATA[With a little hard work and my secret development ingredient, you can be a better Agile Developer

Recently my fellow developers at Integrum and I took a survey that helped us assess our team with regard to our Agile practices. When taking the survey, and now reviewing it later on, I was struck by how many [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3>With a little hard work and my secret development ingredient, you can be a better Agile Developer</h3>

<p><span class="drop_cap">R</span>ecently my fellow developers at <a href="http://www.integrumtech.com">Integrum</a> and I took a survey that helped us assess our team with regard to our Agile practices. When taking the survey, and now reviewing it later on, I was struck by how many of the questions were related to a single concept. Many of the problem areas that can be uncovered by the survey, along with examples of one&#8217;s successes, come back to this one theme.</p>

<blockquote class="left">Are programmers nearly always confident that the code they&#8217;ve written recently does what it&#8217;s intended to do?
</blockquote>Consider the following questions:


<ul>
<li>Is there more than one bug per month in the business logic of completed stories?</li>
<li>Can any programmer on the team currently build and test the software, and get unambiguous success / fail result, using a single command?</li>
<li>When a programmer gets the latest code, is he nearly always confident that it will build successfully and pass all tests?</li>
<li>Are fewer than five bugs per month discovered in the team&Ecirc;&frac14;s finished work?</li>
<li>After a line item is marked &#8220;complete&#8221; do team members later perform unexpected additional work, such as bug fixes or release polish, to finish it?</li>
<li>Are programmers nearly always confident that the code they&#8217;ve written recently does what it&#8217;s intended to do?</li>
<li>Are all programmers comfortable making changes to the code?</li>
<li>Do programmers have more than one debug session per week that exceeds 10 minutes?</li>
<li>Do unexpected design changes require difficult or costly changes to existing code?</li>
<li>Do any programmers optimize code without conducting performance tests first?</li>
<li>Is there more than one bug per month in the business logic of completed stories?</li>
<li>Are any team members unsure about the quality of the software the team is producing?</li>
</ul>



<p class="alert">What&#8217;s the common theme among these stories, and the secret to better agile development? <strong>Testing</strong>, <strong>testing</strong> and more <strong>testing</strong>.</p>

<p>The negative outcomes implied by some of these questions can be solved by testing. Spending time fixing &#8220;completed&#8221; stories? Probably something you could have tested. Conversely, the positive benefits implied by other questions can be had via testing. Want to make your code more inviting and easier to deal with for new team members or people unfamiliar with the project? Give them robust and well-written tests.</p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/xfrGyVm4iVk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/12/awesome-agile-development-secret/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/12/awesome-agile-development-secret/</feedburner:origLink></item>
		<item>
		<title>The 7 Bullshit Agile Estimation Problems</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/kOoe9SBWHto/</link>
		<comments>http://www.claytonlz.com/index.php/2009/12/agile-esitmation-problems/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 18:15:04 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Riffs]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[estimations]]></category>
		<category><![CDATA[planning]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=332</guid>
		<description><![CDATA[Estimating stories for an upcoming project is one of the more difficult tasks that agile teams have to perform. It&#8217;s never easy to determine how difficult it will be to implement a particular feature, especially when you&#8217;ve got different personalities, goals, and levels or experience in the same room. Unfortunately this all leads to people [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Estimating stories for an upcoming project is one of the more difficult tasks that agile teams have to perform. It&#8217;s never easy to determine how difficult it will be to implement a particular feature, especially when you&#8217;ve got different personalities, goals, and levels or experience in the same room. Unfortunately this all leads to people coming up with excuses and roadblocks which lead to inaccurate estimates.</p>

<p>I&#8217;ve identified seven problems pitfalls of the agile estimation process that I&#8217;m sure many other teams have experienced:</p>

<h3>1) Estimating Time Rather Than Complexity</h3>

<p>The point of estimating stories with planning poker cards is that you estimate based on the story&#8217;s complexity, not on how long it will take you to complete the actual feature. A story that&#8217;s an 8 is more complex than one that&#8217;s a 5, but it doesn&#8217;t meant that the 8 will take two days. It could take an hour or a week, it&#8217;s all relative.</p>

<p><strong>Why it&#8217;s Bullshit</strong><br />
Estimates based on time make planning commitments difficult and velocities unreliable.</p>

<h3>2) Not Estimating For &#8220;Simplest Possible Solution&#8221;</h3>

<p>The &#8220;Simplest Possible Solution&#8221; is just that, what&#8217;s the simplest way that the feature described in the story can be implemented. When you get away from this you start going down all sorts of &#8220;what if&#8221; roads that always end up bumping up your estimate.</p>

<p><strong>Why it&#8217;s Bullshit</strong><br />
Trying to guess what the product owner will want or what the completed feature entails is a waste of time.</p>

<h3>3) I&#8217;ve Never Done That Before</h3>

<p>There aren&#8217;t many software problems that haven&#8217;t been solved. Most of them are things that have been solved a thousand times in a hundred different ways. Adding complexity to a story because you&#8217;ve personally never solved that problem is shortsighted.</p>

<p><strong>Why it&#8217;s Bullshit</strong><br />
Just because you&#8217;ve never done something doesn&#8217;t mean it&#8217;s complex. Lean on your team or network of developer peers to help solve these problems.</p>

<h3>4) Estimating Stories In Excessive or No Isolation</h3>

<p>Stories should be estimated in isolation, just as they should be written so as not to depend heavily on one another.  However, developers will often try to assign too much complexity to a story because of assumed tasks or features that <em>they think</em> would accompany the story in a completed state. For example:</p>

<blockquote>
As a user I should be able to login<br />
As a user I should be able to upload a profile photo<br />
As a user I should be able to change my address<br />
</blockquote>

<p>Some developers will see the first story and immediately think of the complexity of creating a user model, the controllers and views that go along with the entire registration process. </p>

<p>Alternatively some developers will see the last story and think &#8220;Oh I just need a form field for the e-mail address when the user is editing their profile.&#8221;</p>

<p><strong>Why it&#8217;s Bullshit</strong><br />
The first extreme gives you chunks of related stories with too much padding that are never as complex individually as they are as a whole. The latter only (sometimes) works when the actual stories are extracted out into a bunch of very small stories, which has its own set of problems.</p>

<h3>5) Gaming Velocities</h3>

<p>If you&#8217;re looking to &#8220;guesstimate&#8221; how long a project will take to complete, you could grab some story cards and pick out what you think might be a week of work. If you add up the points assigned to those stories you&#8217;d have an estimated velocity. However, if you&#8217;ve padded your stories, or purposefully pick out a small number of stories, your project is going to appear much lengthier than it really is.</p>

<p><strong>Why it&#8217;s Bullshit</strong><br />
You don&#8217;t look any better completing 50 points per iteration when you padded the hell out of your estimates than you do when you do 20 points per iteration with accurate estimates.</p>

<h3>6) Always Assume The Worst!</h3>

<p>There seems to be this mantra with some developers, &#8220;Always assume the worst!&#8221; When you come across a slightly vague story, let your imagination run wild and assume that the product owner is going to want the most complex solution possible.</p>

<p><strong>Why it&#8217;s Bullshit</strong><br />
Remember, every story is a negotiation. You&#8217;re not going to know the exact details of the story until you have your planning meeting with the product owner. Often times the product owner would never have been able to dream up the solution on which you based your estimate. </p>

<h3>7) Padding Padding Padding</h3>

<p><strong>Padding is all Bullshit</strong><br />
The problem of padding estimates creeps into nearly all of the above six issues. It introduces bad data early in the life of the project and makes every other step of the process unreliable. It&#8217;s almost always in an effort to cover one&#8217;s ass but it&#8217;s painfully transparent and reeks of amateurism.</p>

<p>Don&#8217;t pad your estimates.</p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/kOoe9SBWHto" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/12/agile-esitmation-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/12/agile-esitmation-problems/</feedburner:origLink></item>
		<item>
		<title>Intel Developer Ignite #2</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/PQ-i028YswA/</link>
		<comments>http://www.claytonlz.com/index.php/2009/11/intel-developer-ignite-2/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 17:30:49 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Social Networking]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=327</guid>
		<description><![CDATA[I had a blast presenting at the recent Intel Developer Ignite. In my quick five minute presentation I mapped ten of Aesop&#8217;s fables to modern day software engineering challenges and principles. If you missed the event, or just want to check out my presentation again, here it is!

Age-Old Solutions to Everyday Problems

Big thanks to Intel [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I had a blast presenting at the recent Intel Developer Ignite. In my quick five minute presentation I mapped ten of Aesop&#8217;s fables to modern day software engineering challenges and principles. If you missed the event, or just want to check out my presentation again, here it is!</p>

<p><a href="http://software.intel.com/en-us/videos/34age-old-solutions-to-everyday-problems34/">Age-Old Solutions to Everyday Problems</a></p>

<p>Big thanks to Intel and everyone involved for putting on a great event, I really enjoyed it and can&#8217;t wait to do it again soon.</p>

<p><object id='v_2676_1145' name='v_2676_1145' width='640' height='360' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'><param name='flashvars' value='file=http://software.intel.com/media/videos/f/e/a/b/0/5/a/feab05aa91085b7a8012516bc3533958.flv&amp;image=http://software.intel.com/media/videos/f/e/a/b/0/5/a/feab05aa91085b7a8012516bc3533958_player.jpg&amp;autostart=false&amp;bufferlength=5&amp;allowfullscreen=true&amp;plugins=http://software.intel.com/common/swf/listen&amp;title=%26%2334%3BAge-Old+Solutions+to+Everyday+Problems%26%2334%3B' /><param name='movie' value='http://software.intel.com/common/swf/mediaplayer.swf' /><param name='allowfullscreen' value='true' /><embed src='http://software.intel.com/common/swf/mediaplayer.swf' width='640' height='360' bgcolor='#FFFFFF' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='file=http://software.intel.com/media/videos/f/e/a/b/0/5/a/feab05aa91085b7a8012516bc3533958.flv&amp;image=http://software.intel.com/media/videos/f/e/a/b/0/5/a/feab05aa91085b7a8012516bc3533958_player.jpg&amp;autostart=false&amp;bufferlength=5&amp;allowfullscreen=true' allowfullscreen='true'/></object></p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/PQ-i028YswA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/11/intel-developer-ignite-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/11/intel-developer-ignite-2/</feedburner:origLink></item>
		<item>
		<title>The Secret to Full Stack Testing with Cucumber and Webrat</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/UE6F4j4r-RA/</link>
		<comments>http://www.claytonlz.com/index.php/2009/11/the-secret-to-full-stack-testing-with-cucumber-and-webrat/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 00:54:48 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[cucumber]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=318</guid>
		<description><![CDATA[Today I gave a presentation at "Desert Code Camp":http://www.desertcodecamp.com/ about BDD, Cucumber, Webrat and User Stories. If you'd like to find review the slides or download the code I used during the presentation here they are.]]></description>
			<content:encoded><![CDATA[<p></p><p>Today I gave a presentation at <a href="http://www.desertcodecamp.com/">Desert Code Camp</a> about <span class="caps">BDD,</span> Cucumber, Webrat and User Stories. If you&#8217;d like to find review the slides or download the code I used during the presentation here they are.</p>

<h3>Slides and Code</h3>

<p><a href="http://www.claytonlz.com/wp-content/uploads/2009/11/slides.pdf">Desert Code Camp <span class="caps">BDD</span> Presentation Slides</a></p>

<p><a href="http://github.com/clayton/desert-code-camp" target="_self">http://github.com/clayton/desert-code-camp</a></p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/UE6F4j4r-RA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/11/the-secret-to-full-stack-testing-with-cucumber-and-webrat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/11/the-secret-to-full-stack-testing-with-cucumber-and-webrat/</feedburner:origLink></item>
		<item>
		<title>Cucumber Table Transformations with Factory Girl Sequences</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/uEDjOh2nuTI/</link>
		<comments>http://www.claytonlz.com/index.php/2009/11/cucumber-table-transformations-with-factory-girl-sequences/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:33:49 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[authlogic]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[factory_girl]]></category>
		<category><![CDATA[transformations]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=313</guid>
		<description><![CDATA[If you're using "Cucumber":http://cukes.info and you're not using "Transformations":http://wiki.github.com/aslakhellesoy/cucumber/step-argument-transforms you're doing it wrong. I just started using these recently and ran into a problem with creating records using "Factory Girl":http://github.com/thoughtbot/factory_girl factories that made use of sequences. While trying to create multiple "Authlogic":http://github.com/binarylogic/authlogic user records with a unique <tt>email</tt> and unique <tt>single_access_token</tt> using a Cucumber table, the functionality of <tt>Factory.next(:email)</tt> wasn't working correctly, I would always get the same e-mail address. Turns out it was an easy fix, just had to use lazy attributes in my factory.]]></description>
			<content:encoded><![CDATA[<p></p><p>If you&#8217;re using <a href="http://cukes.info">Cucumber</a> and you&#8217;re not using <a href="http://wiki.github.com/aslakhellesoy/cucumber/step-argument-transforms">Transformations</a> you&#8217;re doing it wrong. I just started using these recently and ran into a problem with creating records using <a href="http://github.com/thoughtbot/factory_girl">factory_girl</a> factories that made use of sequences. While trying to create multiple <a href="http://github.com/binarylogic/authlogic">Authlogic</a> user records with a unique <tt>email</tt> and unique <tt>single_access_token</tt> using a Cucumber table, the functionality of <tt>Factory.next(:email)</tt> wasn&#8217;t working correctly, I would always get the same e-mail address. Turns out it was an easy fix, just had to use lazy attributes in my factory.</p>

<h4>The Scenario, Step Definition and Factory</h4>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="">  Scenario: Presenter List
    Given the following presenters:
      | Name    | Bio                 | Website              |
      | Clayton | Rails dev @integrum | http://claytonlz.com |
      | Chris   | Scrum @integrum     |                      |
    And I am on the homepage
    When I follow &quot;Presenters&quot;
    Then I should see &quot;Clayton&quot;
    And I should see &quot;Rails dev @integrum&quot;
    And I should see &quot;http://claytonlz.com&quot;
    Then I should see &quot;Chris&quot;
    And I should see &quot;Scrum @integrum&quot;</pre></td></tr></table></div>




<p><strong>My  Step Definition</strong><br />
This uses the Transformation table below:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="ruby">Given <span style="color:#006600; font-weight:bold;">/</span>^the following presenters:$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>table<span style="color:#006600; font-weight:bold;">|</span>
  table.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>attrs<span style="color:#006600; font-weight:bold;">|</span>
    Factory.<span style="color:#9900CC;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:user</span>, attrs<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>




<p>This transformation takes a table like the one in my scenario above, and assigns the values to a hash using the actual model attribute names (Name isn&#8217;t an attribute on a user but name is). The regular cucumber step definition &#8220;consumes&#8221; this hash for each entry in the table and passes it to a Factory for creation.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="ruby">Transform <span style="color:#006600; font-weight:bold;">/</span>^table:Name,Bio,Website$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>table<span style="color:#006600; font-weight:bold;">|</span>
  table.<span style="color:#9900CC;">hashes</span>.<span style="color:#9900CC;">map</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>hash<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#006600; font-weight:bold;">&#123;</span>:name <span style="color:#006600; font-weight:bold;">=&gt;</span> hash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:Name</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:bio</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> hash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:Bio</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:website</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> hash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:Website</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>




<p><strong>My Factory</strong></p>

<p>This is a pretty basic factory for an authlogic user model, I&#8217;m using factory_girl sequences to give me a &#8220;unique&#8221; e-mail and single access token, which are required by Authlogic.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="ruby">Factory.<span style="color:#9900CC;">define</span> <span style="color:#ff3333; font-weight:bold;">:user</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>user<span style="color:#006600; font-weight:bold;">|</span>
  user.<span style="color:#9900CC;">email</span> Factory.<span style="color:#9966CC; font-weight:bold;">next</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:email</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  user.<span style="color:#9900CC;">name</span> <span style="color:#996600;">&quot;&quot;</span>
  user.<span style="color:#9900CC;">bio</span> <span style="color:#996600;">&quot;&quot;</span>
  user.<span style="color:#9900CC;">website</span> <span style="color:#996600;">&quot;&quot;</span>
  user.<span style="color:#9900CC;">password</span> <span style="color:#996600;">&quot;password&quot;</span>
  user.<span style="color:#9900CC;">password_confirmation</span> <span style="color:#996600;">&quot;password&quot;</span>
  user.<span style="color:#9900CC;">single_access_token</span> Factory.<span style="color:#9966CC; font-weight:bold;">next</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:single_access_token</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>




<h4>The problem</h4>

<p>The above scenario will fail when it tries to create the user records via the factories. You&#8217;ll see a validation error about how the user model requires a unique e-mail and single access token. You&#8217;ll be wondering, &#8220;hey why are my sequences working?&#8221;. When you inspect the log you&#8217;ll see that they are in fact <span class="caps">NOT </span>working.</p>

<h4>The Quick Answer</h4>

<p>The easy answer to this is that you need to use lazy attributes in your factory for the sequences so that they are loaded each time instead of once.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="ruby">Factory.<span style="color:#9900CC;">define</span> <span style="color:#ff3333; font-weight:bold;">:user</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>user<span style="color:#006600; font-weight:bold;">|</span>
  user.<span style="color:#9900CC;">email</span> <span style="color:#006600; font-weight:bold;">&#123;</span> Factory.<span style="color:#9966CC; font-weight:bold;">next</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:email</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
  user.<span style="color:#9900CC;">name</span> <span style="color:#996600;">&quot;&quot;</span>
  user.<span style="color:#9900CC;">bio</span> <span style="color:#996600;">&quot;&quot;</span>
  user.<span style="color:#9900CC;">website</span> <span style="color:#996600;">&quot;&quot;</span>
  user.<span style="color:#9900CC;">password</span> <span style="color:#996600;">&quot;password&quot;</span>
  user.<span style="color:#9900CC;">password_confirmation</span> <span style="color:#996600;">&quot;password&quot;</span>
  user.<span style="color:#9900CC;">single_access_token</span> <span style="color:#006600; font-weight:bold;">&#123;</span> Factory.<span style="color:#9966CC; font-weight:bold;">next</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:single_access_token</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>




<p><strong>Notice the curly braces around the sequences</strong></p>

<h4>The Longer Answer</h4>

<p>The cucumber rdoc explains the Transform functionality, albeit somewhat hard to understand.</p>

<blockquote><p>Registers a proc that will be called with a step definition argument if it matches the pattern passed as the first argument to Transform. Alternatively, if the pattern contains captures then they will be yielded as arguments to the provided proc. The return value of the proc is consequently yielded to the step definition.</p></blockquote>

<p>I think the issue comes from something with the way these Procs are created, called and also their scope with regard to the step definition etc. I don&#8217;t think my ruby-fu is strong enough to give a good explanation but maybe I&#8217;m going in the right direction.</p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/uEDjOh2nuTI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/11/cucumber-table-transformations-with-factory-girl-sequences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/11/cucumber-table-transformations-with-factory-girl-sequences/</feedburner:origLink></item>
		<item>
		<title>Missing host to link to! Please provide :host parameter</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/WhAqV_LzxAE/</link>
		<comments>http://www.claytonlz.com/index.php/2009/11/authlogic-activation-host-parameter-gotcha/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 08:53:46 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[activation]]></category>
		<category><![CDATA[authlogic]]></category>
		<category><![CDATA[gotcha]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=305</guid>
		<description><![CDATA[If you've followed my version of the "authlogic account activation tutorial":http://www.claytonlz.com/index.php/2009/07/authlogic-account-activation-tutorial/ or the "original version":http://github.com/matthooks/authlogic-activation-tutorial by Matt Hooks you might have run into this error]]></description>
			<content:encoded><![CDATA[<p></p><p>If you&#8217;ve followed my version of the <a href="http://www.claytonlz.com/index.php/2009/07/authlogic-account-activation-tutorial/">authlogic account activation tutorial</a> or the <a href="http://github.com/matthooks/authlogic-activation-tutorial">original version</a> by Matt Hooks you might have run into this error:</p>

<code>
Missing host to link to! Please provide :host parameter or set default_url_options[:host] when sending emails
</code>

<p>When authlogic sends e-mails with the account activation link, it uses a <tt>url_for</tt> helper to build that link. Because the &#8220;Notifier&#8221; mailer is an instance of <tt>ActionMailer::Base</tt> and not <tt>ActionController::Base</tt> it doesn&#8217;t know what the <tt>host</tt> parameter of the <span class="caps">URL </span>should be, so you have to tell it explicitly.</p>

<p>Put the following into your <tt>environments/development.rb</tt> and <tt>environments/test.rb</tt>:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="ruby"><span style="color:#008000; font-style:italic;"># This assumes you're running your local development server on port 3000 via script/server</span>
config.<span style="color:#9900CC;">action_mailer</span>.<span style="color:#9900CC;">default_url_options</span> = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:host</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;127.0.0.1:3000&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span></pre></td></tr></table></div>




<p>Put this into your <tt>environments/production.rb</tt>:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="ruby"><span style="color:#008000; font-style:italic;"># Replace example.org with your actual domain name</span>
config.<span style="color:#9900CC;">action_mailer</span>.<span style="color:#9900CC;">default_url_options</span> = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:host</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;example.org&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span></pre></td></tr></table></div>
<img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/WhAqV_LzxAE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/11/authlogic-activation-host-parameter-gotcha/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/11/authlogic-activation-host-parameter-gotcha/</feedburner:origLink></item>
		<item>
		<title>Does the Chronic Time Parsing Library Break with DST Changes?</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/PjnHItvVDVc/</link>
		<comments>http://www.claytonlz.com/index.php/2009/11/ruby-chronic-dst-error/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:30:15 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[chronic]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[weirdness]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=298</guid>
		<description><![CDATA[I've been troubleshooting a problem on an existing application for the last week or so that deals with the parsing of dates using the <a href="http://chronic.rubyforge.org/">Chronic</a> time parsing library. Today the problem magically solved itself, without me doing anything. These types of self solving problems are usually more frustrating than problems you can't solve at all, so I took a little extra time to experiment with the particular date format I was using and found what might be a problem with the Chronic library when it gets to the "fall back" DST change in the fall.]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve been troubleshooting a problem on an existing application for the last week or so that deals with the parsing of dates using the <a href="http://chronic.rubyforge.org/">Chronic</a> time parsing library. Today the problem magically solved itself, without me doing anything. These types of self solving problems are usually more frustrating than problems you can&#8217;t solve at all, so I took a little extra time to experiment with the particular date format I was using and found what might be a problem with the Chronic library when it gets to the &#8220;fall back&#8221; DST change in the fall.</p>

<h4>Do You Observe <span class="caps">DST</span>?</h4>

<p>It looks like if your local environment is set to a timezone which observes <span class="caps">DST, </span>like Eastern Standard Time for instance, you get a chunk of dates around the switch in the fall where Chronic returns <tt>nil</tt> instead of the correct date. If you&#8217;re on a machine where the timezone is set to an area which does not observe <span class="caps">DST, </span>like Arizona, you won&#8217;t be able to replicate this problem.</p>

<h4>Replicating the problem</h4>

<p>Install the latest version of Chronic.</p>


<div class="wp_syntax"><div class="code"><pre class="bash">$<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> chronic</pre></div></div>




<p>Fire up <tt>irb</tt> and give the following a shot.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash">require <span style="color: #ff0000;">'chronic'</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>Date.parse<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;2009-01-01&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>..Date.parse<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;2009-12-31&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.each <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #000000; font-weight: bold;">|</span>d<span style="color: #000000; font-weight: bold;">|</span>
  puts Chronic.parse<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;next tuesday 6am&quot;</span>, :now =<span style="color: #000000; font-weight: bold;">&gt;</span> d<span style="color: #7a0874; font-weight: bold;">&#41;</span>
end</pre></td></tr></table></div>




<p>With <tt>ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]</tt> on Ubuntu and my timezone set to <span class="caps">EST</span>/New York. I see a bunch of Tuesdays and then a blank section around the end of October / beginning of November.</p>



<pre>
...snip...
Tue Oct 20 06:00:00 -0400 2009
Tue Oct 20 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
nil
nil
nil
nil
nil
nil
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 17 06:00:00 -0500 2009
Tue Nov 17 06:00:00 -0500 2009
Tue Nov 17 06:00:00 -0500 2009
...snip...
</pre>



<p>If you change your timezone to something like <span class="caps">MST</span>/Arizona you&#8217;ll see this</p>



<pre>
...snip...
Tue Oct 20 06:00:00 -0400 2009
Tue Oct 20 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Oct 27 06:00:00 -0400 2009
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 03 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 10 06:00:00 -0500 2009
Tue Nov 17 06:00:00 -0500 2009
Tue Nov 17 06:00:00 -0500 2009
Tue Nov 17 06:00:00 -0500 2009
...snip...
</pre>



<h4>What&#8217;s the Fix?</h4>

<p>None as far as I know. I&#8217;m sure one could dig into the internals of the library and figure out how to deal with this problem, but I&#8217;m not up for that right now.</p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/PjnHItvVDVc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/11/ruby-chronic-dst-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/11/ruby-chronic-dst-error/</feedburner:origLink></item>
		<item>
		<title>Make Fun of Your Client To Prevent Defects</title>
		<link>http://feedproxy.google.com/~r/claytonlengelzigich/~3/iG9oukeTk7E/</link>
		<comments>http://www.claytonlz.com/index.php/2009/10/make-fun-of-your-client/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 17:30:18 +0000</pubDate>
		<dc:creator>Clayton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Riffs]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[communication]]></category>

		<guid isPermaLink="false">http://www.claytonlz.com/?p=283</guid>
		<description><![CDATA[One thing I've always heard about learning a new language is that you can't consider yourself fully fluent until you can tell a joke. Telling a joke requires the understanding of homonyms and how words flow together. "So a guy walks into a bar..." sounds different than "A man enters beverage store...".

When dealing with clients, it's easy to joke about your client, but don't miss an opportunity to prevent future missteps once you know more about them.]]></description>
			<content:encoded><![CDATA[<p></p><p>One thing I&#8217;ve always heard about learning a new language is that you can&#8217;t consider yourself fully fluent until you can tell a joke. Telling a joke requires the understanding of homonyms and how words flow together. &#8220;So a guy walks into a bar&#8230;&#8221; sounds different than &#8220;A man enters beverage store&#8230;&#8221;.</p>

<p>When dealing with clients, it&#8217;s easy to joke about your client, but don&#8217;t miss an opportunity to prevent future missteps once you know more about them.</p>

<p>How often do you get off the phone with a client and immediately have a funny remark about some critique or issue they have mentioned. Typically this manifests itself when the client brings up an issue, that while important to them, is considered trivial by the developer.</p>

<blockquote>
Can you believe this guy!? I built out this whiz-bang feature and he&#8217;s just complaining about the font being too small!<br />
</blockquote>

<p>The key part of this interaction is that you&#8217;ve now got a little insight into what makes this particular client tick. When you demo the next few features and he is unimpressed by the functionality, but comments on the spacing of form elements you should skip the joke and make a mental note for the future.</p>

<p>Once you can tell a joke about your client, <em>before</em> the interaction, and you have an &#8220;I told ya so!&#8221; moment with yourself or your pair afterwards, you know you&#8217;ve made it to the next level of understanding that client. Now, the next time you deploy a feature, discuss requirements or ask a question you can preempt the inevitable by accounting for those quirks and personal preferences of your client.</p>

<p>Instead of making a joke, make them happy, then you can both smile. ;)</p><img src="http://feeds.feedburner.com/~r/claytonlengelzigich/~4/iG9oukeTk7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.claytonlz.com/index.php/2009/10/make-fun-of-your-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.claytonlz.com/index.php/2009/10/make-fun-of-your-client/</feedburner:origLink></item>
	</channel>
</rss>
