<?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: Some Java &#8220;Strangelets&#8221;</title>
	<atom:link href="http://closingbraces.net/2007/03/05/strangelets/feed/" rel="self" type="application/rss+xml" />
	<link>http://closingbraces.net/2007/03/05/strangelets/</link>
	<description>After-hours notes and opinions on Java and system development</description>
	<lastBuildDate>Wed, 11 Jan 2012 18:00:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: closingbraces</title>
		<link>http://closingbraces.net/2007/03/05/strangelets/#comment-54</link>
		<dc:creator><![CDATA[closingbraces]]></dc:creator>
		<pubDate>Sat, 10 Mar 2007 14:25:49 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.net/2007/03/05/strangelets/#comment-54</guid>
		<description><![CDATA[Paul, 

Probably here first, then maybe one or more of the many snippet/tip sites. But it&#039;d have to be pretty useful and non-obvious to seem worth publishing. Most such sites seem full of trivial examples of using APIs that are themselves quite adequately documented. They often seem incomplete or poorly coded, and ignore the alternatives, variations and trade-offs that are usually involved. Then again I don&#039;t particularly search for snippets, just never seem to need to. So maybe I just haven&#039;t seen the right sites yet? Any you would recommend?

No doubt some people find snippets useful, but I&#039;d feel wasteful posting any that are just examples of normal code and API calls.]]></description>
		<content:encoded><![CDATA[<p>Paul, </p>
<p>Probably here first, then maybe one or more of the many snippet/tip sites. But it&#8217;d have to be pretty useful and non-obvious to seem worth publishing. Most such sites seem full of trivial examples of using APIs that are themselves quite adequately documented. They often seem incomplete or poorly coded, and ignore the alternatives, variations and trade-offs that are usually involved. Then again I don&#8217;t particularly search for snippets, just never seem to need to. So maybe I just haven&#8217;t seen the right sites yet? Any you would recommend?</p>
<p>No doubt some people find snippets useful, but I&#8217;d feel wasteful posting any that are just examples of normal code and API calls.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul M</title>
		<link>http://closingbraces.net/2007/03/05/strangelets/#comment-52</link>
		<dc:creator><![CDATA[Paul M]]></dc:creator>
		<pubDate>Sat, 10 Mar 2007 02:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.net/2007/03/05/strangelets/#comment-52</guid>
		<description><![CDATA[If you have a completely awesome little code snippet, where would you publish it?]]></description>
		<content:encoded><![CDATA[<p>If you have a completely awesome little code snippet, where would you publish it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: closingbraces</title>
		<link>http://closingbraces.net/2007/03/05/strangelets/#comment-46</link>
		<dc:creator><![CDATA[closingbraces]]></dc:creator>
		<pubDate>Tue, 06 Mar 2007 19:44:22 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.net/2007/03/05/strangelets/#comment-46</guid>
		<description><![CDATA[David, 

Heard of jga but not looked at it before. Seems quite interesting, especially in view of the current fuss over closures. Will try and fit in a quick look sometime. But without the package names, I&#039;m not sure which jga &quot;equal&quot; and &quot;sort&quot; methods you&#039;re referring to, as I couldn&#039;t spot anything obvious in the jga javadoc or its index.

Anyway, even the standard JDK java.util.Arrays &quot;equals&quot; and &quot;sort&quot; would do the trick &lt;b&gt;IF&lt;/b&gt; the objects could be sorted in a manner compatible with their own individual &quot;equals&quot;. That is, such that [a, c, b] and [x, y, z] are respectively sorted into (for example) [a, b, c] and [z, y, x] if a.equals(z), b.equals(y), c.equals(x). 

That&#039;s fine if you have a comparator that uses the same details as used for equals, but I&#039;m not sure such a sort is possible for arbitrary objects with their own equals methods. (Maybe a comparator based on hashCode and some way of handling equal values with differing hashCodes? Anyone have an answer? Have a feeling I&#039;m missing something obvious here...).

Anyway, at that point it still seems worth encapsulating into a method, so we&#039;re just down to what the internal implementation of unorderedEquals should be (and even if a &quot;sort&quot; is possible, at the moment it sounds rather harder to be sure of and test than a more &quot;manual&quot; approach).]]></description>
		<content:encoded><![CDATA[<p>David, </p>
<p>Heard of jga but not looked at it before. Seems quite interesting, especially in view of the current fuss over closures. Will try and fit in a quick look sometime. But without the package names, I&#8217;m not sure which jga &#8220;equal&#8221; and &#8220;sort&#8221; methods you&#8217;re referring to, as I couldn&#8217;t spot anything obvious in the jga javadoc or its index.</p>
<p>Anyway, even the standard JDK java.util.Arrays &#8220;equals&#8221; and &#8220;sort&#8221; would do the trick <b>IF</b> the objects could be sorted in a manner compatible with their own individual &#8220;equals&#8221;. That is, such that [a, c, b] and [x, y, z] are respectively sorted into (for example) [a, b, c] and [z, y, x] if a.equals(z), b.equals(y), c.equals(x). </p>
<p>That&#8217;s fine if you have a comparator that uses the same details as used for equals, but I&#8217;m not sure such a sort is possible for arbitrary objects with their own equals methods. (Maybe a comparator based on hashCode and some way of handling equal values with differing hashCodes? Anyone have an answer? Have a feeling I&#8217;m missing something obvious here&#8230;).</p>
<p>Anyway, at that point it still seems worth encapsulating into a method, so we&#8217;re just down to what the internal implementation of unorderedEquals should be (and even if a &#8220;sort&#8221; is possible, at the moment it sounds rather harder to be sure of and test than a more &#8220;manual&#8221; approach).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Hall</title>
		<link>http://closingbraces.net/2007/03/05/strangelets/#comment-45</link>
		<dc:creator><![CDATA[David Hall]]></dc:creator>
		<pubDate>Tue, 06 Mar 2007 14:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.net/2007/03/05/strangelets/#comment-45</guid>
		<description><![CDATA[In jga (0.8), #3 (w/ static imports) could be done with:

&lt;code&gt;equal(sort(arr1), sort(arr2))&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>In jga (0.8), #3 (w/ static imports) could be done with:</p>
<p><code>equal(sort(arr1), sort(arr2))</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

