<?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/"
	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>Nico de Wet</title>
	<atom:link href="http://nicodewet.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicodewet.com</link>
	<description>Nico&#039;s thoughts on business, software and more</description>
	<lastBuildDate>Sun, 20 May 2012 12:41:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nicodewet.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6c97c13a7b730da2fa2cd532a109d63c?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Nico de Wet</title>
		<link>http://nicodewet.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nicodewet.com/osd.xml" title="Nico de Wet" />
	<atom:link rel='hub' href='http://nicodewet.com/?pushpress=hub'/>
		<item>
		<title>mvn eclipse:eclipse</title>
		<link>http://nicodewet.com/2012/05/20/mvn-eclipseeclipse/</link>
		<comments>http://nicodewet.com/2012/05/20/mvn-eclipseeclipse/#comments</comments>
		<pubDate>Sun, 20 May 2012 12:41:07 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=588</guid>
		<description><![CDATA[Once you have used mvn eclipse:eclipse, you will most likely need to remember these, so here they are for quick reference: $ mvn eclipse:clean $ mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=588&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Once you have used mvn eclipse:eclipse, you will most likely need to remember these, so here they are for quick reference:</p>
<p>$ mvn eclipse:clean<br />
$ mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/588/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=588&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2012/05/20/mvn-eclipseeclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>
	</item>
		<item>
		<title>Protect your web service from a denial-of-service attack with Apache Synapse</title>
		<link>http://nicodewet.com/2012/04/11/protect-your-web-service-from-a-denial-of-service-attack-with-apache-synapse/</link>
		<comments>http://nicodewet.com/2012/04/11/protect-your-web-service-from-a-denial-of-service-attack-with-apache-synapse/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 18:40:11 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[denial-of-service]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=584</guid>
		<description><![CDATA[If you&#8217;re looking to protect your web service from a denial-of-service (DOS) attack, and don&#8217;t want to polute your web service with home grown security logic, you may want to have a look at Apache Synapse (The Lightweight ESB). Synapse comes packaged as a war, if you are using Maven, you should be able to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=584&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking to protect your web service from a <a href="http://en.wikipedia.org/wiki/Denial-of-service_attack">denial-of-service (DOS) attack</a>, and don&#8217;t want to polute your web service with home grown security logic, you may want to have a look at <a href="http://synapse.apache.org/">Apache Synapse (The Lightweight ESB)</a>.</p>
<p>Synapse comes packaged as a war, if you are using Maven, you should be able to use an overlay to modify the default configuration to suit your needs. On the note of configuration, <a href="http://synapse.apache.org/userguide/samples/sample370.html">this page</a> documents one way of protecting your web service against a DOS attack, and that is by using a Throttle Mediator and Concurrency Control (in Synapse parlance).</p>
<p>In my case, I&#8217;m using a cloud based platform as a service provider, so low level firewall work is not going to work for me. Instead a proxy such as Synapse, routing HTTP based SOAP requests, seems to be suitable.</p>
<p>I hope to update this post once I have tested and deployed it all, which may take some time, since the web service is far from finished. Its good to know about Synapse though, as now I can stop thinking about security for a while and an intentional (or unintentional) DOS attack. Not sure if I could restrict load of a per client basis with Synapse, but at least global throttling is better than nothing.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/584/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=584&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2012/04/11/protect-your-web-service-from-a-denial-of-service-attack-with-apache-synapse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>
	</item>
		<item>
		<title>Automated deployment with Maven and friends</title>
		<link>http://nicodewet.com/2012/03/11/automated-deployment-with-maven-and-friends/</link>
		<comments>http://nicodewet.com/2012/03/11/automated-deployment-with-maven-and-friends/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 17:26:58 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=575</guid>
		<description><![CDATA[I&#8217;m busy with an automated deployment configuration task and stumbled upon the following excellent presentation by John Ferguson Smart from Wakaleo Consulting: Automated deployment with Maven and friends &#8211; Going the whole nine yards If I can add some context to labelling the presentation as excellent. In essence it represents what I regard as best [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=575&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m busy with an automated deployment configuration task and stumbled upon the following excellent presentation by John Ferguson Smart from Wakaleo Consulting: <a href="http://www.slideshare.net/wakaleo/automated-deployment-with-maven-going-the-whole-nine-yards">Automated deployment with Maven and friends &#8211; Going the whole nine yards</a></p>
<p>If I can add some context to labelling the presentation as <strong>excellent</strong>. In essence it represents what I regard as best practices. Setting up the mentioned infrastructure takes time, but WILL save time and money in the long run. Here are some other reasons why I advocate the use of the practices outlined in the presentation:</p>
<ul>
<li>I&#8217;ve had the misfortune of a three month stint as a human continuous integration / deployment &#8220;Jenkins&#8221; in the early days of a large scale enterprise project, this has left me scarred and obsessed with automated deployment and subsequent testing.</li>
<li>I&#8217;ve seen Liquibase replicated many times, at considerable expense.</li>
<li>If you don&#8217;t set it all up early in a project, you will pay for it with wasted time, one way or the other.</li>
</ul>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/575/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=575&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2012/03/11/automated-deployment-with-maven-and-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>
	</item>
		<item>
		<title>Note to self &#8211; don&#8217;t be that anonymous &#8220;someone that forgot to add 29 February&#8221; to the system</title>
		<link>http://nicodewet.com/2012/02/29/note-to-self-dont-be-that-anonymous-someone-that-forgot-to-add-29-february-to-the-system/</link>
		<comments>http://nicodewet.com/2012/02/29/note-to-self-dont-be-that-anonymous-someone-that-forgot-to-add-29-february-to-the-system/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 19:51:58 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[bugs]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=572</guid>
		<description><![CDATA[Overheard someone talking about some systems being down whilst shopping at the mall today. Well I had largely forgotten that its a leap year, nor given the date much thought. There where no doubt thousands of systems that had glitches associated with 29 February today, and covering it up is most likely standard procedure, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=572&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Overheard someone talking about some systems being down whilst shopping at the mall today. Well I had largely forgotten that its a leap year, nor given the date much thought.</p>
<p>There where no doubt thousands of systems that had glitches associated with 29 February today, and covering it up is most likely standard procedure, and who could blame the companies in question.</p>
<p>In any case, one of the biggest crashes of the day, <a href="http://www.smh.com.au/business/leap-year-blamed-for-hicaps-stumble-20120229-1u1z7.html">that made the news</a>, seems to be a health care payment system processing 150 000 transactions per day, the best line is this, and I hope SVN will never show this I&#8217;m this <em>someone</em>:</p>
<blockquote><p>A knowledgeable source said the outage arose because <strong>“someone forgot to add the 29th of February”</strong> to the system.</p></blockquote>
<p>Well, it seems its called the <a href="http://en.wikipedia.org/wiki/Leap_year_bug">Leap year bug</a>, and here are some more occurances:</p>
<ul>
<li><a href="http://gadgets.ndtv.com/shownews.aspx?id=GADEN20120195585&amp;Sec=NEWS&amp;nid=181168">Licensing system bug report</a></li>
<li><a href="http://exceldailytip.blogspot.com/2010/01/excels-leap-year-bug.html">&#8220;Known issue&#8221; in Excel that won&#8217;t be fixed</a></li>
<li><a href="http://thedailywtf.com/Articles/DATE_NOT_FOUND.aspx" target="_blank">The Daily WTF: DATE_NOT_FOUND</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/572/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=572&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2012/02/29/note-to-self-dont-be-that-anonymous-someone-that-forgot-to-add-29-february-to-the-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>
	</item>
		<item>
		<title>Search your source with wcgrep -l methodname</title>
		<link>http://nicodewet.com/2012/02/27/search-your-source-with-wcgrep-l-methodname/</link>
		<comments>http://nicodewet.com/2012/02/27/search-your-source-with-wcgrep-l-methodname/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 17:41:36 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=564</guid>
		<description><![CDATA[Having used, for years, the inferior command when recursively searching through files for a method, the discovery of comes as a shock. Looks like I&#8217;m not the only one using $grep -rin. In any case, there is a new, clever kid on the block, freshly installed in /usr/bin: wcgrep -l methodname It is smart enough [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=564&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having used, for years, the inferior command <pre class="brush: plain;">$grep -rin 'methodname' .</pre> when recursively searching through files for a method, the discovery of <pre class="brush: plain;">wcgrep -l methodname</pre> comes as a shock.</p>
<p>Looks like <a href="http://askubuntu.com/questions/55325/how-to-use-grep-command-to-find-text-including-subdirectories">I&#8217;m not the only one</a> using <em>$grep -rin</em>. In any case, there is a new, clever kid on the block, freshly installed in /usr/bin: <strong>wcgrep -l methodname</strong> </p>
<p>It is smart enough <strong>not</strong> to search Subversion&#8217;s text-base files, something that has plagued me, and perhaps you too. For an entertaining post on the topic, <a href="http://justinsomnia.org/2006/09/how-to-grep-without-hitting-subversions-text-base-files/">read this post on justinsomnia.org</a>, published six years ago, ouch, that rubs some serious salt into the wound.</p>
<p>You can find the wcgrep script <a href="http://svn.apache.org/repos/asf/subversion/trunk/contrib/client-side/wcgrep">HERE</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/564/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=564&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2012/02/27/search-your-source-with-wcgrep-l-methodname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>
	</item>
		<item>
		<title>Be sure to perform dependency validation using the Spring container&#8217;s initialization callback mechanism</title>
		<link>http://nicodewet.com/2012/02/23/be-sure-to-perform-dependency-validation-using-the-spring-containers-initialization-callback-mechanism/</link>
		<comments>http://nicodewet.com/2012/02/23/be-sure-to-perform-dependency-validation-using-the-spring-containers-initialization-callback-mechanism/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 19:53:25 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[IoC container]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=538</guid>
		<description><![CDATA[Ala JavaSpecialists&#8217; newsletter, this post comes to you from the beautiful Kuils River region of greater Cape Town, also known as the Kuils Riviera. Here you are reminded that to some &#8220;life is not a beach&#8221;, in particular when passing by the local township where dismal poverty and a hand to mouth existance reigns. On [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=538&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_548" class="wp-caption alignleft" style="width: 356px"><a href="http://nicodewet.files.wordpress.com/2012/02/nicodewet-com_spring_container.jpg"><img class="size-full wp-image-548  " title="Spring Container In The Real World" src="http://nicodewet.files.wordpress.com/2012/02/nicodewet-com_spring_container.jpg?w=600" alt=""   /></a><p class="wp-caption-text">A Spring Container In The Real World</p></div>
<p>Ala <a href="http://www.javaspecialists.eu/">JavaSpecialists&#8217; newsletter</a>, this post comes to you from the beautiful <a href="http://en.wikipedia.org/wiki/Kuils_River">Kuils River</a> region of greater Cape Town, also known as the <em>Kuils Riviera</em>. Here you are reminded that to some &#8220;life is not a beach&#8221;, in particular when passing by the local township where dismal poverty and a hand to mouth existance reigns.</p>
<p>On that note, lets dive straight into the subject matter of this post, performing the most basic validation in your Spring beans to quickly <strong>detect stupid mistakes</strong>.</p>
<p>Now, as a Spring user you have a number of options when it comes to configuring dependencies you wish to have injected into a given bean. You can use autowiring, which itself has further options, such as autowiring by type or name, or you can use xml configuration with explicit bean references. Regardless of what you use, it pays to use the Spring container&#8217;s initialization callback mechanism to avoid or easily detect basic mistakes that can easily eat up hours of development time. This entails validating your dependencies, at the very least in terms of whether they are null or not, in a consistent fashion in any given project.</p>
<p>Lets first get onto an example of such a basic mistake, in which a suspected wiring configuration error, which turned out to be a programmer error, cost precious time, and then move onto what do to, consistently, to avoid future similar wasteage.</p>
<p><strong>BEFORE</strong></p>
<p>Herewith a class under test, note the @Autowired bean <i>propertyService</i>.</p>
<p><pre class="brush: java;">
public class ConfigServiceImpl implements ConfigService {

    @Autowired
    @Qualifier(&quot;propertyServiceBean&quot;)
    protected PropertyService propertyService;

    // NO INIT METHOD

...
}
</pre></p>
<p>Here is <strong>the stupid mistake</strong>.</p>
<p><pre class="brush: java;">
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {&quot;/com/mayloom/activiti/config/spring-context.xml&quot;})
public class ConfigServiceTest {

   @Autowired
   private ConfigService configService;

   @Test
   public void updateConfiguration() {

      ConfigService configService = new ConfigServiceImpl(); // This line must be removed

      Properties props = configService.getProperties();
</pre></p>
<p>The mistake is the programmer is autowiring the configService yet also instatiating it. The latter renders Autowiring of dependencies in <i>configService</i> as useless, the entire line must be removed. It could be that this was a class that was later turned into a Spring bean, so just an oversight.</p>
<p>This the the result of the mistake, or at least a snippet of the surefire report showing the offending <strong>NullPointerException</strong>.</p>
<p><pre class="brush: java;">
-------------------------------------------------------------------------------
Test set: com.mayloom.config.ConfigServiceTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.282 sec &lt;&lt;&lt; FAILURE!
updateConfiguration(com.mayloom.config.ConfigServiceTest)  Time elapsed: 0.266 sec  &lt;&lt;&lt; ERROR!
java.lang.NullPointerException
	at com.mayloom.config.ConfigServiceImpl.getProperties(ConfigServiceImpl.java:72)
</pre></p>
<p>Now, if you had been making various Spring configuration changes in your project, and you see the above, one could start thinking that a wiring configuration error is the cause and waste hours reconfiguring and basically looking in the wrong place, even though the mistake made is quite obvious to us now.</p>
<p><b>AFTER</b></p>
<p>To quickly rule out wiring errors as a cause, in this case, and in general, all one has to do is to check that wired dependencies are not null as shown in the <a href="http://static.springsource.org/spring/docs/3.0.0.RELEASE/reference/html/beans.html#beans-factory-lifecycle-default-init-destroy-methods">Default initialization and destroy methods</a> section of the Spring manual.</p>
<p>So, we would end up with the pertitent section of our spring configuration looking as as shown below, with the <b>default-init-method</b> being what we want to include.</p>
<p><pre class="brush: xml;">
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/context
		   http://www.springframework.org/schema/context/spring-context-3.0.xsd&quot; default-init-method=&quot;init&quot;&gt;
</pre></p>
<p>Next, we&#8217;ll update ConfigServiceImpl as shown below.</p>
<p><pre class="brush: java;">
public class ConfigServiceImpl implements ConfigService {
	
  @Autowired
  @Qualifier(&quot;propertyServiceBean&quot;)
  protected PropertyService propertyService;
	
  // this is (unsurprisingly) the initialization callback method
  public void init() {
    	log.info(&quot;==================== ConfigServiceImpl =========================&quot;);
        if (this.propertyService == null) {
            throw new IllegalStateException(&quot;The [propertyService] property must be set.&quot;);
        }
    }
</pre></p>
<p>Thats pretty much it, no advanced concurrency lesson here, no generics to marvel at, but it may save you time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/538/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=538&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2012/02/23/be-sure-to-perform-dependency-validation-using-the-spring-containers-initialization-callback-mechanism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>

		<media:content url="http://nicodewet.files.wordpress.com/2012/02/nicodewet-com_spring_container.jpg" medium="image">
			<media:title type="html">Spring Container In The Real World</media:title>
		</media:content>
	</item>
		<item>
		<title>java.lang.OutOfMemoryError: unable to create new native thread</title>
		<link>http://nicodewet.com/2012/02/05/java-lang-outofmemoryerror-unable-to-create-new-native-thread/</link>
		<comments>http://nicodewet.com/2012/02/05/java-lang-outofmemoryerror-unable-to-create-new-native-thread/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 20:27:24 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=529</guid>
		<description><![CDATA[If you&#8217;ve been spending too much time dealing with higher level business logic, it&#8217;s easy to start losing touch with JVM performance tuning, and the OS in general. A recent bout of java.lang.OutOfMemoryError: unable to create new native thread forced me to spend some time initially barking up the wrong tree, and then fixing it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=529&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been spending too much time dealing with higher level business logic, it&#8217;s easy to start losing touch with JVM performance tuning, and the OS in general. A recent bout of <em>java.lang.OutOfMemoryError: unable to create new native thread</em> forced me to spend some time initially barking up the wrong tree, and then fixing it by brute force.</p>
<p><strong>Brute Force Fix</strong></p>
<p>To get onto the fix first. All I needed to do was to configure the nproc settings for the user in question (it happened to be jenkins) upwards in /etc/security/limits.conf</p>
<p><strong>Playing</strong></p>
<p>Before getting onto the most obvious fix, I went off on a tangent and refreshed my memory on the effects of the heap size, permanent generation size, thread stack  size and other related topics (the bash based thread count script is a work in progress). A simple program to help you determine how many threads you can create can be found below if you are also keen on experimentation.</p>
<p><pre class="brush: java;">
public class RunOutOfMemory {

/**
* Results
*
* ==== Environment: 32bit Win 7, 2GB RAM, Java 7 ====
*
* Reducing the default maximum thread stack size allows more of the process' virtual
* memory address space to be used by the Java heap and vice-versa.
*
* Note, when it comes to virtual memory usage consumed by the jvm process, we are
* not including the heap and permanent generation allocation.
*
* Test: 1. ALL VM arguments at default values: OutOfMemory with 3974 threads =
*                                                       1238 MB (320k / thread)
* 	2. -Xss1m, rest VM arguments at default values: OutOfMemory with 1211 threads
*                                                                           = 1211 MB
* 	3. -Xss2m, rest VM arguments at default values: OutOfMemory with 533 threads
*                                                                           = 1066 MB
*       4. -Xss128k, rest VM arguments at default values: OutOfMemory with 10358 threads
*                                                                           = 1294 MB
*
* &quot;On Windows, the default thread stack size is read from the binary (java.exe). As of
* Java SE 6, this value is 320k in the 32-bit VM and 1024k in the 64-bit VM.&quot; oracle.com
*
* ==== Linux ====
*
* NOTE: Pay close attention to your limits configured in /etc/security/limits.conf You
* may want to adjust the nproc setting for your process upwards if you are seeing a
* &quot;cannot create native thread&quot; message
*/
		public static void main(String[] pArgs) {

			try {
				// keep spawning new threads forever
				while (true) {
					// thread begins execution, JVM calls run method of this new thread
					new TestThread().start();
				}
			} catch (java.lang.OutOfMemoryError e ) {

				// when out of memory error is reached, print out the number of
				// successful threads spawned and exit
				System.out.println(TestThread.CREATE_COUNT);
				System.exit(-1);
			}
		}

		static class TestThread extends Thread {

			private static int CREATE_COUNT = 0;

			public TestThread() {
				CREATE_COUNT++;
			}

			// make the thread wait for eternity after being spawned
			public void run() {
				this.suspend();
			}
		}
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/529/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=529&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2012/02/05/java-lang-outofmemoryerror-unable-to-create-new-native-thread/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>
	</item>
		<item>
		<title>Fedora 16 on Pimped Up Sony Vaio Y Series</title>
		<link>http://nicodewet.com/2011/11/27/fedora-16-on-pimped-up-sony-vaio-y-series/</link>
		<comments>http://nicodewet.com/2011/11/27/fedora-16-on-pimped-up-sony-vaio-y-series/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 13:11:58 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=515</guid>
		<description><![CDATA[This post is a brief report, that is to be updated over time, of my experiences of the Sony Vaio Y Series laptop, pimped up with a 64GB SSD, with Fedora 16 in the driving seat. The overal goal was to have a laptop that can be used as a highly portable software development environment. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=515&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://nicodewet.files.wordpress.com/2011/11/logo_fedoralogo.png"><img class="alignleft  wp-image-517" style="border:5px solid white;" title="Logo_fedoralogo" src="http://nicodewet.files.wordpress.com/2011/11/logo_fedoralogo.png?w=360&h=109" alt="" width="360" height="109" /></a>This post is a brief report, that is to be updated over time, of my experiences of the <a href="http://www.sony.co.za/product/vpcyb35ag">Sony Vaio Y Series</a> laptop, pimped up with a 64GB SSD, with Fedora 16 in the driving seat. The overal goal was to have a laptop that can be used as a highly portable software development environment.</p>
<p>I came across the Vaio Y Series in the aftermath of a botched laptop upgrade. It all started in an effort to enhance the battery life of the old chunky beast, without too much thought I  recently went out and bought a 64GB <a href="http://www.kingston.com/ukroot/ssd/v100.asp">Kingston SSDNow V100</a>, downloaded the freshly released Ubuntu 11.11 ISO and went to work. Sadly the laptop was in such a sad state that it didn&#8217;t work out, so I went out and bought a 32 bit Sony Vaio Y Series laptop (VPCYB35AG) which  had fairly decent reviews in terms of battery life, and I absolutely loved the size and 11.6 inch HD screen.</p>
<p>I started by backing up the Windows 7 Starter edition OS onto a 16GB flash drive, and then swapped drives, the reason for the backup to flash drive, in addition to the OS already on the 320GB drive that came with the laptop, was incase there wasn&#8217;t sufficient driver support for the Vaio and I had to use Windows 7. I wanted to avoid the latter since I don&#8217;t regard Windows as a suitable development environment for server-side development, which is what I specialize in. Kudos to Sony when it comes to their recovery process, I tested Windows 7 recovery on the SSD, just to be sure that it would work, and it was all effortless.</p>
<p>In any case, having tested the laptop without linux, I got round to creating a bootable Fedora 16 USB key and installed onto the SDD. The first attempt failed, I do not know why, so I just repeated the process. Second time round it worked just fine.</p>
<p>The first challenge was getting used to Gnome 3 and also inconsistent boot behaviour that may be related to the next generation InsydeH20 UEFI BIOS and GRUB2. On the inconsistent boot behaviour, that may have been caused by me leaving on the &#8220;boot from external device&#8221; option in InsydeH20, I am uncertain. With regards to Gnome 3, so far I&#8217;m just getting used to it, and I like it, in any case, I am not too concerned with such details right now, its driver support that I&#8217;m concerned with, I just want the laptop to work in terms of the basics. Overall, right now I&#8217;d say I&#8217;m enjoying the experience, and given that all I&#8217;ve done to date is to &#8220;yum update&#8221;, the existing driver support is sufficient to get to work. So I&#8217;m generally happy. I&#8217;ll update this post in a couple of weeks time, once the laptop has seen more use.</p>
<p><strong>Update 28 Nov 2011</strong></p>
<p>Installed the latest official ATI Catalyst driver (11.11), and Gnome 3 immediately reverted to &#8220;fallback mode&#8221;, which in terms of usability seems a fairly serious regression. Rather the vent online, contacted AMD via their web form for support, this is the request:</p>
<p><em>Hi there,</em></p>
<p><em>I have purchased a Sony Vaio VPCYB35AG with an AMD E-450 APU (by the way your web form only gives an option for the E-350) and installed Fedora 16 with comes with Gnome 3.</em></p>
<p><em>I then installed the Catalyst ATI driver (ati-driver-installer-11-11-x86.x86_64.run). Rather than improving matters, it made it worse and so I researched what might be going wrong.</em></p>
<p><em>In any case, as far as I can tell (please see http://ati.cchtml.com/show_bug.cgi?id=99), AMD is aware of a Graphical corruption issues pertaining to the gnome-shell, but has not done anything about it.</em></p>
<p><em>Please can you let me know whether AMD is attending to this issue. I am sure there are thousands of affected linux users.</em></p>
<p><em>Regards,</em><br />
<em>Nico</em></p>
<p>As a parting comment, I wish I could just pay Sony, or whoever else, to give me a glitch free system. In any case, lets see what AMD says.</p>
<p><strong>Update 3 Dec 2011</strong></p>
<p>Given that I had little confidence in getting a satisfactory response from AMD, I reloaded Windows 7 and have been using it for the last few days. I&#8217;m now back to 4.5 hours battery life, instead of the 2.5 on Fedora 16. So, this brings, sadly, an end to my attempt to get any linux distribution going on my Vaio.</p>
<p>I did receive the following response from AMD 2 Dec 2011, which does not inspire confidence, as it does not help me. I would have been willing to pay for a working driver.</p>
<p><em><span style="font-family:Calibri;">We do not officially support GNOME3, since none of our supported distributions use it by default. Unbuntu 11.10 is the first one to ship with this product, but it does not use Gnome3 by default.</span></em></p>
<p><em><span style="font-family:Calibri;">Our OpenGL team is currently aware of the issue, plans may be in place to support it later on but there is no official word as of yet. </span></em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/515/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=515&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2011/11/27/fedora-16-on-pimped-up-sony-vaio-y-series/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>

		<media:content url="http://nicodewet.files.wordpress.com/2011/11/logo_fedoralogo.png" medium="image">
			<media:title type="html">Logo_fedoralogo</media:title>
		</media:content>
	</item>
		<item>
		<title>Book Review: The Net Delusion &#8211; How Not To Liberate The World</title>
		<link>http://nicodewet.com/2011/10/02/book-review-the-net-delusion-how-not-to-liberate-the-world/</link>
		<comments>http://nicodewet.com/2011/10/02/book-review-the-net-delusion-how-not-to-liberate-the-world/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 14:03:48 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=495</guid>
		<description><![CDATA[The Net Delusion &#8211; How Not To Liberate The World, by Evgeny Morozov, is an excellent read on many levels. The central concepts in the book are that of cyber-utopianism  a naive belief in the emancipatory nature of online communication that rests on a stubborn refusal to acknowledge its downside and Internet-centrism a philosophy of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=495&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://nicodewet.files.wordpress.com/2011/10/nicodewet-com_net_delusion1.jpg"><img class="alignleft size-medium wp-image-504" style="border:4px white;" title="nicodewet.com_net_delusion" src="http://nicodewet.files.wordpress.com/2011/10/nicodewet-com_net_delusion1.jpg?w=209&h=300" alt="" width="209" height="300" /></a><a href="http://www.amazon.co.uk/Net-Delusion-How-Liberate-World/dp/1846143535" target="_blank">The Net Delusion &#8211; How Not To Liberate The World</a>, by Evgeny Morozov, is an excellent read on many levels. The central concepts in the book are that of <strong><em>cyber-utopianism</em></strong></p>
<blockquote><p> a naive belief in the emancipatory nature of online communication that rests on a stubborn refusal to acknowledge its downside</p></blockquote>
<p>and <strong><em>Internet-centrism</em></strong></p>
<blockquote><p>a philosophy of action that informs how decisions, including those that deal with democracy promotion, are made and how long-term strategies are crafted.</p></blockquote>
<p>Even if you have no interest in liberating the world and promoting <a href="http://en.wikipedia.org/wiki/Democratization" target="_blank">democratization</a>, Morozov&#8217;s concepts of cyber-utopianism and Internet-centrism <strong>are equally applicable to business and personal dealings</strong> and worth reading for this reason alone. In addition, Morozov raises valid concerns regarding the dominance and power of US service providers, especially since they are not immune to US government interference and can act with impunity when it comes to a large portion of the worlds population&#8217;s sensitive personal data.</p>
<p>Finally, Morozov warns against the &#8220;digital visionaries&#8221; that are seemingly ever present nowadays in all spheres of life, with entire consultancies based on, and by definition biased towards, the virtues of tweeting, Facebooking and advertising online. Such online social visionaries bring back memories of the <a href="http://en.wikipedia.org/wiki/Dot-com_bubble" target="_blank">Dot-com bubble</a>, except this time its the <strong>Dot-social bubble</strong>. A memorable quote in this regard:</p>
<blockquote><p>..most digital visionaries see the Web as a Swiss army knife ready for any job at hand. They rarely alert us to the information black-holes creates by the Internet, from the sprawling surveillance apparatus facilitated by the public nature of social neworking to the persistence of myth making and propaganda, which is much easier to produce and distribute in a world where every fringe movement blogs, tweets, and Facebooks.</p></blockquote>
<p>Personally, I would give the book 9/10 and recommend it as a worthy read along-side with Naomi Klein&#8217;s <a href="http://www.naomiklein.org/shock-doctrine" target="_blank">The Shock Doctrine</a> and <a href="http://www.naomiklein.org/no-logo" target="_blank">No Logo</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/495/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=495&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2011/10/02/book-review-the-net-delusion-how-not-to-liberate-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>

		<media:content url="http://nicodewet.files.wordpress.com/2011/10/nicodewet-com_net_delusion1.jpg?w=209" medium="image">
			<media:title type="html">nicodewet.com_net_delusion</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Exception Rule Book</title>
		<link>http://nicodewet.com/2011/10/02/java-exception-rule-book/</link>
		<comments>http://nicodewet.com/2011/10/02/java-exception-rule-book/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 09:52:22 +0000</pubDate>
		<dc:creator>nicodewet</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[joshua bloch]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://nicodewet.com/?p=396</guid>
		<description><![CDATA[This post consists of a briefly outlined set of Java Exception rules, or best practices, with an accompanying look at rule compliance using specific transient network and database layer Exceptions. The rules are based on the relevant rules from Joshua Bloch&#8217;s lauded and highly recommended Effective Java, 2nd Edition. Bloch is arguably the authority on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=396&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://nicodewet.files.wordpress.com/2011/08/nicodewet-com_exceptions.jpg"><img class="alignleft size-medium wp-image-397" title="Java Exceptions Illustrated With Exceptional Fruit" src="http://nicodewet.files.wordpress.com/2011/08/nicodewet-com_exceptions.jpg?w=300&h=200" alt="" width="300" height="200" /></a><strong></strong></p>
<p>This post consists of a briefly outlined set of Java Exception rules, or best practices, with an accompanying look at rule compliance using specific transient network and database layer Exceptions.</p>
<p>The rules are based on the relevant rules from Joshua Bloch&#8217;s lauded and highly recommended <a href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683">Effective Java, 2nd Edition</a>. Bloch is arguably the authority on the subject, and his legacy includes being listed as author of the Sun JDK <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html">Throwable</a> implementation (see @author in the source code).</p>
<h2><strong>RULE BOOK<br />
</strong></h2>
<p>The author has violated these rules hundreds if not thousands of times over the last decade. As a mitigating factor it can be argued that the rules in themselves represent exception utopia, and so, it is highly unlikely that they will all be consistently followed in any given code base, or put differently, that even with the best of intentions any software engineer will follow all of them due to say project timeline pressures.</p>
<p>Such pressure may however be a symptom of not asserting one&#8217;s own standards when a unit of work or project commences, to alleviate pressure one can always <em>clearly communicate one&#8217;s own non negotiable engineering standards</em> at the start of a project.</p>
<p><strong>Rule 1: Never use exceptions for ordinary control flow</strong></p>
<p><pre class="brush: java;">
import java.util.ArrayList;
import java.util.Iterator;

/**
* Do not, use Exceptions for flow control, this is an example of what not to do.
*
* @author nico
*/
public class DontUseExceptionsForFlowControl {

 public static void main(String[] args) {

   ArrayList list = new ArrayList();

   list.add(&quot;hello world&quot;);

   // Let's to the wrong thing, and jump out of this loop with an iterator related
   // Exception...

   Iterator iter = list.iterator();

   while(true) {

     try {

       System.out.println(iter.next());

     } catch (java.util.NoSuchElementException e) {

        // Using Exception for flow control, so can safely ignore this one.
        // TODO Stop using Exceptions for flow control.
     }

   }

  }

}
</pre></p>
<p>Using Exceptions for ordinary control flow violates the <a href="http://c2.com/cgi/wiki?PrincipleOfLeastAstonishment" target="_blank">Principle of Least Astonishmen</a>t which states <em>&#8220;the result of performing some operation should be obvious, consistent, and predictable, based upon the name of the operation and other clues&#8221;</em>.</p>
<h3><strong>Rule 2: Never write APIs that force others to use Exceptions for ordinary control flow</strong></h3>
<p><pre class="brush: java;">
/**
* Database layer API, implementation detail agnostic.
*/
public interface EmailDatabaseHelper {

 // TODO refactor, this forces the user to catch checked exception EmailDoesNotExistException, with an email
 // address not existing being in no way exceptional, and hence in ordinary control flow
 public void doesEmailExist(String email) throws EmailDoesNotExistException;
}
</pre></p>
<h3><strong>Rule 3: Use runtime exceptions for programmer errors and checked exceptions where recovery is possible</strong></h3>
<p>Note that this rule does not state, as you may expect, that you must use unchecked exceptions for programmer errors, since that casts too wide a net. Unchecked throwables include runtime exceptions and errors, with the latter conventionally reserved for JVM error reporting under conditions where continued execution is impossible.</p>
<h3><strong>Rule 4: When uncertain as to whether a condition is recoverable or not, use an unchecked exception</strong></h3>
<p>The reasoning behind this is simple, if you do not know how an API user will recover from the checked exception, do not place the burden on the API user in terms of trying to figure out how, and potentially wasting time concluding that its not possible.</p>
<h3><strong>Rule 5: Only use checked exceptions if the API user can take action to recover from the said exception</strong></h3>
<p>If the only course of action, that you could take, when confronted with your own checked exception, is a variation of the below example then chances are good that you should not be using a checked exception. The checked exception adds no value, so, either attempt to refactor as per Rule 6, or use an unchecked exception.</p>
<p><pre class="brush: java;">
} catch (CheckedExceptionWithNoUsefulActionPossible e) {
  logger.error(&quot;an error occurred&quot;);
  e.printStackTrace();
  System.exit(1); // or stopping the current thread
}
</pre></p>
<h3><strong>Rule 6: Refactor, where possible, checked exceptions that violate rule 5 into a state-checking method and unchecked exception</strong></h3>
<p>Before.</p>
<p><pre class="brush: java;">
try {
  ball.kick(HARD);
} catch (BallCannotBeKickedException e) {
  // recover from exceptional conditions
}
</pre></p>
<p>After. State-checking method and unchecked exception has been introduced.</p>
<p><pre class="brush: java;">
// ball will not be accessed concurrently, and so the calling sequence is safe
if (ball.isKickeable()) {
  ball.kick(HARD);
} else {
  // recover from exceptional condition
}
</pre></p>
<h3>Rule 7: Clearly document if the unrecoverability of an unchecked exception is likely to be transient in nature</h3>
<p>Certain conditions are unrecoverable at a particular instant but not permanently, and a prime example is an exception related to a lock being held on a database table on which say an update is being attempted. Methods that throw unchecked exceptions where the exception relates to a condition that may be transient in nature should document this fact, that is that the condition may be transient, and suggest a retry in the Javadoc comment associated with the unchecked exception.</p>
<h3><strong>Rule 8: Use the standard Java platform library unchecked exceptions where appropriate, do not re-invent the wheel</strong></h3>
<p>Reuse the standard Java platform library unchecked exceptions whereever possible, whilst honouring their documented semantics. A prime example is <a href="http://download.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html">IllegalArgumentException</a>. See the subclasses of <a href="http://download.oracle.com/javase/7/docs/api/java/lang/RuntimeException.html">RuntimeException</a> for further candidates.</p>
<h3><strong>Rule 9: When dealing with lower-level exceptions inappropriate to the higher-level abstraction, perform either exception translation or exception chaining</strong></h3>
<p>Exception translation.</p>
<p><pre class="brush: java;">
try {
     // lower level method invocation e.g. JPA call
} catch(LowerLevelMethodInvocationException e) {
     // now translate the lower level exception into an exception that matches
     // the higher level abstraction in our current context
     throw new HigherLevelException(...);
}
</pre></p>
<p>Exception chaining with chaining-aware contructor.</p>
<p><pre class="brush: java;">
class HigherLevelAbstractionException extends Exception {
    HigherLevelAbstractionException(Throwable cause) {
         super(cause);
    }
}
try {
     // lower level method invocation e.g. JPA call
} catch(LowerLevelMethodInvocationException e) {
     // now translate the lower level exception into an exception that matches
     // the higher level abstraction in our current context
     throw new HigherLevelAbstractionException(e); // use chaining-aware constructor
}
</pre></p>
<h3><strong>Rule 10: You MUST document all exceptions, checked and unchecked, thrown by your methods</strong></h3>
<p>Excuse the all-caps and repetition will <em>all</em> exceptions being defined, but proper documentation is in no way negotiable and is every software engineers professional responsibility. The Javadoc @throws tag must be used to document both checked and unchecked exceptions in terms of the conditions under which they will be thrown. The only difference between checked and unchecked exceptions is that you must only define checked exceptions with the <strong>throws</strong> keyword, do not include unchecked exceptions here.</p>
<h3><strong>Rule 11: Force including the values of all parameters and fields that comprise the cause of an exception in its detail message</strong></h3>
<p><strong></strong>Support personnel or fellow programmers, when faced with a stack trace in say a log file, require pertinent data in order to ascertain exactly what caused an exception. Without the values of all parameters and fields that comprised the exception, it may be impossible to reproduce an exception.</p>
<p>In terms of forcing including pertinent parameter and field data in the detail message of exception, simply do not provide a constructor that has a string parameter as detail message, rather force the user to specify the said data in the constructor.</p>
<p>Consider the following checked exception, which has accessor methods since as per Rule 5 such exceptions should be used for recoverable exceptions.</p>
<p><pre class="brush: java;">
/**
* @author Nico
*/
public class ServiceOperationException extends Exception {

private String suppliedApiKey;

/**
* Construct an ServiceOperationException.
*
* @param suppliedApiKey    the API key supplied to the service user upon successful registration
*/
public ServiceOperationException(String suppliedApiKey) {

// detail message
super(&quot;Supplied API Key: &quot; + suppliedApiKey);

// capture for recovery purposes
this.suppliedApiKey = suppliedApiKey;
}

public String getSuppliedApiKey() {
return suppliedApiKey;
}

public void setSuppliedApiKey(String suppliedApiKey) {
this.suppliedApiKey = suppliedApiKey;
}
}
</pre></p>
<h3><strong>Rule 12: Ensure that your methods are failure atomic and if not document this fact in your API<br />
</strong></h3>
<p>Methods that are failure atomic leave an object in the state it was prior to the method invocation in the event of failure. Either ensure parameters have their validity checked before proceeding to to the actual work (and modification) in a method invoked on a mutable object, or ensure the relevant class is modified to be immutable.</p>
<h3><strong>Rule 13: Never ignore exceptions</strong></h3>
<p>From time to time you may see empty catch blocks, and in the worst case, catch blocks that catch java.lang.Exception (as <a href="http://today.java.net/article/2006/04/04/exception-handling-antipatterns#catchingException" target="_blank">listed</a> in Tim McCune&#8217;s <a href="http://today.java.net/article/2006/04/04/exception-handling-antipatterns" target="_blank">Exception-Handling Antipatterns</a>) or java.lang.Throwable. This is a cardinal sin, and should never be done. At the very least, the exception should be logged (that is the entire stack trace should be logged) with an appropriate log level. In some cases, it may be justifiable to take no action, but in such cases, comments must justify why no action is taken.</p>
<h2><strong>RULE COMPLIANCE &#8211; RECOVERABLE TRANSIENT CONDITIONS<br />
</strong></h2>
<p>Some exceptions are associated with conditions that are possibly but not necessarily transient in nature, and so, when faced with them, the appropriate course of action is to automatically retry the operation. The <a href="http://static.springsource.org/spring-batch/reference/html/retry.html">Spring Batch Retry</a> mechanism is geared for exactly such exceptions.</p>
<p>In terms of the rules, Rule 3, 4, 5, 6 and 7 are applicable, given our definition of the conditions being transient, but not with absolute certainty. In other words, given the lack of certainty as to whether the condition is recoverable, an <strong>unchecked</strong> exception should be used, as per Rule 3, 4 and Rule 5. If we choose not adhere to this rule, and feel the condition is indeed recoverable, and use a <strong>checked</strong> exception, as per Rule 5, then as per Rule 6 one should refactor into an <strong>unchecked</strong> exception with an accompanying <strong>state-checking</strong> method.</p>
<p>So, in short, we should use:</p>
<ul>
<li><strong></strong>unchecked exception (if uncertain if recoverable) or if unrecoverability is a certainty</li>
</ul>
<ul>
<li><strong></strong>checked exception if recoverable</li>
</ul>
<ul>
<li><strong></strong>even better, unchecked exception with a state-checking method if recoverable</li>
</ul>
<h3><strong>Database Layer</strong></h3>
<p>Consider the following exceptions, that one may see with a Spring / JPA / Hibernate stack:</p>
<ol>
<li><a href="http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/transaction/UnexpectedRollbackException.html" target="_blank">UnexpectedRollbackException</a> (Spring)</li>
<li><a href="http://java.sun.com/javaee/5/docs/api/javax/persistence/OptimisticLockException.html" target="_blank">OptimisticLockException</a> (JPA)</li>
<li><a href="http://docs.jboss.org/hibernate/core/3.2/api/org/hibernate/exception/LockAcquisitionException.html" target="_blank">LockAcquisitionException</a> (Hibernate)</li>
</ol>
<p>The decision to make all of these unchecked exceptions complies with the rules, given that within the context of a single transaction, the underlying condition is not recoverable. Within the context of retries, and so multiple transactions, the condition may indeed be recoverable due to the transient nature of the underlying conditions (a lock on a table will most likely not be permanently held). So, methods that throw these exceptions should firstly document that they throw these exceptions with @throws Javasdoc (as per Rule 10) and then also document the fact that the user may wish to attempt retries (as per Rule 7).</p>
<h3><strong>Network Layer</strong></h3>
<p>Another example of an exception that may point to a transient condition is a <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/net/SocketException.html" target="_blank">SocketException</a>, especially when considering its subclasses, <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/net/BindException.html" target="_blank">BindException</a>, <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/net/ConnectException.html" target="_blank">ConnectException</a>, <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/net/NoRouteToHostException.html" target="_blank">NoRouteToHostException</a> and <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/net/PortUnreachableException.html" target="_blank">PortUnreachableException</a>. These exceptions are all checked exceptions, and this is incorrect since at the instant an associated method was called, recovery would not necessarily be possible, that is, recovery is not a certainty, so Rule 3 is violated. Rather, as per Rule 4, the exceptions should be unchecked and the transient nature of the exceptions should be documented as per Rule 7.</p>
<h2><strong>Key References</strong></h2>
<ol>
<li>Chapter 9 of Joshua Bloch&#8217;s (the author of <a href="http://download.oracle.com/javase/7/docs/api/java/lang/Throwable.html">java.lang.Throwable</a>) <a href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683" target="_blank">Effective Java</a>, Second Edition. <em>If you don&#8217;t own a copy, buy one, you won&#8217;t regret it.</em></li>
<li>Tim McCune&#8217;s <a href="http://today.java.net/article/2006/04/04/exception-handling-antipatterns" target="_blank">Exception-Handling Antipatterns</a></li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicodewet.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicodewet.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicodewet.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicodewet.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicodewet.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicodewet.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicodewet.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicodewet.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicodewet.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicodewet.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicodewet.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicodewet.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicodewet.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicodewet.wordpress.com/396/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicodewet.com&#038;blog=8943366&#038;post=396&#038;subd=nicodewet&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicodewet.com/2011/10/02/java-exception-rule-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17b88a67f6e771cf9b41fcfffdc917e0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicodewet</media:title>
		</media:content>

		<media:content url="http://nicodewet.files.wordpress.com/2011/08/nicodewet-com_exceptions.jpg?w=300" medium="image">
			<media:title type="html">Java Exceptions Illustrated With Exceptional Fruit</media:title>
		</media:content>
	</item>
	</channel>
</rss>
