<?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>Mike Mason &#187; Java</title>
	<atom:link href="http://mikemason.ca/blog/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikemason.ca/blog</link>
	<description>agile thinking</description>
	<lastBuildDate>Tue, 06 Mar 2012 17:23:17 +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>Finding Bugs Is Easy</title>
		<link>http://mikemason.ca/blog/2005/02/finding-bugs-is-easy/</link>
		<comments>http://mikemason.ca/blog/2005/02/finding-bugs-is-easy/#comments</comments>
		<pubDate>Tue, 01 Mar 2005 00:39:00 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://mikemason.ca/blog/?p=13</guid>
		<description><![CDATA[ …or so say the makers of FindBugs, an open-source bug detector for Java. When I’m asked to improve the code quality on a project often the first thing I do is to search for “obviously” bad code. By this I mean I look for stuff like String construction (you never need this in Java), [...]]]></description>
			<content:encoded><![CDATA[<p> …or so say the makers of <a href="http://findbugs.sourceforge.net/">FindBugs</a>, an open-source bug detector for Java. When I’m asked to improve the code quality on a project often the first thing I do is to search for “obviously” bad code. By this I mean I look for stuff like String construction (you never need this in Java), incorrect use of static (makes testing hard, could be a sign people are using singletons), and a few others.</p>
<p>FindBugs takes this approach a step further using automated detectors that look for dodgy code. They work by scanning the compiled Java bytecode and looking for suspicious patterns. Running this against my current project found a multitude of sins, my favourite being the “looks right but is definitely buggy” <a href="http://checkstyle.sourceforge.net/config_coding.html#CovariantEquals">covariant equals</a>. Next best is the “database resource not closed” detector, and the “questionable reference comparison” detector – try manually finding bugs caused by Integer object comparison using == instead of equals()…</p>
<p>FindBugs has definitely found a place in my toolbox, and I’ll be running it regularly to avoid nasty surprises.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikemason.ca/blog/2005/02/finding-bugs-is-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

