<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Beware the mechanical coder, my son&#8230;</title>
	<atom:link href="http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/feed/" rel="self" type="application/rss+xml" />
	<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/</link>
	<description>Robert&#039;s Rambling Ruminations Regarding Reality...</description>
	<lastBuildDate>Thu, 12 Apr 2012 16:31:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Robert Watkins</title>
		<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/#comment-104</link>
		<dc:creator><![CDATA[Robert Watkins]]></dc:creator>
		<pubDate>Mon, 21 Feb 2005 14:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-104</guid>
		<description><![CDATA[Ah, but the first one indicates a greater degree of cluelessness, and that&#039;s what I&#039;m finding offensive.

The second one, of course, is the greater problem.
]]></description>
		<content:encoded><![CDATA[<p>Ah, but the first one indicates a greater degree of cluelessness, and that&#8217;s what I&#8217;m finding offensive.</p>
<p>The second one, of course, is the greater problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/#comment-103</link>
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Mon, 21 Feb 2005 13:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-103</guid>
		<description><![CDATA[But it is the second one with serious real world implications.

But fixing the second one will require a lot more testing then the first.
]]></description>
		<content:encoded><![CDATA[<p>But it is the second one with serious real world implications.</p>
<p>But fixing the second one will require a lot more testing then the first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Watkins</title>
		<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/#comment-102</link>
		<dc:creator><![CDATA[Robert Watkins]]></dc:creator>
		<pubDate>Mon, 21 Feb 2005 11:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-102</guid>
		<description><![CDATA[Probably the first one. That&#039;s a basic Java issue, whereas the &quot;fetch IDs and delete one-by-one&quot; is one step further up.

To answer Charles: the string appends isn&#039;t a problem. As can be clearly seen, all the strings are constant; the compiler will simply run them together at compile time (a standard optimisation technique).
]]></description>
		<content:encoded><![CDATA[<p>Probably the first one. That&#8217;s a basic Java issue, whereas the &#8220;fetch IDs and delete one-by-one&#8221; is one step further up.</p>
<p>To answer Charles: the string appends isn&#8217;t a problem. As can be clearly seen, all the strings are constant; the compiler will simply run them together at compile time (a standard optimisation technique).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/#comment-101</link>
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Sat, 19 Feb 2005 21:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-101</guid>
		<description><![CDATA[But which one offends you more? The mindless use of StringBuffer (probably cause someone told them that if you are building up strings, ALWAYS use a string buffer. If I had a doller for everytime...)

OR

The n+1?
]]></description>
		<content:encoded><![CDATA[<p>But which one offends you more? The mindless use of StringBuffer (probably cause someone told them that if you are building up strings, ALWAYS use a string buffer. If I had a doller for everytime&#8230;)</p>
<p>OR</p>
<p>The n+1?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles</title>
		<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/#comment-100</link>
		<dc:creator><![CDATA[Charles]]></dc:creator>
		<pubDate>Sat, 19 Feb 2005 05:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-100</guid>
		<description><![CDATA[The problem with the first one is clearly that he uses the stringbuffer, ostensibly for performance reasons but then uses string concatenation anyways instead of calling .append()
]]></description>
		<content:encoded><![CDATA[<p>The problem with the first one is clearly that he uses the stringbuffer, ostensibly for performance reasons but then uses string concatenation anyways instead of calling .append()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Watkins</title>
		<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/#comment-99</link>
		<dc:creator><![CDATA[Robert Watkins]]></dc:creator>
		<pubDate>Fri, 18 Feb 2005 18:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-99</guid>
		<description><![CDATA[Yes, as you say, it uses a StringBuffer when not needed; the template, BTW, comes from a dynamically constructed query elsewhere in the class.

The problem with the latter is that it does a query to get back the IDs, then iterates through the list and brings them back one at a time. Thus, you get N+1 database calls, instead of just 1.

The problem with all of it is that the person who wrote it just mechanically copied something else rather than understand it.
]]></description>
		<content:encoded><![CDATA[<p>Yes, as you say, it uses a StringBuffer when not needed; the template, BTW, comes from a dynamically constructed query elsewhere in the class.</p>
<p>The problem with the latter is that it does a query to get back the IDs, then iterates through the list and brings them back one at a time. Thus, you get N+1 database calls, instead of just 1.</p>
<p>The problem with all of it is that the person who wrote it just mechanically copied something else rather than understand it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niels</title>
		<link>http://twasink.net/2005/02/18/beware-the-mechanical-coder-my-son/#comment-98</link>
		<dc:creator><![CDATA[Niels]]></dc:creator>
		<pubDate>Fri, 18 Feb 2005 18:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-98</guid>
		<description><![CDATA[The only problem I see in the first fragment is that it uses a StringBuffer instead of a plain String. The concatenation will be handled at compiletime anyway.

Not beign hibernate-savvy, I won&#039;t comment on the second fragment.
]]></description>
		<content:encoded><![CDATA[<p>The only problem I see in the first fragment is that it uses a StringBuffer instead of a plain String. The concatenation will be handled at compiletime anyway.</p>
<p>Not beign hibernate-savvy, I won&#8217;t comment on the second fragment.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

