<?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: Go Easy on the Maintenance Programmer</title>
	<atom:link href="http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/feed" rel="self" type="application/rss+xml" />
	<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer</link>
	<description>Adventures in Programming</description>
	<lastBuildDate>Fri, 02 Apr 2010 16:07:43 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mcherm</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-308</link>
		<dc:creator>mcherm</dc:creator>
		<pubDate>Thu, 31 Jul 2008 12:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-308</guid>
		<description>@Roy:

I actually don&#039;t KNOW &quot;Who the heck is that?&quot; I have an interesting practice with my illustrations. There are a few that I photograph, create or draw myself, but these are the minority. Most are pictures gathered from flickr, which people have chosen to license under a Creative Commons license that allows others to use it. You can identify these because clicking on the picture leads you to the original photographer&#039;s site on flickr. In this case, I searched for a good photograph of someone pulling their hair out (preferably a woman since on my blog the &quot;default&quot; programmer is usually a woman). As it turns out, someone whose username is &quot;dearbarbie&quot; took an excellent picture of just that.</description>
		<content:encoded><![CDATA[<p>@Roy:</p>
<p>I actually don&#8217;t KNOW &#8220;Who the heck is that?&#8221; I have an interesting practice with my illustrations. There are a few that I photograph, create or draw myself, but these are the minority. Most are pictures gathered from flickr, which people have chosen to license under a Creative Commons license that allows others to use it. You can identify these because clicking on the picture leads you to the original photographer&#8217;s site on flickr. In this case, I searched for a good photograph of someone pulling their hair out (preferably a woman since on my blog the &#8220;default&#8221; programmer is usually a woman). As it turns out, someone whose username is &#8220;dearbarbie&#8221; took an excellent picture of just that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymous</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-291</link>
		<dc:creator>anonymous</dc:creator>
		<pubDate>Mon, 21 Jul 2008 12:33:13 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-291</guid>
		<description>&gt;&gt;&gt; This is how it can take hours to decide whether 10 minutes of trivial code is safe to write.

Precisely.. In one of my previous jobs, I was a junior maintenance developer. I had a project manager, who asked me to change something in the morning, and I completed it in the evening. He shouted at me asking why I took a day to modify not more than 20 lines of code. 

I told him the story about an engineer who is asked to fix a machine in a factory. He spends a few hours investigating the machinery and marks the defective part with a chalk, asks the company to replace it, and sends a bill of 100. The company asks why 100 for a chalk mark. The engineer sends another bill - 1 for the chalk and 99 for knowing where to put the mark. 

I guess he got the idea.. though I had to leave the company.</description>
		<content:encoded><![CDATA[<p>&gt;&gt;&gt; This is how it can take hours to decide whether 10 minutes of trivial code is safe to write.</p>
<p>Precisely.. In one of my previous jobs, I was a junior maintenance developer. I had a project manager, who asked me to change something in the morning, and I completed it in the evening. He shouted at me asking why I took a day to modify not more than 20 lines of code. </p>
<p>I told him the story about an engineer who is asked to fix a machine in a factory. He spends a few hours investigating the machinery and marks the defective part with a chalk, asks the company to replace it, and sends a bill of 100. The company asks why 100 for a chalk mark. The engineer sends another bill &#8211; 1 for the chalk and 99 for knowing where to put the mark. </p>
<p>I guess he got the idea.. though I had to leave the company.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SeanJA</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-290</link>
		<dc:creator>SeanJA</dc:creator>
		<pubDate>Sun, 20 Jul 2008 00:06:24 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-290</guid>
		<description>Wouldn&#039;t adding another List to the parameters mean that you now would have to go through each line of code to make sure that they are all calling the function correctly? I know this is simple with &quot;Right Click -&gt; Refactor Code&quot;, so if you were to go this route would there not be a better way of doing it? Perhaps not by sending another list through but rather having a switch type variable &quot;int listType&quot; perhaps?</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t adding another List to the parameters mean that you now would have to go through each line of code to make sure that they are all calling the function correctly? I know this is simple with &#8220;Right Click -&gt; Refactor Code&#8221;, so if you were to go this route would there not be a better way of doing it? Perhaps not by sending another list through but rather having a switch type variable &#8220;int listType&#8221; perhaps?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Lee Smith</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-289</link>
		<dc:creator>Mark Lee Smith</dc:creator>
		<pubDate>Fri, 18 Jul 2008 23:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-289</guid>
		<description>Note: I&#039;m not implying that this is what you were advocating.</description>
		<content:encoded><![CDATA[<p>Note: I&#8217;m not implying that this is what you were advocating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Lee Smith</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-288</link>
		<dc:creator>Mark Lee Smith</dc:creator>
		<pubDate>Fri, 18 Jul 2008 23:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-288</guid>
		<description>You&#039;re not wrong: reducing side-effects can be said to increase cohesion in the system. That said I think it&#039;s more important to strike a balance.

There are times when side-effects make life a whole lot easier. At the same time there are situations where side-effects can cause a whole lot of trouble.

As a general rule: eschew side-effects that you can do without, but don&#039;t make things harder yourself by trying to make them easier.

The functional-programming ideology is very tantalizing, but it&#039;s easily be taken to far. Not that I&#039;m saying you&#039;re guilty of this :).

I&#039;ve done this in the past and it&#039;s certainly not fun. I wouldn&#039;t advocate that any programmer attempt to avoid side-effects completely. Not even Haskell programmers do that! Instead, they use handy dandy tricks like monads to keep them in check.</description>
		<content:encoded><![CDATA[<p>You&#8217;re not wrong: reducing side-effects can be said to increase cohesion in the system. That said I think it&#8217;s more important to strike a balance.</p>
<p>There are times when side-effects make life a whole lot easier. At the same time there are situations where side-effects can cause a whole lot of trouble.</p>
<p>As a general rule: eschew side-effects that you can do without, but don&#8217;t make things harder yourself by trying to make them easier.</p>
<p>The functional-programming ideology is very tantalizing, but it&#8217;s easily be taken to far. Not that I&#8217;m saying you&#8217;re guilty of this :).</p>
<p>I&#8217;ve done this in the past and it&#8217;s certainly not fun. I wouldn&#8217;t advocate that any programmer attempt to avoid side-effects completely. Not even Haskell programmers do that! Instead, they use handy dandy tricks like monads to keep them in check.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcherm</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-287</link>
		<dc:creator>mcherm</dc:creator>
		<pubDate>Fri, 18 Jul 2008 20:56:33 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-287</guid>
		<description>Mark:

I had a REALLY difficult time writing this article, for two reasons. The first, was that it was difficult to come up with an example that was simple enough (short enough) to fit in the article. The second reason was that when I really dug into it, I discovered that I didn&#039;t have a well-defined idea of just what I meant by code with &quot;no side effects&quot;.

I am now in the Justice Stewart state with regard to this: I know it when I see it. A simple setter method isn&#039;t &quot;side effects&quot; (or at least not the kind that bothers me). A method called calculateRate() that updates the rate on an object is OK (but closer to the borderline). A method that loops through a list calling a function, but also caches some kind of total in an instance variable, that IS a &quot;side effect&quot;.

Certainly the second approach (without the instance variable) is DIFFERENT -- the rest of the code would need to be different also. My claim is that IF the entire codebase were written this way, that it would be easier to maintain because the maintainer would have to &quot;fully understand&quot; a much smaller portion of the code in order to safely make the change.</description>
		<content:encoded><![CDATA[<p>Mark:</p>
<p>I had a REALLY difficult time writing this article, for two reasons. The first, was that it was difficult to come up with an example that was simple enough (short enough) to fit in the article. The second reason was that when I really dug into it, I discovered that I didn&#8217;t have a well-defined idea of just what I meant by code with &#8220;no side effects&#8221;.</p>
<p>I am now in the Justice Stewart state with regard to this: I know it when I see it. A simple setter method isn&#8217;t &#8220;side effects&#8221; (or at least not the kind that bothers me). A method called calculateRate() that updates the rate on an object is OK (but closer to the borderline). A method that loops through a list calling a function, but also caches some kind of total in an instance variable, that IS a &#8220;side effect&#8221;.</p>
<p>Certainly the second approach (without the instance variable) is DIFFERENT &#8212; the rest of the code would need to be different also. My claim is that IF the entire codebase were written this way, that it would be easier to maintain because the maintainer would have to &#8220;fully understand&#8221; a much smaller portion of the code in order to safely make the change.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Morris</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-286</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Fri, 18 Jul 2008 20:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-286</guid>
		<description>Eschew side-effects is a great programming mantra. However, Java makes this extremely difficult. If you&#039;re stuck on legacy Java junk, try moving to Scala. If this doesn&#039;t suit the irrationality of the suits, there is Functional Java.</description>
		<content:encoded><![CDATA[<p>Eschew side-effects is a great programming mantra. However, Java makes this extremely difficult. If you&#8217;re stuck on legacy Java junk, try moving to Scala. If this doesn&#8217;t suit the irrationality of the suits, there is Functional Java.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Lee Smith</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-285</link>
		<dc:creator>Mark Lee Smith</dc:creator>
		<pubDate>Fri, 18 Jul 2008 19:32:16 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-285</guid>
		<description>Forgive me for saying this but have you not just replaced a binding with a behaviour? Conceptually submitOrders is now called wherever totalValidOrders was referenced. You still need to investigate these places to find out what value they expected.

Minimizing side effects can certainly be an advantage in some situations, but this doesn&#039;t strike me as one of them. It hardly reduces the amount of work required in this example!

The claim that this is easier seems to hinge on the fact that callsites are better known (documented?) and hence easier to check. That sounds like it has very little to do with &quot;the advantages of functional programming&quot;.

We&#039;ll ignore the potential performance penalty that results from doing this as I doubt it&#039;s that important here. 

Thanks for the interesting article, it was well written and entertaining, even if I don&#039;t agree :).</description>
		<content:encoded><![CDATA[<p>Forgive me for saying this but have you not just replaced a binding with a behaviour? Conceptually submitOrders is now called wherever totalValidOrders was referenced. You still need to investigate these places to find out what value they expected.</p>
<p>Minimizing side effects can certainly be an advantage in some situations, but this doesn&#8217;t strike me as one of them. It hardly reduces the amount of work required in this example!</p>
<p>The claim that this is easier seems to hinge on the fact that callsites are better known (documented?) and hence easier to check. That sounds like it has very little to do with &#8220;the advantages of functional programming&#8221;.</p>
<p>We&#8217;ll ignore the potential performance penalty that results from doing this as I doubt it&#8217;s that important here. </p>
<p>Thanks for the interesting article, it was well written and entertaining, even if I don&#8217;t agree :).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: james woodyatt</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-284</link>
		<dc:creator>james woodyatt</dc:creator>
		<pubDate>Fri, 18 Jul 2008 18:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-284</guid>
		<description>One proverb I learned at the knee of a chief architect who came out of the early Ingres developer pool is this: &quot;Real programmers know there are only three numbers.  Zero, One and Many.  And the truly advanced programmers are never too sure about the distinction between One and Many.&quot;</description>
		<content:encoded><![CDATA[<p>One proverb I learned at the knee of a chief architect who came out of the early Ingres developer pool is this: &#8220;Real programmers know there are only three numbers.  Zero, One and Many.  And the truly advanced programmers are never too sure about the distinction between One and Many.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RBeatty</title>
		<link>http://mcherm.com/permalinks/1/go-easy-on-the-maintenance-programmer/comment-page-1#comment-283</link>
		<dc:creator>RBeatty</dc:creator>
		<pubDate>Fri, 18 Jul 2008 14:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=82#comment-283</guid>
		<description>Michael,

May I recommend that your future illustrations include a caption.  The immediate question I had was not &quot;What did Michael write?&quot; but &quot;Who the heck is that?&quot;

Roy</description>
		<content:encoded><![CDATA[<p>Michael,</p>
<p>May I recommend that your future illustrations include a caption.  The immediate question I had was not &#8220;What did Michael write?&#8221; but &#8220;Who the heck is that?&#8221;</p>
<p>Roy</p>
]]></content:encoded>
	</item>
</channel>
</rss>

