<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Coding: Putting code where people can find it</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sun, 14 Mar 2010 14:43:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Christer Nyberg</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-26186</link>
		<dc:creator>Christer Nyberg</dc:creator>
		<pubDate>Wed, 04 Nov 2009 12:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-26186</guid>
		<description>Ed,

You can simply return the first parameter of the extension method. (The this parameter.)</description>
		<content:encoded><![CDATA[<p>Ed,</p>
<p>You can simply return the first parameter of the extension method. (The this parameter.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Builders hanging off class vs Builders in same namespace at Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-21404</link>
		<dc:creator>Builders hanging off class vs Builders in same namespace at Mark Needham</dc:creator>
		<pubDate>Sat, 15 Aug 2009 00:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-21404</guid>
		<description>[...] months ago about an approach we&#039;re using to help people find test data builders in our code base by hanging those builders off a class called &#039;GetBuilderFor&#039; and I think it&#039;s worked reasonably [...]</description>
		<content:encoded><![CDATA[<p>[...] months ago about an approach we're using to help people find test data builders in our code base by hanging those builders off a class called 'GetBuilderFor' and I think it's worked reasonably [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed Blackburn</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18321</link>
		<dc:creator>Ed Blackburn</dc:creator>
		<pubDate>Fri, 05 Jun 2009 14:26:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18321</guid>
		<description>Nathaniel / Mark,

As you can&#039;t return &#039;this&#039;. How would you implement your builders as static ext methods?</description>
		<content:encoded><![CDATA[<p>Nathaniel / Mark,</p>
<p>As you can't return 'this'. How would you implement your builders as static ext methods?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ville Oikarinen</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18288</link>
		<dc:creator>Ville Oikarinen</dc:creator>
		<pubDate>Thu, 04 Jun 2009 13:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18288</guid>
		<description>Mark, yes I ship the builder with all other production code.

It seems most people use builders only as testing tools, but why keep all nice things in test-code only? Object creation is needed in production code, too.

Especially, if you care to read the observations in the article I mentioned, fluent builders are very useful streaming tools and make the data flow (possibly through transformers) in a maintainable and efficient way.</description>
		<content:encoded><![CDATA[<p>Mark, yes I ship the builder with all other production code.</p>
<p>It seems most people use builders only as testing tools, but why keep all nice things in test-code only? Object creation is needed in production code, too.</p>
<p>Especially, if you care to read the observations in the article I mentioned, fluent builders are very useful streaming tools and make the data flow (possibly through transformers) in a maintainable and efficient way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathaniel Neitzke</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18131</link>
		<dc:creator>Nathaniel Neitzke</dc:creator>
		<pubDate>Wed, 03 Jun 2009 21:22:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18131</guid>
		<description>Ville,
Not necessarily true if the methods such as Car() in GetBuilderFor.Car() are extension methods, which I believe is the way Mark intended.</description>
		<content:encoded><![CDATA[<p>Ville,<br />
Not necessarily true if the methods such as Car() in GetBuilderFor.Car() are extension methods, which I believe is the way Mark intended.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18130</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Wed, 03 Jun 2009 21:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18130</guid>
		<description>@Ville Good point I hadn&#039;t thought about the depedency problem although with the approach that you suggest wouldn&#039;t that mean that the builder ships with your production code?</description>
		<content:encoded><![CDATA[<p>@Ville Good point I hadn't thought about the depedency problem although with the approach that you suggest wouldn't that mean that the builder ships with your production code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ville Oikarinen</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18112</link>
		<dc:creator>Ville Oikarinen</dc:creator>
		<pubDate>Wed, 03 Jun 2009 11:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18112</guid>
		<description>Hello Mark.

This pattern certainly has its uses. On the other hand, sometimes it might be a dependency problem: you cannot depend on the GetBuilderFor class without depending on all classes it has builders for.

Another trick is to make the builder an inner class of the class it is building. If the static method for accessing the builder is named &quot;with&quot;, the building sentence becomes:

Car car = Car.with().model(&quot;Model&quot;).year(2009).build();

(from http://web.sysart.fi/developer/articles:nested_fluent_builder)</description>
		<content:encoded><![CDATA[<p>Hello Mark.</p>
<p>This pattern certainly has its uses. On the other hand, sometimes it might be a dependency problem: you cannot depend on the GetBuilderFor class without depending on all classes it has builders for.</p>
<p>Another trick is to make the builder an inner class of the class it is building. If the static method for accessing the builder is named "with", the building sentence becomes:</p>
<p>Car car = Car.with().model("Model").year(2009).build();</p>
<p>(from <a href="http://web.sysart.fi/developer/articles:nested_fluent_builder)" rel="nofollow">http://web.sysart.fi/developer/articles:nested_fluent_builder)</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Hunter</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18110</link>
		<dc:creator>Rob Hunter</dc:creator>
		<pubDate>Wed, 03 Jun 2009 09:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18110</guid>
		<description>Mark, I don&#039;t know if you&#039;ve seen Pete Yandell&#039;s &quot;&lt;a href=&quot;http://github.com/notahat/machinist/tree/master&quot; rel=&quot;nofollow&quot;&gt;Machinist&lt;/a&gt;&quot; in the Ruby world, but it has a wonderful builder style with excellent findability as well as readability.

You provide Machinist with blueprints on how your object might normally be constructed:

&lt;pre&gt;&lt;code&gt;
Car.blueprint do
  year 2009
  manufacturer
  model
  description { Sham.description }
end
&lt;/code&gt;&lt;/pre&gt;

Then, you can ask Machinist to build an object and only be as specific as you need to for your test:

&lt;pre&gt;&lt;code&gt;
regular_car = Car.make
old_car = Car.make(:year =&gt; 1970)
old_audi = Car.make(:year =&gt; 1970, :manufacturer =&gt; audi)
nondescript_car = Car.make(:description =&gt; nil)
&lt;/code&gt;&lt;/pre&gt;

The blueprints are completely findable because they are (by convention) kept in one file, and the &quot;make&quot; method is on the domain class itself (just like &quot;new&quot; and &quot;create&quot;).</description>
		<content:encoded><![CDATA[<p>Mark, I don't know if you've seen Pete Yandell's "<a href="http://github.com/notahat/machinist/tree/master" rel="nofollow">Machinist</a>" in the Ruby world, but it has a wonderful builder style with excellent findability as well as readability.</p>
<p>You provide Machinist with blueprints on how your object might normally be constructed:</p>
<pre><code>
Car.blueprint do
  year 2009
  manufacturer
  model
  description { Sham.description }
end
</code></pre>
<p>Then, you can ask Machinist to build an object and only be as specific as you need to for your test:</p>
<pre><code>
regular_car = Car.make
old_car = Car.make(:year =&gt; 1970)
old_audi = Car.make(:year =&gt; 1970, :manufacturer =&gt; audi)
nondescript_car = Car.make(:description =&gt; nil)
</code></pre>
<p>The blueprints are completely findable because they are (by convention) kept in one file, and the "make" method is on the domain class itself (just like "new" and "create").</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18067</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Tue, 02 Jun 2009 14:41:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18067</guid>
		<description>I was thinking that it&#039;d be cool to write something like that! Looks like it&#039;s already been done.

Might have to give that a try out and see what it&#039;s like.

Thanks for the link.</description>
		<content:encoded><![CDATA[<p>I was thinking that it'd be cool to write something like that! Looks like it's already been done.</p>
<p>Might have to give that a try out and see what it's like.</p>
<p>Thanks for the link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed Blackburn</title>
		<link>http://www.markhneedham.com/blog/2009/06/02/coding-putting-code-where-people-can-find-it/comment-page-1/#comment-18066</link>
		<dc:creator>Ed Blackburn</dc:creator>
		<pubDate>Tue, 02 Jun 2009 14:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1291#comment-18066</guid>
		<description>Not a bad idea Mark. On the subject of builders, have you looked at NBuilder (http://code.google.com/p/nbuilder/) yet?</description>
		<content:encoded><![CDATA[<p>Not a bad idea Mark. On the subject of builders, have you looked at NBuilder (<a href="http://code.google.com/p/nbuilder/" rel="nofollow">http://code.google.com/p/nbuilder/</a>) yet?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
