<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog &#187; java</title>
	<atom:link href="http://www.adamcrume.com/blog/archive/tag/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.adamcrume.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 12 Jan 2012 15:54:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unit testing graphics code</title>
		<link>http://www.adamcrume.com/blog/archive/2011/04/01/unit-testing-graphics-code</link>
		<comments>http://www.adamcrume.com/blog/archive/2011/04/01/unit-testing-graphics-code#comments</comments>
		<pubDate>Sat, 02 Apr 2011 01:07:48 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.adamcrume.com/blog/?p=164</guid>
		<description><![CDATA[I recently worked on a project that involved heavy use of custom graphics.  Specifically, lots of lines.  The code was sufficiently important and complex that it needed to be unit tested.  However, I had never unit tested drawing code before.
A simple strategy would be to paint to an image, then compare the result with a [...]]]></description>
		<wfw:commentRss>http://www.adamcrume.com/blog/archive/2011/04/01/unit-testing-graphics-code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plain TCP beats RMI</title>
		<link>http://www.adamcrume.com/blog/archive/2010/11/25/plain-tcp-beats-rmi</link>
		<comments>http://www.adamcrume.com/blog/archive/2010/11/25/plain-tcp-beats-rmi#comments</comments>
		<pubDate>Fri, 26 Nov 2010 06:43:30 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rmi]]></category>
		<category><![CDATA[tcp]]></category>

		<guid isPermaLink="false">http://www.adamcrume.com/blog/?p=154</guid>
		<description><![CDATA[I&#8217;ve been working on a class project that involves a cluster of worker machines.  Just to throw something quick together, I thought I&#8217;d use RMI.  Since I could ensure that every machine was running byte-for-byte identical programs, I didn&#8217;t think I&#8217;d run into class loading issues.  However, I&#8217;ve never had good luck with RMI, and [...]]]></description>
		<wfw:commentRss>http://www.adamcrume.com/blog/archive/2010/11/25/plain-tcp-beats-rmi/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HttpServletRequest cheat sheet</title>
		<link>http://www.adamcrume.com/blog/archive/2010/01/01/httpservletrequest-cheat-sheet</link>
		<comments>http://www.adamcrume.com/blog/archive/2010/01/01/httpservletrequest-cheat-sheet#comments</comments>
		<pubDate>Fri, 01 Jan 2010 21:44:21 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[httpservletrequest]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jee]]></category>

		<guid isPermaLink="false">http://localhost/blog/?p=53</guid>
		<description><![CDATA[
Many HttpServletRequest properties can be confusing, so I decided to create this cheat sheet. (Properties can have similar names, some properties contain delimiters and some don&#8217;t, etc.) Let&#8217;s say your domain is domain.com, and it points to a router which forwards the request to port 8080 on a server called bob with a local IP [...]]]></description>
		<wfw:commentRss>http://www.adamcrume.com/blog/archive/2010/01/01/httpservletrequest-cheat-sheet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Java DOM API sucks</title>
		<link>http://www.adamcrume.com/blog/archive/2009/12/23/the-java-dom-api-sucks</link>
		<comments>http://www.adamcrume.com/blog/archive/2009/12/23/the-java-dom-api-sucks#comments</comments>
		<pubDate>Thu, 24 Dec 2009 02:55:50 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://localhost/blog/?p=51</guid>
		<description><![CDATA[
How it sucks
I recently wrote some code to filter nodes from a DOM and had issues with NullPointerExceptions:
NodeList nl = doc.getElementsByTagName("mytag");
for(int i = 0, n = nl.getLength(); i &#60; n; i++) {
	Element elt = (Element) nl.item(i);
	if(...) {
		elt.getParentNode().removeChild(elt);
	}
}
The problem was that NodeLists are live, and removing elements while iterating changes the indexes. When I tried to [...]]]></description>
		<wfw:commentRss>http://www.adamcrume.com/blog/archive/2009/12/23/the-java-dom-api-sucks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Double.equals pitfalls</title>
		<link>http://www.adamcrume.com/blog/archive/2009/09/11/doubleequals-pitfalls</link>
		<comments>http://www.adamcrume.com/blog/archive/2009/09/11/doubleequals-pitfalls#comments</comments>
		<pubDate>Fri, 11 Sep 2009 19:12:35 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[equals]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://localhost/blog/?p=22</guid>
		<description><![CDATA[It turns out that Double.equals is not always the same as == with two double primitives. Case in point:
double a = Double.NaN;
System.out.println(a == a);
Double b = new Double(a);
System.out.println(b.equals(b));
This code will print out false and true.
What&#8217;s going on? Basically, if you look at the Javadoc for the equals method, it says that &#8220;two double values are [...]]]></description>
		<wfw:commentRss>http://www.adamcrume.com/blog/archive/2009/09/11/doubleequals-pitfalls/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using scripts to hide complexity and only making it worse</title>
		<link>http://www.adamcrume.com/blog/archive/2009/08/25/using-scripts-to-hide-complexity-and-only-making-it-worse</link>
		<comments>http://www.adamcrume.com/blog/archive/2009/08/25/using-scripts-to-hide-complexity-and-only-making-it-worse#comments</comments>
		<pubDate>Wed, 26 Aug 2009 04:29:56 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jython]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://localhost/blog/?p=14</guid>
		<description><![CDATA[
I recently had to work with software that is customizable using Jython script. As much as I like both Java and Python, this environment was a nightmare.
The problem was the inability to write Python in the Python script.  First off was the old version of Python. The script was limited to version 2.1 (8 [...]]]></description>
		<wfw:commentRss>http://www.adamcrume.com/blog/archive/2009/08/25/using-scripts-to-hide-complexity-and-only-making-it-worse/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

