<?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>Dark Views &#187; Groovy</title>
	<atom:link href="http://blog.pdark.de/tag/groovy/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pdark.de</link>
	<description>Opinions and views about computers, writing SciFi and everything else.</description>
	<lastBuildDate>Wed, 08 Feb 2012 06:43:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.pdark.de' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/7741f06d762e6a53700b2915f21e3d77?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Dark Views &#187; Groovy</title>
		<link>http://blog.pdark.de</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.pdark.de/osd.xml" title="Dark Views" />
	<atom:link rel='hub' href='http://blog.pdark.de/?pushpress=hub'/>
		<item>
		<title>Closures and Bindings in Groovy</title>
		<link>http://blog.pdark.de/2011/12/30/closures-and-bindings-in-groovy/</link>
		<comments>http://blog.pdark.de/2011/12/30/closures-and-bindings-in-groovy/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 10:00:46 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Binding]]></category>
		<category><![CDATA[Closures]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=2442</guid>
		<description><![CDATA[Mark Menard blogged about a hidden gem in Groovy which might be useful when you use closures a lot: Binding properties to a closure after the closure was created. Remember, it&#8217;s simple to bind properties to a closure when those properties exist before the closure is created: Just define them. But how could you create [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2442&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mark Menard blogged about a hidden gem in Groovy which might be useful when you use closures a lot: <a href="http://www.vitarara.org/cms/closures_and_bindings_in_groovy" target="_blank">Binding properties to a closure</a> <em>after</em> the closure was created.</p>
<p>Remember, it&#8217;s simple to bind properties to a closure when those properties exist <em>before</em> the closure is created: Just define them. But how could you create a library of closures for user to consume?</p>
<p><pre class="brush: groovy;">
def c = {
	println a // a isn't know here
}

def a = &quot;Hello&quot;

def binding = new Binding ()
binding.setVariable (&quot;a&quot;, a)

c.setBinding (binding)
c.call()
</pre></p>
<p>As you can see, the property <tt>a</tt> isn&#8217;t known at the time the closure is defined. The binding allows to &#8220;inject&#8221; it later.</p>
<p>Groovy!</p>
<br /> Tagged: <a href='http://blog.pdark.de/tag/binding/'>Binding</a>, <a href='http://blog.pdark.de/tag/closures/'>Closures</a>, <a href='http://blog.pdark.de/tag/groovy/'>Groovy</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/2442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/2442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/2442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/2442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/2442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/2442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/2442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/2442/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2442&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/12/30/closures-and-bindings-in-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy Eclipse V2 M2</title>
		<link>http://blog.pdark.de/2009/12/14/groovy-eclipse-v2-m2/</link>
		<comments>http://blog.pdark.de/2009/12/14/groovy-eclipse-v2-m2/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 20:05:00 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=761</guid>
		<description><![CDATA[It&#8217;s been a couple of days since the Milestone 2 of the new Goovy Eclipse V2 plugin was released. If you&#8217;re developing with Groovy and you&#8217;re using Eclipse and you&#8217;ve been living under a stone, get it now. It&#8217;s so much better than the old Groovy plugin. In word: Development with Eclipse has become Groovy, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=761&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a couple of days since the <a href="http://docs.codehaus.org/display/GROOVY/Groovy-Eclipse+2.0.0M2+New+and+Noteworthy">Milestone 2</a> of the new <a href="http://groovy.codehaus.org/Eclipse+Plugin">Goovy Eclipse V2 plugin</a> was released. If you&#8217;re developing with Groovy and you&#8217;re using Eclipse and you&#8217;ve been living under a stone, get it now. It&#8217;s so much better than the old Groovy plugin.</p>
<p>In word: Development with Eclipse has become Groovy, again.</p>
<p>Links:<br />
<a href="http://docs.codehaus.org/display/GROOVY/Groovy-Eclipse+2.0.0M2+New+and+Noteworthy">Groovy-Eclipse 2.0.0M2 New and Noteworthy</a><br />
<a href="http://docs.codehaus.org/display/GROOVY/Groovy-Eclipse+2.0.0M1+New+and+Noteworthy">Groovy-Eclipse 2.0.0M1 New and Noteworthy</a></p>
<br /> Tagged: Eclipse, Groovy <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/761/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=761&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2009/12/14/groovy-eclipse-v2-m2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Traits for Groovy/Java</title>
		<link>http://blog.pdark.de/2009/06/25/traits-for-groovyjava/</link>
		<comments>http://blog.pdark.de/2009/06/25/traits-for-groovyjava/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 18:29:28 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[Sensei]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[SWT]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=641</guid>
		<description><![CDATA[I&#8217;m again toying with the idea of traits for Java (or rather Groovy). Just to give you a rough idea if you haven&#8217;t heard about this before, think of my Sensei application template: A most simple model but it contains everything you can encounter in an application: Parent-child/tree structure, 1:N and N:M mappings. Now the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=641&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m again toying with the idea of traits for Java (or rather <a href="http://groovy.codehaus.org/">Groovy</a>). Just to give you a rough idea if you haven&#8217;t heard about this before, think of my <a href="http://blog.pdark.de/2007/07/11/whats-wrong-with-java-part-1/">Sensei application template</a>:</p>
<p><pre class="brush: java;">
class Knowledge {
    Set tags;
    Knowledge parent;
    List children;
    String name;
    String content;
}
class Tag { String name; }
class Relation { String name; Knowledge from, to;
</pre></p>
<p>A most simple model but it contains everything you can encounter in an application: Parent-child/tree structure, 1:N and N:M mappings. Now the idea is to have a way to build a UI and a DB mapping from this code. The idea of traits is to implement real properties in Java.</p>
<p>So instead of fields with primitive types, you have real objects to work with:</p>
<p><pre class="brush: java;">
    assert &quot;name&quot; == Knowledge.name.getName()
</pre></p>
<p>These objects exist partially at the class and at the instance level. There is static information at the class level (the name of the property) and there is instance information (the current value). But it should be possible to add more information at both levels. So a DB mapper can add necessary translation information to the class level and a Hibernate mapper can build on top of that.</p>
<p>Oh, I hear you cry &#8220;annotations!&#8221; But annotations can suck, too. You can&#8217;t have smart defaults with annotations. For example, you can&#8217;t say &#8220;I want all fields called &#8216;timestamp&#8217; to be mapped with an <code>java.sql.Timestamp</code>&#8220;. You have to add the annotation to each timestamp field. That violates DRY. It quickly gets really bad when you have to do this for several mappers: Database, <a href="https://www.hibernate.org/">Hibernate</a>, <a href="http://java.sun.com/javaee/overview/faq/persistence.jsp">JPA</a>, the UI, Swing, <a href="http://www.eclipse.org/swt/">SWT</a>, <a href="http://code.google.com/intl/de-DE/webtoolkit/">GWT</a>. Suddenly, each property would need 10+ annotations!</p>
<p>I think I&#8217;ve found a solution which should need relatively few lines of code with Groovy. I&#8217;ll let that stew for a couple of days in by subconscious and post another article when it&#8217;s well done <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br /> Tagged: Database, Groovy, Hibernate, Java, JPA, Sensei, Swing, SWT <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/641/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/641/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/641/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/641/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/641/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/641/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/641/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/641/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/641/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/641/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/641/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/641/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/641/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/641/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=641&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2009/06/25/traits-for-groovyjava/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Jazoon, Day 2: XWiki</title>
		<link>http://blog.pdark.de/2009/06/24/jazoon-day-2-xwiki/</link>
		<comments>http://blog.pdark.de/2009/06/24/jazoon-day-2-xwiki/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:18:40 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Jazoon]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[MoinMoin]]></category>
		<category><![CDATA[Velocity]]></category>
		<category><![CDATA[wiki]]></category>
		<category><![CDATA[XWiki]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=638</guid>
		<description><![CDATA[I&#8217;m a huge fan of wikis. Not necessarily MediaWiki (holy ugly, Batman, the syntax!). I dig MoinMoin. I just heard the talk by Vincent Massol about next generation wikis. Okay, I can hear you moan under the load of buzzwords but give me a moment. XWiki looks really promising. Wikis basically allow to publish mostly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=638&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a huge fan of wikis. Not necessarily MediaWiki (holy ugly, Batman, the syntax!). I dig <a href="http://moinmo.in/">MoinMoin</a>. I just heard <a href="http://jazoon.com/en/conference/presentationdetails.html?type=sid&amp;detail=7400">the talk</a> by <a href="http://jazoon.com/en/conference/authors/Vincent_Massol">Vincent Massol</a> about next generation wikis. Okay, I can hear you moan under the load of buzzwords but give me a moment. <a href="http://www.xwiki.org/">XWiki</a> looks really promising.</p>
<p>Wikis basically allow to publish mostly unstructured data. I say &#8220;mostly&#8221; because wikis give them some structure but not (too) much: You can organize it in pages and put it into context (by linking between the pages). Often, this is enough. But recently, MediaWiki has started to add support for structured data. See that <a href="http://en.wikipedia.org/wiki/68000">infobox in the top left corner</a>? But that&#8217;s just half-hearted.</p>
<p>XWiki takes this one step further. XWiki, as I understand it, is a framework of loosely coupled components which allow you to create a wiki. The default one is pretty good, too, so most of the time, you won&#8217;t even get into this. The cool part about XWiki is that you can define a class <strong>inside of it</strong>. Let me repeat: You can create a page (like a normal text page) that XWiki will treat as a class definition. So this class gets versioned, etc. You can then add attributes as you like.</p>
<p>After that, you can create instances of this class. The instances are again wiki pages. You can even use more than a single instance on a page, for example, you can have several tag instances and a single person instance. Instances are versioned, too. Of course they are, this is a wiki!</p>
<p>Now you need to display that data. You can use <a href="http://velocity.apache.org/">Velocity</a> or <a href="http://groovy.codehaus.org/">Groovy</a> for that. And guess what, the view is &#8230; a wiki page. So your designers can create a beautiful look for your the boring raw data. With versions and comments and everything. While some other guys are adding data to the system.</p>
<p>In &#8220;normal&#8221; wiki pages, you can reference these instances and render them using such a template. The same is true for editors. With a few lines of code, you can create overview pages: All instances of a class or all instances with or without a certain property or you can use Groovy to do whatever you can think of.</p>
<p>Now imagine this: You have an existing database where your marketing guys can, say, plan the next campaign. They can use all the wiki features to collect ideas, filter and verify them, to come up with a really good plan. Some of that data needs to go into a corporate database. In former wikis, you&#8217;d have to use an external application, switch back and forth, curse a lot when they get out of sync.</p>
<p>With XWiki, you can finally annotate data in your corporate database with a wiki page, with all the power of a wiki and you can even <strong>display the data set in the wiki and edit it there</strong>. Granted, the data set won&#8217;t be versioned unless your corporate database allows that but it&#8217;s simple to do the versioning in the data access layer (for example, you can save all modifications in a log database).</p>
<p>Suddenly, possibilities open up.</p>
<br /> Tagged: Database, Groovy, Java, Jazoon, MediaWiki, MoinMoin, Velocity, wiki, XWiki <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/638/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=638&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2009/06/24/jazoon-day-2-xwiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Jazoon 2009, Day One</title>
		<link>http://blog.pdark.de/2009/06/23/jazoon-2009-day-one/</link>
		<comments>http://blog.pdark.de/2009/06/23/jazoon-2009-day-one/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 20:08:37 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Jazoon]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[OpenJDK]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=633</guid>
		<description><![CDATA[It&#8217;s late, so only a very short summary of today. James Gosling gave a broad overview what is currently happening at Sun. Nice video but little meat. I asked about what happened to closures but I&#8217;m not sure whether I can repeat his answer here. My feeling is that, behind the scenes, there&#8217;s a lot [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=633&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s late, so only a very short summary of today.</p>
<p><a href="http://jazoon.com/en/conference/presentations/istr/10120">James Gosling</a> gave a broad overview what is currently happening at Sun. Nice video but little meat. I asked about what happened to closures but I&#8217;m not sure whether I can repeat his answer here. My feeling is that, behind the scenes, there&#8217;s a lot of emotions and that&#8217;s bad. Oh well, maybe some will simply implement something reasonable in the OpenJDK. Otherwise, Closures are probably dead in Java which is a bit of a pity.</p>
<p><a href="http://jazoon.com/en/conference/presentations/tl/7580">Dirk König</a> showed a the most common use cases for Groovy in a Java project. Nothing really new for anyone who had been in contact with Groovy for nicely packaged and showed some cool stuff you can do with this mature language.</p>
<p>After that, <a href="http://jazoon.com/en/conference/presentations/tl/6421">Neal Ford</a> explained how <a href="http://en.wikipedia.org/wiki/Design_Patterns_%28book%29">Design Patterns</a> started to disappear. We didn&#8217;t really notice but things like Iterators or Adapters have become features of the language itself. In Java, you still have to query a container for an iterator, in Groovy, you just <code>container.each {</code> &#8230; do something with each item &#8230; <code>}</code>. Really nice talk, as usual.</p>
<p>Missed most of the <a href="http://jazoon.com/en/conference/presentations/tl/8881">next talk</a> because I talked to Dirk König but if you&#8217;re using Maven or Ant as a build system, you should have a look at <a href="http://www.gradle.org/">Gradle</a>. It fixes most of the issues with Ant and some of the ones with Maven. Later that day, Hans Dockter (a Gradle developer) and I tossed a couple of ideas back and forth how the build could be improved. If any of these could be implemented, we&#8217;ll see a new way to build software.</p>
<p>At 15:00, Jason van Zyl told us what is happening in and around Maven. His talk was so full of information, it was impossible to follow the slides and him. Maven 3.0 is due early 2010 and it will solve a lot of the issues in M2. One of the most important features: You get hooks to run stuff before and after a lifecycle phase. Ever wanted to calculate a build number? Now you can.</p>
<p>M3 is based on SAT4J, just like Eclipse p2. Now, if you followed my blog, you know that I hate p2. p2 is a piece of banana software, delivered green, ripes at the customer. Which is a pity. p2 solved a lot of the issues with the old installer and it could solve all the other issues but apparently, there are forced behind the scenes which make this almost impossible. So when you meet Pascal Rapicault next time, don&#8217;t blame him for all the misery he has caused you. He has to solve a mission impossible and that only works in movies.</p>
<p>Later that evening, Thomas Mueller talked about <a href="http://jazoon.com/en/conference/presentations/ts/6640">Testing Zen</a>. Nothing really new but I&#8217;ll probably have a look at <a href="http://www.h2database.com/html/main.html">H2</a> next week or so. It could replace my favorite in-memory Java database HSQLDB.</p>
<p>The closing session was by Neal Ford again. I wish I could create slides that were only a fraction as great as his. *sigh* Anyway, he drew a large arc from how technologies can become obsolete within a few years (as we all know), how good intentions pave the road to hell, about our responsibilities as software developers which go beyond what&#8217;s in our contract and predicting the future. Well, Terminator is probably not a good example but everyone knows it. Still, I find it troubling that the military is deploying thousands of automated drones for surveillance. You don&#8217;t? How would you feel about a robot equiped with a working machine gun that is programmed to automatically fire on any human that isn&#8217;t wearing an RFID tag? <a href="http://www.theregister.co.uk/2007/03/14/south_korean_gun_bots/">Samsung installed a couple of them</a> along the northern border of South Korea two years ago. Skynet, here we come!</p>
<p><a href="http://jazoon.com/en/conference/presentations/istr/8561">What they don&#8217;t teach you about software at school: Be Smart!</a>, the last talk of the day, was disappointing. I&#8217;ll give Ivar that he had to compete against Neal but &#8230; The topic was okay and what he said was correct and all but the presentation could use some improvement. &#8216;Nuff said.</p>
<br /> Tagged: Design Patterns, Gradle, Groovy, Java, Jazoon, Maven, OpenJDK <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/633/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=633&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2009/06/23/jazoon-2009-day-one/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>DSLs: Introducing Slang</title>
		<link>http://blog.pdark.de/2008/07/28/dsls-introducing-slang/</link>
		<comments>http://blog.pdark.de/2008/07/28/dsls-introducing-slang/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 15:29:00 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://darkviews.wordpress.com/2008/07/28/dsls-introducing-slang/</guid>
		<description><![CDATA[Did you ever ask for a more compact way to express something in your favorite programming language? Say hello to DSL (Domain Specific Language). A DSL is a slang, a compact way to say what you want. When two astronauts talk, they use slang. They need to get information across and presto. &#8220;Over&#8221; instead of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=133&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Did you ever ask for a more compact way to express something in your favorite programming language? Say hello to DSL (Domain Specific Language). A DSL is a slang, a compact way to say what you want. When two astronauts talk, they use slang. They need to get information across and presto. &#8220;Over&#8221; instead of &#8220;I&#8217;ll now clear the frequency so you can start talking.&#8221; And when these guys do it, there&#8217;s no reason for us not to.</p>
<p><a href="http://www.javaworld.com/javaworld/jw-07-2008/jw-07-dsls-in-java-2.html">Here is an artical</a> on Java World which gives some nice examples how to create a slang in Java and in Groovy. Pizza-lovers of the world, eat your heart out.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/darkviews.wordpress.com/133/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/darkviews.wordpress.com/133/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=133&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2008/07/28/dsls-introducing-slang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Jazoon: One Year Of Groovy</title>
		<link>http://blog.pdark.de/2008/06/26/jazoon-one-year-of-groovy/</link>
		<comments>http://blog.pdark.de/2008/06/26/jazoon-one-year-of-groovy/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 20:20:00 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Talk]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Jazoon]]></category>

		<guid isPermaLink="false">http://darkviews.wordpress.com/2008/06/26/jazoon-one-year-of-groovy/</guid>
		<description><![CDATA[That was my talk. Attendance could have been better but I guess with Joshua Bloch presenting Java Puzzlers, Cédric Beust with &#8220;A quick guide to modern languages and interesting concepts for the busy Java programmer&#8221; and Adam Bien with Glassfish at the same time, it wasn&#8217;t so bad. Here is the link to the presentation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=112&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>That was my talk. Attendance could have been better but I guess with Joshua Bloch <a href="http://jazoon.com/jazoon08/en/conference/presentations/tl/5620">presenting Java Puzzlers</a>, Cédric Beust with &#8220;<a href="http://jazoon.com/jazoon08/en/conference/presentationdetails.html?type=sid&amp;detail=5249">A quick guide to modern languages and interesting concepts for the busy Java programmer</a>&#8221; and Adam Bien with <a href="http://jazoon.com/jazoon08/en/conference/presentations/tl/2562">Glassfish</a> at the same time, it wasn&#8217;t so bad.</p>
<p>Here is the <a href="http://www.pdark.de/Jazoon08%20One%20Year%20of%20Groovy.odp">link to the presentation</a> as OpenOffice document. Feel free to post any comments or questions below.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/darkviews.wordpress.com/112/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/darkviews.wordpress.com/112/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=112&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2008/06/26/jazoon-one-year-of-groovy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Jazon: Building DSL&#8217;s</title>
		<link>http://blog.pdark.de/2008/06/25/jazon-building-dsls/</link>
		<comments>http://blog.pdark.de/2008/06/25/jazon-building-dsls/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 11:28:00 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Jazoon]]></category>

		<guid isPermaLink="false">http://darkviews.wordpress.com/2008/06/25/jazon-building-dsls/</guid>
		<description><![CDATA[Neal Ford&#8216;s talk about DSLs and how to create them in static and dynamic languages (Java and Groovy in this case) was very interesting because he clear up the fog around DSL&#8217;s a but, why they are great and when they help. Basically a DSL is &#8220;jargon&#8221;. It is compact code that allows you to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=99&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://jazoon.com/jazoon08/en/conference/authors/Neal_Ford">Neal Ford</a>&#8216;s <a href="http://jazoon.com/jazoon08/en/conference/presentations/tl/5256">talk about DSLs</a> and how to create them in static and dynamic languages (Java and Groovy in this case) was very interesting because he clear up the fog around DSL&#8217;s a but, why they are great and when they help. Basically a DSL is &#8220;jargon&#8221;. It is compact code that allows you to express much more tightly what you want than any &#8220;general purpose&#8221; language (&#8220;one site fits all&#8221; actually makes everyone look ridiculous).</p>
<p>Remember that old OO promise to allow to mirror the world in a programming language, to allow to model the code after what the customer had in mind? Turns out, that OO was &#8230; nah, not lying &#8230; it was just overselling itself because customers don&#8217;t think in objects or models. They think jargon. And DSL&#8217;s allow you to make a compiler understand jargon. That&#8217;s even possible with Java even though &#8220;Java is like taking to a retard&#8221;: You always have to repeat yourself to make sure that the stupid compiler gets what you want (pun intended).</p>
<p>A DSL is not to be confused with an API. An API uses explicit context like &#8220;obj.setThis(&#8230;); obj.setThat(&#8230;);&#8221; etc. Here &#8220;obj&#8221; is the context and &#8220;setXyz()&#8221; is not meaningful without knowing the object we&#8217;re talking about here. A DSL, on the other hand, is all about context and context is implicit. It goes &#8220;obj.should(&#8230;).allow(&#8230;).this(&#8230;)&#8221;. An example is <a href="http://code.google.com/p/hamcrest/wiki/Tutorial">hamcrest</a>: &#8220;assertThat(theBiscuit, is(myBiscuit));&#8221; Reads fluently, compact code, and it&#8217;s obvious that &#8220;is(myBiscuit)&#8221; should be compared to &#8220;theBiscuit&#8221; in some way.</p>
<p>The handouts of his presentation are available from <a href="http://nealford.com/mypastconferences.htm">his homepage</a> but without his witty remarks. A pity but still worth to check out if you want to see just how far you can push Java to get code that your customer might understand.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/darkviews.wordpress.com/99/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/darkviews.wordpress.com/99/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=99&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2008/06/25/jazon-building-dsls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Jazoon 2008, Day 0</title>
		<link>http://blog.pdark.de/2008/06/23/jazoon-2008-day-0/</link>
		<comments>http://blog.pdark.de/2008/06/23/jazoon-2008-day-0/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 20:31:00 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Jazoon]]></category>

		<guid isPermaLink="false">http://darkviews.wordpress.com/2008/06/23/jazoon-2008-day-0/</guid>
		<description><![CDATA[Just back from the Jazoon 2008, Tutorial day (the day before the actual conference starts). I attended Ted Neward&#8217;s talk &#8220;The Busy Java Developer&#8217;s Guide to Groovy&#8220;. As always, the talk was quite a lot of fun even for someone like me, who already knows a lot about Groovy. If you get a chance to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=95&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just back from the <a href="http://jazoon.com/">Jazoon 2008</a>, Tutorial day (the day before the actual conference starts). I attended Ted Neward&#8217;s talk &#8220;<a href="http://jazoon.com/jazoon08/en/conference/presentationdetails.html?type=sid&amp;detail=5041">The Busy Java Developer&#8217;s Guide to Groovy</a>&#8220;. As always, the talk was quite a lot of fun even for someone like me, who already <a href="http://groups.google.com/group/groovy-developer/search?group=groovy-developer&amp;q=aaron+digulla&amp;qt_g=Diese+Gruppe+durchsuchen">knows a lot about Groovy</a>. If you get a chance to attend a talk given by Ted: Go. It&#8217;s worth it.</p>
<p>In his talk, Ted crammed a pretty complete introduction in the key features of <a href="http://groovy.codehaus.org/">Groovy</a> into three hours. For me, the key points of the talk were these: Productivity and ceremony.</p>
<p>Research shows that all developers roughly write the same amount of code lines per day. The difference between guru developers and the greenhorns is that the gurus write a line once and it works first try and each line achieves much more in respect to reaching the goal than any line of a novice. So in order to boost productivity of a guru, the only way is to use a programming language which can achieve more in a single line of code (and we&#8217;re talking one statement per line here, obviously). So it&#8217;s not that the guru writes ten times as much code per day as the novice, the novice just writes every line ten times because every time, (s)he gets something wrong and has to fix it.</p>
<p>The other aspect is ceremony. A lot of code in Java is ceremony. In most cases, the Java compiler knows where a statement ends and it wouldn&#8217;t need the semicolon. Still it insists that I press the key anyway (and it&#8217;s two keys on the German or Swiss keyboard). The same goes for many other things in Java which are just there for tradition. It would be simple for the Java compiler to infer the type of an object after <tt>if (obj instanceof ...)</tt>. There really is no need for the cast in the next line. I could find another 10 examples easily.</p>
<p>Groovy does away with all that. It comes at a price, though. If you like to rely on the compiler creating a cozy padded cell for you, checking types and syntax as much as possible, then Groovy is not for you. In Groovy, the idea is that the developer knows exactly what (s)he&#8217;s doing and all (s)he needs is the fastest path to get there. You <em>can</em> do all the dirty things you wished for in Java but you don&#8217;t <em>have</em> to. Groovy is an &#8220;also&#8221; language, not an &#8220;either-or&#8221; language. If you feel that Java is dirty enough, already, try <a href="http://www.scala-lang.org/">Scala</a>.</p>
<p>Thanks, Ted.</p>
<p>If you want to know more about Groovy and you&#8217;re in Zurich, why not attend <a href="http://jazoon.com/jazoon08/en/conference/presentationdetails.html?type=sid&amp;detail=4163">my talk</a> on <a href="http://jazoon.com/en/conference/thursday.html">Thursday</a>?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/darkviews.wordpress.com/95/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/darkviews.wordpress.com/95/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=95&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2008/06/23/jazoon-2008-day-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Complexity Budget</title>
		<link>http://blog.pdark.de/2008/05/08/complexity-budget/</link>
		<comments>http://blog.pdark.de/2008/05/08/complexity-budget/#comments</comments>
		<pubDate>Thu, 08 May 2008 08:50:00 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://darkviews.wordpress.com/2008/05/08/complexity-budget/</guid>
		<description><![CDATA[Are you a human? If not, then this is probably not for you. If you are, then you have a &#8220;complexity budget&#8220;. I define it a little bit differently than the author of the article. My definition is that you can spend only so much on understanding something. Example. What does this little C program [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=77&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Are you a human? If not, then this is probably not for you.</p>
<p>If you are, then you have a &#8220;<a href="http://weblogs.java.net/blog/arnold/archive/2005/06/generics_consid_1.html">complexity budget</a>&#8220;. I define it a little bit differently than the author of the article. My definition is that you can spend only so much on understanding something. Example. <a href="http://en.wikipedia.org/wiki/Obfuscated_code">What does this little C program do?</a></p>
<div>
<pre>_(__,___,____){___/__1&amp;&amp;___%__&lt;___/__?_(__,1+
___,____+!(___/__%(___%__))):___&lt;__*__?_(__,___+1,____):0;}main(){_(100,0,0);}</pre>
</div>
<p>It prints the primes below 100. And it blows the complexity budget. C++ also often blows the complexity budget. A friend of mine once said: &#8220;To understand C++, you have to be a C++ compiler.&#8221;</p>
<p>Java once was a simple language but the wise guys with a sun-burn (from being exposed too long to the sun, get it?) decided to do something about it and came up with Generics. And since they weren&#8217;t sure that this would indeed make the language too complex, they added annotations on top of that. Excellent move!</p>
<p>But it didn&#8217;t work. There are still too many people who use and understand Java. So they came up with <a href="http://groups.csail.mit.edu/pag/jsr308/">JSR 308</a> which allows you to use annotations in even more places to write code like this (from <a href="http://java.dzone.com/articles/when-should-you-jump-jsr-308-t">this article</a>):</p>
<pre>@NotEmpty List strings
        = new ArrayList();</pre>
<p>If that doesn&#8217;t do it, nothing will.</p>
<p>On a positive side note, in <a href="http://groovy.codehaus.org/">Groovy</a>, I can not only register an annotation processor (AP) in the compiler, I can even manipulate the AST from the AP, allowing to create code like this:</p>
<div>
<pre>@GroovySQL(type=DemoType.class)
def load(long id) {
    return """select * from demo_table where id = ${id}""";
}</pre>
</div>
<p>That doesn&#8217;t return a string but an object of type DemoType filled with the data from the database. Life can be so simple.</p>
<p>And to the guys from Sun: Thanks a lot! We really appreciate your help! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Links: <a href="http://java.dzone.com/articles/when-should-you-jump-jsr-308-t">Article by Michael Nygard about JSR 308</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/darkviews.wordpress.com/77/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/darkviews.wordpress.com/77/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=77&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2008/05/08/complexity-budget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
	</channel>
</rss>
