<?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: Don&#8217;t Design for Reuse</title>
	<atom:link href="http://cafe.elharo.com/programming/dont-design-for-reuse/feed/" rel="self" type="application/rss+xml" />
	<link>http://cafe.elharo.com/programming/dont-design-for-reuse/</link>
	<description>Longer than a blog; shorter than a book</description>
	<lastBuildDate>Wed, 22 May 2013 10:09:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Martin Valjavec</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1382166</link>
		<dc:creator>Martin Valjavec</dc:creator>
		<pubDate>Tue, 29 Jan 2013 16:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1382166</guid>
		<description><![CDATA[Peter Kretzman said:
The “don’t design for reuse” is overstated and “baitful” here.

Yes. Reason: Any function is likely to be called from more than 1 place, so, is this &quot;reuse&quot;? Or just &quot;use&quot;? I have seen code to become less usable since it was designed with params, configs, bells and whistles to make it more &quot;reusable&quot; - for unforeseen &quot;future&quot; use.

I think, it was in his book &quot;Smalltalk Best Practice Patterns&quot;, that Kent Beck argued, we should make our code usable in the first place before we think about reusability; and we should strive to make it changeable rather than reusable since we cannot foresee, what (currently unneeded!) extra features and parameters (who will test all this?) we need to add to satisfy &quot;future&quot; requests.

I plead for a small amount of &quot;controls/parameters&quot; in our code to make it more usable, i.e. &quot;short term reusable&quot; in the foreseeable near future ... fluminis said it already: even in our applications we do not want to duplicate work, so we need to design for our own use.

For such case, my feeling is that a &quot;less ambitious&quot; library for one&#039;s own purpose might often be so much simpler than a professional one (for a much larger audience!) - which we maybe should reuse - that the simple homegrown solution can be the better (easier to learn and debug) choice ... especially if you can make it so simple that its code is very changeable (as Beck suggested): then it might be easy to adapt it to future requirements as soon as they get known ... maybe at least as easy as trying to figure out how the more complex &quot;truly flexible&quot; library functions from the pros can be tweaked by passing optional parameters or setting values in some configuration files.

To sum it up:
The most important goals are
1) simplicity while maintaining correctness
2) proper design for &quot;current use&quot; (in fact implied by correctness)
3) a coding style that eases changes in the codebase
my 2c]]></description>
		<content:encoded><![CDATA[<p>Peter Kretzman said:<br />
The “don’t design for reuse” is overstated and “baitful” here.</p>
<p>Yes. Reason: Any function is likely to be called from more than 1 place, so, is this &#8220;reuse&#8221;? Or just &#8220;use&#8221;? I have seen code to become less usable since it was designed with params, configs, bells and whistles to make it more &#8220;reusable&#8221; &#8211; for unforeseen &#8220;future&#8221; use.</p>
<p>I think, it was in his book &#8220;Smalltalk Best Practice Patterns&#8221;, that Kent Beck argued, we should make our code usable in the first place before we think about reusability; and we should strive to make it changeable rather than reusable since we cannot foresee, what (currently unneeded!) extra features and parameters (who will test all this?) we need to add to satisfy &#8220;future&#8221; requests.</p>
<p>I plead for a small amount of &#8220;controls/parameters&#8221; in our code to make it more usable, i.e. &#8220;short term reusable&#8221; in the foreseeable near future &#8230; fluminis said it already: even in our applications we do not want to duplicate work, so we need to design for our own use.</p>
<p>For such case, my feeling is that a &#8220;less ambitious&#8221; library for one&#8217;s own purpose might often be so much simpler than a professional one (for a much larger audience!) &#8211; which we maybe should reuse &#8211; that the simple homegrown solution can be the better (easier to learn and debug) choice &#8230; especially if you can make it so simple that its code is very changeable (as Beck suggested): then it might be easy to adapt it to future requirements as soon as they get known &#8230; maybe at least as easy as trying to figure out how the more complex &#8220;truly flexible&#8221; library functions from the pros can be tweaked by passing optional parameters or setting values in some configuration files.</p>
<p>To sum it up:<br />
The most important goals are<br />
1) simplicity while maintaining correctness<br />
2) proper design for &#8220;current use&#8221; (in fact implied by correctness)<br />
3) a coding style that eases changes in the codebase<br />
my 2c</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tchoupi</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1366519</link>
		<dc:creator>Tchoupi</dc:creator>
		<pubDate>Thu, 24 Jan 2013 11:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1366519</guid>
		<description><![CDATA[If I had to push your logic one step further, wouldn&#039;t it become : &quot;Don&#039;t program ! Other programmers can write the program you are going to write better than you do&quot;.

Or even more :

&quot;Don&#039;t learn about computers. Young people, born with an iPad in their hands, will get past you soon... Learn management and outsourcing instead&quot;.

I do think that you need to go through the basics, all of them. Refactoring, writing / thinking about how to write reusable code. Until it becomes automagic. And you master the subject enough to be able to decide
- when to write code
- when to spend time making it reusable
- when to leverage other people&#039;s work...

Nearly every single developers already implements the logic you describe at a basic level, by not reimplementing the Sine or Sqrt function when he needs them.]]></description>
		<content:encoded><![CDATA[<p>If I had to push your logic one step further, wouldn&#8217;t it become : &#8220;Don&#8217;t program ! Other programmers can write the program you are going to write better than you do&#8221;.</p>
<p>Or even more :</p>
<p>&#8220;Don&#8217;t learn about computers. Young people, born with an iPad in their hands, will get past you soon&#8230; Learn management and outsourcing instead&#8221;.</p>
<p>I do think that you need to go through the basics, all of them. Refactoring, writing / thinking about how to write reusable code. Until it becomes automagic. And you master the subject enough to be able to decide<br />
- when to write code<br />
- when to spend time making it reusable<br />
- when to leverage other people&#8217;s work&#8230;</p>
<p>Nearly every single developers already implements the logic you describe at a basic level, by not reimplementing the Sine or Sqrt function when he needs them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chiro</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1359373</link>
		<dc:creator>Chiro</dc:creator>
		<pubDate>Tue, 22 Jan 2013 08:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1359373</guid>
		<description><![CDATA[It is very hard to write good reusable code upfront - because you just don&#039;t know yet the needs of other people. Trying to predict and satisfy them all is a sure way to hell. 
In my experience, it is best to write the smallest working code, dealing with current issue only. And then, if ever needed, you tweak it to support your current needs also. In a few iterations you will get pretty good reusable code.
Based on my experience, writing reusable code in first iteration was, almost always, pure waste of time.]]></description>
		<content:encoded><![CDATA[<p>It is very hard to write good reusable code upfront &#8211; because you just don&#8217;t know yet the needs of other people. Trying to predict and satisfy them all is a sure way to hell.<br />
In my experience, it is best to write the smallest working code, dealing with current issue only. And then, if ever needed, you tweak it to support your current needs also. In a few iterations you will get pretty good reusable code.<br />
Based on my experience, writing reusable code in first iteration was, almost always, pure waste of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1356936</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 21 Jan 2013 14:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1356936</guid>
		<description><![CDATA[Design for reuse is a code smell; design for use instead.  If you create something that does a well defined job well, people will (re)use it. 

Don&#039;t assume you know what the future will bring, predicting the future correctly is exquisitely difficult. Of course if you already have requirements for 50 similar solutions, well that&#039;s &#039;use&#039;.]]></description>
		<content:encoded><![CDATA[<p>Design for reuse is a code smell; design for use instead.  If you create something that does a well defined job well, people will (re)use it. </p>
<p>Don&#8217;t assume you know what the future will bring, predicting the future correctly is exquisitely difficult. Of course if you already have requirements for 50 similar solutions, well that&#8217;s &#8216;use&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Stein</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1356559</link>
		<dc:creator>Ted Stein</dc:creator>
		<pubDate>Mon, 21 Jan 2013 12:13:45 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1356559</guid>
		<description><![CDATA[Horrible title. Also, horrible post.

There is a legitimate debate about dependencies vs. reusable code, but not here...]]></description>
		<content:encoded><![CDATA[<p>Horrible title. Also, horrible post.</p>
<p>There is a legitimate debate about dependencies vs. reusable code, but not here&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoffrey</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1355928</link>
		<dc:creator>Geoffrey</dc:creator>
		<pubDate>Mon, 21 Jan 2013 07:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1355928</guid>
		<description><![CDATA[&quot;Design for reuse&quot; is fundamentally flawed but I argue that it&#039;s for a different reason.

Reuse should emerge as a result of good design. What I mean by that is when a piece of code solves a highly focused problem (i.e Single Responsibility) with as few external responsibilities\interactions as possible, then it is easy to reuse that piece of code. The SOLID principles are the principles of design optimisation for maintainability and reuse. Although they are presented with a focus on OO, they apply to any language where the relationships relevant to the principle can be expressed in that language.

I completely agree with the idea of don&#039;t reinvent the wheel though.]]></description>
		<content:encoded><![CDATA[<p>&#8220;Design for reuse&#8221; is fundamentally flawed but I argue that it&#8217;s for a different reason.</p>
<p>Reuse should emerge as a result of good design. What I mean by that is when a piece of code solves a highly focused problem (i.e Single Responsibility) with as few external responsibilities\interactions as possible, then it is easy to reuse that piece of code. The SOLID principles are the principles of design optimisation for maintainability and reuse. Although they are presented with a focus on OO, they apply to any language where the relationships relevant to the principle can be expressed in that language.</p>
<p>I completely agree with the idea of don&#8217;t reinvent the wheel though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reddit Made some stupid snipes</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1354659</link>
		<dc:creator>Reddit Made some stupid snipes</dc:creator>
		<pubDate>Sun, 20 Jan 2013 21:44:29 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1354659</guid>
		<description><![CDATA[So r/programming made some stupid snipes at your post and some reasonable comments too (but it&#039;s like panning for gold in a pile of dog turd):

http://www.reddit.com/r/programming/comments/16xrmu/dont_design_for_reuse_more_hilarity_from_the/]]></description>
		<content:encoded><![CDATA[<p>So r/programming made some stupid snipes at your post and some reasonable comments too (but it&#8217;s like panning for gold in a pile of dog turd):</p>
<p><a href="http://www.reddit.com/r/programming/comments/16xrmu/dont_design_for_reuse_more_hilarity_from_the/" rel="nofollow">http://www.reddit.com/r/programming/comments/16xrmu/dont_design_for_reuse_more_hilarity_from_the/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sony Mathew</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1093906</link>
		<dc:creator>Sony Mathew</dc:creator>
		<pubDate>Thu, 26 Jul 2012 17:10:25 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1093906</guid>
		<description><![CDATA[My immediate thought was exactly as J.B. Rainsberger.  Don&#039;t code for reuse is a &quot;bad&quot; title and &quot;bad&quot; advice :-)]]></description>
		<content:encoded><![CDATA[<p>My immediate thought was exactly as J.B. Rainsberger.  Don&#8217;t code for reuse is a &#8220;bad&#8221; title and &#8220;bad&#8221; advice <img src='http://cafe.elharo.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fadi (itoctopus)</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1086329</link>
		<dc:creator>Fadi (itoctopus)</dc:creator>
		<pubDate>Wed, 18 Jul 2012 18:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1086329</guid>
		<description><![CDATA[The title of the post is misleading as J. B. Rainsberger already stated. I thought you were preaching about a new way that makes development faster by not really caring about code reuse.]]></description>
		<content:encoded><![CDATA[<p>The title of the post is misleading as J. B. Rainsberger already stated. I thought you were preaching about a new way that makes development faster by not really caring about code reuse.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jayunit100</title>
		<link>http://cafe.elharo.com/programming/dont-design-for-reuse/comment-page-1/#comment-1086161</link>
		<dc:creator>jayunit100</dc:creator>
		<pubDate>Wed, 18 Jul 2012 14:36:58 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/?p=862#comment-1086161</guid>
		<description><![CDATA[I agree, you shouldn&#039;t write a reusable http server.  But there are many instances where reusable components are still valuable.  Most importantly, a non-reusable component will be exceedingly hard to unit-test, since it might not have the level of modularity needed to run when decoupled from the production environment.  Another sort of &quot;reusable&quot; comonent which comes to mind is a domain-specific object or (for the functional guys in the audience) macro or namespace of utilities.  These will rarely exist in precise form in prebuilt FOSS libraries.  

A 3rd scenario where reusability is important is when we wish to have uniform developer idioms throughout a codebase. Often times its easier to rewrite a component that exists, or wrap it, in such a way that it more naturally interacts with our API.  When we do this, our components need to be reusable.]]></description>
		<content:encoded><![CDATA[<p>I agree, you shouldn&#8217;t write a reusable http server.  But there are many instances where reusable components are still valuable.  Most importantly, a non-reusable component will be exceedingly hard to unit-test, since it might not have the level of modularity needed to run when decoupled from the production environment.  Another sort of &#8220;reusable&#8221; comonent which comes to mind is a domain-specific object or (for the functional guys in the audience) macro or namespace of utilities.  These will rarely exist in precise form in prebuilt FOSS libraries.  </p>
<p>A 3rd scenario where reusability is important is when we wish to have uniform developer idioms throughout a codebase. Often times its easier to rewrite a component that exists, or wrap it, in such a way that it more naturally interacts with our API.  When we do this, our components need to be reusable.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
