<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Robby on Rails: Tag tdd</title>
    <link>http://www.robbyonrails.com/articles/tag/tdd</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>thoughts.sort_by{|t| t[:topic]}.collect </description>
    <item>
      <title>BDD is still kinky</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/planetargon/447627473"&gt;&lt;img src="http://farm1.static.flickr.com/214/447627473_36d5614c82.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I still believe that &lt;a href="http://www.robbyonrails.com/articles/2007/02/08/is-bdd-kinkier-than-tdd"&gt;Behavior-Driven Development is kinkier than Test-Driven Development&lt;/a&gt;...&lt;/p&gt;
</description>
      <pubDate>Tue, 10 Apr 2007 16:51:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:936e15de-98f3-41da-8ef2-895c8c6dbb0d</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/04/10/bdd-is-still-kinky</link>
      <category>Programming</category>
      <category>bdd</category>
      <category>tdd</category>
      <category>behavior</category>
      <category>driven</category>
      <category>agile</category>
      <category>development</category>
      <category>kinky</category>
      <category>rspec</category>
    </item>
    <item>
      <title>Embracing Failure, part 1</title>
      <description>&lt;p&gt;I&amp;#8217;m currently reading &lt;a href="http://www.amazon.com/Engineer-Human-Failure-Successful-Design/dp/0679734163"&gt;To Engineer is Human&lt;/a&gt;, by Henry Petroski and found the following applicable to software development and managing client and customer expectations.&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;As much as it is human to make mistakes, it is also human to want to avoid them. Murphy&amp;#8217;s Law, holding that anything that can go wrong will, is not a law of nature but a joke. All the light bulbs that last until we tire of the lamp, all the shoelaces that outlast their shoes, all the automobiles that give trouble-free service until they are traded in have the last laugh on Murphy. Just as he will not outlive his law, so nothing manufactured can be or is expected to last forever. Once we recognize this elementary fact, the possibility of a machine or a building being as near to perfect for its designed lifetime as its creators may strive to be for theirs is not only a realistic goal but also a reasonable expectation for consumers. It is only when we set ourselves such an unrealistic goal as buying a shoelace that will never break, inventing a perpetual motion machine, or building a vehicle that will never break down that we appear to be fools and not rational beings.&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;I&amp;#8217;m sure that most of us are guilty of having high expectations for products that we purchased. (why does my ipod screen scratch so easily when in my pocket?) We also set high expectations for the code that we develop, which is why we (hopefully) continue to refine our process. We&amp;#8217;re bound to time and budget constraints, which often prevent us from testing every imaginable edge case. Given our constraints, problems are almost always going to arise. It&amp;#8217;s no wonder that we see Test-Driven Development as an important part of a healthy development process. We want to catch our failures as early as possible.&lt;/p&gt;


	&lt;p&gt;Our clients often have high expectations and it&amp;#8217;s almost always very reasonable. That&amp;#8217;s not to say that some clients will not have highly irrational expectations. It&amp;#8217;s our job to manage these expectations as best as possible.&lt;/p&gt;


	&lt;p&gt;Do we mislead our clients by convincing them that our &lt;span class="caps"&gt;TDD&lt;/span&gt;/BDD process is going to prevent any bugs from creeping from the woodwork after the development cycle is finished?&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;&amp;#8220;I thought that we paid you to fully test the code?&amp;#8221;&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;Really&amp;#8230; is that even possible? Can we predict (and test) every possible interaction within an application? Highly unlikely.&lt;/p&gt;


	&lt;p&gt;What we &lt;em&gt;can&lt;/em&gt; do is plan for and embrace failure. We can help our clients understand that almost every application needs to be &lt;em&gt;maintained&lt;/em&gt; after it&amp;#8217;s initial development cycle. Bugs are inevitable and there needs to be a &lt;a href="http://daringfireball.net/linked/2007/march#wed-14-adobedevcycle"&gt;clear process for handling them&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Perhaps I&amp;#8217;m abusing the bug fixing process by calling it a failure&amp;#8230; but I&amp;#8217;ve also found that yes&amp;#8230; many bugs are due to failure. Whether that be a failure to &lt;a href="http://behavior-driven.org/"&gt;specify application behavior&lt;/a&gt;, a failure to understand the project goals, a &lt;a href="http://www.robbyonrails.com/articles/2006/09/27/project-enlightenment-with-d3"&gt;failure in communication&lt;/a&gt;, ...or maybe a failure in our software architecture. We&amp;#8217;re constantly failing.. and it&amp;#8217;s okay!&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;IT&amp;#8217;S &lt;span class="caps"&gt;OKAY TO FAIL&lt;/span&gt;!&lt;/strong&gt; (some of the time&amp;#8230;)&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;No one &lt;em&gt;wants&lt;/em&gt; to learn by mistakes, but we cannot learn enough from successes to go beyond the state of the art. Contrary to their popular characterization as intellectual conservatives, engineers are really among the avant-garde. They are constantly seeking to employ new concepts to reduce the weigh and thus the cost of their structures, and they are constantly striving to do more with less so the resulting structure represents an efficient use of materials. The engineer always believes he is trying something without error, but the truth of the matter is that each new structure can be a new trial. In the meantime the layman, whose spokesman is often a poet or writer, can be threatened by both the failures &lt;em&gt;and&lt;/em&gt; the successes. Such is the nature not only of science and engineering, but of all human endeavors.&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;As we&amp;#8217;re creating these virtual structures&amp;#8230; are we really taking the time to reflect on our failures? This is why some teams adopt practices like iteration retrospectives and post-mortems.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ll end this with a few questions, which I hope that you&amp;#8217;ll share your experiences about&amp;#8230;&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;In what ways is your team embracing the failures of your development projects?&lt;/li&gt;
		&lt;li&gt;How do you help manage your clients expectations&amp;#8230; so that they too can plan for and embrace failure? Isn&amp;#8217;t their new business venture on the web&amp;#8230; likely to experience some failure?&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;We have so much to learn&amp;#8230;&lt;/p&gt;
</description>
      <pubDate>Tue, 10 Apr 2007 16:38:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b216559d-75b1-443f-a42b-65a8feefe92d</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/04/10/embracing-failure-part-1</link>
      <category>Business</category>
      <category>Programming</category>
      <category>d3</category>
      <category>book</category>
      <category>tdd</category>
      <category>development</category>
      <category>testing</category>
      <category>agile</category>
      <category>design</category>
      <category>clients</category>
      <category>communication</category>
      <category>bdd</category>
      <category>failure</category>
      <category>expectations</category>
      <category>engineering</category>
    </item>
    <item>
      <title>Is BDD kinkier than TDD?</title>
      <description>&lt;p&gt;If you&amp;#8217;re in need of a compelling reason to switch from Test-Driven Development to &lt;a href="http://www.behavior-driven.org/"&gt;Behavior-Driven Development&lt;/a&gt;... consider this.&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&lt;em&gt;&amp;#8220;BDD sounds kinkier.&amp;#8221;&lt;/em&gt;  -Michael K. Loukides, Book Editor for O&amp;#8217;Reilly&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;...on that &lt;em&gt;bombshell&lt;/em&gt;... I am going to suggest that this be used as the official &lt;span class="caps"&gt;BDD&lt;/span&gt; logo.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.robbyonrails.com/files/kinkier_than_tdd.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;There you have it. Deep down&amp;#8230; the biggest reason that I switched from Test::Unit to &lt;a href="http://rspec.rubyforge.org"&gt;RSpec&lt;/a&gt;... was the sex appeal. ;-)&lt;/p&gt;


	&lt;p&gt;What was your reason?&lt;/p&gt;
</description>
      <pubDate>Thu, 08 Feb 2007 13:20:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:95d594a2-43ce-4682-b024-2a01af278078</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/02/08/is-bdd-kinkier-than-tdd</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>bdd</category>
      <category>tdd</category>
      <category>behavior</category>
      <category>driven</category>
      <category>agile</category>
      <category>development</category>
      <category>kinky</category>
      <category>sex</category>
      <category>handcuffs</category>
      <category>rspec</category>
    </item>
    <item>
      <title>Keeping the Code Organic</title>
      <description>&lt;p&gt;The landscape around us is quickly changing-&lt;del&gt;really, it has been changing for some time now&lt;/del&gt;-we&amp;#8217;ve come a point where we admit that it&amp;#8217;s okay to want more for less. We want more features, &lt;strong&gt;in less time&lt;/strong&gt;. We want more control, for &lt;strong&gt;less money&lt;/strong&gt;. Why? When did we collectively decide that huge monolithic systems could be completed in a fraction of the time it &lt;em&gt;should&lt;/em&gt; take?&lt;/p&gt;


	&lt;p&gt;After years of working in  .NET, &lt;span class="caps"&gt;PHP&lt;/span&gt;, Perl, and even a little Python, I have gone down the road of simplicity. I want simple looking code (thank you Ruby). Code that I can hand off to another developer and for them to simply &lt;strong&gt;get it&lt;/strong&gt;&amp;#8212;which helps to keep things moving. It&amp;#8217;s about getting the project done.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt; The client wants delivery in X days, so you aim for Y days early. Shortcuts get made, tests are forgotten, code is blemished, and deadlines still manage to sneak by unmet. Why do we do this to ourselves?&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;I say, no more!&lt;/strong&gt;&lt;/p&gt;


	&lt;h3&gt;Sacrifices Are Okay&lt;/h3&gt;


	&lt;p&gt;What? You mean I can &lt;em&gt;choose&lt;/em&gt; to leave something out? I can-&lt;del&gt;dare, I say&lt;/del&gt;-tell my client &lt;strong&gt;no&lt;/strong&gt;? Yes! Well, maybe. It&amp;#8217;s time to &lt;strong&gt;re&lt;/strong&gt;-think how you view your projects. Have you asked your client, &amp;#8220;What is the &lt;strong&gt;single-most-important&lt;/strong&gt; feature of this project?&amp;#8221; Every project has one. Your customer will likely be relieved to hear that you care about the purpose of the project. And it gives you an idea as to where &lt;strong&gt;not&lt;/strong&gt; to make sacrifices, which in turn helps to identify the areas where you can.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;So, if you haven&amp;#8217;t asked them yet&amp;#8230; &lt;em&gt;ask them now&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;


	&lt;h3&gt;The Big Picture&lt;/h3&gt;


	&lt;p&gt;If things change, how will it impact your timeframe? When your schedule is threatened, it becomes easier to see what isn&amp;#8217;t necessary, or perhaps, not necessary &lt;strong&gt;right now&lt;/strong&gt;.&lt;/p&gt;


	&lt;p&gt;All features in a project are part of the big pictures. If you ask your client what is &lt;strong&gt;required&lt;/strong&gt; they will almost always respond with the all to easy, &amp;#8220;everything.&amp;#8221; Simply accepting this as fact often leads to shoddy workmanship in favor of giving your client &amp;#8220;everything.&amp;#8221; To the client it may seem like you aced the test, but that&amp;#8217;s because they don&amp;#8217;t know you&amp;#8217;ve cheated. I&amp;#8217;m sure a lot of you know what it&amp;#8217;s like to inherit the code of someone who has done this, and you know you&amp;#8217;ve probably been on the other end as well.&lt;/p&gt;


	&lt;h3&gt;A Neverending Story&lt;/h3&gt;


	&lt;p&gt;Projects aren&amp;#8217;t just instantly created, they &lt;strong&gt;evolve&lt;/strong&gt;. They need to be fine-tuned, maintained and should most certainly be &lt;a href="http://www.refactoringrails.com"&gt;refactored&lt;/a&gt; when necessary. Most projects require ongoing work&amp;#8230; because requirements &lt;strong&gt;do&lt;/strong&gt; change.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s time to stop and really consider how you approach both your clients and their projects. Can the next project be built in an evolutionary fashion? Can you focus on one new feature at a time, maintaining your tests, and &lt;em&gt;avoiding bloat&lt;/em&gt;?&lt;/p&gt;


&lt;blockquote&gt;
&amp;#8220;Big fleas have little fleas
Upon their backs to bite &amp;#8216;em:
Little fleas have lesser fleas
And so ad infinitum.&amp;#8221; 
&lt;/blockquote&gt;

	&lt;p&gt;I found this in a book that I picked up at the local Library booksale for something like 20 cents. The book, &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/B0006D8J40/qid=1130637858/sr"&gt;The New Utopians&lt;/a&gt; by, Robert Boguslaw was written in 1965 and has some  insightful thoughts on systems as &lt;strong&gt;organisms.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keep it Organic&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Pesticides are not necesary to produce quality produce. They are a cheap shortcut that can cause other problems in the longrun, and are generally not a healthy addition to the lifecycle of the fruit or vegetable (or to those who harvest it and consume it).&lt;/p&gt;


	&lt;p&gt;Test-Driven Development allows you to constantly monitor the behavior of your application. Feature-Driven Development keeps your team focused on what is currently the most important piece of your project. Don&amp;#8217;t rely on pesticide, let the project flow the way it wants to.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Keep it Flexible&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Business Rules should not be flexible&amp;#8230; but they should. That sounds confusing, but it&amp;#8217;s not. Know where to make that distinction. Add your rules first&amp;#8230; build your tests&amp;#8230; then code. Maintain flexibility &lt;strong&gt;through&lt;/strong&gt; your rules.&lt;/p&gt;


	&lt;p&gt;Test First. Code Second. Lather. Rinse. Repeat.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Be Proud of Your Code, But Not Blinded By It&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;You&amp;#8217;re&lt;/em&gt; biased. Your &lt;em&gt;code&lt;/em&gt; is biased. The opinion that you have &lt;em&gt;about&lt;/em&gt; your code is biased. You are proud of your code&amp;#8230; but you can do it better and some people are better at somethings than you are. Don&amp;#8217;t dwell on it, embrace it.&lt;/p&gt;


	&lt;p&gt;How many of you are making the mistake of being the &lt;strong&gt;only&lt;/strong&gt; programmer on a project? I&amp;#8217;m not a big fan of &lt;strong&gt;big&lt;/strong&gt; teams, but I know that &lt;strong&gt;small&lt;/strong&gt; and &lt;strong&gt;focused&lt;/strong&gt; teams are extremly productive and better positioned for the big projects of tomorrow. Find someone that you trust and trade peer-review time. Not sure where to start? Pick up a copy of &lt;a href="http://www.powells.com/biblio/4-0201485672-0"&gt;Refactoring&lt;/a&gt;.  It&amp;#8217;s time that you &lt;strong&gt;RE&lt;/strong&gt;-think how you are doing things.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Embrace Heuristics&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s time to challenge yourself. A new year is almost upon us and we&amp;#8217;re all behind on our goals&amp;#8230; because things change. This is the time to explore your possibilities. Learn something new. Don&amp;#8217;t be afraid to break things. Just learn why the thing broke. Learn to be a good tester. Learn to write cleaner code. Learn to refactor your code. Learn to make it readable.&lt;/p&gt;


	&lt;p&gt;Learn to learn&amp;#8230; and remember to buy organic. ;-)&lt;/p&gt;</description>
      <pubDate>Sat, 29 Oct 2005 20:30:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:8e3c4ec83c18f48e2eb9d05efe9ff9ac</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2005/10/29/keeping-the-code-organic</link>
      <category>Off-Topic</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>programming</category>
      <category>tdd</category>
      <category>fdd</category>
    </item>
  </channel>
</rss>
