<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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/" version="2.0">
<channel>
	<title>Comments for satukubik</title>
	
	<link>http://satukubik.com</link>
	<description>My great explanation of my life</description>
	<pubDate>Tue, 06 Jan 2009 14:30:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/CommentsForSatukubik" type="application/rss+xml" /><item>
		<title>Comment on Java Tips: Memory Optimization for String by Bristol</title>
		<link>http://satukubik.com/2009/01/06/java-tips-memory-optimization-for-string/comment-page-1/#comment-4995</link>
		<dc:creator>Bristol</dc:creator>
		<pubDate>Tue, 06 Jan 2009 13:13:10 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=149#comment-4995</guid>
		<description>(sorry, I don't know how my comment got cut off)
... 
wouldn't it be better to use regex if you really really need to have the unique string(s)?</description>
		<content:encoded><![CDATA[<p>(sorry, I don&#8217;t know how my comment got cut off)<br />
&#8230;<br />
wouldn&#8217;t it be better to use regex if you really really need to have the unique string(s)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Tips: Memory Optimization for String by Bristol</title>
		<link>http://satukubik.com/2009/01/06/java-tips-memory-optimization-for-string/comment-page-1/#comment-4994</link>
		<dc:creator>Bristol</dc:creator>
		<pubDate>Tue, 06 Jan 2009 13:08:45 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=149#comment-4994</guid>
		<description>Wouldn't there be a lookup cost as the pool of unique strings grow?
I'd rather sacrifice a little bit of memory rather than performance.

As for parsing the XML in your example, I understand that it depends on the XML</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t there be a lookup cost as the pool of unique strings grow?<br />
I&#8217;d rather sacrifice a little bit of memory rather than performance.</p>
<p>As for parsing the XML in your example, I understand that it depends on the XML</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Tips: Memory Optimization for String by Ariya</title>
		<link>http://satukubik.com/2009/01/06/java-tips-memory-optimization-for-string/comment-page-1/#comment-4991</link>
		<dc:creator>Ariya</dc:creator>
		<pubDate>Tue, 06 Jan 2009 10:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=149#comment-4991</guid>
		<description>Beside the above mentioned problem, isn't this also a performance hit?</description>
		<content:encoded><![CDATA[<p>Beside the above mentioned problem, isn&#8217;t this also a performance hit?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Tips: Memory Optimization for String by Stephen Colebourne</title>
		<link>http://satukubik.com/2009/01/06/java-tips-memory-optimization-for-string/comment-page-1/#comment-4990</link>
		<dc:creator>Stephen Colebourne</dc:creator>
		<pubDate>Tue, 06 Jan 2009 10:19:35 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=149#comment-4990</guid>
		<description>This advice can have bad side-effects. A string object is actually just a view on an underlying char[]. If the char[] is very large, and the view very small (as can often happen with using substring on a large string such as xml) then your advice would end up caching the whole large char[] even though you are only using a small fraction of it. And this is a cache that can never be freed.

In general, String.intern() is a pretty low-level method (originally designed for JVM/compiler caching) and great care should be taken when using it in your own code.</description>
		<content:encoded><![CDATA[<p>This advice can have bad side-effects. A string object is actually just a view on an underlying char[]. If the char[] is very large, and the view very small (as can often happen with using substring on a large string such as xml) then your advice would end up caching the whole large char[] even though you are only using a small fraction of it. And this is a cache that can never be freed.</p>
<p>In general, String.intern() is a pretty low-level method (originally designed for JVM/compiler caching) and great care should be taken when using it in your own code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Tips: More About Initializing Collection by Nanda Firdausi</title>
		<link>http://satukubik.com/2009/01/05/java-tips-more-about-initializing-collection/comment-page-1/#comment-4972</link>
		<dc:creator>Nanda Firdausi</dc:creator>
		<pubDate>Mon, 05 Jan 2009 11:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=144#comment-4972</guid>
		<description>Like I said in the previous article, you can't modify the collections if you choose this way. The &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html" rel="nofollow"&gt;Javadoc&lt;/a&gt; also clearly states that the collection is immutable.

BTW, for your example if you don't intend to change the list anymore, I like this better:

List s = Collections.singletonList("First!");</description>
		<content:encoded><![CDATA[<p>Like I said in the previous article, you can&#8217;t modify the collections if you choose this way. The <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html" rel="nofollow">Javadoc</a> also clearly states that the collection is immutable.</p>
<p>BTW, for your example if you don&#8217;t intend to change the list anymore, I like this better:</p>
<p>List s = Collections.singletonList(&#8221;First!&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Tips: More About Initializing Collection by Ronsen</title>
		<link>http://satukubik.com/2009/01/05/java-tips-more-about-initializing-collection/comment-page-1/#comment-4971</link>
		<dc:creator>Ronsen</dc:creator>
		<pubDate>Mon, 05 Jan 2009 11:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=144#comment-4971</guid>
		<description>Yup, I use these APIs to avoid NPE, that's it! But you must always use the concrete classes to use it.

Bad:
List s = Collections.EMPTY_LIST;
s.add("First!");

Good:
List s = new ArrayList();
s.add("First!");</description>
		<content:encoded><![CDATA[<p>Yup, I use these APIs to avoid NPE, that&#8217;s it! But you must always use the concrete classes to use it.</p>
<p>Bad:<br />
List s = Collections.EMPTY_LIST;<br />
s.add(&#8221;First!&#8221;);</p>
<p>Good:<br />
List s = new ArrayList();<br />
s.add(&#8221;First!&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Tips: Initializing Collection by Java Tips: More About Initializing Collection | satukubik</title>
		<link>http://satukubik.com/2007/12/19/java-tips-initializing-collection/comment-page-1/#comment-4969</link>
		<dc:creator>Java Tips: More About Initializing Collection | satukubik</dc:creator>
		<pubDate>Mon, 05 Jan 2009 09:53:34 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/2007/12/19/java-tips-initializing-collection/#comment-4969</guid>
		<description>[...] time ago I wrote an article about initializing collection in Java. I just found that Java actually provides several methods to help this task if you just want to [...]</description>
		<content:encoded><![CDATA[<p>[...] time ago I wrote an article about initializing collection in Java. I just found that Java actually provides several methods to help this task if you just want to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What is the smallest positive integer that Google doesn’t know? by Eugene</title>
		<link>http://satukubik.com/2008/09/09/what-is-the-smallest-positive-integer-that-google-doesnt-know/comment-page-1/#comment-4281</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Wed, 22 Oct 2008 21:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=117#comment-4281</guid>
		<description>I am seaching for some idea to write in my blog... somehow come to your blog. best of luck. Eugene</description>
		<content:encoded><![CDATA[<p>I am seaching for some idea to write in my blog&#8230; somehow come to your blog. best of luck. Eugene</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Will Apple redefine portable game market? by Bookmarks about Market</title>
		<link>http://satukubik.com/2008/07/12/will-apple-redefine-portable-game-market/comment-page-1/#comment-3285</link>
		<dc:creator>Bookmarks about Market</dc:creator>
		<pubDate>Thu, 31 Jul 2008 02:45:32 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=108#comment-3285</guid>
		<description>[...] - bookmarked by 3 members originally found by riiview on July 16, 2008  Will Apple redefine portable game market?  http://satukubik.com/2008/07/12/will-apple-redefine-portable-game-market/ - bookmarked by 2 [...]</description>
		<content:encoded><![CDATA[<p>[...] - bookmarked by 3 members originally found by riiview on July 16, 2008  Will Apple redefine portable game market?  <a href="http://satukubik.com/2008/07/12/will-apple-redefine-portable-game-market/" rel="nofollow">http://satukubik.com/2008/07/12/will-apple-redefine-portable-game-market/</a> - bookmarked by 2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Will Apple redefine portable game market? by dani</title>
		<link>http://satukubik.com/2008/07/12/will-apple-redefine-portable-game-market/comment-page-1/#comment-3127</link>
		<dc:creator>dani</dc:creator>
		<pubDate>Mon, 14 Jul 2008 01:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://satukubik.com/?p=108#comment-3127</guid>
		<description>Iya saya juga setuju dengan aaulia, artikel kamu ini terlalu membesarkan fitur gaming di iphone/ipod yang notabene cuman sekedar tambahan saja untuk pemilik ipod, saya rasa agak susah melakukan komparasi ke suatu alat yang memang dikhusukan untuk game dibandingkan dengan alat multimedia.</description>
		<content:encoded><![CDATA[<p>Iya saya juga setuju dengan aaulia, artikel kamu ini terlalu membesarkan fitur gaming di iphone/ipod yang notabene cuman sekedar tambahan saja untuk pemilik ipod, saya rasa agak susah melakukan komparasi ke suatu alat yang memang dikhusukan untuk game dibandingkan dengan alat multimedia.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
