<?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"
	>
<channel>
	<title>Comments on: Use vr.s Reuse, or The Second Derivitive of Programming</title>
	<atom:link href="http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/</link>
	<description>Robert Fischer and Brian Hurt on Punditry, Programming Languages, and Other Religious Issues</description>
	<pubDate>Thu, 20 Nov 2008 10:57:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Upped The Recent Post/Popular Post Widget Count &#124; Enfranchised Mind</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-33661</link>
		<dc:creator>Upped The Recent Post/Popular Post Widget Count &#124; Enfranchised Mind</dc:creator>
		<pubDate>Tue, 12 Aug 2008 19:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-33661</guid>
		<description>[...] Use vr.s Reuse, or The Second Derivitive of Programming [...]</description>
		<content:encoded><![CDATA[<p>[...] Use vr.s Reuse, or The Second Derivitive of Programming [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enfranchised Mind &#187; Development Acceleration: The Second Derivative of Functionality</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-33397</link>
		<dc:creator>Enfranchised Mind &#187; Development Acceleration: The Second Derivative of Functionality</dc:creator>
		<pubDate>Fri, 20 Jun 2008 16:17:21 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-33397</guid>
		<description>[...] Brian beat me to the punch: he&#8217;s posted about The Second Derivative of Programming, which is an idea that we&#8217;ve been kicking around for a while over the phone. It&#8217;s a [...]</description>
		<content:encoded><![CDATA[<p>[...] Brian beat me to the punch: he&#8217;s posted about The Second Derivative of Programming, which is an idea that we&#8217;ve been kicking around for a while over the phone. It&#8217;s a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enfranchised Mind &#187; 7 Actually Useful Things You Didn&#8217;t Know Static Typing Could Do: An Introduction for the Dynamic Language Enthusiast</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-33004</link>
		<dc:creator>Enfranchised Mind &#187; 7 Actually Useful Things You Didn&#8217;t Know Static Typing Could Do: An Introduction for the Dynamic Language Enthusiast</dc:creator>
		<pubDate>Mon, 14 Apr 2008 14:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-33004</guid>
		<description>[...] code, and just the core logic is left behind. It also enables that wonderful productivity boost of surprising reuse in more places: you don&#8217;t have to be a Java coder for too long before you discover a place [...]</description>
		<content:encoded><![CDATA[<p>[...] code, and just the core logic is left behind. It also enables that wonderful productivity boost of surprising reuse in more places: you don&#8217;t have to be a Java coder for too long before you discover a place [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Labnotes &#187; Rounded Corners - 146 (Second derivative)</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-31669</link>
		<dc:creator>Labnotes &#187; Rounded Corners - 146 (Second derivative)</dc:creator>
		<pubDate>Wed, 12 Sep 2007 19:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-31669</guid>
		<description>[...] second derivative. So I started reading &#8216;Use vr.s Reuse, or The Second Derivitive of Programming&#8217; (sic), and soon enough bumped into some points I disagree with, I thought they were eager [...]</description>
		<content:encoded><![CDATA[<p>[...] second derivative. So I started reading &#8216;Use vr.s Reuse, or The Second Derivitive of Programming&#8217; (sic), and soon enough bumped into some points I disagree with, I thought they were eager [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enfranchised Mind</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-31657</link>
		<dc:creator>Enfranchised Mind</dc:creator>
		<pubDate>Tue, 11 Sep 2007 02:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-31657</guid>
		<description>&lt;strong&gt;Development Acceleration: The Second Derivative of Functionality...&lt;/strong&gt;

So, Brian beat me to the punch: he&#8217;s posted about The Second Derivative of Programming, which is an idea that we&#8217;ve been kicking around for a while over the phone.  It&#8217;s a good post, and I highly suggest tackling it.
(Note to self #1:...</description>
		<content:encoded><![CDATA[<p><strong>Development Acceleration: The Second Derivative of Functionality&#8230;</strong></p>
<p>So, Brian beat me to the punch: he&#8217;s posted about The Second Derivative of Programming, which is an idea that we&#8217;ve been kicking around for a while over the phone.  It&#8217;s a good post, and I highly suggest tackling it.<br />
(Note to self #1:&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fischer</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-31653</link>
		<dc:creator>Robert Fischer</dc:creator>
		<pubDate>Mon, 10 Sep 2007 00:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-31653</guid>
		<description>&lt;blockquote&gt;Duck typing, aka structural type equivelence, is also a big feature helping code reuse. &lt;em&gt;[...]&lt;/em&gt;  It doesn’t matter if the class can quack and waddle, if the programmer didn’t say you could use it as a duck, you can’t use it as a duck. At least, not without a lot of work.&lt;/blockquote&gt;

For more on this, see the 2nd and 3rd paragraph of &lt;a href="http://enfranchisedmind.com/blog/archive/2007/02/17/193" target="v" rel="nofollow"&gt;my "Implementation Exposure Through Inheritance"&lt;/a&gt; post.</description>
		<content:encoded><![CDATA[<blockquote><p>Duck typing, aka structural type equivelence, is also a big feature helping code reuse. <em>[...]</em>  It doesn’t matter if the class can quack and waddle, if the programmer didn’t say you could use it as a duck, you can’t use it as a duck. At least, not without a lot of work.</p></blockquote>
<p>For more on this, see the 2nd and 3rd paragraph of <a href="http://enfranchisedmind.com/blog/archive/2007/02/17/193" target="v" rel="nofollow">my &#8220;Implementation Exposure Through Inheritance&#8221;</a> post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fischer</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-31652</link>
		<dc:creator>Robert Fischer</dc:creator>
		<pubDate>Mon, 10 Sep 2007 00:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-31652</guid>
		<description>&lt;blockquote&gt;Because, by the definition I’ve laid out above, refactoring is not reuse. Refactoring is the process of adding uses cases to the set of uses cases a peice of code is designed to be used with. You can tell this by the fact that “rearchitect” and “redesign” are commonly used as synonyms for refactor.

Another synonym for refactor is “rewrite”. And herein lies the rub. &lt;/blockquote&gt;

That's not refactoring like I would use the term.

Wikipedia (the real-life &lt;a href="http://en.wikipedia.org/wiki/The_Guide_%28character%29#Description" target="v" rel="nofollow"&gt;The Guide&lt;/a&gt;) has &lt;a href="http://en.wikipedia.org/wiki/Refactoring" target="v" rel="nofollow"&gt;a better definition&lt;/a&gt;: &lt;em&gt;A code refactoring is any change to a computer program's code which improves its readability or simplifies its structure without changing its results.&lt;/em&gt; 

The purpose of refactoring a piece of code is not to tack on additional use cases -- it's to make maintenance of the code easier.  This is why you don't have to write or change test cases while you're refactoring: the API is staying stable.</description>
		<content:encoded><![CDATA[<blockquote><p>Because, by the definition I’ve laid out above, refactoring is not reuse. Refactoring is the process of adding uses cases to the set of uses cases a peice of code is designed to be used with. You can tell this by the fact that “rearchitect” and “redesign” are commonly used as synonyms for refactor.</p>
<p>Another synonym for refactor is “rewrite”. And herein lies the rub. </p></blockquote>
<p>That&#8217;s not refactoring like I would use the term.</p>
<p>Wikipedia (the real-life <a href="http://en.wikipedia.org/wiki/The_Guide_%28character%29#Description" target="v" rel="nofollow">The Guide</a>) has <a href="http://en.wikipedia.org/wiki/Refactoring" target="v" rel="nofollow">a better definition</a>: <em>A code refactoring is any change to a computer program&#8217;s code which improves its readability or simplifies its structure without changing its results.</em> </p>
<p>The purpose of refactoring a piece of code is not to tack on additional use cases &#8212; it&#8217;s to make maintenance of the code easier.  This is why you don&#8217;t have to write or change test cases while you&#8217;re refactoring: the API is staying stable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/2007/09/09/use-vrs-reuse-or-the-second-derivitive-of-programming/#comment-31650</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sun, 09 Sep 2007 16:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/09/328#comment-31650</guid>
		<description>One thing I wanted to work in to this post, but just didn't "fit in", is Haskell's deforrestation and it's importance to reuse.  Consider the code:

&lt;CODE&gt;map f (map g lst)&lt;/CODE&gt;

What the Haskell compiler does (well, the GHC compiler with the right options turned on, anyways) is convert the above code to:

&lt;CODE&gt;map (f . g) lst&lt;/CODE&gt;

where the period is the composition operator (&lt;CODE&gt;(f . g) x = f (g x)&lt;/CODE&gt;).

Now, what's important about this is that the original nested maps are not something programmers tend to write straight up (although maybe we should)- code like that doesn't tend to show up in the use cases programmers tend to think about.  But they are a common pattern that shows up when you're reusing code.  

A common excuse programmers give when breaking reuse is performance.  It's important for the compiler to eliminate that excuse as much as possible, and that encourages reuse.    Deforrestation is one of the many reasons Haskell is a powerfull language.</description>
		<content:encoded><![CDATA[<p>One thing I wanted to work in to this post, but just didn&#8217;t &#8220;fit in&#8221;, is Haskell&#8217;s deforrestation and it&#8217;s importance to reuse.  Consider the code:</p>
<p><code>map f (map g lst)</code></p>
<p>What the Haskell compiler does (well, the GHC compiler with the right options turned on, anyways) is convert the above code to:</p>
<p><code>map (f . g) lst</code></p>
<p>where the period is the composition operator (<code>(f . g) x = f (g x)</code>).</p>
<p>Now, what&#8217;s important about this is that the original nested maps are not something programmers tend to write straight up (although maybe we should)- code like that doesn&#8217;t tend to show up in the use cases programmers tend to think about.  But they are a common pattern that shows up when you&#8217;re reusing code.  </p>
<p>A common excuse programmers give when breaking reuse is performance.  It&#8217;s important for the compiler to eliminate that excuse as much as possible, and that encourages reuse.    Deforrestation is one of the many reasons Haskell is a powerfull language.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
