<?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"
	>

<channel>
	<title>thoughts.on.code</title>
	<atom:link href="http://blog.secosoft.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.secosoft.net</link>
	<description>Matt Secoske's intermittent ramblings on software and life</description>
	<pubDate>Tue, 30 Oct 2007 15:10:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Firebug makes GMail slow?</title>
		<link>http://blog.secosoft.net/2007/10/30/firebug-makes-gmail-slow/</link>
		<comments>http://blog.secosoft.net/2007/10/30/firebug-makes-gmail-slow/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 15:10:22 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[AJAX/Web 2.0]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/10/30/firebug-makes-gmail-slow/</guid>
		<description><![CDATA[I was perusing my favorite online email service just now and saw this red banner blazing across the top of my mail:

My first reaction was &#8220;Holy shit they detected Firebug?!?!&#8221;  My next reaction was &#8220;ok, lets see how we fix this&#8221;.  So I clicked the link.  It brought me to this page [...]]]></description>
			<content:encoded><![CDATA[<p>I was perusing my favorite online email service just now and saw this red banner blazing across the top of my mail:</p>
<p><img src="/wp-content/gmail_mac.png" alt="wtf?" /></p>
<p>My first reaction was &#8220;Holy shit they detected Firebug?!?!&#8221;  My next reaction was &#8220;ok, lets see how we fix this&#8221;.  So I clicked the link.  It brought me to <a href="https://mail.google.com/support/bin/answer.py?answer=77355">this page</a> (included below incase you cannot see the page):</p>
<blockquote><p>
Firebug can make Gmail slow</p>
<p>If you&#8217;re using Windows or Linux</p>
<p>For the best Gmail performance, we suggest disabling Firebug for www.google.com by following these steps:</p>
<p>   1. Click the green or red icon in the bottom right corner of the browser window to open Firebug.<br />
   2. Click the bug icon in the top left corner of Firebug and select &#8216;Disable Firebug for mail.google.com.&#8217;</p>
<p>If you&#8217;d like to keep Firebug running, you may improve Gmail performance by following these steps:</p>
<p>   1. Click the green or red icon in the bottom right corner of the browser window to open Firebug.<br />
   2. Click the Console tab.<br />
   3. Select Options.<br />
   4. Uncheck Show XMLHttpRequests.<br />
   5. Click the Net tab.<br />
   6. Select Options.<br />
   7. Check Disable Network Monitoring.</p>
<p>If you&#8217;re using a Mac</p>
<p>Please note that if you&#8217;re using a Mac, you&#8217;ll continue to experience performance problems unless you disable Firebug for Gmail. To disable Firebug for www.google.com, please follow the steps below:</p>
<p>   1. Click the green or red icon in the bottom right corner of the browser window to open Firebug.<br />
   2. Click the bug icon in the top left corner of Firebug and select &#8216;Disable Firebug for mail.google.com.&#8217;</p>
<p>If disabling Firebug for Gmail doesn&#8217;t improve performance results, you may have to entirely disable Firebug.
</p></blockquote>
<p>I am just now disabling Firebug for Gmail&#8230; hopefully that will also speed up iGoogle, &#8217;cause it is slower than a snail most of the time on my Powerbook.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/10/30/firebug-makes-gmail-slow/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Comparing Java to Groovy NFJS talk online</title>
		<link>http://blog.secosoft.net/2007/08/04/comparing-java-to-groovy-nfjs-talk-online/</link>
		<comments>http://blog.secosoft.net/2007/08/04/comparing-java-to-groovy-nfjs-talk-online/#comments</comments>
		<pubDate>Sun, 05 Aug 2007 05:29:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Groovy]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/08/04/comparing-java-to-groovy-nfjs-talk-online/</guid>
		<description><![CDATA[The slides for my NFJS talk &#8220;Comparing Java and Groovy&#8221;, along with source code are now online in the Presentations section.
]]></description>
			<content:encoded><![CDATA[<p>The slides for my NFJS talk &#8220;Comparing Java and Groovy&#8221;, along with source code are now online in the <a href="http://blog.secosoft.net/presentations">Presentations</a> section.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/08/04/comparing-java-to-groovy-nfjs-talk-online/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WYSIWTF</title>
		<link>http://blog.secosoft.net/2007/07/27/wysiwtf/</link>
		<comments>http://blog.secosoft.net/2007/07/27/wysiwtf/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 16:37:37 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[AJAX/Web 2.0]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Quotes]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[Thought]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/07/27/wysiwtf/</guid>
		<description><![CDATA[Too funny
]]></description>
			<content:encoded><![CDATA[<p><a href="http://ars.userfriendly.org/cartoons/?id=20070726">Too funny</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/07/27/wysiwtf/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Implementing DSLs in Groovy (OSCON slides online)</title>
		<link>http://blog.secosoft.net/2007/07/26/implementing-dsls-in-groovy-oscon-slides-online/</link>
		<comments>http://blog.secosoft.net/2007/07/26/implementing-dsls-in-groovy-oscon-slides-online/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 23:46:57 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Grails]]></category>

		<category><![CDATA[Groovy]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[OJUG]]></category>

		<category><![CDATA[Self]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/07/26/implementing-dsls-in-groovy-oscon-slides-online/</guid>
		<description><![CDATA[I have put the slides and some code from my OSCON 2007 talk online.  
Had a lot of fun giving the talk.  There is a lot of interest in Groovy out there!  Thanks to everyone who came to the talk for the wonderful questions!
]]></description>
			<content:encoded><![CDATA[<p>I have put the <a href="http://blog.secosoft.net/wp-content/oscon2007/groovy_dsl_oscon.ppt">slides</a> and some <a href="http://blog.secosoft.net/wp-content/oscon2007/oscon2007_dsl.zip">code</a> from my OSCON 2007 talk online.  </p>
<p>Had a lot of fun giving the talk.  There is a lot of interest in Groovy out there!  Thanks to everyone who came to the talk for the wonderful questions!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/07/26/implementing-dsls-in-groovy-oscon-slides-online/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Groovy + Annotations + Aspects</title>
		<link>http://blog.secosoft.net/2007/07/20/groovy-annotations-aspects/</link>
		<comments>http://blog.secosoft.net/2007/07/20/groovy-annotations-aspects/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 06:14:58 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Grails]]></category>

		<category><![CDATA[Groovy]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[Speaking]]></category>

		<category><![CDATA[Thought]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/07/20/groovy-annotations-aspects/</guid>
		<description><![CDATA[I have been doing a lot of digging into Groovy and DSLs lately, getting ready for my OSCON talk next week.  
The Groovy language has great built-in support for creating DSLs.  Along with its dynamic nature, Groovy has the &#8220;use&#8221; keyword for working with categories, and coming in 1.1, the ExpandoMetaClass if you [...]]]></description>
			<content:encoded><![CDATA[<p>I have been doing a lot of digging into <a href="http://groovy.codehaus.org">Groovy</a> and <a href="http://www.martinfowler.com/bliki/DomainSpecificLanguage.html">DSL</a>s lately, getting ready for my <a href="http://conferences.oreillynet.com/os2007/">OSCON</a> talk next week.  </p>
<p>The <a href="http://groovy.codehaus.org">Groovy</a> language has great built-in support for creating <a href="http://groovy.codehaus.org/Writing+Domain-Specific+Languages">DSLs</a>.  Along with its dynamic nature, Groovy has the &#8220;use&#8221; keyword for working with <a href="http://groovy.codehaus.org/Groovy+Categories">categories</a>, and coming in <a href="http://docs.codehaus.org/display/GROOVY/2007/07/05/Groovy+1.1-beta-2+with+contributions+from+JetBrains+and+JBoss">1.1</a>, the <a href="http://groovy.codehaus.org/ExpandoMetaClass">ExpandoMetaClass</a> if you want to complete.  </p>
<h2>&#8220;Use&#8221;ing Categories</h2>
<p>Categories help you do scoped &#8220;extension&#8221; to normal every day objects.  An example is in order:</p>
<div class="codesnip-container" >
<div class="codesnip">
<ol>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a> TacoCategory <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span class="kw2">static</span></a> <a href="http://www.google.de/search?as_q=String&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span class="kw3">String</span></a> getTacos<span class="br0">&#40;</span><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20final"><span class="kw2">final</span></a> <a href="http://www.google.de/search?as_q=Integer&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span class="kw3">Integer</span></a> i<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8220;${i} tasty tacos&#8221;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20use"><span class="kw8">use</span></a> <span class="br0">&#40;</span>TacoCategory.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span class="kw8">println</span></a> <span class="nu0">2</span>.<span class="me1">tacos</span>&nbsp; &nbsp; &nbsp;<span class="co1">// outputs -&gt; &quot;2 tasty tacos&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<p>So, inside the use block, there is now (effectively) a new property on the Integer class, called tacos, that will return a string describing your delectable entree.   This is a very powerful technique, and is very useful for developing your own expressive syntax.</p>
<p>One drawback to this technique is that you have to define where you are using it.  Use can be extended into closures, but does not always extend into predefined methods.</p>
<div class="codesnip-container" >
<div class="codesnip">
<ol>
<li class="li1">
<div class="de1">aClosure = <span class="br0">&#123;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span class="kw8">println</span></a> <span class="nu0">3</span>.<span class="me1">tacos</span> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20use"><span class="kw8">use</span></a> <span class="br0">&#40;</span>TacoCategory.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;aClosure.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20call"><span class="kw9">call</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>&nbsp; <span class="co1">// outputs -&gt; &quot;3 tasty tacos&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">aClosure.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20call"><span class="kw9">call</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>&nbsp; <span class="co1">// Exception No such property: tacos for class: java.lang.Integer</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// However, you can do this from Java (or Groovy):</span></div>
</li>
<li class="li1">
<div class="de1">GroovyCategorySupport.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20use"><span class="kw8">use</span></a><span class="br0">&#40;</span>TacoCategory.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a>, aClosure<span class="br0">&#41;</span>&nbsp; <span class="co1">// outputs -&gt; &quot;3 tasty tacos&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//&nbsp; calling methods on a class:</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a> A <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20public"><span class="kw2">public</span></a> <a href="http://www.google.de/search?as_q=String&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span class="kw3">String</span></a> getTacos<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">4</span>.<span class="me1">tacos</span>&nbsp; <span class="co1">// has not been evaluated yet</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span class="kw8">println</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span class="kw2">new</span></a> A<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getTacos</span><span class="br0">&#40;</span><span class="br0">&#41;</span>&nbsp; &nbsp;<span class="co1">// Exception No such property: tacos for class: java.lang.Integer</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// but you can do this:</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20use"><span class="kw8">use</span></a><span class="br0">&#40;</span>TacoCategory.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span class="kw8">println</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span class="kw2">new</span></a> A<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getTacos</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="co1">// outputs -&gt; &quot;4 tasty tacos&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<h2>Groovy + Annotations + Aspects = annotated &#8220;use&#8221; clause</h2>
<p>I was talking about Groovy Categories with <a href="http://blog.blainebuxton.com">Blaine Buxton</a>, and was telling him that I did not like having the &#8220;use&#8221; block inside my DSL code, and wanted a more transparent approach.  He suggested that perhaps an Annotation and an Aspect would do what I was looking for.</p>
<p>With the <a href="http://docs.codehaus.org/display/GROOVY/2007/04/30/Groovy+1.1-beta-1+with+annotation+support">1.1-Beta1 Release</a>, Groovy has built in support for Java Annotations, and since Groovy compiles down to byte code, there is implicit support for Aspects.  Putting these two things together allows us to create an annotation for a more powerful use:</p>
<div class="codesnip-container" >
<div class="codesnip">
<ol>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a> AnnotatedObject <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; @Uses<span class="br0">&#40;</span>category=<span class="br0">&#91;</span>MeasurementCategory.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a><span class="br0">&#93;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20public"><span class="kw2">public</span></a> <a href="http://www.google.de/search?as_q=String&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span class="kw3">String</span></a> fourPoundsOfSomething<span class="br0">&#40;</span>something<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">4</span>.<span class="me1">lbs</span>.<span class="me1">of</span><span class="br0">&#40;</span>something<span class="br0">&#41;</span><span class="br0">&#41;</span>.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span>&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<p>With a simple annotation, @Uses(category=[list of category classes]), we now can define them for any method we want, without having to put them into the method body.</p>
<p>Here is the Annotation code:</p>
<div class="codesnip-container" >
<div class="codesnip">
<ol>
<li class="li1">
<div class="de1">package com.<span class="me1">nimblelogic</span>.<span class="me1">groovy</span>.<span class="me1">dsl</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import java.lang.annotation.Inherited;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import java.lang.annotation.Retention;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import java.lang.annotation.RetentionPolicy;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">@Inherited</div>
</li>
<li class="li1">
<div class="de1">@Retention<span class="br0">&#40;</span>RetentionPolicy.<span class="me1">RUNTIME</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> @<span class="kw2">interface</span> Uses <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">public</span> <span class="kw2">Class</span><span class="br0">&#91;</span><span class="br0">&#93;</span> category<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<p>And here is the Aspect code:</p>
<div class="codesnip-container" >
<div class="codesnip">
<ol>
<li class="li1">
<div class="de1">package com.<span class="me1">nimblelogic</span>.<span class="me1">groovy</span>.<span class="me1">dsl</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import groovy.lang.Closure;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import java.util.ArrayList;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import java.util.List;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.aspectj.lang.JoinPoint;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.aspectj.lang.annotation.SuppressAjWarnings;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.aspectj.lang.reflect.MethodSignature;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.codehaus.groovy.runtime.GroovyCategorySupport;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> aspect UsesAspect <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;pointcut allMethods<span class="br0">&#40;</span><span class="br0">&#41;</span>: call<span class="br0">&#40;</span>@Uses * *<span class="br0">&#40;</span>..<span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; @SuppressAjWarnings</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span class="kw3">Object</span></a> around<span class="br0">&#40;</span><span class="br0">&#41;</span>: allMethods<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; List&lt; <span class="kw2">class</span> &gt;&nbsp; classes = getCategories<span class="br0">&#40;</span>thisJoinPoint<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span class="kw3">Object</span></a> result = <span class="kw2">null</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span> classes.<span class="me1">isEmpty</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = proceed<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; result = </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; GroovyCategorySupport.<span class="me1">use</span><span class="br0">&#40;</span>classes,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">new</span> Closure<span class="br0">&#40;</span>thisJoinPoint.<span class="me1">getTarget</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">public</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span class="kw3">Object</span></a> call<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span> proceed<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span> result;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; @SuppressWarnings<span class="br0">&#40;</span><span class="st0">&#8220;unchecked&#8221;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">private</span> List&lt; <span class="kw2">class</span> &gt; getCategories<span class="br0">&#40;</span>JoinPoint thisJoinPoint<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; List&lt; <span class="kw2">class</span> &gt; classes = <span class="kw2">new</span> ArrayList&lt; <span class="kw2">class</span> &gt;<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// get class level categories (if any)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">Class</span> cl = thisJoinPoint.<span class="me1">getTarget</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getClass</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; addCategories<span class="br0">&#40;</span><span class="br0">&#40;</span>Uses<span class="br0">&#41;</span> cl.<span class="me1">getAnnotation</span><span class="br0">&#40;</span>Uses.<span class="kw2">class</span><span class="br0">&#41;</span>, classes<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// get method level categories (if any)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span> thisJoinPoint.<span class="me1">getKind</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">equals</span><span class="br0">&#40;</span>JoinPoint.<span class="me1">METHOD_CALL</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MethodSignature sig = <span class="br0">&#40;</span>MethodSignature<span class="br0">&#41;</span> thisJoinPoint.<span class="me1">getSignature</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addCategories<span class="br0">&#40;</span><span class="br0">&#40;</span>Uses<span class="br0">&#41;</span> sig.<span class="me1">getMethod</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getAnnotation</span><span class="br0">&#40;</span>Uses.<span class="kw2">class</span><span class="br0">&#41;</span>, classes<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span> classes;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">void</span> addCategories<span class="br0">&#40;</span>Uses uses, List&lt; <span class="kw2">class</span> &gt; classList<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span> uses != <span class="kw2">null</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <span class="kw2">Class</span><span class="br0">&#91;</span><span class="br0">&#93;</span> classes = uses.<span class="me1">category</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">Class</span> cl : classes<span class="br0">&#41;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; classList.<span class="me1">add</span><span class="br0">&#40;</span>cl<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<p>One thing to note when working with Annotations / Aspects in Groovy:  you have to keep track of the build order.  I struggled for a while to figure out why I was not seeing the annotation in my Groovy classes.  It was because it had not been built yet!  I ended up having to split my compilation into 4 parts: </p>
<ol>
<li>Build the Annotation</li>
<li>Compile the Groovy code</li>
<li>Compile my other Java code (just test code)</li>
<li>Weave the Aspects</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/07/20/groovy-annotations-aspects/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Uncle Bob on XML</title>
		<link>http://blog.secosoft.net/2007/05/30/uncle-bob-on-xml/</link>
		<comments>http://blog.secosoft.net/2007/05/30/uncle-bob-on-xml/#comments</comments>
		<pubDate>Thu, 31 May 2007 03:35:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[Thought]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/05/30/uncle-bob-on-xml/</guid>
		<description><![CDATA[I&#8217;m trying to catch up to my overflowing Google reader, and have just seen Uncle Bob&#8217;s posting on XML &#8220;The Hidiocy of XML Languages&#8220;:

Look, writing in XML is hideous. It’s wordy, it’s error-prone, it’s arcane, it’s redundant, it’s redundant, it’s redundant, it’s… HIDEOUS! To make matters worse, we have been embedding OTHER languages INSIDE this [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to catch up to my overflowing Google reader, and have just seen Uncle Bob&#8217;s posting on XML &#8220;<a href="http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages">The Hidiocy of XML Languages</a>&#8220;:</p>
<blockquote><p>
Look, writing in XML is hideous. It’s wordy, it’s error-prone, it’s arcane, it’s redundant, it’s redundant, it’s redundant, it’s… HIDEOUS! To make matters worse, we have been embedding OTHER languages INSIDE this horrible container. EGAD! YIKES! ZOUNDS! FORSOOTH! This is just plain nuts, stupid, idiotic, retarded, poo-poo-headed, silliness!
</p></blockquote>
<p>All I can say is AMEN!!!  And it just gets better.  </p>
<p>I&#8217;ve never been a fan of XML.  Yes, it does have benefits as a data transfer mechanism, though even that is questionable.  Take the <a href="http://www.acord.org">ACORD standards</a> as an example.  This is the standard schema for defining interoperability standards for Insurance Company operations/transactions (Quotes, etc).  Fair enough, this can be very useful for companies to work together.  However, each insurance company has it&#8217;s own way of doing business, and may not use the schema in the same way.  ie a Policy for this company (or even Line of Business) may not mean the same as for another.  So, how interoperable is that?</p>
<p>XML sucks.  Its better than binary, or &#8212; shudder &#8212; ASN.1, but it still sucks, and should not be used as a language.  Thank you Uncle Bob for your rant!  It makes me that maybe, just maybe, I&#8217;m not as insane as people think when I tell them that I hate writing logic in XML.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/05/30/uncle-bob-on-xml/feed/</wfw:commentRss>
		</item>
		<item>
		<title>God is not Great debate</title>
		<link>http://blog.secosoft.net/2007/05/09/god-is-not-great-debate/</link>
		<comments>http://blog.secosoft.net/2007/05/09/god-is-not-great-debate/#comments</comments>
		<pubDate>Thu, 10 May 2007 05:18:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Books]]></category>

		<category><![CDATA[Thought]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/05/09/god-is-not-great-debate/</guid>
		<description><![CDATA[Reverend Al Sharpton, former presidential candidate (among many other things) and Christopher Hitchens, author of &#8220;God is not Great&#8221; had a very interesting discussion a couple of nights ago.  A partial (though fairly accurate) transcript is available here, with the full audio recording available here.  Its 1.5 hours long, and with such an [...]]]></description>
			<content:encoded><![CDATA[<p>Reverend Al Sharpton, former presidential candidate (among many other things) and Christopher Hitchens, author of &#8220;God is not Great&#8221; had a very interesting discussion a couple of nights ago.  A partial (though fairly accurate) transcript is available <a href="http://www.oculture.com/weblog/2007/05/the_great_god_d.html">here</a>, with the full audio recording available <a href="http://www.nypl.org/research/chss/pep/pepdesc.cfm?id=2677">here</a>.  Its 1.5 hours long, and with such an interesting topic, it is really hard to concentrate on other tasks at hand.</p>
<p>Regardless of which side of the debate you stand on, there is something to think about.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/05/09/god-is-not-great-debate/feed/</wfw:commentRss>
		</item>
		<item>
		<title>InfoTec 2007 Presentations are online</title>
		<link>http://blog.secosoft.net/2007/04/20/infotec-2007-presentations-are-online/</link>
		<comments>http://blog.secosoft.net/2007/04/20/infotec-2007-presentations-are-online/#comments</comments>
		<pubDate>Fri, 20 Apr 2007 17:59:33 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[AJAX/Web 2.0]]></category>

		<category><![CDATA[Agile]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Grails]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[Self]]></category>

		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/04/20/infotec-2007-presentations-are-online/</guid>
		<description><![CDATA[I put my InfoTec 2007 presentations online last night.  If you don&#8217;t want to hear about how much fun I had giving them, here is the link.
My first talk was a 4 hour &#8220;Introduction to Ruby on Rails&#8221;.  It had a decent turnout, and was a lot of fun to give.  Thanks [...]]]></description>
			<content:encoded><![CDATA[<p>I put my InfoTec 2007 presentations online last night.  If you don&#8217;t want to hear about how much fun I had giving them, here is <a href="http://blog.secosoft.net/presentations">the link</a>.</p>
<p>My first talk was a 4 hour &#8220;Introduction to Ruby on Rails&#8221;.  It had a decent turnout, and was a lot of fun to give.  Thanks to a IM chat with <a href="http://www.ideologicllc.com/">Harish</a> the night before the talk, I gave the best line I&#8217;ve given so far in a talk (IMHO):  &#8220;So, what type of web application would you like to build today?&#8221;</p>
<p>My second talk was &#8220;Agile Java Web Frameworks&#8221;.  There were twice as many people in this talk that had signed up before the conference started, though slightly fewer than in my rails talk.  A slightly disjointed talk, I hit upon some of the more interesting web frameworks in the java world: Struts2, Spring MVC/WebFlow, Click, Rife, and then the dynamic contenders: Grails, Rails, and Lift.</p>
<p>Click was an interesting experience, as I had only learned about it the night before from <a href="http://www.exigencecorp.com/index.html">Stephen Haberman</a>. It looks pretty promising.</p>
<p>We only had enough time to quickly dive into one of the frameworks, and the audience chose Grails.  So we delved into the bowels of GroovyQuiz and I showed them how it works.</p>
<p>Overall I had a lot of fun, and am looking forward to next years InfoTec. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/04/20/infotec-2007-presentations-are-online/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Simple Groovy script to remove .svn directories</title>
		<link>http://blog.secosoft.net/2007/04/04/simple-groovy-script-to-remove-svn-directories/</link>
		<comments>http://blog.secosoft.net/2007/04/04/simple-groovy-script-to-remove-svn-directories/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 01:51:31 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Groovy]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/04/04/simple-groovy-script-to-remove-svn-directories/</guid>
		<description><![CDATA[The other day I needed to remove a mess of .svn directories from a project as I moved it from my personal box (using svn as the soure control) to the client&#8217;s source control system.  This is a fairly frequent task, so attempting to be a &#8220;productive programmer&#8221; I decided that I would take [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I needed to remove a mess of .svn directories from a project as I moved it from my personal box (using svn as the soure control) to the client&#8217;s source control system.  This is a fairly frequent task, so attempting to be a &#8220;productive programmer&#8221; I decided that I would take the time to write a script to do this for me.  After testing, it took about an hour to write&#8230; mainly because I tried to be too fancy, and tried a few things in Groovy I had not seen before.  Overall, it was an hour well spent: </p>
<div class="codesnip-container" >
<div class="codesnip">
<ol>
<li class="li1">
<div class="de1">search_for<span class="br0">&#40;</span><span class="st0">&#8220;.&#8221;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span class="kw2">def</span></a> search_for<span class="br0">&#40;</span>dir<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; homedir = <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span class="kw2">new</span></a> <a href="http://www.google.de/search?as_q=File&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span class="kw3">File</span></a><span class="br0">&#40;</span>dir<span class="br0">&#41;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; homedir.<span class="me1">eachDir</span> <span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span class="kw1">if</span></a> <span class="br0">&#40;</span>it.<span class="me1">name</span> == <span class="st0">&#8220;.svn&#8221;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span class="kw8">println</span></a> it.<span class="me1">canonicalPath</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deleteDirectory<span class="br0">&#40;</span>it<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span class="kw1">else</span></a> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; search_for<span class="br0">&#40;</span>it.<span class="me1">canonicalPath</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span class="kw2">def</span></a> deleteDirectory<span class="br0">&#40;</span>dir<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; dir.<span class="me1">eachDir</span> <span class="br0">&#123;</span> deleteDirectory<span class="br0">&#40;</span>it<span class="br0">&#41;</span> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; dir.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20eachFile"><span class="kw7">eachFile</span></a> <span class="br0">&#123;</span> it.<span class="me1">delete</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; dir.<span class="me1">delete</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<p>14 lines.  I really like the eachDir and the eachFile methods on the File object&#8230; and there is even an eachFileRecurse.  All I can say is: where the heck is the eachDirRecurse???    Oh well.  It was still a good learning experience, and now I have a malleable tool next time I run into something similar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/04/04/simple-groovy-script-to-remove-svn-directories/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GroovyQuiz.com is finally here!</title>
		<link>http://blog.secosoft.net/2007/03/30/groovyquizcom-is-finally-here/</link>
		<comments>http://blog.secosoft.net/2007/03/30/groovyquizcom-is-finally-here/#comments</comments>
		<pubDate>Fri, 30 Mar 2007 21:55:45 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Grails]]></category>

		<category><![CDATA[Groovy]]></category>

		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.secosoft.net/2007/03/30/groovyquizcom-is-finally-here/</guid>
		<description><![CDATA[Earlier today I put GroovyQuiz.com online, along with its first quiz (Anyone up for a game of Life?)
It amazing to see the response its getting already&#8230; there are a number of sites linking to it already (Thank you aboutGroovy.com and groovyblogs.org&#8230; you both rock!).  And I&#8217;ve got a number of solutions (one in under [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today I put <a href="http://groovyquiz.com">GroovyQuiz.com</a> online, along with its <a href="http://groovyquiz.com/groovyquiz/main/quiz/1">first quiz</a> (Anyone up for a game of Life?)</p>
<p>It amazing to see the response its getting already&#8230; there are a number of sites linking to it already (Thank you <a href="http://aboutGroovy.com">aboutGroovy.com</a> and <a href="http://groovyblogs.org">groovyblogs.org</a>&#8230; you both rock!).  And I&#8217;ve got a number of solutions (one in under 3 hours!)  to post as soon as I finish up that section of the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.secosoft.net/2007/03/30/groovyquizcom-is-finally-here/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
