<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2polishfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Blog.Project13.pl</title>
	
	<link>http://www.blog.project13.pl</link>
	<description>The Blog of a Coder</description>
	<lastBuildDate>Fri, 23 Jul 2010 20:34:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/blogproject13pl" /><feedburner:info uri="blogproject13pl" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:emailServiceId>blogproject13pl</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fblogproject13pl" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fblogproject13pl" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fblogproject13pl" src="http://www.newsgator.com/images/ngsub1.gif">Zapisz w NewsGator Online</feedburner:feedFlare><feedburner:feedFlare href="http://client.pluck.com/pluckit/prompt.aspx?GCID=C12286x053&amp;a=http%3A%2F%2Ffeeds.feedburner.com%2Fblogproject13pl" src="http://www.pluck.com/images/rss-pluck.gif">Zapisz w czytniku Pluck RSS</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fblogproject13pl" src="http://o.aolcdn.com/myfeeds/html/vis/myaol_cta1.gif">Zapisz w My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/blogproject13pl" src="http://www.bloglines.com/images/sub_modern11.gif">Zapisz w Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fblogproject13pl" src="http://www.netvibes.com/img/add2netvibes.gif">Dodaj do netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fblogproject13pl" src="http://buttons.googlesyndication.com/fusion/add.gif">Dodaj do Google</feedburner:feedFlare><item>
		<title>[song] Follow the GNU – Void Main feat. Richard ‘rms’ Stallman</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/fiiEygfnH14/</link>
		<comments>http://www.blog.project13.pl/index.php/null/780/song-follow-the-gnu-void-main-feat-richard-rms-stallman/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 20:34:59 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[null]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=780</guid>
		<description><![CDATA[Todays fun-friday will be about my most super favourite geek song of all time. It&#8217;s basically just a part from Richard Stallman&#8216;s speech from NY from 2001 with neat music added to it. I really like this speech as it is both powerful and easy to understand for licensing newbies. That said, here is the [...]]]></description>
			<content:encoded><![CDATA[<p>Todays fun-friday will be about my most super favourite<strong> geek song</strong> of all time. It&#8217;s basically just a part from <strong>Richard Stallman</strong>&#8216;s speech from NY from 2001 with neat music added to it. I really like this speech as it is both powerful and easy to understand for licensing newbies. That said, here is the <strong>ogg </strong>file and some of the lyrics. <em>Why ogg? Because it&#8217;s an<strong> free (as in Freedom) </strong>alternative to MP3s, and sometimes ofers even better quality than mp3s. :-)</em></p>
<p style="text-align: center;"><a href="http://www.uploadmysoul.project13.pl/files/follow-the-gnu.ogg" onclick="urchinTracker('/outgoing/www.uploadmysoul.project13.pl/files/follow-the-gnu.ogg?referer=');"><strong>Void Main feat. Richard Stallman &#8211; Follow the GNU</strong> <em>.ogg</em></a></p>
<pre>Now, some of you may not ever write computer programs, but perhaps you
cook.  And if you cook, unless you're really great, you probably use
recipes.  And, if you use recipes, you've probably had the experience of
getting a copy of a recipe from a friend who's sharing it.  And you've
probably also had the experience -- unless you're a total neophyte -- of
changing a recipe.  You know, it says certain things, but you don't have
to do exactly that.  You can leave out some ingredients.  Add some
mushrooms, 'cause you like mushrooms.  Put in less salt because your
doctor said you should cut down on salt -- whatever.  You can even make
bigger changes according to your skill.  And if you've made changes in a
recipe, and you cook it for your friends, and they like it, one of your
friends might say, "Hey, could I have the recipe?"  And then, what do you
do?  You could write down your modified version of the recipe and make a
copy for your friend.  These are the natural things to do with
functionally useful recipes of any kind.

Now a recipe is a lot like a computer program.  A computer program's a lot
like a recipe: a series of steps to be carried out to get some result
that you want.  So it's just as natural to do those same things with
computer programs -- hand a copy to your friend.  Make changes in it
because the job it was written to do isn't exactly what you want.  It did
a great job for somebody else, but your job is a different job.  And
after you've changed it, that's likely to be useful for other people.
Maybe they have a job to do that's like the job you do.  So they ask, "Hey,
can I have a copy?"  Of course, if you're a nice person, you're going to
give a copy.  That's the way to be a decent person.

So imagine what it would be like if recipes were packaged inside black
boxes.   You couldn't see what ingredients they're using, let alone change
them, and imagine if you made a copy for a friend, they would call you
a pirate and try to put you in prison for years.  That world would create
tremendous outrage from all the people who are used to sharing recipes.
But that is exactly what the world of proprietary software is like.  A
world in which common decency towards other people is prohibited or
prevented.
</pre>
<p>The above text was taken from: <a href="http://www.gnu.org/events/rms-nyu-2001-transcript.txt" onclick="urchinTracker('/outgoing/www.gnu.org/events/rms-nyu-2001-transcript.txt?referer=');">http://www.gnu.org/events/rms-nyu-2001-transcript.txt</a> Feel free to spread the love of free software + music&#8230; and of course, follow the GNU! :-)</p>
<p>If you got interested in Stallman&#8217;s views, and would like to know a little more about his view on the music industry etc, feel free to take a look at this video that I have recorded on <strong>2009&#8242;s IT Giants at Cracow AGH University</strong>:<br />
<object id="VideoPlayback" style="width: 400px; height: 326px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://video.google.pl/googleplayer.swf?docid=-5621142882400305486&amp;hl=pl&amp;fs=true" /><param name="allowfullscreen" value="true" /><embed id="VideoPlayback" style="width: 400px; height: 326px;" type="application/x-shockwave-flash" width="100" height="100" src="http://video.google.pl/googleplayer.swf?docid=-5621142882400305486&amp;hl=pl&amp;fs=true" allowfullscreen="true"></embed></object></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=fiiEygfnH14:hAeFqHGVltc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/null/780/song-follow-the-gnu-void-main-feat-richard-rms-stallman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.uploadmysoul.project13.pl/files/follow-the-gnu.ogg" length="3366722" type="audio/ogg" />
		<feedburner:origLink>http://www.blog.project13.pl/index.php/null/780/song-follow-the-gnu-void-main-feat-richard-rms-stallman/</feedburner:origLink></item>
		<item>
		<title>[song] Every OS sucks!</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/AB3sfEtRq5c/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/774/song-every-os-sucks/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 23:01:20 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[freedom]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=774</guid>
		<description><![CDATA[An very amazing and beautiful song I just had to share with you guys! It&#8217;s by http://www.deadtroll.com/ so feel free to get over to their site if you liked it :-) It&#8217;s my second favourite GeekSong &#8211; I&#8217;ll link my favourite next week (by VoidMain and an special guest!)&#8230; :-) Download the MP3 file: three_dead_trolls_in_a_baggie-every_os_sucks.mp3 [...]]]></description>
			<content:encoded><![CDATA[<p>An very amazing and beautiful song I just had to share with you guys! It&#8217;s by <a href="http://www.deadtroll.com/" onclick="urchinTracker('/outgoing/www.deadtroll.com/?referer=');">http://www.deadtroll.com/</a> so feel free to get over to their site if you liked it :-) It&#8217;s my second favourite GeekSong &#8211; I&#8217;ll link my favourite next week (by VoidMain and an special guest!)&#8230; :-)</p>
<p>Download the MP3 file: <a href="http://www.up.project13.pl/files/three_dead_trolls_in_a_baggie-every_os_sucks.mp3" onclick="urchinTracker('/outgoing/www.up.project13.pl/files/three_dead_trolls_in_a_baggie-every_os_sucks.mp3?referer=');">three_dead_trolls_in_a_baggie-every_os_sucks.mp3</a></p>
<p>And here are the lyrics:</p>
<p><!-- p, li { white-space: pre-wrap; } --></p>
<blockquote><p><!--StartFragment-->(spoken introduction)</p>
<p>You see, I come from a time in the nineteen-hundred-and-seventies when computers were used for two things &#8211; to either go to the moon, or play Pong&#8230; nothing in between. Y&#8217;see, you didn&#8217;t need a fancy operating system to play Pong, and the men who went to the moon&#8211;God Bless &#8216;em&#8211;did it with no mouse, and a plain text-only black-and-white screen, and 32 kilobytes of RAM.</p>
<p>But then &#8217;round &#8217;bout the late 70&#8242;s, home computers started to do a little more than play Pong&#8230; very little more. Like computers started to play non-Pong-like games, and balance checkbooks, and why&#8230; you could play Zaxxon on your Apple II, or&#8230; write a book! All with a computer that had 32 kilobytes of RAM! It was good enough to go to the moon, it was good enough for you.</p>
<p>It was a golden time. A time before Windows, a time before mouses, a time before the internet and bloatware, and a time&#8230; before every OS sucked.</p>
<p>*sigh*</p>
<p>(singing)</p>
<p>Well, way back in the olden times,<br />
my computer worked for me.<br />
I&#8217;d laugh and play, all night and day,<br />
on Zork I, II and III.</p>
<p>The Amiga, VIC-20 and the Sinclair II,<br />
The TRS 80 and the Apple II,<br />
they did what they were supposed to do,<br />
wasn&#8217;t much&#8230; but it was enough.</p>
<p>But then Xerox made a prototype,<br />
Steve Jobs came on the scene,<br />
read &#8220;Of Mice and Menus,&#8221; Windows, Icons<br />
a trash, and a bitmap screen.</p>
<p>Well Stevie said to Xerox,<br />
&#8220;Boys, turn your heads and cough.&#8221;<br />
And when no-one was looking,<br />
he ripped their interfaces off.</p>
<p>Stole every feature that he had seen,<br />
put it in a cute box with a tiny little screen,<br />
Mac OS 1 ran that machine,<br />
only cost five thousand bucks.</p>
<p>But it was slow, it was buggy,<br />
so they wrote it again,<br />
And now they&#8217;re up to OS 10,<br />
they&#8217;ll charge you for the Beta, then charge you again,<br />
but the Mac OS still sucks.</p>
<p>Every OS wastes your time,<br />
from the desktop to the lap,<br />
Everything since Apple Dos,<br />
Just a bunch of crap.</p>
<p>From Microsoft, to Macintosh,<br />
to Lin&#8211; line&#8211; lin&#8211; lie&#8230; nux,<br />
Every computer crashes,<br />
&#8217;cause every OS sucks.</p>
<p>Well then Microsoft jumped in the game,<br />
copied Apple&#8217;s interface, with an OS named,<br />
&#8220;Windows 3.1&#8243; &#8211; it was twice as lame,<br />
but the stock price rose and rose.</p>
<p>Then Windows 95, then 98,<br />
man solitaire never ran so great,<br />
and every single version came out late,<br />
but I guess that&#8217;s the way it goes.</p>
<p>But that bloatware&#8217;ll crash and delete your work,<br />
NT, ME, man, none of &#8216;em work.<br />
Bill Gates may be richer than Captain Kirk,<br />
but the Windows OS blows!</p>
<p>And sucks!</p>
<p>At the same time!</p>
<p>I&#8217;d trade it in, yeah right&#8230; for what?<br />
It&#8217;s top of the line from the Compuhut.<br />
The fridge, stove and toaster, never crash on me,<br />
I should be able to get online, without a PHD.</p>
<p>My phone doesn&#8217;t take a week to boot it,<br />
my TV doesn&#8217;t crash when I mute it,<br />
I miss ASCII text, and my floppy drive,<br />
I wish VIC-20 was still alive&#8230;</p>
<p>But it ain&#8217;t the hardware, man.</p>
<p>It&#8217;s just that every OS sucks&#8230; and blows.</p>
<p>Now there&#8217;s lih-nux or lie-nux,<br />
I don&#8217;t know how you say it,<br />
or how you install it, or use it, or play it,<br />
or where you download it, or what programs run,<br />
but lih-nux, or lie-nux, don&#8217;t look like much fun.</p>
<p>However you say it, it&#8217;s getting great press,<br />
though how it survives is anyone&#8217;s guess,<br />
If you ask me, it&#8217;s a great big mess,<br />
for elitist, nerdy shmucks.</p>
<p>&#8220;It&#8217;s free!&#8221; they say, if you can get it to run,<br />
the Geeks say, &#8220;Hey, that&#8217;s half the fun!&#8221;<br />
Yeah, but I got a girlfriend, and things to get done,<br />
the Linux OS SUCKS.<br />
(I&#8217;m sorry to say it, but it does.)</p>
<p>Every OS wastes your time,<br />
from the desktop to the lap,<br />
Everything since the abacus,<br />
Just a bunch of crap.</p>
<p>From Microsoft, to Macintosh,<br />
to lin&#8211; line&#8211; lin&#8211; lie&#8230; nux.<br />
Every computer crashes,<br />
&#8217;cause every OS sucks.</p>
<p>Every computer crashes&#8230; &#8217;cause every OS sucks!<!--EndFragment--></p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=AB3sfEtRq5c:PqpqX6ArBhQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/774/song-every-os-sucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.up.project13.pl/files/three_dead_trolls_in_a_baggie-every_os_sucks.mp3" length="4179968" type="audio/mpeg" />
		<feedburner:origLink>http://www.blog.project13.pl/index.php/fun/774/song-every-os-sucks/</feedburner:origLink></item>
		<item>
		<title>GWT Firefox 3.6+ plugin on 64bit Fedora 13</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/jcTWZINcDeA/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/760/gwt-firefox-3-6-plugin-on-64bit-fedora-13/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 12:17:49 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[xsolve]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=760</guid>
		<description><![CDATA[Hi again, this time a short code snippet &#8211; but a very useful one. At work I&#8217;m working on an Ubuntu 10.4 (love you guys for getting me a PC with Linux with no problems!) my laptop is on Fedora 13 i586 and my home PC is running Fedora 13 x64. Thank goodnes they&#8217;re all [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again, this time a short code snippet &#8211; but a very useful one.</p>
<p>At work I&#8217;m working on an Ubuntu 10.4 (<em>love you guys for getting me a PC with Linux with no problems!</em>) my laptop is on Fedora 13 i586 and my home PC is running <strong>Fedora 13 x64</strong>. Thank goodnes they&#8217;re all linux&#8230; ;-) The problem <span style="text-decoration: line-through;">is</span> was that the <strong>Google Web Toolkit</strong> plugin isn&#8217;t working with Firefox 3.6.4 on an x64 system on linux! So&#8230; can&#8217;t I develop GWT stuff on my super powerful home PC? Of course I can, the only thing I needed to do, is to get the latest sources for the plugin and <strong>compile it for myself</strong> ;-) Here&#8217;s how:</p>
<div class="geshi no bash">
<div class="head">mkdir gwt-source</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> gwt-<span class="kw3">source</span></div>
</li>
<li class="li1">
<div class="de1">svn checkout http:<span class="sy0">//</span>google-web-toolkit.googlecode.com<span class="sy0">/</span>svn<span class="sy0">/</span>trunk<span class="sy0">/</span> trunk</div>
</li>
<li class="li1">
<div class="de1">svn checkout http:<span class="sy0">//</span>google-web-toolkit.googlecode.com<span class="sy0">/</span>svn<span class="sy0">/</span>plugin-sdks<span class="sy0">/</span> plugin-sdks</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> trunk<span class="sy0">/</span>plugins<span class="sy0">/</span>xpcom</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">export</span> <span class="re2">BROWSER=</span>ff36</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">export</span> <span class="re2">DEFAULT_FIREFOX_LIBS=</span><span class="sy0">/</span>usr<span class="sy0">/</span>lib<span class="sy0">/</span>xulrunner-devel<span class="nu0">-1.9</span><span class="nu0">.2</span><span class="sy0">/</span>sdk<span class="sy0">/</span>lib<span class="sy0">/</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">make</span> clean</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">make</span></div>
</li>
<li class="li1">
<div class="de1">firefox prebuilt<span class="sy0">/</span>gwt-dev-plugin.xpi</div>
</li>
</ol>
</div>
<p>And we&#8217;re done &#8212; off to GWT development!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=jcTWZINcDeA:RiOf1fXGKmY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/760/gwt-firefox-3-6-plugin-on-64bit-fedora-13/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/coding/760/gwt-firefox-3-6-plugin-on-64bit-fedora-13/</feedburner:origLink></item>
		<item>
		<title>Git @ “Fridays at XSolve”</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/qupn3M8yD70/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/758/git-fridays-at-xsolve/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 11:59:56 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[xsolve]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=758</guid>
		<description><![CDATA[I&#8217;m curently doing an internship (It&#8217;s called: &#8220;Poławiamy perły, szlifujemy diamenty&#8221; == &#8220;Pooling pearls, polishing diamonds&#8221; &#8212; very cool :-)) at XSolve &#8211; we&#8217;re doing some GWT coding and I really like it. The team is great and everyone is really helpful and fun to talk to &#8212; the company&#8217;s &#8220;look and feel&#8221; reminds me [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m curently doing an internship (It&#8217;s called: &#8220;<em><a href="http://praktyki-staze.xsolve.pl/" onclick="urchinTracker('/outgoing/praktyki-staze.xsolve.pl/?referer=');">Poławiamy perły, szlifujemy diamenty</a></em>&#8221; == &#8220;<em>Pooling pearls, polishing diamonds</em>&#8221; &#8212; very cool :-)) at <a href="http://xsolve.pl" onclick="urchinTracker('/outgoing/xsolve.pl?referer=');"><strong>XSolve</strong></a> &#8211; we&#8217;re doing some<em> GWT coding and I really like it</em>. The team is great and everyone is really helpful and fun to talk to &#8212; the company&#8217;s &#8220;look and feel&#8221; reminds me very much of Google by the way&#8230; It&#8217;s very friendly, everyone is calling others by their names and we often play together after some chunk of work. We&#8217;ve even stayed until 20:00 one time, while mounting some servers and having fun in the process &#8211; I actually didn&#8217;t mind staying so long thanks to this&#8230; :-)</p>
<p>Having that said&#8230; there is one thing I don&#8217;t like there&#8230; it&#8217;s SVN ;-) Of course I knew that I can&#8217;t be running from SVN all my life and that I&#8217;d end up using it someday in some company&#8230; As some may know, I&#8217;m a big Git (or mercurial) fan, thus &#8211; I kinda see what SVN is doring wrong. At XSolve we have this weekly-event called <strong>&#8220;Fridays at XSolve&#8221;</strong>, where one can present in a short 30min session, something he&#8217;s been interested in lately etc. It&#8217;s a really cool idea, that allows ideas do spread throughout the company &#8211; the <strong>HR</strong> team seems to really care to keep this atmosthere in the company&#8230; :-) This Friday I was given the honour and joy to be presenting Git &#8211; as we&#8217;ve been talking about it a few times during my first week here. Below is the presentation I&#8217;ve used:</p>
<div id="__ss_4721725" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Dlaczego Git to nie SVN?" href="http://www.slideshare.net/ktoso/dlaczego-git-to-nie-svn" onclick="urchinTracker('/outgoing/www.slideshare.net/ktoso/dlaczego-git-to-nie-svn?referer=');">Dlaczego Git to nie SVN?</a></strong><object id="__sse4721725" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=git4xsolve-100709124340-phpapp01&amp;rel=0&amp;stripped_title=dlaczego-git-to-nie-svn" /><param name="name" value="__sse4721725" /><param name="allowfullscreen" value="true" /><embed id="__sse4721725" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=git4xsolve-100709124340-phpapp01&amp;rel=0&amp;stripped_title=dlaczego-git-to-nie-svn" name="__sse4721725" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<p>You can download <a href="http://www.slideshare.net/ktoso/dlaczego-git-to-nie-svn/download" onclick="urchinTracker('/outgoing/www.slideshare.net/ktoso/dlaczego-git-to-nie-svn/download?referer=');">the presentation</a> or the <a href="up.project13.pl/files/git4xsolve.tex">sources for the presentation here</a> as they are also a simple (I&#8217;ve made one about <a href="http://www.slideshare.net/ktoso/guava" onclick="urchinTracker('/outgoing/www.slideshare.net/ktoso/guava?referer=');">Guava</a> that&#8217;s a little more interesting from the TeX viewpoint) example of the <a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBgQFjAA&amp;url=http%3A%2F%2Flatex-beamer.sourceforge.net%2F&amp;ei=Il04TNvQHNCVOOHVqYoK&amp;usg=AFQjCNGjVsJ5vBpYgmyyLJOFdVxBLBetPw&amp;sig2=qf-pljl_hjhbfJIPau0R5g" onclick="urchinTracker('/outgoing/www.google.com/url?sa=t_amp_source=web_amp_cd=1_amp_ved=0CBgQFjAA_amp_url=http_3A_2F_2Flatex-beamer.sourceforge.net_2F_amp_ei=Il04TNvQHNCVOOHVqYoK_amp_usg=AFQjCNGjVsJ5vBpYgmyyLJOFdVxBLBetPw_amp_sig2=qf-pljl_hjhbfJIPau0R5g&amp;referer=');">LaTeX beamer</a> &#8211; which apparently is also an favourite tool of some team members&#8230; :-) I&#8217;ve also talked a moment after the event with an v. good (so it seems) developer who knew really a lot about many different SCMs &#8211; we mentioned &#8220;<strong>cherry picking</strong>&#8221; which is really interesting but I don&#8217;t know much about it yet. If you don&#8217;t know much about Git &#8211; take a look at the above presentation, or better, start out your new (better) life with git by visiting these links:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=4XpnKHJAok8" target="_blank" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=4XpnKHJAok8&amp;referer=');">http://www.youtube.com/watch?v=4XpnKHJAok8</a> Linusa Torvalds on Git vs CVS/SVN</li>
<li><a href="http://whygitisbetterthanx.com/" target="_blank" onclick="urchinTracker('/outgoing/whygitisbetterthanx.com/?referer=');">http://whygitisbetterthanx.com</a> &#8211; why git is better than any other SCM ;-) A biased site obviously ;-)</li>
<li><a href="http://git.or.cz/course/svn.html" target="_blank" onclick="urchinTracker('/outgoing/git.or.cz/course/svn.html?referer=');">http://git.or.cz/course/svn.html</a> &#8211; side-by-side with SVN</li>
<li><a href="http://git-scm.com/" target="_blank" onclick="urchinTracker('/outgoing/git-scm.com/?referer=');">http://git-scm.com</a> &#8211; Git homepage</li>
</ul>
<p>The presentation worked quite well I guess &#8211; some team members who knew about Git/SVN/Mecurial/Bzr etc, where adding their bits of knowledge which really made the presentation a lot more than just a bunch of boring slides&#8230; ;-) All in all it was all of those: fun, interesting and yet another occasion for me to train presenting stuff (I&#8217;m still bad at it, but well&#8230; life is study, right? :-)) I&#8217;m really happy to have the opportunity to be working in such a environment &#8211; I&#8217;ll post whatever is inseresting on this blog (if I have the time to do so :&lt;), so keep an eye ot for some Java/GWT posts&#8230; :-)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=qupn3M8yD70:UuPt7-rhktM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/758/git-fridays-at-xsolve/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/fun/758/git-fridays-at-xsolve/</feedburner:origLink></item>
		<item>
		<title>ip2cntry – ex-appengine app (mainly JAX-RS)</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/2xIYZBHkAf0/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/727/ip2cntry-ex-appengine-app-mainly-jax-rs/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 15:13:04 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[webdeveloper]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=727</guid>
		<description><![CDATA[I&#8217;ve been coding an simple RESTful &#8220;ip to country&#8221; conversion service. I&#8217;ve decided to put it up to appengine &#8211; so that everybody may use it freely even if I&#8217;d change my server etc&#8230; And if looked quite nice the first day &#8211; buw when I got to do some &#8220;real stuff&#8221; app engine started [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;"><img title="appengine and duke" src="http://api.ning.com/files/mDJ*r0VXJVM5*LNj5uct5fwBIDcQH99SKTN-zzCVyDf306EuzF6lbwkJW6cGVJOUNtAen43aPLTd9HtdVcYgFuxB-d8SufPD/dukeongae.jpg" alt="" width="151" height="138" /></div>
<p>I&#8217;ve been coding an simple RESTful &#8220;ip to country&#8221; conversion service. I&#8217;ve decided to put it up to appengine &#8211; so that everybody may use it freely even if I&#8217;d change my server etc&#8230; And if looked quite nice the first day &#8211; buw when I got to do some &#8220;real stuff&#8221; app engine started to get in my way, here&#8217;s a quick rundown of the problems I&#8217;ve found with appengine:</p>
<ol>
<li>I need to download and update the ip&lt;-&gt;country database every few days. I&#8217;d use an <strong>GZIPInputStream</strong> and <strong>BufferedReader</strong> to get the file I was interested in and update the database. Did appengine allow me to use such an simple aparoach?
<ol>
<li><strong style="color: #03c300;">pro:</strong> appengine provides a very nice cron-like mechanism. So I just had to create an <strong>cron.xml in WEB-INF</strong> and this part was ready to go! This was in fact easier and more fun than in classic <strong>Spring + Open Symphony Quartz</strong>.</li>
<li><strong style="color: #cb0007;">con:</strong>I checked if this tactic was OK with the JRE whilelist and checked the Quotas &#8211; <a href="http://code.google.com/appengine/docs/quotas.html#UrlFetch" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/quotas.html_UrlFetch?referer=');">http://code.google.com/appengine/docs/quotas.html#UrlFetch</a>, &#8220;seems ok&#8221; &#8211; I thought &#8211; &#8220;nothing about per connection limits, only daily quotas.&#8221;. After writing the code, I discovered that even though on the main quota page there was no word about per connection limits, in fact there are such quotas, but a little more hidden: <a href="http://code.google.com/appengine/docs/java/urlfetch/overview.html" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/java/urlfetch/overview.html?referer=');">http://code.google.com/appengine/docs/java/urlfetch/overview.html</a> Max request/response sizes are capped at exactly 1MB.<br />
As my gzipped file is around 1.1MB,<strong> appengine killed my simple idea&#8230;</strong> I&#8217;d have to split the file into separate ones &#8211; on another server, and then fetch the separated files onto appengine.</li>
<li><strong style="color: #cb0007;">con:</strong>The<strong> </strong>mentione CRON mechanism is quite funny. You don&#8217;t call<strong> methods </strong>but URLs &#8211; and they are normally called as if one would launch them from the browser &#8211; thus, traffic and &#8220;max time&#8221; quotas do count there as well. So rather than calling an method, as you&#8217;d do with OpenSymphony &#8211; you create an Servlet that does all the work. This may me both good, and bad&#8230; You cound do all the CRON stuff by hand if it got out of sync etc&#8230; I didn&#8217;t really like it, and as mentioned&#8230; <strong>When doing my &#8220;big batch database update&#8221; the servlet would simply timeout&#8230;</strong></li>
</ol>
</li>
<li>Let&#8217;s talk about the <strong>dataStore</strong>. As you all probably know&#8230; AppEngine does not provide and &#8220;database&#8221; per se. It&#8217;s not relational and has quite some limitations. BUT!<strong> That&#8217;s quite ok, as it&#8217;s very quick and very very scalable!</strong> And most of the time&#8230; Do you really need all those fancy relations? ;-) It was an ideal place to hold my super simple data: &#8220;ip region = country&#8221; mapping in a persistent way. &#8220;Another nice thing on appengine for this application I&#8217;m going to write.&#8221; &#8211; I thought. Was I right?
<ol>
<li><strong style="color: #03c300;">pro/con:</strong> Not really&#8230; I used JPA but JDO (which is prefered by appengine from what I&#8217;ve seen) also works nice on GAE. The setup did run quite ok while I was running tests on my local machine. Deployment is also an breeze and <strong>I didn&#8217;t have to use any complicated dependencies to get it running &#8211; &#8220;yay, no maven!&#8221;. </strong>You just have to enchance the classes you want to make persistent (just as hibernate does).</li>
<li><strong style="color: #cb0007;">con:</strong>The problems started when I wanted to <strong>clear my datastore.</strong> Nothing easier than that, right&#8230;? &#8220;delete from BlaBla&#8221; and we&#8217;re done. Yeah, but not on GAE. As even the &#8220;max rows a query touches&#8221; are limited &#8211; to 500. So there I am, with my 100.000 rows, and I have to delete them in 500 rows per query&#8230; Of course I can&#8217;t call this in an loop &#8211; as  the timeout quota would get in my way and kill the app.From what I&#8217;ve seen, people do solve this using a CRON task that calls this &#8220;clearDatabase&#8221; servlet until it&#8217;s  done &#8211; ugh, not a nice solution but I can&#8217;t think of any other solution :\</li>
<li><strong style="color: #cb0007;">con:</strong>The only query I need to do in this app is basically:
<pre>SELECT range FROM RemoteIpData as range
             WHERE range.ipFrom &lt;= ?1
               AND range.ipTo &gt;= ?2
<em>#and this would always return 1 entry!</em>
</pre>
<p>And guess what&#8230; <strong>AppEngine does not support multiple &#8220;less/more than&#8221; operands in one query!</strong> If you think hard about what BigTable is, it does make some sense. More information about &#8220;<strong>GQL</strong>&#8221; can be found here: <a href="http://code.google.com/appengine/docs/python/datastore/gqlreference.html" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/python/datastore/gqlreference.html?referer=');">http://code.google.com/appengine/docs/python/datastore/gqlreference.html</a> All the <a href="http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/java/datastore/queriesandindexes.html?referer=');">restrictions about the Queries you can do are documented here</a> &#8211; some are really counter intuitive when you come from an RDBMS enviroment&#8230; Ah well ;-) Oh, and yet another <a href="http://blog.newsplore.com/2009/06/06/reviewing-google-appengine-for-java-part-2" onclick="urchinTracker('/outgoing/blog.newsplore.com/2009/06/06/reviewing-google-appengine-for-java-part-2?referer=');">great link about GAE limitations</a>.</p>
<p>Having this limitation, really sucks for my normally &#8220;super simple query&#8221;, and I&#8217;d have to change the data structure somehow or do some awful 2 queries and then combine them in Java (omg teh terrorr&#8230; :&lt;). So, while developing on appengine, keep in ming &#8211; simple things might turn out quite complicated due to the nature of BigTable. If you know all the limitations when designing the system and not while finishing it, you&#8217;ll be a happier man&#8230; ;-)</li>
<li><strong>neutral</strong>: Primary keys can&#8217;t be Integers etc, as AppEngine uses it&#8217;s own &#8220;Key&#8221; type. :-)</li>
</ol>
</li>
<li>Having that all said. Appengine&#8217;s administration panel is quite ok. And the not-so-newly-added log search etc are really fine tools. Something an plain old tomcat can not offer. On the other hand, the limitations can really be a deal breaker! My app was really fairly simple, and yet appengines quotas managed to really get in my way. Keep this in mind while thinking about using it. You may also try Amazon&#8217;s cloud or CloudForce from SalesForce etc&#8230; They all do offer a quite less restrictive enviroment.</li>
<li>If you&#8217;re interested, deployment does take about 5-7 minutes before the new version is visible on the web &#8211; so don&#8217;t panic if you&#8217;re still seeing the old version after deploying the new one.</li>
<li>My opinion about GAE&#8230;? <span style="text-size: xx-small;">(semi serious ;-))</span></li>
</ol>
<blockquote><p><em><strong>&#8220;Screw you clouds, I&#8217;m going /home!&#8221;</strong></em><br />
<span style="text-size: xx-small;">(<a href="http://www.youtube.com/watch?v=7oH5Qc2zTrs&amp;feature=related" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=7oH5Qc2zTrs_amp_feature=related&amp;referer=');">intended southpark pun</a>)</span><em><strong><br />
</strong></em></p></blockquote>
<p>I&#8217;ll finish this project using my ol&#8217; pal, <strong>Tomcat6</strong> which I&#8217;ve already got running for <a href="http://netbeans.edu.pl" onclick="urchinTracker('/outgoing/netbeans.edu.pl?referer=');">netbeans.edu.pl</a> (but that was an grails app).</p>
<p>I&#8217;ve also decided to use Spring, which I didn&#8217;t really need on appengine &#8211; as the only thing I was doing was so small that all the logic was around 10 lines in the servlets&#8230; But if using hibernate and all the other &#8220;real&#8221; JEE stuff, I felt I&#8217;d need to &#8220;do this right&#8221; so I&#8217;ve decided for Spring 3 and Maven2&#8230; I&#8217;ll try to build this project from gradle soon too!</p>
<p>ALSO! If interested in an more experienced programmers view on appengine (I&#8217;m still a novice), go and read <a href="http://art-of-software.blogspot.com/2010/04/goole-application-engine.html" onclick="urchinTracker('/outgoing/art-of-software.blogspot.com/2010/04/goole-application-engine.html?referer=');">this blog post about GAE on Sławek Sobótkas blog.</a> All in all we seem to agree that the limitations can be an pain in the a&#8230; ;-)</p>
<p>The source for the appengine version is on my github account. I&#8217;m porting it to an plain old tomcat environment and will post this version there too when it&#8217;s ready to run (<strong>tomcat deployment </strong>is somehow hell with such apps for me&#8230; Any tips are really welcome :-))</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=2xIYZBHkAf0:Q3oa9iw72a8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/727/ip2cntry-ex-appengine-app-mainly-jax-rs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/coding/727/ip2cntry-ex-appengine-app-mainly-jax-rs/</feedburner:origLink></item>
		<item>
		<title>GitHub Diff in Gmail</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/w2Nkk9ztWQM/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/724/github-diff-in-gmail/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 14:32:14 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webdeveloper]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=724</guid>
		<description><![CDATA[Hi there, below is the (horribly trashy and chaotic &#8211; as it was hacked up in about 2/3 hours) source for my Google Gmail Contextual Gadget. It extends Gmail by parsing all links passed in an email, and if an github commit link is found it displays the diff for this commit. With coloring etc [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://github.com/ktoso/GitHubDiff/raw/master/screenshot.png" onclick="urchinTracker('/outgoing/github.com/ktoso/GitHubDiff/raw/master/screenshot.png?referer=');"><img class="aligncenter" title="github diff in gmail" src="http://github.com/ktoso/GitHubDiff/raw/master/screenshot.png" alt="" width="500" /></a></p>
<p style="text-align: left;">Hi there, below is the (horribly trashy and chaotic &#8211; as it was hacked up<strong> in about 2/3 hours</strong>) source for my <em>Google Gmail Contextual Gadget</em>.</p>
<p>It<strong> extends Gmail </strong>by <em>parsing all links passed in an email, and if an github commit link is found it displays the diff for this commit.</em> <strong>With coloring</strong> etc &#8211; just as github would. It&#8217;s really fairly easy to get this kind of things going, and if your working with Google Apps (using gmail in your domain etc) you can use this, and many more gadgets (though I didn&#8217;t find much of them really useful &#8211; that&#8217;s why I&#8217;ve written this one).</p>
<p>The source can be downloaded, and fixed (which I hopefuly will have time to do! As it&#8217;s a mess, let&#8217;s say, &#8220;proof of concept&#8221;): <a href="http://github.com/ktoso/GitHubDiff" onclick="urchinTracker('/outgoing/github.com/ktoso/GitHubDiff?referer=');">http://github.com/ktoso/GitHubDiff</a> (It&#8217;s on the <strong>MIT license</strong>).</p>
<p><span class="youtube">
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/bJIhKxNDNKg&amp;color1=3a3a3a&amp;color2=999999&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube.com/v/bJIhKxNDNKg&amp;color1=3a3a3a&amp;color2=999999&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=bJIhKxNDNKg" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=bJIhKxNDNKg&amp;referer=');"><img src="http://img.youtube.com/vi/bJIhKxNDNKg/default.jpg" width="130" height="97" border=0></a></p></p>
<p>Read the full story to see instalation instructions as well as documentation links&#8230;<br />
<span id="more-724"></span></p>
<p><strong>HOW TO INSTALL:</strong><br />
It can be installed by your own into gmail, if you&#8217;re running on Google Apps -just by creating an new Application on the Market and then adding it to your Account. If you&#8217;d like me to polish and publish this to the Google Enterprise Market &#8211; you&#8217;d have to fund me the publish fee, 100$&#8230; ;-)</p>
<p><strong>DOCUMENTATION:</strong><br />
Contextual Gadgets: <a href="http://code.google.com/apis/gmail/gadgets/contextual/" onclick="urchinTracker('/outgoing/code.google.com/apis/gmail/gadgets/contextual/?referer=');">http://code.google.com/apis/gmail/gadgets/contextual/</a></p>
<p>jQuery &#8211; getJSON: <a href="http://api.jquery.com/jQuery.getJSON/" onclick="urchinTracker('/outgoing/api.jquery.com/jQuery.getJSON/?referer=');">http://api.jquery.com/jQuery.getJSON/</a><br />
GitHub API &#8211; <a href="http://develop.github.com/p/commits.html" onclick="urchinTracker('/outgoing/develop.github.com/p/commits.html?referer=');">http://develop.github.com/p/commits.html</a></p>
<p><strong>LICENSE:</strong><br />
The source is MIT licensed, feel free to use it as a base for your own projects etc. It&#8217;s nothing particularly well written etc ;-)</p>
<p>Enjoy<strong> github</strong> in your <strong>gmail</strong> &#8211; two amazing webapps in one&#8230; :-)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=w2Nkk9ztWQM:_pOU5L96GZ0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/724/github-diff-in-gmail/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/fun/724/github-diff-in-gmail/</feedburner:origLink></item>
		<item>
		<title>JavaCamp #4</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/_wa9rt0_H2Q/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/700/review-javacamp-4/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 20:21:36 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[akka]]></category>
		<category><![CDATA[camp]]></category>
		<category><![CDATA[JavaCamp]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[parallelism]]></category>
		<category><![CDATA[pjug]]></category>
		<category><![CDATA[polishjug]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=700</guid>
		<description><![CDATA[Yup, last Saturday we&#8217;ve had yet another JavaCamp in Cracow. It was in my opinion the best yet &#8211; mostly due to our awesome speakers. One could call this &#8220;JavaCamp&#8221; an &#8220;ScalaCamp&#8221; if you think about it &#8211; as most of the topics (3/4) where mostly about scala (AKKA is avaiable as both Java and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-536" title="pjug_logo" src="http://www.blog.project13.pl/wp-content/uploads/2010/04/pjug_logo.jpg" alt="Polish Java User Group" width="126" height="157" />Yup, last Saturday we&#8217;ve had yet another JavaCamp in Cracow. It was in my opinion the best yet &#8211; mostly due to our awesome speakers. One could call this &#8220;JavaCamp&#8221; an &#8220;ScalaCamp&#8221; if you think about it &#8211; as most of the topics (3/4) where mostly about scala (AKKA is avaiable as both Java and Scala API, but the Scala API is a little &#8220;cleaner&#8221; &#8211; well, as everything written in Scala I guess :-))</p>
<h2><strong>Łukasz Kuczera</strong> &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Scala the next Java?</a></h2>
<h2><a href="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0059.jpg"><img class="alignright size-thumbnail wp-image-706" title="javacamp#4" src="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0059-150x150.jpg" alt="" width="150" height="150" /></a></h2>
<p>Łukasz&#8217;s presentation really did fit the topic and did a really good job in setting the &#8220;mood and feel&#8221; for the rest of the day. People who didn&#8217;t know any scala before &#8211; now did know it enough to understand all the code Jonas displayed later, and people who&#8217;ve known some scala before &#8211; might have got some nice information from this. I really liked it and am now more tha ever convinced of scala&#8217;s &#8220;perfect fit&#8221; nature in the JVM lanugages team. As I was sitting with my friend <a href="http://temporal.pr0.pl/devblog/" onclick="urchinTracker('/outgoing/temporal.pr0.pl/devblog/?referer=');">Temporal</a> &#8211; who&#8217;s a <strong>real Erlang and Lisp hacker ;-) -</strong> I&#8217;ve got some interesting insights about what scala took from Lisp and later on, what Akka took from Lisp and Erlang. A very good presentation in my opinion. :-)</p>
<h2><strong>Jonas Bonér</strong> (<a href="http://jonasboner.com/" onclick="urchinTracker('/outgoing/jonasboner.com/?referer=');">private site</a>) &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Akka: Simpler Scalability,  Fault-Tolerance, Concurrency &amp; Remoting through Actors</a></h2>
<p>A very very awesome speech and topic. Akka seems to do Actors and Parallelism very well. Also, thanks to my lisp/erlang friend, I&#8217;ve had some amazing insights about where Jonas got some of the implementation ideas. Also, we&#8217;d both like to note that some things are done even cleaner in  Akka than in Erlang: in erlang you&#8217;d pass an actors PID around in order  to &#8220;link&#8221; with another, and the links are always bidirectional. The actor pattern really powerful and scalable from what I&#8217;ve seen. It&#8217;s also implemented by Vaclav Pech in his GPars library (&#8220;Groovy Parallelism&#8221;).</p>
<p>This should have been just another presentation in a series of them as Jonas already had presented it on both Scala Days 2010 and GeeCON2010. But! As the present programmers really where into this topic we&#8217;ve had a lot of pauses with some chit-chat. A very valuable thing for both akka and our community :-) Too bad that Jonas didn&#8217;t have the time to go more into STM, as I still  dont really know what it essetialy is &#8220;in practice&#8221;. Later we got a glimpse of Agents and what they could be useful for. All in all&#8230; go checkout the movie &#8211; it&#8217;s worth your time if you don&#8217;t know about parallelism and akka (I guarantee it ;-)): <a href="http://pjug.project13.pl/dl.php?f=jc4-1-scala-min.mp4" onclick="urchinTracker('/outgoing/pjug.project13.pl/dl.php?f=jc4-1-scala-min.mp4&amp;referer=');">jc4-1-scala-min.mp4</a></p>
<p>Jonas covered and built upon the previous presentation, and we got to see some more scala in action &#8211; feels really natural. <strong>The transition from Java-&gt;Scala seems to be as painless as the transition from Java-&gt;Groovy. </strong>That&#8217;s a really nice thing I guess. <strong>There&#8217;s also an Java API</strong> for most the things in AKKA &#8211; so if you don&#8217;t want to adopt Scala in your project &#8211; no problems here. If you&#8217;d like to read more about AKKA, just goto their website at: <a href="http://akkasource.org/" onclick="urchinTracker('/outgoing/akkasource.org/?referer=');">http://akkasource.org/</a> &#8211; and <strong>yes, it&#8217;s open source</strong>. :-)</p>
<p>Oh, and if you&#8217;d like to see the slides Jonas used: they&#8217;re online on his slideshare: <a href="http://www.slideshare.net/jboner/akka-scala-days-2010" onclick="urchinTracker('/outgoing/www.slideshare.net/jboner/akka-scala-days-2010?referer=');">http://www.slideshare.net/jboner/akka-scala-days-2010</a><br />
Also feel free to read this very in-depth post on his blog: <a href="http://jonasboner.com/2010/01/04/introducing-akka.html" onclick="urchinTracker('/outgoing/jonasboner.com/2010/01/04/introducing-akka.html?referer=');">Introducing Akka – Simpler Scalability, Fault-Tolerance, Concurrency &amp; Remoting through Actors</a></p>
<h2>Pizza</h2>
<p>In the break we had some chats about the usual stuff &#8211; programming, companies, and of course a little something about the gaming industry ;-) The pizza was quite tasty &#8211; as always &#8211; so let&#8217;s move on to the next presentation ;-)</p>
<h2><strong>Bartosz Kowalewski</strong> &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Is OSGi ready for enterprise use?</a></h2>
<p>Yet another go with &#8220;grasping wtf OSGi is and WTF would I use it?!&#8221;. This topic was kinda new to Temporal, as he&#8217;s not into JEE Java, where OSGi now seems to be &#8220;trendy&#8221;. So after a short intro into maven/dependency stuff from me we focused on Bartosz&#8217;s presentation. I was <strong>immensly happy</strong> to see that his thoughts and presentation focused on <em>&#8220;what OSGi should solve, and why it sometimes does NOT&#8221;</em>. His code examples really cleared up what the problem is, and displayed why OSGi is sometimes a much harder to force to work properly than we&#8217;d think it should.</p>
<p>All in all, he described it as an amazing technology to play with, but if one would to use it IRL, with real deadlines etc &#8211; one should better know what he&#8217;s getting into, as OSGi does solve some things, but in exchange it introduces a lot of more compicated problems. The presentation was really good &#8211; as it focused, and really showed how/why OSGi should be awesome, and why sometimes it&#8217;s not &#8211; most of the time with needless <strong>complexity (!)</strong>.</p>
<p><strong>UPDATE: </strong>If your interested in the examples Bartosz has shown during his presentation &#8211; download this <a href="http://pjug.project13.pl/dl.php?f=jc4-3-osgi-pl-slides-sources.zip" onclick="urchinTracker('/outgoing/pjug.project13.pl/dl.php?f=jc4-3-osgi-pl-slides-sources.zip&amp;referer=');">this zip file</a> that he has made available. It includes the <strong>presentation</strong>, as well as the <strong>sources</strong> he used (plus the maven artifacts needed to run the app). Don&#8217;t worry if some tests fail &#8211; they&#8217;re designed to&#8230; :-)</p>
<h2><strong>Łukasz Kuczera</strong> &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Lift &#8211; simply functional web  framework</a></h2>
<p>The last presentation was again Łukasz, continuing in the spirit of this &#8220;Scala-flavoured-JavaCamp&#8221;, with Lift, an web framework with quite some nice contepts &#8211; as view first etc. As it was more of a code-trip, showing the basics of lift, there&#8217;s not much to comment on here.</p>
<p><strong>I was kind of disappointed with Lift. </strong>It really didn&#8217;t seem to be as powerful or mature as Grails of Symfony for example. The &#8220;view first&#8221; pattern is of course nice and quite well &#8220;forced&#8221;, but it didn&#8217;t strike me to be any different than just<strong> Django templates.</strong> The <strong>CRUD also does not impress someone who&#8217;s been using Rail-ish stuff for quite some time.</strong> There was not much said about the ORM, but <strong>I feel quite comfortable with GORM</strong> and the <strong>routing system is waaaay overgrown</strong> &#8211; just look at symfony/grails/rails routing files &#8211; they&#8217;re short and easy &#8211; what I&#8217;ve seen in Lift does not seem to be short &#8211; it&#8217;s quite long and with lots of empty [] etc&#8230; I may come back and take a look at lift when I have the time, but it really didn&#8217;t impress.</p>
<h2>Videos and sources from the meeting</h2>
<p><a href="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0060.jpg"><img class="alignright size-thumbnail wp-image-707" title="java camp 4 location" src="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0060-150x150.jpg" alt="" width="150" height="150" /></a>The 4th edition for our JavaCamp was truly amazing in my opinion, and this time, we&#8217;ve even got an amazing place, sponsors and great speakers. Have a nice holiday all! And if you didn&#8217;t manage to be there live, you can always go to the page bellow and watch the video&#8217;s I&#8217;ve recorded from the meeting :-)</p>
<p><strong>All videos are temporarily available on my server &#8211; here: <a href="http://pjug.project13.pl/" onclick="urchinTracker('/outgoing/pjug.project13.pl/?referer=');">http://pjug.project13.pl/</a></strong><br />
I&#8217;m hoping to get them up on the java.pl server soon, or better, on  parleys.com  &#8211; but we&#8217;ll see about that. :-)</p>
<p>PS: The next camp, won&#8217;t be organized so soon &#8211; but from what we&#8217;ve planed, we&#8217;ll be goring into some <span style="font-weight: bold;">groovy</span> topics most probably&#8230; But don&#8217;t take my word for it ;-)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=_wa9rt0_H2Q:maVKdTKoNzY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/700/review-javacamp-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/coding/700/review-javacamp-4/</feedburner:origLink></item>
		<item>
		<title>The Grails way #0: Simple Twitter TagLib</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/1z8qTOGNdjo/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/#comments</comments>
		<pubDate>Tue, 25 May 2010 14:33:11 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=664</guid>
		<description><![CDATA[Let&#8217;s skip the introduction of taglibs, (since anyone knows what they are), and get to the code really quickly! If you&#8217;ve seen netbeans.edu.pl you probably noticed the twitter part on the right. As twitter&#8217;s API is really simple to use, one could implement this on ones own, but why do so if we&#8217;re in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/twitternbexample.png"><img class="alignleft size-medium wp-image-679" title="twitternbexample" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/twitternbexample-99x300.png" alt="" width="99" height="300" /></a>Let&#8217;s skip the introduction of taglibs, (since anyone knows what they are), and get to the code really quickly! If you&#8217;ve seen netbeans.edu.pl you probably noticed the twitter part on the right. As twitter&#8217;s API is really simple to use, one could implement this on ones own, but why do so if we&#8217;re in the Grails -&gt; Groovy -&gt; Java world, where there are amazing libraries for most things.</p>
<p>I used 2 libs to create this tag:</p>
<ul>
<li><a href="http://twitter4j.org/en/index.jsp" onclick="urchinTracker('/outgoing/twitter4j.org/en/index.jsp?referer=');">twitter4j</a> &#8211; a very good  twitter client library (java, even works on android)</li>
<li><a href="http://github.com/mzsanford/twitter-text-java" onclick="urchinTracker('/outgoing/github.com/mzsanford/twitter-text-java?referer=');">twitter-text-java</a> &#8211; the official library for parsing plaintext to produce valid @ and # links, more information about it can be found on github or <a href="http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html" onclick="urchinTracker('/outgoing/engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html?referer=');">http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html</a></li>
</ul>
<p>Anyways, first the source of the actuall taglib. We simply call the methods, get the response fill out the content of the tag with the variables we got:</p>
<div class="geshi no groovy">
<div class="head">package pl.project13</div>
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import com.twitter.Autolink</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import twitter4j.*</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">class</span> TweetsTagLib <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">static</span> namespace <span class="sy0">=</span> <span class="st0">&#39;tweets&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp;* Performs an twitter search and displays the result as an</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">def</span> fromSearch <span class="sy0">=</span> <span class="br0">&#123;</span>attrs, body -<span class="sy0">&amp;</span>gt<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Twitter twitter <span class="sy0">=</span> <span class="kw2">new</span> TwitterFactory<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getInstance</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Query query <span class="sy0">=</span> <span class="kw2">new</span> Query<span class="br0">&#40;</span>attrs.<span class="me1">query</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; QueryResult result <span class="sy0">=</span> twitter.<span class="me1">search</span><span class="br0">&#40;</span>query<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">def</span> tweetz <span class="sy0">=</span> result.<span class="me1">tweets</span>.<span class="me1">subList</span><span class="br0">&#40;</span><span class="nu0">0</span>, <span class="kw3">Integer</span>.<span class="me1">parseInt</span><span class="br0">&#40;</span>attrs.<span class="kw5">count</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; tweetz.<span class="kw5">each</span> <span class="br0">&#123;</span>Tweet tweet -<span class="sy0">&amp;</span>gt<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; Autolink parser <span class="sy0">=</span> <span class="kw2">new</span> Autolink<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; tweet.<span class="me1">text</span> <span class="sy0">=</span> parser.<span class="me1">autoLink</span><span class="br0">&#40;</span>tweet.<span class="me1">text</span><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; pageScope.<span class="me1">tweet</span> <span class="sy0">=</span> tweet</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; out <span class="sy0">&amp;</span>lt<span class="sy0">;</span> <span class="sy0">&amp;</span>lt<span class="sy0">;</span> body<span class="br0">&#40;</span>tweet<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="co1">//some other stuff&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Super easy, ain&#8217;t it? More stuff <a href="http://www.grails.org/doc/1.3.x/guide/single.html#6.3%20Tag%20Libraries" onclick="urchinTracker('/outgoing/www.grails.org/doc/1.3.x/guide/single.html_6.3_20Tag_20Libraries?referer=');">about taglibs in grails can be found here</a>. Now let&#8217;s go over to our view and see how to use this taglib &#8211; it&#8217;s (once again) amazingly simple:</p>
<div class="geshi no plain">
<ol>
<li class="li1">
<div class="de1">&lt;g :set var=&quot;query&quot; value=&quot;netbeans&quot;/&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;h3&gt;Twitter #${query}&lt;/h3&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;div id=&quot;twitter&quot; class=&quot;menubox&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;ul&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;tweets :fromSearch query=&quot;#${query}&quot; count=&quot;8&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &lt;li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;http://www.twitter.com/${it.fromUser}&quot; target=&quot;_blank&quot; class=&quot;twitter-author&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;img src=&quot;${it.profileImageUrl}&quot; alt=&quot;${it.fromUser}&quot; title=&quot;${it.fromUser}&quot; style=&quot;float:left; padding:2px; width:25px; height:25px&quot;/&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; %{&#8211;${it.fromUser}:&#8211;}%
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; ${it.text}&lt;br /&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;span style=&quot;font-size:0.75em&quot; class=&quot;twitter-date&quot;&gt;${it.createdAt}&lt;/span&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/tweets&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;/ul&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &amp;#187;&amp;nbsp;&lt;a href=&quot;http://twitter.com/#search?q=${query}&quot; target=&quot;_blank&quot;&gt;więcej&lt;/a&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/div&gt;</div>
</li>
</ol>
</div>
<p>All we need to do here, is set an variable thanks to some nice GSP tag, and then use it to query and echo our data the taglib is supplying us with. Note that the <strong>tweets:fromSearch</strong> acts like an foreach &#8211; no need for any extra loops here :-) That&#8217;s just a very simple tag but it&#8217;s quite nice to use, hope you enjoied it and will be more than happy to see the sources of netbeans.edu.pl published on github soon&#8230; :-)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=1z8qTOGNdjo:7z8-ldoEjKk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/</feedburner:origLink></item>
		<item>
		<title>NetBeans Platform Lookups as communication method</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/_wKH_V1A2MM/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/640/netbeans-platform-lookups-as-communication-method/#comments</comments>
		<pubDate>Sun, 23 May 2010 14:54:28 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[netbeans platform]]></category>
		<category><![CDATA[studies]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=640</guid>
		<description><![CDATA[Helo again! Today&#8217;s post will be an super quick usage scenario for NetBeans Platform Lookups &#8211; the probably most essential part of the Platform. An super simple explanation of them is &#8220;an Map&#60;Class, Object&#62;&#8221;. Sounds simple right? Well it is, and it&#8217;s quite powerful at the same time. It enables you to loosely couple parts [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://github.com/ktoso/TravelingSalesman-NBP/raw/master/doc/screenshots/pieknygraforazwykresy.png" onclick="urchinTracker('/outgoing/github.com/ktoso/TravelingSalesman-NBP/raw/master/doc/screenshots/pieknygraforazwykresy.png?referer=');"><img class="aligncenter" title="Traveling Salesman on NetBeansPlatform" src="http://github.com/ktoso/TravelingSalesman-NBP/raw/master/doc/screenshots/pieknygraforazwykresy.png" alt="Traveling Salesman on NetBeansPlatform" width="300" /></a></p>
<p>Helo again! Today&#8217;s post will be an super quick usage scenario for <strong>NetBeans Platform Lookups</strong> &#8211; the probably most essential part of the Platform. An super simple explanation of them is &#8220;an Map&lt;Class, Object&gt;&#8221;. Sounds <strong>simple </strong>right? Well<strong> it is,</strong> and it&#8217;s quite powerful at the same time. It enables you to loosely couple parts of your app, create extension points etc. Another use case is passing some date around in the app, but you don&#8217;t know where the modules interested in this data are (because you&#8217;re loosely coupled, right?). In an app I&#8217;ve been writing for my Uni since some days, I&#8217;ve used the Lookup to do exactly this &#8211; pass data from an algorithm to an LineChartDrawer that then will update it&#8217;s chart each time the data is being updated.</p>
<p>This is going to be<strong> quite similar </strong>to an  <a href="http://en.wikipedia.org/wiki/Observer_pattern" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Observer_pattern?referer=');">Observer Pattern</a> implementation, but using the lookup as notification mechanism. Let&#8217;s start out with our Algorithm class (and module &#8211; note that this module is not dependent on the chart drawing module!)</p>
<div class="geshi no java">
<div class="head">package pl.edu.netbeans.algorithms;</div>
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.Exceptions;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.Lookup;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.LookupListener;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.lookup.AbstractLookup;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.lookup.InstanceContent;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.windows.TopComponent;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.windows.WindowManager;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import pl.edu.netbeans.algorithms.genetic.Chromosom;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import pl.edu.netbeans.algorithms.genetic.Population;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import pl.edu.netbeans.toolbox.ChartDataDTO;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import prefuse.data.Graph;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* The algorithm implementation, does some stuff and throws the data into an DTO which is packed into the lookup</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* @author ktoso</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">class</span> FirstTSSolverAction <span class="kw2">extends</span> SolverAction <span class="kw2">implements</span> TSSolverAction, Lookup.<span class="kw3">Provider</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw2">final</span> Population population<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">//just to get us some fancy names for this algorithm</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw2">static</span> <span class="kw4">int</span> simcount = <span class="nu0">1</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw2">final</span> <span class="kw3">String</span> SIMULATION_ID = <span class="st0">&quot;symulacja &quot;</span> + FirstTSSolverAction.<span class="me1">simcount</span>++<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="coMULTI">/*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* Here we&#39;re setting up the Lookup, to work with dynamic content, thanks to this,</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* we&#39;ll be able to modify it&#39;s contents and notify all listeners after some change has happened</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> InstanceContent dynamicContent = <span class="kw2">new</span> InstanceContent<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> Lookup myLookup = <span class="kw2">new</span> AbstractLookup<span class="br0">&#40;</span>dynamicContent<span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">//AbstractLookup is NOT an abstract class, it&#39;s an &quot;general purpose lookup&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> Lookup.<span class="me1">Result</span> res<span class="sy0">;</span> <span class="co1">//this is only here because I want to use allItems down there bellow, otherwise it would be just a variable in the method bellow</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">public</span> FirstTSSolverAction<span class="br0">&#40;</span>Graph graph<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">super</span><span class="br0">&#40;</span>graph<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&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; <span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* This is not an Runnable class but the run method will act quite the same as if it was,</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* as our framework will call it in constant time delays. We do all the computing here.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; @Override</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> run<span class="br0">&#40;</span><span class="kw4">double</span> frac<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>population.<span class="me1">shouldStop</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; <span class="co1">//&#8230; stop the execution etc.</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span><span class="sy0">;</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; population.<span class="me1">nextGeneration</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Chromosom ch = population.<span class="me1">getBestChromosom</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">int</span> numerGeneracji = population.<span class="me1">getNumerGeneracji</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> avgFitness = population.<span class="me1">getAvgFitness</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> maxFitness = population.<span class="me1">getWorstFittness</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> minFitness = population.<span class="me1">getBestFitness</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; log<span class="br0">&#40;</span><span class="st0">&quot;Generacja &quot;</span> + numerGeneracji + <span class="st0">&quot;: naj. chromosom: &quot;</span> + ch + <span class="st0">&quot; (&quot;</span> + avgFitness + <span class="st0">&quot;)&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/* Słuchający tego lookup zostaną powiadomieni o zmianie, przerysują wykres */</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; dynamicContent.<span class="me1">add</span><span class="br0">&#40;</span><span class="kw2">new</span> ChartDataDTO<span class="br0">&#40;</span>SIMULATION_ID, numerGeneracji, avgFitness, maxFitness, minFitness<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; res.<span class="me1">allItems</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="co1">//I found it quite helpful in order to be sure that the listeners will notice the change</span></div>
</li>
<li class="li1">
<div class="de1">&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; <span class="co1">//&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* Since we&#39;re an Lookup.Provider, let&#39;s provide our lookup!</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* It can be implemented in multiple ways, but let&#39;s just return our lookup this time.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; @Override</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">public</span> Lookup getLookup<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; <span class="kw2">return</span> myLookup<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&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; <span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* Poszukuje oraz ustawia listenera implementującego LineChartDrawer</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* aby ten reagował na każdorazową zmianę w naszym lookup &#8211; aktualizował wykres</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; @SuppressWarnings<span class="br0">&#40;</span><span class="st0">&quot;unchecked&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">void</span> setupLineGraphDrawerListener<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; <span class="co1">//a sucky but good enough implementation for our usecase</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Better solution: You could use another Lookup to find implementations of the &quot;LineGrapghDrawer&quot; interface and then use this instance here!</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; TopComponent drawer = WindowManager.<span class="me1">getDefault</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">findTopComponent</span><span class="br0">&#40;</span><span class="st0">&quot;FitnessGraphTopComponent&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>drawer == <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; <span class="co1">//depending on if you need this or not, throw exceptions or just ignore this if you dont need it</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//throw new RuntimeException(&quot;Nie znaleziono implementacji FitnessGraphTopComponent. Nikt mnie nie słucha!&quot;);</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//or&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log<span class="br0">&#40;</span><span class="st0">&quot;No FittnessGraphTopComponent found. That&#39;s OK, so I will continue without it&#8230;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span><span class="sy0">;</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="co1">//below is the actual settup of our &quot;observer&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; res = myLookup.<span class="me1">lookup</span><span class="br0">&#40;</span><span class="kw2">new</span> Lookup.<span class="me1">Template</span><span class="br0">&#40;</span>ChartDataDTO.<span class="kw2">class</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">//setup the resultset to react to changes of ChartDataDTOs in it</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; res.<span class="me1">allItems</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="co1">//THIS IS IMPORTANT! Help out the lookup by &quot;refreshing&quot; its contents</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; res.<span class="me1">addLookupListener</span><span class="br0">&#40;</span><span class="br0">&#40;</span>LookupListener<span class="br0">&#41;</span> drawer<span class="br0">&#41;</span><span class="sy0">;</span><span class="co1">//setup the listener to the drawer we found</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>
<p>The code is well commented for this post so take a moment and read through it. It&#8217;s just some pieces of the actual class we&#8217;re using &#8211; so no actual computing stuff is shown here, let&#8217;s focus on the lookups. Note that I&#8217;m getting the TopComponent that I&#8217;ll add as an listener &#8220;by name&#8221;, it&#8217;s super simple but would you need to &#8220;find some implementation of some drawer interface&#8221; just use an lookup and get the instance, or even all the instances of such interface implementations. That said, this solution is not the most universal here (getting the instance) but it&#8217;s good enough for our app since it&#8217;s a very small application. No let&#8217;s look at the &#8220;Observer&#8221;, better named as &#8220;LookupListener&#8221;:</p>
<div class="geshi no java">
<div class="head">package pl.edu.netbeans.visualization;</div>
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import java.awt.BorderLayout;</span></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.Collection;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import java.util.Iterator;</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"><span class="co2">import java.util.logging.Logger;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.chart.ChartFactory;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.chart.ChartPanel;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.chart.JFreeChart;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.chart.axis.ValueAxis;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.chart.plot.PlotOrientation;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.chart.plot.XYPlot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.data.xy.XYDataset;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.data.xy.XYSeries;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.jfree.data.xy.XYSeriesCollection;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.NbBundle;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.windows.TopComponent;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.windows.WindowManager;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.netbeans.api.settings.ConvertAsProperties;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.Lookup;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.LookupEvent;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import org.openide.util.LookupListener;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import pl.edu.netbeans.toolbox.ChartDataDTO;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import pl.edu.netbeans.toolbox.LineChartDrawer;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import prefuse.Visualization;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* Top component which will draw graphs for all the data it gets&#8230;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">@ConvertAsProperties<span class="br0">&#40;</span>dtd = <span class="st0">&quot;-//pl.edu.netbeans.visualization//FitnessGraph//EN&quot;</span>,</div>
</li>
<li class="li1">
<div class="de1">autostore = <span class="kw2">false</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">final</span> <span class="kw2">class</span> FitnessGraphTopComponent <span class="kw2">extends</span> TopComponent <span class="kw2">implements</span> LookupListener, LineChartDrawer <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw2">static</span> FitnessGraphTopComponent instance<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw2">static</span> <span class="kw2">final</span> <span class="kw3">String</span> PREFERRED_ID = <span class="st0">&quot;FitnessGraphTopComponent&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">//&#8230; skipped all the computing/drawing stuff</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">public</span> FitnessGraphTopComponent<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; initComponents<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; setupChart<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; setName<span class="br0">&#40;</span>NbBundle.<span class="me1">getMessage</span><span class="br0">&#40;</span>FitnessGraphTopComponent.<span class="kw2">class</span>, <span class="st0">&quot;CTL_FitnessGraphTopComponent&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; setToolTipText<span class="br0">&#40;</span>NbBundle.<span class="me1">getMessage</span><span class="br0">&#40;</span>FitnessGraphTopComponent.<span class="kw2">class</span>, <span class="st0">&quot;HINT_FitnessGraphTopComponent&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">//note how easy it will be to internationalize this app :-)</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// &nbsp; &nbsp; &nbsp; &nbsp;setIcon(ImageUtilities.loadImage(ICON_PATH, true));</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; putClientProperty<span class="br0">&#40;</span>TopComponent.<span class="me1">PROP_CLOSING_DISABLED</span>, <span class="kw3">Boolean</span>.<span class="kw2">TRUE</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; putClientProperty<span class="br0">&#40;</span>TopComponent.<span class="me1">PROP_MAXIMIZATION_DISABLED</span>, <span class="kw3">Boolean</span>.<span class="kw2">FALSE</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; putClientProperty<span class="br0">&#40;</span>TopComponent.<span class="me1">PROP_SLIDING_DISABLED</span>, <span class="kw3">Boolean</span>.<span class="kw2">TRUE</span><span class="br0">&#41;</span><span class="sy0">;</span></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; <span class="co1">//&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">//skipped graph drawing/setup parts, this post is about lookups only ;-)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;  <span class="co1">//&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; @Override</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">protected</span> <span class="kw3">String</span> preferredID<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; <span class="kw2">return</span> PREFERRED_ID<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&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; <span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* This is our resultChanged listener. It will be called if the resultSet we&#39;re observing is changed.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;* Note that &quot;changed&quot; means all CRUD operations on it.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; @Override</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> resultChanged<span class="br0">&#40;</span>LookupEvent ev<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Lookup.<span class="me1">Result</span> res = <span class="br0">&#40;</span>Lookup.<span class="me1">Result</span><span class="br0">&#41;</span> ev.<span class="me1">getSource</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">//this is always an safe cast!</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">Collection</span> instances = res.<span class="me1">allInstances</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">//we get all instances from the lookup</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="sy0">!</span>instances.<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; <span class="kw3">Iterator</span> it = instances.<span class="me1">iterator</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">while</span> <span class="br0">&#40;</span>it.<span class="me1">hasNext</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; <span class="kw3">Object</span> o = it.<span class="me1">next</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>o <span class="kw2">instanceof</span> ChartDataDTO<span class="br0">&#41;</span><span class="br0">&#123;</span><span class="co1">//you might wan to use this &#8211; better safe than sorry, check if you got what you expected!</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ChartDataDTO o = <span class="br0">&#40;</span>ChartDataDTO<span class="br0">&#41;</span> it.<span class="me1">next</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">//If not sure if this will always be the case, use an if( instanceof ) here!</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addDTO2Series<span class="br0">&#40;</span>o<span class="br0">&#41;</span><span class="sy0">;</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; <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">&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; <span class="kw2">private</span> <span class="kw4">void</span> addDTO2Series<span class="br0">&#40;</span>ChartDataDTO chartDataDTO<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//&#8230;add the stuff to the graphs&#8230;</span></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; <span class="co1">//&#8230;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>That&#8217;s about it. We simply have an<strong> resultChanged()</strong> method that <strong>will be called if the contents of the resultset are changed.</strong> We might also want to arr more lookups to be observed, so it&#8217;s better to check this instanceof I think than not, since there might be some unexpected stuff inside of it&#8230;</p>
<p>All in all, you write an <strong>Lookup.Provider</strong> and <strong>LookupListener,</strong> implement both&#8217;s methods and then at some place in your app hook them up. It doesn&#8217;t really matter &#8220;who looks for who&#8221; as long as it&#8217;s consistent and logical. In this case, the algorithm is looking for people interested in his data. Note that at any moment in time, we can add another listener, no problems here. Note that the <strong>Lookup.Provider and LookupListener are quite similar to the Observer and Observables</strong> mentioned before.And the good thing is, the algorithm does not know about any concrete drawer, and the drawer has no idea about some algorithm. They just have one shared API module &#8211; the toolbox, in which there is the <strong>DataTransferObject</strong> we&#8217;re using to pass the data from one to another &#8211; yay, an <strong>loosely coupled</strong> system. (yeah, I know our code is tightly coupled at some other places, but this part is quite ok :-))</p>
<p>If you have anything you&#8217;d like to comment on this code, feel free to do so. It&#8217;s just parts taken from <a href="http://github.com/ktoso/TravelingSalesman-NBP" onclick="urchinTracker('/outgoing/github.com/ktoso/TravelingSalesman-NBP?referer=');">http://github.com/ktoso/TravelingSalesman-NBP</a> our implementation and visualization of the <strong>Traveling Salesman Problem</strong> being solved by <a href="http://pl.wikipedia.org/wiki/Algorytm_genetyczny" onclick="urchinTracker('/outgoing/pl.wikipedia.org/wiki/Algorytm_genetyczny?referer=');"><strong>Genetic Algorithms</strong></a>.</p>
<p>For more information about lookups goto: <a href="http://netbeans.dzone.com/articles/netbeans-lookups-explained" onclick="urchinTracker('/outgoing/netbeans.dzone.com/articles/netbeans-lookups-explained?referer=');">a nice post by Anton Epple on dzone.com</a> or to <a href="http://netbeans.dzone.com/news/top-10-netbeans-apis-part-2" onclick="urchinTracker('/outgoing/netbeans.dzone.com/news/top-10-netbeans-apis-part-2?referer=');">Geertjan&#8217;s post with some good links</a> or <a href="http://www.antonioshome.net/blog/2008/20081023-1.php" onclick="urchinTracker('/outgoing/www.antonioshome.net/blog/2008/20081023-1.php?referer=');">http://www.antonioshome.net/blog/2008/20081023-1.php</a></p>
<hr />
<strong>Update!</strong> Geertjan contacted me and suggested I&#8217;d post this on netbeans.dzone.com as it&#8217;s quite an interesting post &#8211; and so I did :-) You can <a href="http://netbeans.dzone.com/articles/netbeans-platform-lookups" onclick="urchinTracker('/outgoing/netbeans.dzone.com/articles/netbeans-platform-lookups?referer=');">read and comment it now on dzone.com</a>. Hope to get some feedback if this is good or bad code, would be quite helpful :-)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=_wKH_V1A2MM:0GD8WSfpWe8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/640/netbeans-platform-lookups-as-communication-method/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/coding/640/netbeans-platform-lookups-as-communication-method/</feedburner:origLink></item>
		<item>
		<title>GeeCON 2010 – Review</title>
		<link>http://feedproxy.google.com/~r/blogproject13pl/~3/G2ez1UY4Gz0/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/614/geecon-2010-review/#comments</comments>
		<pubDate>Mon, 17 May 2010 15:54:17 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[geecon]]></category>
		<category><![CDATA[gpars]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jpa]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[polishjug]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=614</guid>
		<description><![CDATA[So the long awaited GeeCON 2010 has come to an end yesterday. Of course I was there, and had quite an amazing time there yet again. Here&#8217;s, as usually, a small review/roundup of al the three days GeeCON lasted. It&#8217;s been really fun, as I was not only attending all the sessions but hanging around [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="GeeCON 2010" src="http://2010.geecon.org/images/menu/logo_haslo.png" alt="geecon 2010 in Poznań" width="206" height="85" /></p>
<p>So the long awaited GeeCON 2010 has come to an end yesterday. Of course I was there, and had quite an amazing time there yet again. Here&#8217;s, as usually, a small review/roundup of al the three days GeeCON lasted. It&#8217;s been really fun, as I was not only attending all the sessions but hanging around with some of the speakers &#8211; that was the most fun and interesting part I think.</p>
<h2>Day 0 &#8211; VeryBerry</h2>
<p>After an long 8hour trip by train, we (I was with two friends this time) finally arrived in Poznań. We stayed at the<a href="http://www.very-berry.pl/" onclick="urchinTracker('/outgoing/www.very-berry.pl/?referer=');"> VeryBerry</a> hostel and I&#8217;d really like to recomend it to anyone who&#8217;d like to stay in Poznań, the prices are low but the service is top notch and the rooms really new and neat :-) After some minor coding, we went to sleep and got read for&#8230;</p>
<h2>Day 1 &#8211; GeeCON University: Gradle Training &amp; JUGs @ Poznań</h2>
<h3><img class="alignright" title="Gradle Hans Dockter" src="http://lh6.ggpht.com/_QYvjrzcDZMc/S-t3VAQCjeI/AAAAAAAAAXM/Pxh07KtSgb4/s640/IMG_9321.jpg" alt="" width="120" />Gradle Training with <a href="http://2010.geecon.org/speakerdetails/30" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/30?referer=');">Hans Dockter</a></h3>
<p>I was quite interested in Gradle since I&#8217;ve seen it in action at SFI (JavaCamp #3 had the same presentation) so I was really happy to be &#8220;trained&#8221; on it by Gradle inc CEO &#8211; Hans Dockter. Apparently they are using it a little (main stuff is still in maven) at SoftwareMind. The training sadly didn&#8217;t include as much coding as I&#8217;d wish it would, but as Hans said, there&#8217;s too much of us (it was the most popular training) and we had 1 day instead of 2 which usually this training would last. The topics where well distrubuted and now all trainees have a really good basic knowlage to start out with gradle. I&#8217;m hoping to do this in my soon projects, some ant task usage from within Gradle will be required to build GWT/Vaadin stuff, but hey &#8211; the integration is really awesome.</p>
<p>Another fun part was getting home from the University (it&#8217;s really awesome by the way) as we took one cab with Hans Dockter and Oliver Gierke (who talked about his Hades project on the 2nd day). We chatted a little in German and dropped them of at their Hotel. Next stop&#8230; JUGs meeting~!</p>
<h3>JUGs @ Poznań <a href="http://www.jug.poznan.pl/2010/05/spotkanie-poznan-jug-jugsgeecon-12-05-2010/" onclick="urchinTracker('/outgoing/www.jug.poznan.pl/2010/05/spotkanie-poznan-jug-jugsgeecon-12-05-2010/?referer=');">(more info)</a></h3>
<p>This was an short (2h) meeting of the PolishJUG and PoznańJUG. Here we met the rest of my PolishJUG pals, such as Marcin Gadamer and Miroslav Kopecky. And also <a href="http://blogs.sun.com/geertjan/entry/geecon" onclick="urchinTracker('/outgoing/blogs.sun.com/geertjan/entry/geecon?referer=');">Geertjan from NetBeans</a> as he was presenting NBPlatform to the JUGs. It was a quite fun session as there was both <a href="http://2010.geecon.org/speakerdetails/13" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/13?referer=');">Chris Aniszyk</a> from Eclipse (and also an OSGi expert) and <a href="http://blogs.sun.com/geertjan/entry/geecon" onclick="urchinTracker('/outgoing/blogs.sun.com/geertjan/entry/geecon?referer=');">Geertjan Wielenga </a>with NetBeans Platform &#8211; both of which are nice platforms to develop on. The final talk was by <a href="http://2010.geecon.org/speakerdetails/1" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/1?referer=');">Ed Burns</a> in which he presented how the UI enviroment was evolving during the last years and how desktop vs web is now batteling for the users attention. All three would eventually present their talks at the first day of GeeCON &#8211; Geertjan dropped in as <a href="http://2010.geecon.org/speakerdetails/32" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/32?referer=');">Ikai Lan</a> replacement as he got <a href="http://twitter.com/ikai/status/13917092508" onclick="urchinTracker('/outgoing/twitter.com/ikai/status/13917092508?referer=');">really sick</a> and couldn&#8217;t do his speech (in case you&#8217;re wondering why he&#8217;s not listed in the speakers section).</p>
<p>Later we went to a nice Pub called Fuego where we had some interesting conversations with all the speakers and members the Polish and Poznań JUGs&#8230; Let&#8217;s move on to day 1, shall we..?</p>
<h2>Day 2 &#8211; GeeCON &amp; Geeky Pool Party</h2>
<h3><a href="http://2010.geecon.org/speakerdetails/41" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/41?referer=');"><img class="alignright" title="Fitzborn" src="http://lh4.ggpht.com/_QYvjrzcDZMc/S-vOKB2kj9I/AAAAAAAAAaI/vPqGq_DTnok/s640/IMG_1013.jpg" alt="" width="120" />Thorbiörn Fritzon</a><br />
The Future of Java<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1013.jpg"><img class="alignright size-medium wp-image-662" title="Thorbiorn Fritzon" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1013-200x300.jpg" alt="" height="200" /></a></h3>
<p>The first (and also sponsored ;-)) presentation was done really professional and was mostly about assuring all present programmers that oracle does care about the java community and will continue (even more than sun) to evolve java. Well, this might me be true, but the presentation, while really amazing from the visual side, didn&#8217;t really involve more facts than the statement about Java Oracle has released a while ago.</p>
<h3><a href="http://2010.geecon.org/speakerdetails/11" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/11?referer=');">Holly Cummins</a><br />
Apache Aries: Enterprise OSGi in Action<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1107.jpg"><img class="alignright size-medium wp-image-661" title="holly cummins" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1107-200x300.jpg" alt="" height="200" /></a></h3>
<p>I hoped to really grasp the whole OSGi concept after this presentation and partially I did. Holly did kind of introduce OSGi to us and tried to show it in action &#8211; which sadly didn&#8217;t go to well (loosing the war you need to deploy can be quite an problem&#8230; ;-)). One thing that Oliver didn&#8217;t agree on is that she said that Class loading is the best thing about OSGi, yet as <a href="http://twitter.com/olivergierke/status/13903130095" onclick="urchinTracker('/outgoing/twitter.com/olivergierke/status/13903130095?referer=');">Oliver and some others tweeted</a> &#8211; <a href="http://twitter.com/njbartlett/status/13905076207" onclick="urchinTracker('/outgoing/twitter.com/njbartlett/status/13905076207?referer=');">it&#8217;s just an enabeler for Services to exist</a>.</p>
<h3><a href="http://2010.geecon.org/speakerdetails/25" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/25?referer=');"><img class="alignright" title="Craig L Russell" src="http://lh6.ggpht.com/_QYvjrzcDZMc/S-vleQs1_4I/AAAAAAAAAa0/grytFtg-L8c/s640/IMG_1414.jpg" alt="" width="120" />Craig L Russell</a><br />
Easy to Use Highly Available Java Database  Access<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1414.jpg"><img class="alignright size-medium wp-image-660" title="Craig L Russel" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1414-200x300.jpg" alt="" height="200" /></a></h3>
<p>This was a presentation about the MySQL&#8217;s <strong>Cluster storage engine</strong>. It was interesting to see how such technologies are in fact used from the code &#8211; it&#8217;s quite easy actually &#8211; almost like using an normal MySQL instance. There are some limitations of course &#8211; as the lack of relations etc. but if you&#8217;d need HA and Fault Tolerance it&#8217;s definitely one way you could go.</p>
<p>Some of the talk was about ClusterJ which is an slightly more advanced way to interact with your Cluster from Java&#8230; <a href="http://dev.mysql.com/doc/ndbapi/en/mccj-using-clusterj.html" onclick="urchinTracker('/outgoing/dev.mysql.com/doc/ndbapi/en/mccj-using-clusterj.html?referer=');">More about it can be read here</a></p>
<h3><a href="http://2010.geecon.org/speakerdetails/39" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/39?referer=');">Christian Tzolov<br />
</a>Rapid Server Side Java Development Using  Spring Roo</h3>
<p>Though I didn&#8217;t attend this one, I included it in this review in order to say this: Roo ownz (any command line tool that really helps at dev time ownz) :-) I&#8217;ve seen some of it in action some time ago, and it&#8217;s really helping while developing what you&#8217;d call &#8220;plain java apps&#8221;, without the goodness of Grails generate stuff&#8230; If you still haven&#8217;t seen it in action: <a href="http://www.springsource.org/roo" onclick="urchinTracker('/outgoing/www.springsource.org/roo?referer=');">take a look</a>, its definitely worth it. (It&#8217;s an <strong>development time only tool </strong>that like the grails command line app, can really speed up your development time with setting up basic Domain Objects, Persistence etc&#8230;)</p>
<h3><a href="http://2010.geecon.org/speakerdetails/12" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/12?referer=');">Eugene Ciurana</a><br />
The High Availability Non-Stop,  Fault-Tolerant Services Tutorial<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1627.jpg"><img class="alignright size-medium wp-image-653" title="eugene" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1627-300x200.jpg" alt="" width="200" /></a></h3>
<p><strong>A very good talk about scalability and availability.</strong> Eugene explained to us what the typical bottlenecks could be and how we can cope with them, by scaling <strong>up </strong>or <strong>out</strong> &#8211; (at last someone clearly defined those two to me). Some of his real live examples where really interesting as one company that switched to an cluster to store their data and not OracleDB what would cost them A LOT&#8230; All in all, it was quite educational but sadly &#8211; it&#8217;s something I won&#8217;t be seeing in my upcoming years as &#8220;novice developer&#8221;.</p>
<h3><a href="http://2010.geecon.org/speakerdetails/1" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/1?referer=');">Ed Burns<br />
</a>JSF 2.0, Myth and Reality<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1865.jpg"><img class="alignright size-medium wp-image-657" title="ed burns" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_1865-200x300.jpg" alt="" width="150" /></a><img class="alignright" title="Ed Burns" src="http://lh4.ggpht.com/_QYvjrzcDZMc/S-wONKHz2JI/AAAAAAAAAdE/hVt9BwTTcuA/s640/IMG_1865.jpg" alt="" width="120" /></h3>
<p>As Ed is one of co-spec lead for the JSF 2.0 (and also &#8220;worked on a wide  variety of client and server side web technologies since 1994, including  NCSA Mosaic, Mozilla, the Sun Java Plugin, Jakarta Tomcat and, most  recently JavaServer Faces.&#8221;) we were all really interested in his talk. He addmited what they did wrong with JSF 1.x and showed how most of the problems where adressed in the 2.0 release. Is was a quite nice talk, but sadly (and with some maven problems ;-))</p>
<h3><a href="http://2010.geecon.org/speakerdetails/8" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/8?referer=');">Matthias Wessendorf<br />
</a>Practical Comet and JSF</h3>
<p>I&#8217;ve been really interested in ServerSidePush for a long time, so this was an really fun presentation to watch. There were some implementations and Java Libraries shown. If interested, take a look at <a href="https://atmosphere.dev.java.net/" onclick="urchinTracker('/outgoing/atmosphere.dev.java.net/?referer=');">Atmosphere</a> on java.net or the <a href="http://martin.ankerl.com/2007/08/21/ajax-dojo-comet-tutorial/" onclick="urchinTracker('/outgoing/martin.ankerl.com/2007/08/21/ajax-dojo-comet-tutorial/?referer=');">Dojo implementation</a> which I&#8217;ve been reading about lately. (<a href="http://www.ibm.com/developerworks/web/library/wa-cometjava/index.html" onclick="urchinTracker('/outgoing/www.ibm.com/developerworks/web/library/wa-cometjava/index.html?referer=');">another nice link</a>) All in all, it&#8217;s not quite there yet, and will sometimes have to fall back to polling. Hopefully websockets from HTML5 could be a nice thing to use comet in all the future browsers.</p>
<h3><a href="http://2010.geecon.org/speakerdetails/18" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/18?referer=');">Vaclav Pech<br />
</a>Get &#8216;em before they get you</h3>
<p><a href="http://blogs.sun.com/geertjan/entry/geecon" onclick="urchinTracker('/outgoing/blogs.sun.com/geertjan/entry/geecon?referer=');">Geertjan</a> introduced me to <a href="http://www.jroller.com/vaclav/" onclick="urchinTracker('/outgoing/www.jroller.com/vaclav/?referer=');">Vaclav Pech</a> sometime during GeeCON and also I&#8217;ve been following him on twiiter quite for a while, and I must say the stuff he coded is really impressive &#8211; and all his presentations were well prepared and fun :-) That said, let&#8217;s move on to this particular session.<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_2053.jpg"><img class="alignright size-medium wp-image-695" title="IMG_2053" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_2053-300x200.jpg" alt="" width="200" /></a></p>
<p>A sponsored talk, but nonetheless quite interesting, as Vaclav showed us how to even better utilize all the features that IntelliJ IDEA has. Most of the tools where known to me, but some where new or interesting (it&#8217;s quite simple to write your own inspections btw!) The parallel session was Ed Burns with his &#8220;Rockstar Programmer&#8221; book-talk, Vaclav noticed that Ed&#8217;s talk probably has the people who need to become such programmers, while this one has people who already are&#8230; ;-) Following that idea, Vaclav went bughunting with us and all the various IDEA tools &#8211; it was a nice presentation, with a good link between the audience and him :-)</p>
<h3>Geeky Pool Party</h3>
<p style="text-align: center;"><img class="aligncenter" title="Ed Burns, Eugene Ciurana, Craig L Russell" src="http://lh6.ggpht.com/_QYvjrzcDZMc/S-05vafvtNI/AAAAAAAAAgQ/gqmdKVdmr4I/s912/IMG_2086.jpg" alt="Ed Burns, Eugene Ciurana, Craig L Russell" width="400" /></p>
<p style="text-align: left;"><img class="alignright" title="GeeCON Pool Party" src="http://lh3.ggpht.com/_QYvjrzcDZMc/S-054OHFFPI/AAAAAAAAAgc/Nzu0q6pA-J8/s912/IMG_2127.jpg" alt="" width="200" />In the evening all Geeks where invited to the Black Pool (Pool Club) where one had an occasion to talk with fellow developers and speakers. We had a nice talk with James Williams &#8211; not only (but mostly ;-)) about development but also how education works in Poland etc etc&#8230; Later I joined the GeeCON and Sun teams at the Pool and played a little with Łukasz (not sure of the name, sorry!?) who recognized me as the &#8220;guy from JavaCamps with <acronym title="The Guy from the RedHat Logo">Shadowman</acronym> on the laptop&#8221; :-) //That said, Shadowman FTW! :-)</p>
<h2>Day 3 &#8211; GeeCON &amp; GeekTrain back to Cracow</h2>
<h3><a href="http://2010.geecon.org/speakerdetails/16" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/16?referer=');">Oliver Gierke</a><br />
Easing JPA DAO development with Hades<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_2266.jpg"><img class="alignright size-medium wp-image-651" title="Oliver Gierke, spring source" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_2266-200x300.jpg" alt="" width="150" /></a></h3>
<p>Hades is an really nice way to speed up your DAO development, read more about it here: <a href="http://redmine.synyx.org/projects/show/hades" onclick="urchinTracker('/outgoing/redmine.synyx.org/projects/show/hades?referer=');">Synyx Hades</a>. I&#8217;ve bee riding a cab with Oliver before and already heard how good of a programmer he seems to be, the presentation just confirmed this. Hades is really well thought out and intuitive to use. Most of the time, <strong>all you have to do is write an DAO Interface</strong>, that you then use to access your data&#8230; Yeah, just an interface &#8211; no implementation needed &#8211; all the implementing is done by hades. It looks at the interface and tries to guess what an method should be doing, most common prefixes as findBySomething or findAll or other get&#8217;s are supported and generic. When you need an custom implementation, you can easily do this as well, and it&#8217;s possible to reuse named queries&#8230; Really nice, and the upcomming version will be JPA2.0 compatible :-) Big kudos to the Hades team&#8230;</p>
<p>The sources used in the presentation can be found on github: <a href="http://github.com/olivergierke/hades-geecon" onclick="urchinTracker('/outgoing/github.com/olivergierke/hades-geecon?referer=');">http://github.com/olivergierke/hades-geecon</a></p>
<h3><a href="http://2010.geecon.org/speakerdetails/18" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/18?referer=');">Vaclav Pech</a><br />
Unleash your processor(s)<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/4610245556_ea01d4844b_o.jpg"><img class="alignright size-medium wp-image-625" title="4610245556_ea01d4844b_o" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/4610245556_ea01d4844b_o-300x200.jpg" alt="" width="200" /></a></h3>
<p>A really nice intro into paralelisation &#8211; NOT multi threading. Vaclav presented such abstractions as Actors, Agents, Fork/Join and Dataflows&#8230; Of course most of this was shown in Groovy as Vaclav is involved in the development of <a href="http://gpars.codehaus.org/Dataflow" onclick="urchinTracker('/outgoing/gpars.codehaus.org/Dataflow?referer=');">GPars</a>. It&#8217;s been quite insightful and now I also know what this AKKA thing is that some people are so fascinated about. Also some Scala and Cloujure examples where really fun to investigate &#8211; scala in fact is in many ways so very much elegant and ideal for such sollutions &#8211; though Groovy GPars also has me convinced. The <em>withPool 4 {&#8230;}</em> is a nice feat for example, and thats just the tip of the iceberg.</p>
<h3><a href="http://2010.geecon.org/speakerdetails/7" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/7?referer=');">Joonas Lehtinen</a><br />
Vaadin &#8211; Rich <img class="alignright" title="Audience" src="http://lh6.ggpht.com/_QYvjrzcDZMc/S-wQnLdBuKI/AAAAAAAAAdM/EAbnpkT5Emk/s912/IMG_1877.jpg" alt="" width="200" />Web Applications in  Server-side Java without Plug-ins or JavaScript</h3>
<p>I&#8217;ve been trying out vaadin lately and it&#8217;s quite nice. Above all, it&#8217;s &#8220;a GWT that looks good&#8221;. The presentation was lead quite profesionally but all in all didn&#8217;t really show any &#8220;meat&#8221; od the framework. One thing I&#8217;m concerned about is the (as Hans Dockter likes to call it) &#8220;<strong>Frameworkitis</strong>&#8220;, I&#8217;m kind of afraid that it might be hard to force Vaadin to do things that the projectant&#8217;s didn&#8217;t think about&#8230; I&#8217;m hoping to continue to code my simple rss reader with an vaadin front end &#8211; and also I&#8217;d like to add some simple JAX-RS powered REST access to it&#8230;</p>
<h3><a href="http://2010.geecon.org/speakerdetails/24" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/24?referer=');">James Williams</a><br />
Game Programming with Groovy</h3>
<p>We&#8217;ve had a nice talk with James during day1&#8242;s pool party. He&#8217;s been using Grails lately and is working in the US. His talk was ment to be a more fun/geeky one, and showed simple groovy apps/games, one involving JavaLibrary usage to access the Wiimote sensors. Thus, the code was mostly &#8220;looking like java&#8221; and not much groovyish was in there.</p>
<h3><a href="http://2010.geecon.org/speakerdetails/15" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/15?referer=');">Charles Nutter</a><br />
Duby: a Fast, Ruby-like Language for the JVM</h3>
<p>I just the last part of this talk, as James didn&#8217;t take all the time he had so I went over to look at &#8220;this Duby thing&#8221;. The best quote I&#8217;ve head from GeeCON comes from this talk, it went something like this:</p>
<blockquote><p>Obviously I&#8217;ve been looking at the JVMs source a whole lot. [...] So what&#8217;s the neatest feature we all would like in Java&#8230;? MultiLineStrings, for christ&#8217;s sake!!! [...] <strong>And I&#8217;ve been looking thought the Java&#8217;s sources and there is one single damn if statement, that basically says: &#8220;If string, dont allow multiple lines&#8221;. And I was like &#8220;&#8230; You ****!!! For all those years&#8230;!! Argh!!!&#8221;</strong></p></blockquote>
<h3><a href="http://2010.geecon.org/speakerdetails/18" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/18?referer=');">Vaclav Pech</a><br />
Groovy actors and concurrent dataflow with  GPars</h3>
<p>It was basically the same (well, with more code examples) presentation as the one I&#8217;ve seen before, so I switched and went to see Adam Warski and the <strong>Checkers Framework</strong>.</p>
<p>I also had a small talk after this with Łukasz who recognized me from  the JavaCamps and has been presenting <a href="../index.php/coding/327/javacamp-1/">on  the 1st JC on his Swing/JNLP usage at his work</a>. Sadly I wasn&#8217;t into Griffon since then so I couldn&#8217;t really give him more tips about it more than that it looks really promising from looking at the examples.</p>
<h3><a href="http://2010.geecon.org/speakerdetails/22" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/22?referer=');">Adam Warski</a><br />
Static analysis using JSR308 annotations</h3>
<p>The <strong>checkers framework</strong> is a new thing to Java and it basically allows to annotate Types, in a current point in time. Your method can require an <strong>@Hashed String</strong> and would not compile if passing it an normal <strong>String</strong> it opens up quite some interesting interactions, some of which Adam has implemented in his <a href="http://www.warski.org/typestate.html" onclick="urchinTracker('/outgoing/www.warski.org/typestate.html?referer=');">TypeState checker</a> which is checking the status of collections if it is safe to read from some place in the code or not &#8211; by setting the collections @annotation to certain States (like &#8220;you haven&#8217;t called isReady, do please dont read from me!&#8221;). It&#8217;s an interesting way to detect errors in your code before execution time.</p>
<h3>Bruno Bossola<br />
Object Oriented for nonbelievers<a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/DSC006981.jpg"><img class="alignright size-medium wp-image-659" title="DSC00698" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/DSC006981-300x169.jpg" alt="" width="200" /></a></h3>
<p>One of the most fun talks on GeeCON. It was about how we somehow strayed away from what OO used to be, ObjectOriented Design. Nowadays people start out not by building an ObjectModel of their Domain but look for frameworks to use&#8230; His talk was there to bring us back to the basics what OO should be about and showed some patterns in use (simple, yet effective). One particulary fun quote from this talk is the last sentence:</p>
<blockquote><p>Why am I calling this talk &#8220;for nonbelievers&#8221;? Well&#8230; You all agree with me that OODesign is important, but tommorrow you&#8217;ll go back to choosing from all those fun frameworks anyways! ;-)</p></blockquote>
<h3><a href="http://2010.geecon.org/speakerdetails/35" onclick="urchinTracker('/outgoing/2010.geecon.org/speakerdetails/35?referer=');">Mark Struberg</a><br />
JSR-299 Context and Dependency Injection</h3>
<p>An very important topic as DI gonna be standarized now&#8230; Sadly Mark&#8217;s voice was quite monotone and we were all powered out at the time&#8230; The presentation as such, was very well prepared and later there was some source shown &#8211; that&#8217;s how I like it.</p>
<h3>End of GeeCON 2010</h3>
<p><a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_0780.jpg"><img class="aligncenter size-medium wp-image-626" title="IMG_0780" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/IMG_0780-200x300.jpg" alt="" width="200" height="300" /></a></p>
<p>After some &#8220;bye bye&#8221; with crew members and speakers, we went to our hostel and back to Cracow &#8211; it was a fun event, hope to come back next year. What would I like to be different? Well, more awesome speakers &#8211; Scott Davis would be really cool, I&#8217;ve seen his talks on JDD09 and they really changed how I think and code. He opened my mind to &#8220;Java the Platform&#8221; and Groovy and all the other awesome languages. Such speakers would be more than welcome anytime! Oh, and more <strong>&#8220;hands on&#8221;</strong>!</p>
<h3>GeekTrain back to Cracow, and an surprise meeting :-)</h3>
<p>In the train we met some fellow programmer who recognized our GeeCON stuff and most of the trip we where talking about the conference and our studies/work&#8230; It was a fun ending for a fun conference&#8230; ;-) See you next year!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/blogproject13pl?a=G2ez1UY4Gz0:VV03jV-2B6Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/blogproject13pl?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/614/geecon-2010-review/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.blog.project13.pl/index.php/fun/614/geecon-2010-review/</feedburner:origLink></item>
	</channel>
</rss>
