<?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>Pure-Essence.Net &#187; geeky</title>
	<atom:link href="http://pure-essence.net/category/geeky/feed/" rel="self" type="application/rss+xml" />
	<link>http://pure-essence.net</link>
	<description>You have to visit this geeky girl&#039;s blog.</description>
	<lastBuildDate>Fri, 10 Feb 2012 11:26:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pure-essence.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pure-Essence.Net &#187; geeky</title>
		<link>http://pure-essence.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pure-essence.net/osd.xml" title="Pure-Essence.Net" />
	<atom:link rel='hub' href='http://pure-essence.net/?pushpress=hub'/>
		<item>
		<title>Daily wtf Watson story: Active Directory</title>
		<link>http://pure-essence.net/2011/10/01/daily-wtf-watson-story-active-directory/</link>
		<comments>http://pure-essence.net/2011/10/01/daily-wtf-watson-story-active-directory/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 11:38:27 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[dailywtf]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2178</guid>
		<description><![CDATA[A coworker of my husband&#8217;s, let&#8217;s call him Watson, has some interesting ways of dealing with situations. As a system administrator, he has unique powers. Two days ago my husband received a support ticket regarding a temporary employee unable to log into her machine. My husband updated her password and verified and he could log [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2178&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A coworker of my husband&#8217;s, let&#8217;s call him Watson, has some interesting ways of dealing with situations.  As a system administrator, he has unique powers.</p>
<p>Two days ago my husband received a support ticket regarding a temporary employee unable to log into her machine. My husband updated her password and verified and he could log in and closed the ticket.  A day later, the ticket was reopened with the same issue.  This time my husband tried her login on a different machine and true enough, he got the invalid username or password error.  He searched Active Directory looking for the temporary employee&#8217;s login and found nothing. It appeared someone had deleted the employee&#8217;s account.  </p>
<p>My husband scratched his head and inquired Watson:</p>
<p>&#8220;Watson, did you do anything with Mary&#8217;s account?&#8221;</p>
<p>Watson: &#8220;Yes, the manager requested that I delete her account.&#8221;</p>
<p>My husband got the manager on the phone and asked about the situation. The manager confirmed that he created a ticket to have Mary removed from a certain mailing list. As my husband was on the phone with the manager, Watson was listening and became rather irritated and printed the ticket and showed it to my husband.  The ticket titled &#8220;Remove Mary from mailing list ABC&#8221;.  My husband said to Watson:</p>
<p>&#8220;Watson, the ticket requested her removed from a mailing list, you deleted her entire Active Directory account!&#8221;</p>
<p>Watson: &#8220;How else was I supposed to get her off that mailing list?&#8221;</p>
<p>My husband: &#8220;Remove her from the mailing list?&#8221;</p>
<p>Watson barked: &#8220;Yes! I could have done that!&#8221; and stormed off and did not say anything else.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2178&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/10/01/daily-wtf-watson-story-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery read only elements</title>
		<link>http://pure-essence.net/2011/09/22/jquery-read-only-elements/</link>
		<comments>http://pure-essence.net/2011/09/22/jquery-read-only-elements/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 00:47:40 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[readonly]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2171</guid>
		<description><![CDATA[There is a business requirement on a project I have at work to only allow a certain number of properties editable at a certain stage of the domain object&#8217;s life cycle. And like always, the properties defined to be editable could change in the future. I already have a page that allows the user to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2171&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is a business requirement on a project I have at work to only allow a certain number of properties editable at a certain stage of the domain object&#8217;s life cycle. <b>And like always, the properties defined to be editable could change in the future.<b></p>
<p>I already have a page that allows the user to edit all properties of the domain object, I really do not wish to duplicate that code. Please note that if you set an input element on a form as <b>disabled</b>, the value associated with the element will <b>NOT be submitted via form post</b>, that certainly is NOT what I&#8217;m looking for. I want the values of the *read only* fields still be submitted by the form but I just don&#8217;t want the user to edit the values. So I looked into using the readonly attribute in HTML. <a href="http://stackoverflow.com/questions/155291/can-html-checkboxes-be-set-to-readonly" target="_blank">It&#8217;s complete crap</a>. </p>
<p>For <a href="http://www.faqs.org/docs/htmltut/forms/_INPUT_DISABLED.html">faqs.org</a>:</p>
<blockquote><p>It&#8217;s important to understand that READONLY merely prevents the user from changing the value of the field, not from interacting with the field. In checkboxes, for example, you can check them on or off (thus setting the CHECKED state) but you don&#8217;t change the value of the field.</p></blockquote>
<p>Basically it works half-hearted and most browsers (IE, FF) do not indicate (by default) that a field is readonly. So the users will probably be left wondering why they cannot edit the field.</p>
<p>I searched around for an alternative and found <a href="http://plugins.jquery.com/project/readonly" target="_blank">this wonderful jQuery plugin readonly</a>. Even though I couldn&#8217;t get it to work right for my application, the idea behind it is genius. You basically put overlay layers on top of any input fields you wish to make read only. The plugin seems a bit outdated. Perhaps it doesn&#8217;t work well with the newer version of jQuery but the idea still works well. Therefore I implemented my own.</p>
<p>This implementation automatically makes all input fields read only unless the input field has the class <b>excludeMeFromReadOnly</b>. This is just my implementation for demonstration. I do not provide any support for this code. Use where you see fit.</p>
<p><b>CSS</b><br />
<pre class="brush: css; wrap-lines: false;">
.readOnlyOverlay {
	position: absolute;
	background-color: #666;
	opacity: 0.3;
	filter: alpha(opacity=30);
	padding: 0pt !IMPORTANT;
	margin: 0pt !IMPORTANT;
}
</pre></p>
<p><b>javascript function generateOverlay</b><br />
<pre class="brush: jscript; wrap-lines: false;">
function generateOverlay(element) {
	var dimension = getDimensions($(element));
	//console.log('top=' + dimension.top + ' left=' + dimension.left +' width='+ dimension.width + ' height=' + dimension.height);

	// disassociate corresponding label attributes so the value of the element cannot be changed by clicking on the labels
	var id = $(element).attr('id');
	var label = $('label[for=&quot;'+id+'&quot;]');
	$(label).removeAttr('for');
	
	// set my tabindex to -1 so tabs will ignore me
	$(element).attr('tabIndex', -1);
	$(label).attr('tabIndex', -1);

	// create a div overlay
	var overlay = $('&lt;div class=&quot;readOnlyOverlay&quot;&gt;&amp;nbsp;&lt;/div&gt;').appendTo('body');
	$(overlay).css('top', dimension.top).css('left', dimension.left).css('width', dimension.width).css('height', dimension.height);
}
</pre></p>
<p><b>javascript function getDimensions</b><br />
<pre class="brush: jscript; wrap-lines: false;">
function getDimensions(element){
	var ret = {};

	// The multiple acquisitions of the CSS styles are required to cover any border and padding the elements may have.
	// The Ternary (parseInt(...) || 0) statements fix a bug in IE6 where it returns NaN,
	//  which doesn't play nicely when adding to numbers...
	ret.width = $(element).width() 
	  + (parseInt($(element).css('borderLeftWidth')) || 0)
	  + (parseInt($(element).css('borderRightWidth')) || 0)
	  + (parseInt($(element).css('padding-left')) || 0)
	  + (parseInt($(element).css('padding-right')) || 0);
	ret.height = $(element).height() 
	  + (parseInt($(element).css('borderTopWidth')) || 0) 
	  + (parseInt($(element).css('borderBottomWidth')) || 0)
	  + (parseInt($(element).css('padding-bottom')) || 0)
	  + (parseInt($(element).css('padding-bottom')) || 0);
	var offsets = $(element).offset();
	ret.left = offsets.left;
	ret.top = offsets.top;

	return ret;
}
</pre></p>
<p><b>jQuery selector</b><br />
<pre class="brush: jscript; wrap-lines: false;">
// select all input,select elements. I'd wrap my form in a div.
$('div#formContent input, div#formContent select, div#formContent textarea').each(function(i, element) {
	// if the element doesn't have the class named excludeMeFromReadOnly, overlay it to make it look like it's read only
	if(!$(element).hasClass('excludeMeFromReadOnly')) {
		generateOverlay($(element));
	}
});
</pre></p>
<p>Please note, the plugin contains a lot more logic including IE hacks etc. Fortunately for me, I really don&#8217;t care about IE prior to version 8 in my particular scenario. Therefore I don&#8217;t need all of those hacks.</p>
<p><b>&#8212;&gt;<a href="http://regretless.com/stuff/jQuery/readOnlyOverlay.html" target="_blank">Example code</a> (<a href="http://jsfiddle.net/dodozhang21/dVGNV/" target="_blank">example at jsFiddle</a>)&lt;&#8212;</b></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2171&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/09/22/jquery-read-only-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery.each vs Javascript for loop</title>
		<link>http://pure-essence.net/2011/09/02/jquery-each-vs-javascript-for-loop/</link>
		<comments>http://pure-essence.net/2011/09/02/jquery-each-vs-javascript-for-loop/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 21:31:15 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[for loop]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2164</guid>
		<description><![CDATA[Being a big jQuery fan, I use jQuery.each method a lot in my Javascript code. Until recently I didn&#8217;t think too hard what jQuery.each really is. Its description says it&#8217;s an iterator but it certainly is NOT a true iterator. For example: Let me know what you expect the code below to return. Before I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2164&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Being a big jQuery fan, I use jQuery.each method a lot in my Javascript code. Until recently I didn&#8217;t think too hard what jQuery.each really is.</p>
<p><a href="http://api.jquery.com/jQuery.each/">Its description</a> says it&#8217;s an iterator but it certainly is NOT a true iterator.</p>
<p>For example:</p>
<p>Let me know what you expect the code below to return.</p>
<p><pre class="brush: jscript; wrap-lines: false;">
var myVars = ['foo1', 'foo2', 'foo3'];

function containsValue(myValue, myCollection) {
	jQuery.each(myCollection, function(i, val) {
		if(val == myValue) {
			return true;
		}
	});
	return false;
}

$(document).ready(function() {
	console.log(containsValue('foo2', myVars));
});
</pre></p>
<p>Before I know better, I&#8217;d expect it to return true. Since myCollection DOES CONTAIN the value &#8216;foo2&#8242;. However the function <b>containsValue WILL ALWAYS RETURN FALSE</b>. That&#8217;s because when you return out of jQuery.each, it simply exits out of jQuery.each but not the containing function. In fact, whether you do anything in the callback function at all, jQuery.each ALWAYS RETURNS the collection you pass in.</p>
<p>e.g.<br />
<pre class="brush: jscript; wrap-lines: false;">
var returnedVar = jQuery.each(myVars, function(i, val) {});
console.log(returnedVar === myVars); // evaluates to true
</pre></p>
<p>In my opinion, jQuery.each acts more like a closure than an iterator. Sure you may use it as an iterator as long as you not returning anything. If you are just changing behaviors or collecting information, it will mimic an iterator. But you need to know, it really is not an iterator.</p>
<p>Personally I&#8217;m going to start to use <a href="http://www.w3schools.com/js/js_loop_for_in.asp" target="_blank">Javascript&#8217;s native for..in statement</a> instead of jQuery.each for Javascript collection variables. There is also an argument that jQuery.each may never perform faster than the native support for an iterator. Therefore below I will rewrite the function above using for..in.</p>
<p><pre class="brush: jscript; wrap-lines: false;">
function containsValueWithFor(myValue, myCollection) {
	for (index in myCollection) {
		if(myCollection[index] == myValue) {
			return true;
		}
	}
	return false;
}

console.log(containsValueWithFor('foo2', myVars)); // true

var myMap = {'lala':'foo1', '2':'foo2', 'b':'foo3'};

console.log(containsValueWithFor('foo2', myMap)); // true as well for an object/map
</pre></p>
<p><b>&#8212;&gt;<a href="http://regretless.com/stuff/jQuery/jQueryEach.html" target="_blank">Example code</a>&lt;&#8212;</b></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2164&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/09/02/jquery-each-vs-javascript-for-loop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>2011 nfjs Central Iowa Software Symposium</title>
		<link>http://pure-essence.net/2011/08/08/2011-nfjs-central-iowa-software-symposium/</link>
		<comments>http://pure-essence.net/2011/08/08/2011-nfjs-central-iowa-software-symposium/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 18:37:25 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[plug]]></category>
		<category><![CDATA[Central Iowa Software Symposium]]></category>
		<category><![CDATA[nfjs]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2152</guid>
		<description><![CDATA[My survey responses to the 2011 nfjs Central Iowa Software Symposium event for my company. Benefits to you and the company from attending this event: Keep up to date regarding the current technologies and development in the Java community. Information that your co-workers / the company should be aware of: Functional programming is making a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2152&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My survey responses to the <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/home" target="_blank">2011 nfjs Central Iowa Software Symposium</a> event for my company.</p>
<p><b>Benefits to you and the company from attending this event:</b><br />
Keep up to date regarding the current technologies and development in the Java community.</p>
<p><b>Information that your co-workers / the company should be aware of:</b><br />
Functional programming is making a big splash on the JVM. We really should come out of the traditional OO &amp; imperative programming mindset and start think of solving programming challenges in a multi-paradigm fashion. We should upgrade from CVS to Git <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><b>Information that you learned that may have negative impacts to the company:</b><br />
None</p>
<p><b>Would recommend this event / company presenting to someone else?  Why?</b><br />
Yes. The presenters have great knowledge about their topics. They always make me think harder and different about what I am doing at work.</p>
<p><b>Additional Comments or Suggestions:</b><br />
I greatly enjoyed learning more about <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/session?id=23443" title="SUPER FUNNY &amp; ENJOYABLE" target="_blank">Scala</a>, <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/session?id=23444" target="_blank">akka</a> and <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/session?id=22500" target="_blank">functional programming thinking</a>. <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/session?id=23655" target="_blank">The multi-paradigm session</a> by <a href="http://twitter.com/#!/tedneward" target="_blank">Ted Neward</a> opened my eyes.  I took logic &amp; functional programming courses in college and was super impressed by how concise and powerful those languages can be used to solve particular issues.  Now many frameworks on the JVM prove that as Java programmers (who are innately OO &amp; imperative), we may fully utilize the power of programming languages of other paradigms. This motivates me to explore a newer realm of programming.</p>
<p>I learned a lot from <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/session?id=22487" target="_blank">the Seven wastes of software development session</a> e.g. communication is 38% tone, 7% words &amp; 55% body languages. Therefore we should avoid plain emails for especially business rules discussion; converse with a coworker face to face is a much more effective way of communication.  I think I don’t always do well in this area.  Perhaps programmers are generally shy and introverted.  I need to learn to open up more.</p>
<p>I also loved <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/session?id=22476" target="_blank">the Spock session</a> although I feel Spock as a framework is yet completely mature for prime time. The fact it doesn’t have a version 1.x release somewhat speaks for this.  (And it’s not yet in maven central repository.)  I love its various features.  But it’s still under heavy development phase as its community is actively adding more features to the framework. If we start using it now, we may need to upgrade our code dramatically later to get its full effects e.g. the @Unroll feature is going to change soon.  However, I’m super excited to revisit it in a few months or so to see where it’s at. The fact that it’s a test framework great for both state testing &amp; interaction testing (mocking) is awesome!  It sounds like the mocking part of it is yet as mature as other mocking frameworks e.g. Mockito. For example, it doesn’t support partial mock/spy. This does not make me want to switch from Mockito to use it.</p>
<p>I will also use <a href="http://www.nofluffjuststuff.com/conference/des_moines/2011/08/session?id=23648" target="_blank">many of the new features of Groovy I learned</a> since I just started using Groovy for testing.  The SQL class Groovy has is extremely powerful and gave me many ideas as how I can utilize it to make testing more dynamic and more maintenance free.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2152&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/08/08/2011-nfjs-central-iowa-software-symposium/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>QUnit &#8211; test your javascript</title>
		<link>http://pure-essence.net/2011/07/24/qunit-test-your-javascript/</link>
		<comments>http://pure-essence.net/2011/07/24/qunit-test-your-javascript/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 16:28:06 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[qunit]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2139</guid>
		<description><![CDATA[After over ten years of javascript programming, I&#8217;m finally seriously considering writing at least unit tests for my javascript. Since I&#8217;m such a big fan of jQuery, QUnit seems like the obvious choice. It&#8217;s sad but better late than never. The truth is, in my opinion, the fact that javascript test frameworks do not yet [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2139&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After over ten years of javascript programming, I&#8217;m finally seriously considering writing at least unit tests for my javascript. Since I&#8217;m such a big fan of jQuery, <a href="http://docs.jquery.com/QUnit">QUnit</a> seems like the obvious choice.</p>
<p>It&#8217;s sad but better late than never.</p>
<p>The truth is, in my opinion, the fact that javascript test frameworks do not yet maturely work with many of the continuous integration software deters programmers from using them. What&#8217;s the point of unit testing if they don&#8217;t automatically get run? Based on my research, <a href="http://www.jsunit.net/" target="_blank">JSUnit</a> is the only one that integrates with ANT innately. But JSUnit is more of an abandomware now so people are looking for alternatives.</p>
<p><strong>QUnit + CI topics</strong></p>
<ul>
<li>
<a href="http://lostechies.com/joshuaflanagan/2008/09/18/running-jquery-qunit-tests-under-continuous-integration/" target="_blank">jQuery tests under CI</a>
</li>
<li>
<a href="http://jupiterjs.com/#news/syn-a-standalone-synthetic-event-library" target="_blank">Syn instead of Selenium?</a>
</li>
<li>
<a href="http://docs.jquery.com/Qunit#Integration_into_Browser_Automation_Tools" target="_blank">QUnit and automated browser tools</a>
</li>
</ul>
<p>&gt;&gt; <a href="http://regretless.com/stuff/qunit/testSuite.html" target="_blank">Run my test suite</a> &lt;&lt;</p>
<p><strong>QUnit simple example:</strong></p>
<p>HTML:<br />
<pre class="brush: xml; wrap-lines: false;">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Test Suite&lt;/title&gt;
	&lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;
	&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/qunit/git/qunit.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/qunit/git/qunit.js&quot;&gt;&lt;/script&gt;
	&lt;!-- Your source files go here --&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;functions.js&quot;&gt;&lt;/script&gt;

	&lt;!-- Your tests files go here --&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;isEvenTest.js&quot;&gt;&lt;/script&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;startsWithTest.js&quot;&gt;&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
	&lt;h1 id=&quot;qunit-header&quot;&gt;QUnit example&lt;/h1&gt;
	&lt;h2 id=&quot;qunit-banner&quot;&gt;&lt;/h2&gt;
	&lt;div id=&quot;qunit-testrunner-toolbar&quot;&gt;&lt;/div&gt;
	&lt;h2 id=&quot;qunit-userAgent&quot;&gt;&lt;/h2&gt;
	&lt;ol id=&quot;qunit-tests&quot;&gt;&lt;/ol&gt;

	&lt;!-- Any HTML you may require for your tests to work properly --&gt;
	&lt;div id=&quot;qunit-fixture&quot;&gt;test markup, will be hidden&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>Source javascript file:<br />
<pre class="brush: jscript; wrap-lines: false;">
function isEven(val) {
	return val % 2 === 0;
}

function startsWith(data, startsWithStr) {
	data = jQuery.trim(data);
	startsWithStr = jQuery.trim(startsWithStr);
	if(data) {
		return data.toUpperCase().lastIndexOf(startsWithStr.toUpperCase(), 0) === 0;
	} else if(data === startsWithStr) {
		return true;
	} else {
		return false;
	}
}
</pre></p>
<p>Sample test file:<br />
<pre class="brush: jscript; wrap-lines: false;">
$(document).ready(function(){

	module(&quot;startsWithTest&quot;);

	test('startsWith', function() { 
		ok(startsWith(&quot;ll-925&quot;, &quot;ll-&quot;), 'Starts with ll-'); 
		ok(!startsWith(&quot;ll-925&quot;, &quot;xl-&quot;), 'Does not start with xl-'); 
		ok(!startsWith(&quot;&quot;, &quot;xx-&quot;), 'Does not start with xx-'); 
		ok(startsWith(&quot; xx-sdgj &quot;, &quot;xx-&quot;), 'Trimming test: starts with xx-'); 
		ok(startsWith(&quot; xx-sdgj&quot;, &quot; xx- &quot;), 'Trimming test 2: starts with xx-'); 
		ok(startsWith(&quot;&quot;, &quot; &quot;), 'Empty string starts with empty string'); 
		ok(startsWith(&quot;Mn-u59&quot;, &quot;mN-&quot;), 'Non case sensitive test'); 
//		raises(startsWith(foo, &quot; &quot;), 'Undefined test 1');  // undefined is obviously not considered a normal exception
	}) 

});
</pre></p>
<p>&gt;&gt; <a href="https://github.com/dodozhang21/QUnit-Example" target="_blank">git repo for the source</a> &lt;&lt;</p>
<p><strong>Additional resources:</strong></p>
<ul>
<li><a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/" target="_blank">QUnit tutorials</a></li>
<li><a href="http://docs.jquery.com/QUnit#API_documentation" target="_blank">API documentation</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2139&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/07/24/qunit-test-your-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>SPEL! I conquered you on a Friday!</title>
		<link>http://pure-essence.net/2011/07/22/spel-i-conquered-you-on-a-friday/</link>
		<comments>http://pure-essence.net/2011/07/22/spel-i-conquered-you-on-a-friday/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 16:02:35 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[spel]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[Spring Framework]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2132</guid>
		<description><![CDATA[Today is my first attempt at using SPEL. After a mighty struggle, I was able to conquer it! Background: I needed a year variable for some work on a jsp page. It&#8217;s not always defined. I know for our routable datasource, a default year is required in order for it to work. I wanted to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2132&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today is my first attempt at <a href="http://static.springsource.org/spring/docs/3.0.x/reference/expressions.html" target="_blank">using SPEL</a>.  After a mighty struggle, I was able to conquer it!</p>
<p><strong>Background:</strong></p>
<p>I needed a year variable for some work on a jsp page. It&#8217;s not always defined. I know for our <a href="http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.html" target="_blank">routable datasource</a>, a default year is required in order for it to work. I wanted to use the same default year but I only want the variable to be defined once and used in both places.</p>
<p>So I looked into <a href="http://www.mkyong.com/spring3/spring-el-hello-world-example/" target="_blank">SPEL</a>.</p>
<p>It seems like the correct solution for the problem.</p>
<p><strong>My original idea:</strong></p>
<p><a href="http://regretless.com/stuff/spring/spelMightyStruggle1.jpg" class="thickbox"><img src="http://regretless.com/stuff/spring/spelMightyStruggle1.jpg" class="blogpic" /></a><br />
As it turns out, SPEL does not yet support embedded variables.  SPEL, you must improve yourself!</p>
<p><strong>My workaround:</strong></p>
<p>I do not love it but it accomplishes my goal of not defining it more than one place.</p>
<p>Define the variable in a properties file e.g. application.properties<br />
defaultYear=2011</p>
<p>Then use placeholder instead of SPEL notation to include it in spring.</p>
<p><a href="http://regretless.com/stuff/spring/spelMightyStruggle2.jpg" class="thickbox"><img src="http://regretless.com/stuff/spring/spelMightyStruggle2.jpg" class="blogpic" /></a></p>
<p><strong>Syntax grrr syntax:</strong></p>
<p>Sadly some of my time was to learn the fact you CANNOT put a space between # and { in SPEL. For example, # {bean.property} will NOT work, but #{bean.property} will.  It seems obvious afterwards but the error message you get just DOES NOT help you come to that conclusion.</p>
<p><strong>Moral of the story:</strong></p>
<p>SPEL is very handy but it’s yet perfect.  Do keep that in mind as an alternative solution when dealing with Spring.  If you use annotation, you can do @Value(&#8220;#{bean.property}&#8221;).  <a href="http://static.springsource.org/spring/docs/3.0.x/reference/expressions.html" target="_blank">Refer documentation for more info</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2132&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/07/22/spel-i-conquered-you-on-a-friday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>

		<media:content url="http://regretless.com/stuff/spring/spelMightyStruggle1.jpg" medium="image" />

		<media:content url="http://regretless.com/stuff/spring/spelMightyStruggle2.jpg" medium="image" />
	</item>
		<item>
		<title>Java concurrency &#8211; Multiple queue monitors</title>
		<link>http://pure-essence.net/2011/06/25/java-concurrency-multiple-queue-monitors/</link>
		<comments>http://pure-essence.net/2011/06/25/java-concurrency-multiple-queue-monitors/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 11:02:34 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[activemq]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[spring-jms]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2104</guid>
		<description><![CDATA[At work, I&#8217;ve implemented a queue monitor batch application. Due to business rule changes, it now needs to monitor two queues. Instead of creating another batch application, I really wanted to stick with the same application but just create two threads, each monitoring its own queue. However, the twist I need is to have the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2104&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At work, I&#8217;ve implemented a queue monitor batch application.  Due to business rule changes, it now needs to monitor two queues.  Instead of creating another batch application, I really wanted to stick with the same application but just create two threads, each monitoring its own queue.</p>
<p>However, the twist I need is to have the main batch application thread die as soon as either queue monitoring thread dies.</p>
<p>I&#8217;ve been searching for a graceful way to handle such a concurrency need in Java. Thank you to <a href="https://github.com/developerSid/ThreadDoer" target="_blank">Gary Myers</a>, I&#8217;ve got a great start on it.</p>
<p>The basic idea is to pass a java blocking queue to both of the threads and if either thread fails, do blockingQueue.offer to indicate so. Then in the main thread, it will check for the blocking queue&#8217;s result. blockingQueue.take() blocks/waits for it to return and then continues the execution of the main thread.</p>
<p><b>Things I learned that made today AMAZING!</b></p>
<ul>
<li>Put repositories in the pom.xml instead of settings.xml for maven to look through multiple repositories</li>
<li>Use SynchronousQueue to ensure only 1 element at a time may exist in the queue</li>
<li>Use daemon to make sure the JVM will die even if there is a thread running</li>
<li>You can <strong>EMBED <a href="http://activemq.apache.org/" target="_blank">ActiveMQ</a></strong> using spring so you don&#8217;t have install it at all</li>
</ul>
<p>Below is a simple concurrency example that demonstrates the idea from <a href="https://github.com/developerSid/ThreadDoer" target="_blank">Gary Myers</a>.</p>
<p>Worker:<br />
<pre class="brush: java; wrap-lines: false;">
public class Worker implements Runnable {
   private BlockingQueue&lt;String&gt; finishedQueue;
   private String result;
   private long sleepTime;
   
   public Worker(BlockingQueue&lt;String&gt; finishedQueue, String result, long sleepTime) {
      this.finishedQueue=finishedQueue;
      this.result=result;
      this.sleepTime=sleepTime;
   }
   
   public void run() {
      try {
         TimeUnit.SECONDS.sleep(sleepTime);
         finishedQueue.offer(result); //you have to use offer to get this queue to work.  It will throw an exception if there is something in the queue.
      } catch(InterruptedException e) {
         e.printStackTrace();
      }
   }
}
</pre></p>
<p>DaemonThreadFactory:<br />
<pre class="brush: java; wrap-lines: false;">
public class DaemonThreadFactory implements ThreadFactory {
   private AtomicInteger counter;
   
   public DaemonThreadFactory() {
      this.counter=new AtomicInteger(0);
   }
   
   public Thread newThread(Runnable r) {
      Thread thread=new Thread(r);
      
      //if you wanted you can make this class generic by having the constructor take arguments that can be used to configure the following
      thread.setDaemon(true); //need it to be daemon so the JVM will die even if there is a thread running
      thread.setName(&quot;Daemon Thread: &quot; + counter.incrementAndGet()); //you don't have to give it a name, but I always do.
      
      return thread;
   }
}
</pre></p>
<p>Test the threads in a simple example:<br />
<pre class="brush: java; wrap-lines: false;">
public class Main {
   public static void main(String[] args) throws InterruptedException {
      ExecutorService service=Executors.newFixedThreadPool(2, new DaemonThreadFactory());
      SynchronousQueue&lt;String&gt; queue=new SynchronousQueue&lt;String&gt;(); //this queue can hold 1 element at a time, so basically the first thread to finish will be the one to successfully put the element in the queue
      //create the runnables before hand so that extra time isn't spent instantiating the runnables at submission time.
      Runnable runnable1=new Worker(queue, &quot;Runnable 1&quot;, 4);
      Runnable runnable2=new Worker(queue, &quot;Runnable 2&quot;, 3);
      
      service.execute(runnable1);
      service.execute(runnable2);
      
      System.out.println(&quot;before queue&quot;);
      System.out.println(queue.take());
      System.out.println(&quot;after queue&quot;);
      
      service.shutdown(); 
   }
}
</pre></p>
<p>I will not go into the details of the code I added for queue monitoring as they are a lot more involved.</p>
<p><b>The coolest thing I learned about ActiveMQ</b> is how you can embed it using the following spring configuration:<br />
<pre class="brush: xml; wrap-lines: false;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:p=&quot;http://www.springframework.org/schema/p&quot;
       xmlns:jms=&quot;http://www.springframework.org/schema/jms&quot;
       xmlns:amq=&quot;http://activemq.apache.org/schema/core&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/jms http://www.springframework.org/schema/context/spring-jms-3.0.xsd
					http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd&quot;&gt;
 
    &lt;!--  Embedded ActiveMQ Broker --&gt;
    &lt;amq:broker id=&quot;broker&quot; useJmx=&quot;false&quot; persistent=&quot;true&quot;&gt;
        &lt;amq:transportConnectors&gt;
            &lt;amq:transportConnector uri=&quot;tcp://localhost:0&quot; /&gt;
        &lt;/amq:transportConnectors&gt;
    &lt;/amq:broker&gt;

    &lt;!--  ActiveMQ Destination  --&gt;
    &lt;amq:queue id=&quot;destination&quot; physicalName=&quot;com.threads.example.queue&quot; /&gt;

    &lt;!-- JMS ConnectionFactory to use, configuring the embedded broker using XML --&gt;
    &lt;amq:connectionFactory id=&quot;jmsFactory&quot; brokerURL=&quot;vm://localhost&quot; /&gt;

    &lt;!-- JMS Producer Configuration --&gt;
    &lt;bean id=&quot;jmsProducerConnectionFactory&quot; 
          class=&quot;org.springframework.jms.connection.SingleConnectionFactory&quot;
          depends-on=&quot;broker&quot;
          p:targetConnectionFactory-ref=&quot;jmsFactory&quot; /&gt;

    &lt;bean id=&quot;jmsTemplate&quot; class=&quot;org.springframework.jms.core.JmsTemplate&quot;
          p:connectionFactory-ref=&quot;jmsProducerConnectionFactory&quot;
          p:defaultDestination-ref=&quot;destination&quot; /&gt;
&lt;/beans&gt;
</pre><br />
Once done, your application will run without your manual ActiveMQ installation. Above is <a href="http://www.springbyexample.org/examples/simple-spring-jms.html" target="_blank">from the example here</a>.</p>
<p><b>If running in Eclipse&#8230;</b></p>
<ul>
<li>Install m2eclipse plugin if you have not</li>
<li>Import -&gt; Maven -&gt; Existing Maven Projects</li>
<li>Select the MultipleQueueMonitors folder</li>
<li>Add src, resources, properties as source folders</li>
<li>Change the jre to whatever you want to use</li>
</ul>
<p><b>The following error may occur in Eclipse</b><br />
<pre class="brush: plain;">
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c:
The matching wildcard is strict, but no declaration can be found for element 'amq:broker'. 
</pre></p>
<p>To fix it, you must associate the ActiveMQ XSD URL with the schema.</p>
<p>Go to XML-&gt;XML Catalog in Preferences, and add a User Specified Entry.</p>
<p>Location: http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd<br />
Key Type: Namespace Name<br />
Key: http://activemq.apache.org/schema/core</p>
<p>Then add a second one:</p>
<p>Location: http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd<br />
Key Type: Schema Location<br />
Key: http://activemq.apache.org/schema/core/activemq-core.xsd</p>
<p>Hit OK.</p>
<p>For more info, visit this <a href="http://stackoverflow.com/questions/2289532/tomcat-understands-amqbroker-but-eclipse-marks-errors-in-schema" target="_blank">stackoverflow thread</a>.</p>
<h2>
&gt;&gt;&gt;<a href="https://github.com/dodozhang21/MultipleQueueMonitors" target="_blank">Check out or download the source from my github account if you are interested</a>&lt;&lt;&lt;<br />
</h2>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2104&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/06/25/java-concurrency-multiple-queue-monitors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse 3.6 freezes at startup</title>
		<link>http://pure-essence.net/2011/06/23/eclipse-3-6-freezes-at-startup/</link>
		<comments>http://pure-essence.net/2011/06/23/eclipse-3-6-freezes-at-startup/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 14:48:59 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[freeze up]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2101</guid>
		<description><![CDATA[My Eclipse 3.6 froze today at startup. I think what I did was that I clicked on the shortcut a bit too fast and two instances of Eclipse started running at the same time. I got an error message for one saying &#8220;workspace in use&#8221;. I killed the one that showed the error message but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2101&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My Eclipse 3.6 froze today at startup. I think what I did was that I clicked on the shortcut a bit too fast and two instances of Eclipse started running at the same time. I got an error message for one saying &#8220;workspace in use&#8221;. I killed the one that showed the error message but then my Eclipse will no longer start up.</p>
<p>I searched around for solutions.</p>
<p>The one that SORTA worked for me is below from <a href="http://off-topic.biz/en/eclipse-hangs-at-startup-showing-only-the-splash-screen/" target="_blank">here</a>.</p>
<ul>
<li>cd .metadata/.plugins</li>
<li>mv org.eclipse.core.resources org.eclipse.core.resources.bak</li>
<li>Start eclipse. (It should show an error message or an empty workspace because no project is found.)</li>
<li>Close all open editors tabs.</li>
<li>Exit eclipse.</li>
<li>rm -rf org.eclipse.core.resources (Delete the newly created directory.)</li>
<li>mv org.eclipse.core.resources.bak/ org.eclipse.core.resources (Restore the original directory.)</li>
<li>Start eclipse and start working. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>However, just doing that did not exactly solve my problem. I ended up going to the <b>.metainfo/.plugins/org.eclipse.core.resources/.project</b> directory and started deleting random project and trial on error. I finally found the project that was the culprit and fixed my issue.</p>
<p>Another suggestion by a coworker that has worked before if Eclipse freezes at startup is:</p>
<ul>
<li>cd workspace\.metadata\.plugins\org.eclipse.ui.workbench</li>
<li>Make backup of workbench.xml</li>
<li>Edit workbench.xmlfile and remove all &lt;editor&gt; tags.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2101&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/06/23/eclipse-3-6-freezes-at-startup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>m2eclipse plugin jdk warning</title>
		<link>http://pure-essence.net/2011/06/15/m2eclipse-plugin-jdk-warning/</link>
		<comments>http://pure-essence.net/2011/06/15/m2eclipse-plugin-jdk-warning/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 20:59:23 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[m2eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2094</guid>
		<description><![CDATA[More info &#8211; old issue but I ran into it on every freaking machine at home. After I installed the m2eclipse plugin on Eclipse 3.6, I keep getting the following warning on the console: The solution that worked for me is changing the shortcut properties for eclipse e.g. I couldn&#8217;t get the eclipse.ini updates to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2094&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.myeclipseide.com/PNphpBB2-viewtopic-t-20880.html" target="_blank">More info</a> &#8211; old issue but I ran into it on every freaking machine at home.</p>
<p>After I installed <a href="http://m2eclipse.sonatype.org/installing-m2eclipse.html" target="_blank">the m2eclipse plugin</a> on Eclipse 3.6, I keep getting the following warning on the console:<br />
<pre class="brush: plain; wrap-lines: false;">
The Maven Integration requires that Eclipse be running in a JDK, beacuase a number of Maven core plugins are using jars from the JDK.

Please make sure the -vm options in eclipse.ini is pointing to a JDK and verify that Installed JREs are also using JDK installs.
</pre></p>
<p>The solution that worked for me is changing the shortcut properties for eclipse e.g.<br />
<pre class="brush: plain; wrap-lines: false;">
C:\JAVA\eclipse\eclipse.exe -vm &quot;C:\Program Files\Java\jdk1.6.0_25\bin\javaw.exe&quot;
</pre></p>
<p>I couldn&#8217;t get the <strong>eclipse.ini</strong> updates to work for some stupid reason.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2094/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2094/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2094/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2094/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2094/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2094/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2094/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2094&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/06/15/m2eclipse-plugin-jdk-warning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse 3.6 Auto Static Import</title>
		<link>http://pure-essence.net/2011/06/09/eclipse-3-6-auto-static-import/</link>
		<comments>http://pure-essence.net/2011/06/09/eclipse-3-6-auto-static-import/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 18:42:42 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[static import]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2090</guid>
		<description><![CDATA[After I started using JUnit 4, I really want Eclipse to automatically import org.junit.Assert.* statically for me. So when I do ctrl+space on methods like assertTrue, it will do: for me. I&#8217;ve figured it out for a while but I&#8217;ve been noticing it conflicting with my save action -&#62; organize imports setting. I finally got [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2090&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After I started using JUnit 4, I really want Eclipse to automatically import org.junit.Assert.* statically for me. So when I do ctrl+space on methods like <b>assertTrue</b>, it will do:<br />
<pre class="brush: java; wrap-lines: false;">
import static org.junit.Assert.*;
</pre><br />
for me.</p>
<p>I&#8217;ve figured it out for a while but I&#8217;ve been noticing it conflicting with my save action -&gt; organize imports setting.</p>
<p>I finally got fed up and decided to investigate a bit further today.</p>
<p>Below are screenshots of <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> version 3.6.</p>
<ul>
<li>
Preferences -&gt; Java -&gt; Editor -&gt; Content Assit -&gt; Favorites all of the paths you wish to import statically e.g. <b>org.junit.Assert.*</b><br />
<a href="http://regretless.com/stuff/eclipse/staticImport.png" class="thickbox"><img src="http://regretless.com/stuff/eclipse/staticImport.png" style="width:300px;" class="blogpic" /></a>
</li>
<li>
Then if you have Preferences -&gt; Java -&gt; Editor -&gt; Save Actions -&gt; Organize imports selected<br />
<a href="http://regretless.com/stuff/eclipse/autoOrganizeImports.png" class="thickbox"><img src="http://regretless.com/stuff/eclipse/autoOrganizeImports.png" style="width:300px;" class="blogpic" /></a></p>
<p>Make sure you update Preferences -&gt; Java -&gt; Code Style -&gt; Orangize Imports to have <b>Number of static imports needed for .* (e.g. &#8216;java.lang.Math.*)</b> to 1.<br />
<a href="http://regretless.com/stuff/eclipse/staticImportAutoOrganization.png" class="thickbox"><img src="http://regretless.com/stuff/eclipse/staticImportAutoOrganization.png" style="width:300px;" class="blogpic" /></a></p>
<p>This way when you save your java files in Eclipse, it will not change your <b>org.junit.Assert.*</b> import to <b>org.junit.Assert.assertTrue</b> import. Otherwise it will require you to import again if you wish to use another method like <b>assertFalse</b> which in my opinion is annoying.
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2090/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2090/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2090/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2090/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2090/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2090/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2090/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2090/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2090/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2090/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2090/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2090/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2090/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2090/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=2090&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/06/09/eclipse-3-6-auto-static-import/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>

		<media:content url="http://regretless.com/stuff/eclipse/staticImport.png" medium="image" />

		<media:content url="http://regretless.com/stuff/eclipse/autoOrganizeImports.png" medium="image" />

		<media:content url="http://regretless.com/stuff/eclipse/staticImportAutoOrganization.png" medium="image" />
	</item>
	</channel>
</rss>
