<?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: Beware the mechanical coder, my son&#8230;</title>
	<atom:link href="http://twasink.net/blog/2005/02/beware-the-mechanical-coder-my-son/feed/" rel="self" type="application/rss+xml" />
	<link>http://twasink.net/blog/2005/02/beware-the-mechanical-coder-my-son/</link>
	<description>Robert's Rambling Ruminations Regarding Reality</description>
	<lastBuildDate>Mon, 19 Jul 2010 23:02:46 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Robert Watkins</title>
		<link>http://twasink.net/blog/2005/02/beware-the-mechanical-coder-my-son/comment-page-1/#comment-102</link>
		<dc:creator>Robert Watkins</dc:creator>
		<pubDate>Mon, 21 Feb 2005 14:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-102</guid>
		<description>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/blog/2005/02/beware-the-mechanical-coder-my-son/comment-page-1/#comment-101</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Mon, 21 Feb 2005 13:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-101</guid>
		<description>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/blog/2005/02/beware-the-mechanical-coder-my-son/comment-page-1/#comment-100</link>
		<dc:creator>Robert Watkins</dc:creator>
		<pubDate>Mon, 21 Feb 2005 11:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-100</guid>
		<description>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/blog/2005/02/beware-the-mechanical-coder-my-son/comment-page-1/#comment-99</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sat, 19 Feb 2005 21:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-99</guid>
		<description>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/blog/2005/02/beware-the-mechanical-coder-my-son/comment-page-1/#comment-98</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Sat, 19 Feb 2005 05:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-98</guid>
		<description>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/blog/2005/02/beware-the-mechanical-coder-my-son/comment-page-1/#comment-97</link>
		<dc:creator>Robert Watkins</dc:creator>
		<pubDate>Fri, 18 Feb 2005 18:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-97</guid>
		<description>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/blog/2005/02/beware-the-mechanical-coder-my-son/comment-page-1/#comment-96</link>
		<dc:creator>Niels</dc:creator>
		<pubDate>Fri, 18 Feb 2005 18:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=110#comment-96</guid>
		<description>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>
