<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog.Project13.pl &#187; agh</title>
	<atom:link href="http://www.blog.project13.pl/index.php/tag/agh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.project13.pl</link>
	<description>The Blog of a Coder</description>
	<lastBuildDate>Sun, 05 Feb 2012 02:28:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>NetBeans Platform Lookups as communication method</title>
		<link>http://www.blog.project13.pl/index.php/coding/640/netbeans-platform-lookups-as-communication-method/</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>
]]></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>
		</item>
		<item>
		<title>def recent = [python, grails, netbeans platform, hibernate, spring, vaadin, google guava]</title>
		<link>http://www.blog.project13.pl/index.php/project13/606/def-recent-python-grails-netbeans-platform-hibernate-spring-vaadin-google-guava/</link>
		<comments>http://www.blog.project13.pl/index.php/project13/606/def-recent-python-grails-netbeans-platform-hibernate-spring-vaadin-google-guava/#comments</comments>
		<pubDate>Sat, 08 May 2010 20:24:15 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Project13]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[google guava]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[netbeans platform]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[vaadin]]></category>
		<category><![CDATA[webmaster]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=606</guid>
		<description><![CDATA[Just an quick summary of what I&#8217;ve been coding lately: http://github.com/barthez/mysql.integra.dbfiller &#8211; an simple Python app that is able to generate SQL code with inserts that we need to fill up our database for load testing. It&#8217;s doing an simple simulation of people checking in and out from various activities at some job and calculates [...]]]></description>
			<content:encoded><![CDATA[<p>Just an quick summary of what I&#8217;ve been coding lately:</p>
<p><a href="http://github.com/barthez/mysql.integra.dbfiller" onclick="urchinTracker('/outgoing/github.com/barthez/mysql.integra.dbfiller?referer=');">http://github.com/barthez/mysql.integra.dbfiller</a> &#8211; an<strong> </strong>simple Python app that is able to generate SQL code with inserts that we need to fill up our database for load testing. It&#8217;s doing an simple simulation of people checking in and out from various activities at some job and calculates when who should cone and do their shift&#8230; My friend Bartek is by far more into python, and has coded most of this app (just check the impact charts ;-)), so much of the kudos for this goes to him.</p>
<p>Noticed an <strong>gigantic hardware problem </strong>our student groups server&#8230; Some didn&#8217;t believe me in the beginning&#8230; This week we went to see how much of the harddrives &#8220;went bye bye&#8221; in real life, as there was nothing that could be done remotely. I&#8217;ve been battling with the read-only / filesystem some evenings before, and concluded that it&#8217;s not just a small hdd failure &#8211; it had to be something BIG&#8230; And boy, BIG it was&#8230; Something between all the drives and the rest of the server seems to have died. My best guess is the SCSI controller&#8230; It&#8217;s not really worth it to replace the parts as the server was very very old, well, let&#8217;s hope we get some (anything) machine to finally run our tests on. <strong><a href="http://www.youtube.com/watch?v=htKY2oD85rs" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=htKY2oD85rs&amp;referer=');">SCSI Controllers on fire&#8230;</a></strong></p>
<p><a href="http://www.netbeans.edu.pl" onclick="urchinTracker('/outgoing/www.netbeans.edu.pl?referer=');">netbeans.edu.pl</a> &#8211; was written by me in <strong>Grails</strong>. I have yet to release the sources, but will do so for sure &#8211; after I polish them a little, because they&#8217;ve been written under immense time pressure etc. It&#8217;s a quite nice framework, but <strong>obviously it&#8217;s an overkill for such an simple site</strong> as netbeans.edu.pl&#8230; It was quite fun to write <strong>my own taglib for the twitter integration</strong> and also I&#8217;ve also used the<strong> GoogleData API</strong> to serve images directly from Picasa Web Albums&#8230; Of course there are PHP lib&#8217;s that could do this, but it just seemed &#8220;nicer&#8221; to me to write this in Groovy&#8230;</p>
<p>After the NBPTraining me and two friends started developing an simple <a href="http://github.com/ktoso/TravelingSalesman-NBP" onclick="urchinTracker('/outgoing/github.com/ktoso/TravelingSalesman-NBP?referer=');"><strong>Traveling Salesman Visualization</strong> using the <strong>NetBeans Platform</strong> &#8211; solving the problem with<strong> Genetic Algorithms</strong></a>. We&#8217;ve decided to use prefuse for the graph visualization stuff&#8230; Let&#8217;s hope it was a good decision &#8211; of course I know that it&#8217;s not being developed since a long time, and the API isn&#8217;t even Generic, but it looks quite nice and the workflow with grapghs is really neat &#8211; the &#8220;actions&#8221; stuff&#8230; I&#8217;ll be trying to write our own renderer for this program so keep your fingers crossed &#8211; hope it&#8217;s turn out well. Sadly, were presenting an pre-alpha of this program on Wednesday and I won&#8217;t be able to come to the uni as at that time I&#8217;ll be taking the Gradle Training at GeeCON. :-)</p>
<p>Inspired by both <a href="http://koziolekweb.pl/2010/03/28/songs-of-vaadin/" onclick="urchinTracker('/outgoing/koziolekweb.pl/2010/03/28/songs-of-vaadin/?referer=');">koziołek&#8217;</a>s post about <a href="http://vaadin.com/" onclick="urchinTracker('/outgoing/vaadin.com/?referer=');">vaadin</a> + spring and the nice tutorial that <a href="http://darekzon.com/" onclick="urchinTracker('/outgoing/darekzon.com/?referer=');">Darek Zoń has been writing lately</a> I decided to take another look at Vaadin. I&#8217;d describe it best as&#8230; <em>&#8220;GWT that looks and feels good right from the start&#8221;&#8230; ;-)</em> The sources of what might become an simple rss reader app can be found on github: <strong><a href="http://github.com/ktoso/RssR" onclick="urchinTracker('/outgoing/github.com/ktoso/RssR?referer=');">RssR &#8211; vaadin rss reader</a></strong>. I&#8217;ve had some experience with GWT while trying to create an online <a href="http://github.com/ktoso/gwt-crossword" onclick="urchinTracker('/outgoing/github.com/ktoso/gwt-crossword?referer=');">crossword solving</a> system, but I have to admit &#8211; it&#8217;s not really near it&#8217;s final stages&#8230; And I somehow dont have the willpower to go back to it at this moment &#8211; while starting out with it I hoped that I could easily just drop my existing crossword stuff into GWT and add some simple frontend &#8211; turned out that this isn&#8217;t so easy. Ah well. Vaadin on the other side looks much nicer for some &#8220;real, even if generic, webapp&#8221;, so I chose to try implementing an simple rssreader based on it. Loging in and basic hibernate setup (not finished yet) is already in place. Oh, and I&#8217;m also <strong>using maven on this one</strong>. If you&#8217;re interested in it, or are just abour ti start an Vaadin project, <a href="http://github.com/ktoso/RssR" onclick="urchinTracker('/outgoing/github.com/ktoso/RssR?referer=');">check out the sources</a> and maby they&#8217;ll help you out figuring out what all this is about :-) It&#8217;s able to run on jetty by calling <strong>mvn jetty:run-war</strong> :-) <em>(lol just found an google code project about exactly the same stuff only written in pure spring <a href="http://code.google.com/p/rsser/source/browse/trunk/rsser/src/main/resources/messages.properties" onclick="urchinTracker('/outgoing/code.google.com/p/rsser/source/browse/trunk/rsser/src/main/resources/messages.properties?referer=');">http://code.google.com/p/rsser</a> Kudos to the coder! :-))</em></p>
<p>Oh and just an minor mention about <a href="http://code.google.com/p/guava-libraries" onclick="urchinTracker('/outgoing/code.google.com/p/guava-libraries?referer=');"><strong>Google Guava</strong></a>, I&#8217;ve been looking at it&#8217;s API lately and it&#8217;s quite nice I think. It&#8217;s <strong>not as magic filled as op4j</strong>, but this might be just the good thing about it. As I had to do an presentation to pass an class about presentations at school, I&#8217;ve done this <a href="http://www.slideshare.net/ktoso/guava" onclick="urchinTracker('/outgoing/www.slideshare.net/ktoso/guava?referer=');">super simple presentation about a very basic subset of Guava&#8217;s features</a>. While doing it I&#8217;ve learned how to use the <a href="http://pl.wikipedia.org/wiki/Beamer_(LaTeX)" onclick="urchinTracker('/outgoing/pl.wikipedia.org/wiki/Beamer_LaTeX?referer=');">LaTeX Beamer class,</a> and yup, it&#8217;s really very nice indeed! Notice the coloured Java syntax? Nice trick, ain&#8217;t it :-)</p>
<p>Oh, and while doing all this I also created an very simple website <a href="http://www.kemerling.pl/" onclick="urchinTracker('/outgoing/www.kemerling.pl/?referer=');">www.kemerling.pl</a>. The graphics where done by another friend of mine. It was quite hell to get all this to display properly (the while part, with bazylion transparent layers&#8230; ;-)), but I hope it looks all right :-)</p>
<p>Hmm&#8230; back to coding! Gotta improve the NBP Traveling Salesman now :-)</p>
<p>PS: It seems that this blog has been added to <a href="http://www.dworld.pl/blogEntry/blog/113" onclick="urchinTracker('/outgoing/www.dworld.pl/blogEntry/blog/113?referer=');">www.dworld.pl/blogEntry/blog/113</a>! Whoa that&#8217;s really really awesome and I&#8217;m really really grateful to be aggregated together with Poland&#8217;s most active Java bloggers :-) I don&#8217;t know whom I should thank for adding me there, so I&#8217;ll thank that the whole community and <a href="http://www.dworld.pl/page/show/Grzegorz_Duda" onclick="urchinTracker('/outgoing/www.dworld.pl/page/show/Grzegorz_Duda?referer=');">Grzegorz Duda</a> as dworlds author :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/project13/606/def-recent-python-grails-netbeans-platform-hibernate-spring-vaadin-google-guava/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>After the NetBeans Certified Platform Training in Kraków (2010)</title>
		<link>http://www.blog.project13.pl/index.php/project13/551/after-the-netbeans-certified-platform-training-in-krakow-2010/</link>
		<comments>http://www.blog.project13.pl/index.php/project13/551/after-the-netbeans-certified-platform-training-in-krakow-2010/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 13:55:32 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Project13]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[polishjug]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=551</guid>
		<description><![CDATA[Amazing days and awesome people It&#8217;s been some amazing days for me during (and before) the NBPTraining. As you probably know already &#8211; I&#8217;ve been the &#8220;one-man-army&#8221; behind the organization and basically everything around this training. I got lots of help from various people, such as Dr Jarosław Wąs (from KN Glider) &#8211; it wouldn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-569" title="netbeans_2010_poster_min" src="http://www.blog.project13.pl/wp-content/uploads/2010/04/netbeans_2010_poster_min-e1272636685851.jpg" alt="" width="124" height="174" /></p>
<h3>Amazing days and awesome people</h3>
<p>It&#8217;s been <strong>some amazing days</strong> for me during (and before) the NBPTraining. As you probably know already &#8211; I&#8217;ve been the &#8220;one-man-army&#8221; behind the organization and basically everything around this training. I got lots of help from various people, such as Dr Jarosław Wąs (from <a href="http://www.glider.agh.edu.pl" onclick="urchinTracker('/outgoing/www.glider.agh.edu.pl?referer=');">KN Glider</a>) &#8211; it wouldn&#8217;t have been possible to make this training such an success  without his great and very active support. And of course &#8211; the <a href="http://www.java.pl" onclick="urchinTracker('/outgoing/www.java.pl?referer=');">PolishJUG</a>, which I&#8217;m a proud member of! :-) But one thing I have to admit, Bureaucracy is a horrible thing and really made some things (needlessly&#8230;) difficult &#8211; thank goodness in the end, we had everything well organized &#8211; as Geertjan put it on dZone:</p>
<blockquote cite="http://netbeans.dzone.com/polish-jug-netbeans-platform"><p>[...] There are also some illustrative pics to share, to give an impression of  the group (really large)<em>,</em> the trainers (really busy), and the  organization (really good) [...]</p></blockquote>
<h3>Day 0: Welcome Dinner</h3>
<p>What&#8217;s so worth mentioning about the guys just coming here anyway? Well it was a quite trip for some, especially Geertian, who had to come by train which took him about 27hours instead of just coming by car from Prague. All because of <a href="http://wiadomosci.gazeta.pl/Wiadomosci/1,80708,7778761,Eksperci_ostrzegaja__znacznie_wiekszy_wulkan__sasiad.html" onclick="urchinTracker('/outgoing/wiadomosci.gazeta.pl/Wiadomosci/1_80708_7778761_Eksperci_ostrzegaja_znacznie_wiekszy_wulkan_sasiad.html?referer=');">Eyjafjoell</a>&#8216;s eruption last week&#8230; And Toni and Geertjan were in Oslo at that time, doing a Training for an company (btw <a title="Interview wirh Gunnar Reinseth" href="http://blogs.sun.com/geertjan/entry/movie_interview_with_netbeans_platform" onclick="urchinTracker('/outgoing/blogs.sun.com/geertjan/entry/movie_interview_with_netbeans_platform?referer=');">nice interview with Gunnar Reinseth</a>) &#8211; so we were worried if they&#8217;ll be able to come to Poland due to all the flights being cancelled&#8230; Anton was lucky and but Geertjan&#8217;s original flight got cancelled&#8230; Well, he had quite an <a href="http://twitter.com/GeertjanW/status/12664576635" onclick="urchinTracker('/outgoing/twitter.com/GeertjanW/status/12664576635?referer=');">interesting</a> journey as he called it himself :-) Later when Karol joined us and soon we all went to eat some pierogi and chat a little :-)</p>
<div style="text-align: center;"><a href="http://www.blog.project13.pl/wp-content/uploads/2010/04/DSC_0001.jpg"><img class="size-medium wp-image-573" title="concentrated " src="http://www.blog.project13.pl/wp-content/uploads/2010/04/DSC_0001-300x198.jpg" alt="concentrated students" width="300" height="198" /></a></div>
<h3>Days 1 &amp; 2: The Training</h3>
<p>Thanks to dr Wąs everything went smooth and without any problems&#8230; Even though some other students also wanted to use the room we had reserved &#8211; due to the chaos caused by the <a href="http://wyborcza.pl/1,75248,7752563,Lista_ofiar__prezydenckim_Tu_154_lecialy_najwazniejsze.html" onclick="urchinTracker('/outgoing/wyborcza.pl/1_75248_7752563_Lista_ofiar_prezydenckim_Tu_154_lecialy_najwazniejsze.html?referer=');">tragic plane accident</a> and them wanting to make up for the classes they&#8217;ve lost last weekend due to the burial ceremonies&#8230; I&#8217;m really glad we managed to get the training rolling with absolutely no problems &#8211; we were really prepared for everything, along with backup projectors etc ;-)</p>
<p>If you&#8217;re not very familiar with the Java World &#8211; please note, that <em>the  training was NOT about NetBeans IDE</em>. Yeah, we did use NetBeans IDE (there&#8217;s some nice little helpers/wizards),  but that&#8217;s absolutely not a must &#8211; NBP is pure Java (<strong>just a bunch of  jar&#8217;s</strong>) and XML &#8211; so you can use anything you want to code stuff  based on NetBeans RCP. That said, the training was about real coding  stuff such as patters used in the RCP, use-cases and<strong> &#8220;</strong><strong> </strong><strong>how do I code such a feature  to scale well?&#8221;</strong>.</p>
<p>The agenda was the basic NetBeans Platform Training as outlined on <a href="http://edu.netbeans.org/courses/nbplatform-certified-training/" onclick="urchinTracker('/outgoing/edu.netbeans.org/courses/nbplatform-certified-training/?referer=');">http://edu.netbeans.org/courses/nbplatform-certified-training/</a> that&#8217;s a good thing, as only a few students actually have used the NetBeans RCP (or even ANY RCP) in their lives. The level of participants was quite diverse, some saw loose coupling in action for the first time in their lives, and others were already planing some advanced use-cases foe the things we were learning. The sources and videos for most of the examples are also hosted on <a href="http://www.netbeans.edu.pl" onclick="urchinTracker('/outgoing/www.netbeans.edu.pl?referer=');">netbeans.edu.pl</a>, so if you want to know what you&#8217;ve missed, feel free to download/watch them (if interested in FullHD versions, contact me per email). The Lookup and Nodes/Explorer Views were the most interesting features of the platform I guess. Of course having an full blown app with menus etc out of the box is also nice, but not a &#8220;life changer&#8221; if it weren&#8217;t for those mechanisms. Sadly we didn&#8217;t talk about the Lexer API (for parsing languages) but I personally talked with the guys a little about it &#8211; and why schielmann was dropped etc&#8230; A really fun and interesting insider talk :-) I simply love such conversations&#8230;<img class="alignright" title="Rich Client Programming" src="http://www.javalobby.org/articles/rich-client-programming/cover.jpg" alt="rich client programming" width="180" height="180" /></p>
<p>After the training Geertjan gave away a copy of his book (&#8220;Rich Client Programming&#8221;), to the person who asked the best, most interesting questions during the course. Of course it was then signed by all the trainers. Sadly I don&#8217;t have a picture of the books&#8217; winner, nonetheless &#8211; <strong>congratulations!</strong> After the training I also asked the guys to sign my copy of the book, hurray for signature collectors ;-)</p>
<p>Anyone interested in some of the response I got concerning the training? After the training plenty of you mailed me and thanked via forums etc, here&#8217;s a few responses:</p>
<blockquote><p>przyznaje, na prawde baaaardzo fajne szkolenie</p></blockquote>
<blockquote>
<div>Faktycznie &#8211; świetna robota.  Wielkie dzięki ;)</div>
</blockquote>
<blockquote>
<div>Tru. <acronym title="Good Job">Gj</acronym>.</div>
</blockquote>
<blockquote>
<div>[...] nie udalo mi sie zjawic a slyszalem ze bylo super ;/</div>
</blockquote>
<blockquote>
<div>[...] bedzie problemem jesli przyjde jutro na to szkolenie NetBeans&#8217;a? Bo slyszalam ze duzo ciekawych i przydatnych dla mnie rzeczy jest wiec chcialabym sobie posluchac :)</div>
</blockquote>
<div>Big big thanks to all of you, I&#8217;m happy you enjoined the training. You may want to check out <a href="http://netbeans.dzone.com/polish-jug-netbeans-platform" onclick="urchinTracker('/outgoing/netbeans.dzone.com/polish-jug-netbeans-platform?referer=');">Geertjan&#8217;s take on it on dZone</a>.</div>
<p style="text-align: center;"><a href="http://www.blog.project13.pl/wp-content/uploads/2010/04/DSC_0004.jpg"><img class="size-medium wp-image-552" title="NetBeans Platform in Cracow" src="http://www.blog.project13.pl/wp-content/uploads/2010/04/DSC_0004-300x198.jpg" alt="Group foto" width="300" height="198" /></a></p>
<h3>See you next time!</h3>
<p>I hope you all enjoined the training &#8211; we certainly did. I&#8217;ve got some opinions from happy participants, so I guess everyone liked it as much as those did.</p>
<p>If you have anything (opinions, sources or even complaints) feel free to contact me: kmalawski@project13.pl or just leave a comment here :-) Also, when you get your<strong> NetBeans Certified Engineer</strong> and would like some more promotion for your open source project &#8211; let me know and we&#8217;ll add a link to it at netbeans.edu.pl!</p>
<p><strong>Some students have already  have started their projects based on the NetBeans Platform &#8211; so what are you waiting for?! ;-)</strong></p>
<h3>What&#8217;s next for me?</h3>
<p>Well, I&#8217;m going to <a href="http://2010.geecon.org/site/schedule" onclick="urchinTracker('/outgoing/2010.geecon.org/site/schedule?referer=');"><strong>GeeCON</strong></a>, to learn about <strong>Gradle</strong>, and tap into facts and myths about <strong>JSF</strong> and other things (the <a href="http://2010.geecon.org/site/schedule" onclick="urchinTracker('/outgoing/2010.geecon.org/site/schedule?referer=');">list of good topics</a> is really long so I wont list them all here, just have a look on your own). The agenda mostly caught up my attecion and I&#8217;m really happy to be going there. What&#8217;s new for me + conferences is that I don&#8217;t have to go alone anymore. I&#8217;m going with a friend (some years older) and potentialy another girl &#8211; as she won the Google trip to GeeCON&#8230; ;-) I&#8217;m also really happy to be able to meet Adam Dudczak, thanks to whom the whole NBPT idea got ignited in me and the NetBeans Guys :-) Of course we&#8217;ll meet up  with all the <strong>PolishJUG</strong> members, (Adrian Nowak, Radosław Holewa, Marcin Gadamer and Kuba Dżon) and Miroslav will be comming too &#8211; lot&#8217;s and lot&#8217;s of programming-friends :-) Seems like Toni and Geertjan will also be comming, yay! Yeah, so that&#8217;ll be 3 days in May&#8230; but that&#8217;s not the end of my Java related stuff in May:</p>
<p>Later in May I&#8217;ll be on an Spring Source Training. It&#8217;s only the &#8220;short introductory one&#8221;, and I&#8217;m well aware that it won&#8217;t make me an spring-guru, but an insider insight about Spring, Roo or Grails is also a good thing to have.</p>
<p>By the way, did you notice that the <strong>netbeans.edu.pl is running on Grails</strong>? I&#8217;ll release it&#8217;s sources when they&#8217;re polished enough~! Viva la free software.</p>
<div id="attachment_554" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.blog.project13.pl/wp-content/uploads/2010/04/DSC_0002-2.jpg"><img class="size-medium wp-image-554 " title="NetBeans guys and Konrad Malawski" src="http://www.blog.project13.pl/wp-content/uploads/2010/04/DSC_0002-2-300x198.jpg" alt="" width="300" height="198" /></a><p class="wp-caption-text">Geertjan, Toni, Konrad (me), Karol</p></div>
<p>Oh, and for those asking: Sadly I didn&#8217;t own an PolishJUG T-Shirt at the  time of the training, so I took the most Java related I had &#8211; from <a href="http://jdd.org.pl/" onclick="urchinTracker('/outgoing/jdd.org.pl/?referer=');">Java Developers  Day</a>. Also a quite nice conference&#8230; :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/project13/551/after-the-netbeans-certified-platform-training-in-krakow-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaCamp #3</title>
		<link>http://www.blog.project13.pl/index.php/review/537/javacamp-3/</link>
		<comments>http://www.blog.project13.pl/index.php/review/537/javacamp-3/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 08:29:13 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[polish]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[JavaCamp]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[pjug]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/index.php/null/537/javacamp-3/</guid>
		<description><![CDATA[10 Kwietnia 2010, odbył się trzeci już, organizowany przez PJUG na terenie AGH, JavaCamp. Niestety tego samego dnia, około godziny 9:00 doszło do katastrofy polskiego samolutu z b. ważnymi osobami rządowymi i nie tylko Polski&#8230; Trudno jest sprawę opisać słowami i chyba każdy wie o czym mowa, także podobnie jak na JavaCampie, pozostawiam to w chwili ciszy [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blog.project13.pl/wp-content/uploads/2010/04/pjug_logo.jpg"><img class="size-full wp-image-536 alignleft" 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" /></a>10 Kwietnia 2010, odbył się trzeci już, organizowany przez PJUG na terenie AGH, JavaCamp.</p>
<p>Niestety tego samego dnia, około godziny 9:00 doszło do katastrofy polskiego samolutu z b. ważnymi osobami rządowymi i nie tylko Polski&#8230; Trudno jest sprawę opisać słowami i chyba każdy wie o czym mowa, także podobnie jak na JavaCampie, pozostawiam to w chwili ciszy i kontynuuję z materiałem&#8230;</p>
<p>[...]</p>
<h2><strong>Piotr Jagielski</strong> &#8211; “Testowanie z użyciem  obiektów zastępczych”</h2>
<p>Świetna prezentacja na której w końcu zobaczyłem <a href="http://easymock.org/" onclick="urchinTracker('/outgoing/easymock.org/?referer=');">EasyMock</a> (okazało się że wcale nie jest taki Easy jakby nazwa sugerowała) <a href="http://mockito.org/" onclick="urchinTracker('/outgoing/mockito.org/?referer=');">Mockito</a> oraz <a href="http://code.google.com/p/powermock/" onclick="urchinTracker('/outgoing/code.google.com/p/powermock/?referer=');">PowerMock</a> w akcji. Jedyne co miałem dotychczas wspólnego z testowaniem przy wykorzystaniu Mock obiektów to ręcznie napisana <strong>MockCrosswordGenerator</strong> &#8211; <span style="text-decoration: underline;"><em>okazało się że jest to w pełni normalne i porządane czasami podejście</em></span> do mockowania &#8211; także ucieszyłem się że moja domorosła odpowiedź na pytanie <em>&#8220;jak to sensownie przetestować + słyszałem coś o mockowaniu ale franeworka to mu tutaj nie trzeba&#8221;</em> pod tytułem <em>&#8220;a napiszę klasę co implementuje ten interfejs i zwraca gotowce&#8221; <span style="font-style: normal;">okazała się być normalnym i słusznym w niektórych sytuacjach podejściem</span></em>.</p>
<p>Wracając do przedstawianych bibliotek -  Mockito wydaje się faktycznie przyjemny (no i był mocno reklamowanego podczas prezentacji), chyba że znajdę coś lepszego&#8230; <strong>Groovy </strong>wydaje się trochę fajniejszy do takich rzeczy &#8220;na szybko&#8221;, no ale może już dość pakowania go wszędzie gdzie się da hm hm&#8230; Mockito po przedstawionych możliwościach i przyjemności pisania testów w oparciu o niego, jest bardzo przyjemny.</p>
<p>Potem Piotr pokazał jeszcze armatę jaką jest <strong>PowerMock</strong>&#8230; Która po prostu potarfi mockować wszystko &#8211; magicznie. Bo jak wiemy niezbyt da się mockowanie zastosować przy metodach statycznych czy metodach/klasach finalnych. PowerMock trochę &#8220;czaruje&#8221; bytecode&#8217;em i nawet takie trudne sytuacje potrafi mockować&#8230; Co fajne &#8211; buduje on &#8220;na&#8221; tym co już mockito i easymock zdążyły stworzyć &#8211; nie jest to kolejne API które trzeba kuć absolutnie od zera :-)</p>
<p>Prezentacja była na prawdę świetna i chętnie posłuchałbym Piotra ponownie na jakimś innym spotkaniu.</p>
<h2><strong><a href="http://kaczanowscy.pl/tomek/2010-04/gradle-talk-java-camp-3-april-2010-slides-and-source-code" onclick="urchinTracker('/outgoing/kaczanowscy.pl/tomek/2010-04/gradle-talk-java-camp-3-april-2010-slides-and-source-code?referer=');">Tomasz Kaczanowski</a></strong> &#8211; “Gradle”</h2>
<p>Tą prezentację Tomek przedstawiał na <strong>tegorocznym <a href="http://www.sfi.org.pl/prelegenci#kaczanowski" onclick="urchinTracker('/outgoing/www.sfi.org.pl/prelegenci_kaczanowski?referer=');">Studenckim Festiwalu Informatycznym</a></strong> i akurat na niej miałem okazję być (oraz na prezentacji Jacka Laskowskiego oraz &#8220;warsztatach&#8221; z GWT&#8230; ale o tym post kiedy indziej). Także &#8220;nic nowego&#8221;, co nie zmienia faktu iż była zarówno wtedy jak i teraz porządnie przygotowana &#8211; co na prawdę było widać, oraz prowadzona &#8220;z sensem&#8221; &#8211; jakieś tezy, jakieś zestawienia, przykłady a następnie sprawdzenie co faktycznie Gradle nam daje a czego nie.</p>
<p>Na JavaCamp w przeciwieństwie do SFI było obecnych więcej prawdziwych programistów Java na codzień pracujących z Maven2, oraz będących dobrze poinformowanych o nowościach w Maven3. Dzięki temu prezentację często przerywano i dyskutowano na temat &#8220;czy gradle pozwala na XYZ&#8221; lub &#8220;w Maven też da się ABC&#8221; itp. Bardzo mi się to podobało, z dwóch powodów: prezentację już znałem więc powiew świeżości był mile widziany oraz &#8220;życiowe&#8221; spojrzenie na prezentowany materiał zawsze jest najważniejsze a na &#8220;wielkich konferencjach&#8221; często unika się takiego spojrzenia. Słowem? Kolejna bardzo dobra prezentacja z dużym zaangażowaniem publiczności.</p>
<h2><a href="http://09.jdd.org.pl/prelegenci/waldemar-kot" onclick="urchinTracker('/outgoing/09.jdd.org.pl/prelegenci/waldemar-kot?referer=');"><strong>Waldemar Kot</strong></a> &#8211; “Współbieżność w  aplikacjach Java EE”</h2>
<p>Bardzo bardzo podobną prezentację Waldemar prezentował <strong>Java Developers&#8217; Day 2009</strong>, gdzie<strong> </strong>również miałem okazję go posłuchać. Tam prezentacja nazywała się &#8220;<em>Asynchroniczność, współbieżność i rozproszone przetwarzanie w Java  EE<br />
- przykłady z użyciem technologii middleware Oracle: WebLogic Server,<br />
EclipseLink/TopLink JPA i Coherenc</em>e&#8221; i jak można zgadnąć po nazwie&#8230; było trochę &#8220;hmmm&#8221;. Tym razem, pod prostszą nazwą, i odświeżonym podejściem Waldemar skupił się na pokazaniu nam<strong> WorkManager API</strong> &#8211; de facto standardu w przetwarzaniu równoległym w JEE. Bardzo ganił dziwne podejście ludzi który twierdzą że współbieżności w<strong> JEE</strong> &#8220;się nie da&#8221; (pewnie że się da, ale po prostu nie Thread&#8217;em droga) lub &#8220;a jeśli musisz to użyj JMS&#8221; &#8211; dziwne podejścia, faktycznie &#8211; skoro WorkManager jest tak ładnym i banalnym API&#8230; Standaryzacji się niestety wątki w JEE nie doczekały, ale WM jest dobrym i sprawdzonyum rozwiązaniem. No i mamy również w springu: <a href="http://static.springsource.org/spring/docs/2.0.x/reference/scheduling.html" onclick="urchinTracker('/outgoing/static.springsource.org/spring/docs/2.0.x/reference/scheduling.html?referer=');">http://static.springsource.org/spring/docs/2.0.x/reference/scheduling.html</a> Więc w sumie zaskoczył mnie że spotykał się z takimi poglądami dot współbieżności a JEE&#8230;</p>
<p>Potem mała prezentacja tego co taka współbieżność w efekcie daje &#8211; przykładowe odpalanie wątków i zabawa ograniczaniem ThreadPoola z poziomu serwera aplikacyjnego &#8211; to samo było na <strong>JDD </strong>jeśli dobrze pamiętam.</p>
<p>Kolejne demko dotyczyło już <a href="http://www.oracle.com/technology/products/coherence/index.html" onclick="urchinTracker('/outgoing/www.oracle.com/technology/products/coherence/index.html?referer=');">Oracle<strong> Coherence</strong></a><strong>.</strong> Czyli witamy w świecie <strong>DataGrid</strong>. Jak to najprościej opisać? &#8220;Taka Map&#8230; rozproszona na 200 serwerów i samoczynnie replikująca się do baz danych z np. opóźnieniem &#8211; dramatycznie redukując ilość zapytań SQL.&#8221; Oczywiście to nie tylko tyle, ale również dostęp poprzez Java/C++/.NET do jednej i tej samej instancji serwera. Prezentacja była fajna i ciekawa &#8211; szkoda że takie cuda dopiero mają sens gdy ma się miliony zapytań dot. danych &#8211; ale technologia z pewnością jest bardzo ciekawa &#8211; a wydajność &#8220;widać&#8221;, skalowalność również ogromna&#8230; Cud miód i orzeszki. Na tym się coherence oczywiście nie kończy &#8211; pomysł wysyłania &#8220;kodu do wykonania&#8221; (uproszczona nazwa oczywiście&#8230;) zamiast pobierania danych, zmiany, i wysłania również jest fajnie wspierana. Zamiast na bazie danych i SQL po prostu pracujemy z API coherence, które pozwala nam tworzyć pewne zapytania &#8211; przedstawiony przykład był takim SELECT AVG(&#8230;) FROM, ale wykonanym na mapce coherence&#8230; Zwyczajne włączenie kolejnego serwera pozwalało drastycznie zmniejszać czas potrzebny na wykonanie takiej operacji &#8211; serwery same się dogadują i replikują między sobą dane aby potem wykonać 1 zapytanie (nic nie programujemy co by mówiło o jakiś serwerach) na wszystkich serwerkach <strong>na raz</strong> &#8211; ot takie podejście do współbieżności. Bardzo ciekawa technologia, no ale niestety <strong>wielka armata &#8211; chciałbym kiedyś z takich strzelać ;-)</strong></p>
<p><a href="http://2010.geecon.org/" onclick="urchinTracker('/outgoing/2010.geecon.org/?referer=');"><strong><img class="alignnone" title="GeeCON" src="http://www.netbeans.edu.pl/images/geecon.png" alt="" width="206" height="85" /></strong></a></p>
<p><strong>Informacja dla zainteresowanych UniversityDay na GeeCONie:</strong></p>
<p>Waldemar Kot będzie przeprowadzał na UniversityDay całodniowe szkolenie z Coherence &#8211; więc jeśli Cię to zainteresowało &#8211; zapraszamy.<br />
Inna z ścieżej najprawdopodobniej będzie dotyczyć Gradle, także jeśli interesuje cię gradle, miej oko na informacje publikowane na stronie domowej <a href="http://2010.geecon.org/site/schedule3" onclick="urchinTracker('/outgoing/2010.geecon.org/site/schedule3?referer=');">GeeCON</a>.</p>
<p>Pizza jak zawsze &#8211; dobra ;-)</p>
<p><em>Powyższy post napisano na nudnym wykładzie&#8230; ;-)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/review/537/javacamp-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaCamp #2</title>
		<link>http://www.blog.project13.pl/index.php/coding/405/javacamp-2/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/405/javacamp-2/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 02:10:34 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[JavaCamp]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[webdeveloper]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=405</guid>
		<description><![CDATA[Yup, it&#8217;s time for another JavaCamp &#8220;review&#8221;. This time I was able to attend the whole thing, and didn&#8217;t miss the pizza &#8211; well, I just got one slice since we were so busy talking about Google&#8217;s Android with other programmers&#8230; ;-) The agenda was shorter than last time, but it still &#8220;had it&#8217;s moments&#8221;: [...]]]></description>
			<content:encoded><![CDATA[<p>Yup, it&#8217;s time for another <a href="http://www.java.pl/?p=131" onclick="urchinTracker('/outgoing/www.java.pl/?p=131&amp;referer=');">JavaCamp</a> &#8220;review&#8221;.<br />
This time I was able to attend the whole thing, and didn&#8217;t miss the pizza &#8211; well, I just got one slice since we were so busy talking about Google&#8217;s Android with other programmers&#8230; ;-) The agenda was shorter than last time, but it still &#8220;had it&#8217;s moments&#8221;:</p>
<address style="text-align: center;"></address>
<h3><a href="http://www.lenart.org.pl/" onclick="urchinTracker('/outgoing/www.lenart.org.pl/?referer=');"><strong>Łukasz Lenart</strong></a> &#8211; “Google AppEngine &#8211; chmura na Ja(v)wie”</h3>
<p>Łukasz, from the Warsaw JUG, was talking about Google&#8217;s AppEngine &#8211; it&#8217;s baisically <em>Just Another Servlet Container</em> but since it&#8217;s in a Cloud, it&#8217;s (potentially) easy to scale an application deployed on it&#8230; But the biggest benefit of deploying to the AppEngine is in my opinion: free java hosting. If our app doesn&#8217;t exceed some <a href="http://code.google.com/intl/pl/appengine/docs/quotas.html" onclick="urchinTracker('/outgoing/code.google.com/intl/pl/appengine/docs/quotas.html?referer=');">specyfic quotas</a> (most importantly is smaller than 500MB &#8211; concerning the Data/Blob Stores) we don&#8217;t have to pay Google for the hosting. You could call this a free cloud for beginners, and if your app gets bigger, you&#8217;re kinda trapped in this clound, and then have to pay google some fees for the extra bandwidth etc.</p>
<p>Sadly not everything is &#8220;allowed&#8221; and we are restricted by a <a href="http://code.google.com/intl/pl/appengine/docs/java/jrewhitelist.html" onclick="urchinTracker('/outgoing/code.google.com/intl/pl/appengine/docs/java/jrewhitelist.html?referer=');">Java Class WhiteList</a>. Also, there is <strong>no </strong><strong>Relational Database</strong> available for us on the AppEngine &#8211; instead we can use the &#8220;DataStore&#8221; with <strong><abbr title="Google Query Language......">GQL</abbr></strong> (or JDO or <strong>JPA</strong>) and for files there is the (now in &#8220;beta&#8221; status) <strong>BlobStore</strong> &#8211; the name explaing everything I guess&#8230; ;-) Another <em>&#8220;restriction&#8221;</em> would be not being able to access the filesystem. I can only guess why, but it would seem that this would make the <strong>AppEngine</strong> easier to scale&#8230; (sadly I&#8217;m not an AppEngine Developer so that&#8217;s just my wild guess). Ok, but why did I put the word <em>&#8220;restriction&#8221;</em> in quotes? Because I don&#8217;t think this &#8220;restriction&#8221; is that much of a hurdle&#8230; We can always use resources from inside our WAR by using Class.getResource() <em>(I didn&#8217;t test this on the AE, but it sounds plausible and should work) </em>and for uploaded files there&#8217;s the BlobStore. There are some more &#8220;services&#8221; like simplified threading (normal java threads wouldn&#8217;t be easy to controll by the AppEngine I guess, so that&#8217;s why they introducet this option) and some more &#8211; there&#8217;s XMPP, Mailing support etc&#8230;</p>
<p>All in all, I wasn&#8217;t a big fan of cloud&#8217;s to begin with, and even though the AppEngine seems like a nice place to Deploy, I&#8217;m not really convinced to go with it. The presentation was all right and I did learn some thing&#8217;s about the AE I didn&#8217;t know before &#8211; and the &#8220;show what doesn&#8217;t work and not what does work out of the box&#8221; apparoch Łukasz took, was really nice much more interesting than just &#8220;click&#8230; yay it&#8217;s working&#8221; &#8211; as it doesn&#8217;t go like that IRL most of the time&#8230;<br />
That said, I&#8217;ll stick with a <strong>Tomcat</strong> server for my GWT-Crossword.</p>
<p>Oh, and the <a href="http://www.lenart.org.pl/pdf/WarszawaJUG-GoogleAppEngine.pdf" onclick="urchinTracker('/outgoing/www.lenart.org.pl/pdf/WarszawaJUG-GoogleAppEngine.pdf?referer=');">slides are available here</a> and the source code of the demo (&#8220;Struts2 on AppEngine&#8221;) he showed can be pulled from mercurial by:</p>
<pre>hg clone https://lukaszlenart-wjug.googlecode.com/hg/ gruuf-done</pre>
<h3><a href="http://miragemiko.wordpress.com/" onclick="urchinTracker('/outgoing/miragemiko.wordpress.com/?referer=');"><strong>Miroslav Kopecky</strong></a> &#8211; “Outlook to Android Application Development” <em>(yup, another Google product today)</em></h3>
<p>I own an Android powered (and there for Linux powered :-)) HTC Hero since two days, but am not &#8220;new&#8221; in the Android API as I&#8217;ve been reading quite a bit about it since it was announced alongside with the G1<em> (or was it announced before the phone..? hmm&#8230;)</em>. Mirek&#8217;s presentation was an introduction into the Android Platform, or as we noticed &#8220;Framework&#8221;, as coding Android apps feel&#8217;s very much like using an framework (yes, every API is more or less something like a framework, but the &#8220;feel&#8221; here is really framework-ish, with lot&#8217;s of method overriding etc.). After some introduction into an Android Apps structure, Mirek went on and showed 4 application demos. They were using simple layouting, Contact access and at the end event Google Maps. It may have been hard to follow for people not accustomed to Android and wasn&#8217;t all too in depth, but the overall idea most probably came through.</p>
<p>I&#8217;ll write some <strong>Android </strong>App for sure in some time &#8211; first I&#8217;ll have to quickly finish my GWT-Crossword&#8230; It&#8217;ll probably be a ContactMerger &#8211; something that&#8217;s clearly missing in all google apps and is constantly nagging me. That is, an app to easily merge contact duplicates into one contact. This could be really nicely automated, and when some conflicts are detected a normal 3-diff-like dialog would be enough to quickly merge a few contacts into one&#8230; Sadly my HTC Hero still has the uber-old Android 1.5 and the contact&#8217;s access API has significantly changed since then&#8230; I think that by the time I&#8217;m ready to code for android  the 2.1 ROM Upgrade for my Phone should be available&#8230; So I&#8217;m focusing just on the &#8220;Level 7&#8243; API (&#8220;level 7&#8243; means &#8220;android 2.1&#8243;, whereas &#8220;level 3&#8243; means &#8220;android 1.5&#8243;).</p>
<h3><a href="http://jdn.pl/blog/1" onclick="urchinTracker('/outgoing/jdn.pl/blog/1?referer=');"><strong>Piotr Maj</strong></a> &#8211; “Jak czerpać przyjemność z programowania w świecie krótkich terminów i parcia na słupki”</h3>
<p>This presentation really stood outfrom the rest, it was fun and while not really tech focused, quite interesting. Piotr started out with some awesome<span style="text-decoration: line-through;"> [plastelina]</span> figures that his wife made esspecially for this presentation: a &#8220;Garniturek&#8221; (Marketing Guy), an Programmer and an Evil Looking Tester. The figures were really hilarious&#8230; :-) Anyways, he started out with showing sources of <span style="text-decoration: line-through;">[depresion]</span> bad feelings in our day to day jobs, and pointing out that if we do something again and again, and still are doing it the same way &#8211; something&#8217;s not right, we don&#8217;t evolve if we code like that&#8230; Then he went on with introducing the Tester figure and some scenarios of a Tester humiliating Programmers. A few words about Selenium and then we were talking about how writing tests it both necessary and potentially really interesting. So in the end, we ended up talking about <strong>Unit/</strong><strong>Functional</strong> <strong>Testing</strong> and <strong>Test</strong> <strong>Coverage</strong> &#8211; who would have thought, by the title of the presentation I was expecting something else, but it was a really plesant presentation nonetheless, and the need of testing code can&#8217;t be stressed enough I guess &#8211; maybe I&#8217;ll start to have a major test coverage of my code thanks this constant nagging about them ;-)</p>
<h3><strong>Pizza Time</strong></h3>
<p>During the pizza-break we had a long talk with Miroslav, and people could play around with the Nexus One he brought especially for this presentation. It&#8217;s interesting to hear out other developers views on some API. I for example find the Android API quite nice. The &#8220;J2ME Hell&#8221; I have been coding some stuff for burns even fiercer now that I have the option to choose another Mobile Java Platform &#8211; at last with cool things like SQLite, Widgets and Easy Touch Responsiveness &#8211; oh an the BackGroundTasking is a great feature &#8211; something J2ME never had I think, on the other hand, what good stuff did basic J2ME have? Yeah there were some JSRs that made life not so painful on ME, but on most of my phones there always were problems with them &#8211; MMAPI for example, where you sometimes had to code something SE or NOKIA specific &#8211; so where is that &#8220;write once&#8221; gone on ME eh&#8230;? Later on we talked with Miroslav and it seems that he&#8217;ll be at our <a href="http://www.sfi.org.pl/" onclick="urchinTracker('/outgoing/www.sfi.org.pl/?referer=');">SFI</a> next month &#8211; yet another great conference&#8230; :-)</p>
<p>One of the developers had an Motorola DROID, which I have considered buying but decided for the HERO &#8211; for money reasons&#8230; The DROID&#8217;s (MILESTONE&#8217;s) phicical keyboard really sucks, by the way. That, plus the fact of how awesome the on-screen-keyboard of Android is made me not regret buying a phone without phisical keyboard&#8230; ;-)</p>
<h3><a href="http://javarsovia.mocna-kawa.com/index.php?option=com_content&amp;task=view&amp;id=96&amp;Itemid=65" onclick="urchinTracker('/outgoing/javarsovia.mocna-kawa.com/index.php?option=com_content_amp_task=view_amp_id=96_amp_Itemid=65&amp;referer=');"><strong>Marcin Kalas</strong></a> &#8211; “Java/JEE Performance Test Planning &#8211; How To Plan Successful Performance Tuning of Java/JEE applications”</h3>
<p>I had really high hopes for this presentation, as I&#8217;m currently doing JMeter Load Testing on MySQL engines at my University. Sadly this wasn&#8217;t a &#8220;practical&#8221; or &#8220;hands-on&#8221; presentation. Yeah, I understand that it&#8217;s really hard to show this kind of stuff in such a short period of time, nonetheless I hoped for some more &#8220;tricks and advices&#8221;. The some tips about the JVM and multiple GC Strategries were quite interesting, but that&#8217;s something I&#8217;ll need to lookup and read about when I&#8217;m going to need it as it&#8217;s clearly a very big topic.</p>
<p>Marcin surely has a lot of experience in <strong>performance tuning</strong> apps that&#8217;s clear and it was really interesting to see some people (Java Gurus) from the audience throw some interesting stuff into the presentation. Real JEE apps are really something amazing, I hope I&#8217;ll be able to code and work with such apps in my future, it&#8217;s an amazing world full of Gigantic DataCenters and Techniques no small app would ever find any use for&#8230; For now I&#8217;ll have to get good at the basic stuff I guess, I&#8217;ve still got some time. What I found very interesting were the Load/Stress &#8220;Patterns&#8221; Marcin displayed. For example if your application is always busy, or strangely idle &#8211; even with lots of request&#8217;s comming in etc. It&#8217;s something that really makes you think about the app/server and bottlenecks&#8230; Sadly I can&#8217;t seem to find anything similar about those online &#8211; maybe I&#8217;m just not searching well enough. I hope to see some of those behaviours while testing our databases, we don&#8217;t have multiple application layers in these tests and finding bottlenecks <em>should</em> be easy &#8211; it should be, right? ;-) Anyway, I hope to have some fun experiments with our mini-server.</p>
<h3><a href="http://2010.geecon.org/main/home" onclick="urchinTracker('/outgoing/2010.geecon.org/main/home?referer=');">GeeCON 2010</a></h3>
<p>The whole event was also a small GeeCON campain. People got some stickers and <span style="text-decoration: line-through;">[smycze]</span> with GeeCON branding. I&#8217;m planing to go there as it seems like an very amazing event&#8230; This year it&#8217;s in Poznań, and it&#8217;s being organized with cooperation of the Poznań and Polish JUGs. I&#8217;ll keep you up to date about upcomming Java Events &#8211; the next being SFI and then *something special* in April :-) Well then&#8230; <strong><span style="color: #f7d507;"><em>&#8220;Let&#8217;s move the Java World!&#8221;</em></span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/405/javacamp-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQLIntegra: dbfiller &amp; wiki</title>
		<link>http://www.blog.project13.pl/index.php/null/401/mysqlintegra-dbfiller-wiki/</link>
		<comments>http://www.blog.project13.pl/index.php/null/401/mysqlintegra-dbfiller-wiki/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 23:06:21 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[jmeter]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=401</guid>
		<description><![CDATA[I passed all my exams at my first attempt and should have now some time to relax, right? Well something like that, I&#8217;m actually doing quite a lot these days. We&#8217;re on the roll with MySQL Integra. Our server &#8220;Kopiec&#8221; is somewhat online (running CentOS off course) &#8211; we&#8217;re able to start/stop if thanks to [...]]]></description>
			<content:encoded><![CDATA[<p>I passed all my exams at my first attempt and should have now some time to relax, right? Well something like that, I&#8217;m actually doing quite a lot these days. We&#8217;re on the roll with MySQL Integra.</p>
<p>Our server &#8220;<strong>Kopiec</strong>&#8221; is somewhat online (running <strong>CentOS</strong> off course) &#8211; we&#8217;re able to start/stop if thanks to a tool that&#8217;s called &#8220;remote insight&#8221;, and I&#8217;ve put 3 databases on there. <strong>MariaDB</strong>, <strong>InfiniDB</strong> and a clean <strong>MySQL</strong> instalation. We&#8217;re somewhat having problems with <strong>TokuDB</strong>, but that&#8217;s going to be our 4th database of interest. If you want to keep track of our test&#8217;s you can take a look at: <a href="http://mysqlintegra.project13.pl/" onclick="urchinTracker('/outgoing/mysqlintegra.project13.pl/?referer=');">http://mysqlintegra.project13.pl/</a>.</p>
<p>The first step in getting things tested is filling those db&#8217;s with some data, and I mean a LOT of data. So we hacked up a <em>more or less quick and dirty</em> <strong>python</strong> script called <strong>dbfiller</strong> (<a href="http://github.com/barthez/mysql.integra.dbfiller" onclick="urchinTracker('/outgoing/github.com/barthez/mysql.integra.dbfiller?referer=');"><strong>source code </strong>avaiable on github</a>) that would simulate a very simple table generation scheme (people working on shifts and checking in when they&#8217;re finished or start some activity). If you&#8217;re interested, our task is specyfied in the /doc/Opis.pdf file (sorry, only in polish). After a few days it&#8217;s up and running and we&#8217;re moving on to filling up those databases with some gigabytes of data.</p>
<p>Next we&#8217;re going to write some SQL Views/Procedures and then we&#8217;ll use <a href="http://mysqlintegra.project13.pl/index.php/Apache_JMeter" onclick="urchinTracker('/outgoing/mysqlintegra.project13.pl/index.php/Apache_JMeter?referer=');">Apache<strong> JMeter</strong></a> to run some<strong> performance</strong> benchmarks of some interesting <strong>data storage engines</strong>.</p>
<p>PS: If you&#8217;re wondering about my GWT-Crossword project &#8211; yeah, it&#8217;s still actual, and I&#8217;ll get right on it when done with some of the stuff here.<br />
PPS: Yes, an Linux powered phone AT LAST in my hands! The HTC HERO is comming to me really soon &#8211; never again shall I use a ShitOS like WindowsMobile 6.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/null/401/mysqlintegra-dbfiller-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Teamwork&#8221; &#8211; my simple blender animation for class</title>
		<link>http://www.blog.project13.pl/index.php/null/396/teamwork-my-simple-blender-animation-for-class/</link>
		<comments>http://www.blog.project13.pl/index.php/null/396/teamwork-my-simple-blender-animation-for-class/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 01:16:13 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[study]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=396</guid>
		<description><![CDATA[It&#8217;s an increadibly tought time now at my Uni, lots and lots of exams, stuff to hand in etc&#8230; One of such things is this simple blender animation which I have created with my friend Tomek in order to pass Graphics class: Yeah it&#8217;s simple, rough anc certainly not the next Katedra&#8230; ;-) But as [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s an increadibly tought time now at my Uni, lots and lots of exams, stuff to hand in etc&#8230; One of such things is this simple blender animation which I have created with my friend Tomek in order to pass Graphics class:</p>
<p style="text-align: center;"><span class="youtube">
<object width="480" height="360">
<param name="movie" value="http://www.youtube.com/v/sGeEmUGQfo8&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&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube.com/v/sGeEmUGQfo8&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&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="360"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=sGeEmUGQfo8&fmt=18" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=sGeEmUGQfo8_fmt=18&amp;referer=');"><img src="http://img.youtube.com/vi/sGeEmUGQfo8/default.jpg" width="130" height="97" border=0></a></p></p>
<p style="text-align: left;">Yeah it&#8217;s simple, rough anc certainly not the next <a href="http://www.youtube.com/watch?v=OWJAof-O5Pc" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=OWJAof-O5Pc&amp;referer=');">Katedra</a>&#8230; ;-) But as a person that totaly sux at graphics I&#8217;m quite happy with it, take a look and let me know what you think.</p>
<p>Oh and some other animations by my classmates are avaiable on this <a href="http://www.youtube.com/view_play_list?p=F8CEBB4899FE8019" onclick="urchinTracker('/outgoing/www.youtube.com/view_play_list?p=F8CEBB4899FE8019&amp;referer=');">youtube playlist,</a> feel free to check it out -- some are really nice. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/null/396/teamwork-my-simple-blender-animation-for-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aiming Higher&#8230;</title>
		<link>http://www.blog.project13.pl/index.php/coding/363/aiming-higher/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/363/aiming-higher/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 21:54:47 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[integra]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[study]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=363</guid>
		<description><![CDATA[&#8230;is exactly what I&#8217;m currently trying to do. Thus, I&#8217;m out of Mediaframe, and got involved in a fascinating and very cool project. Under the lead of Dr Marek Długosz me and 2 of my friends will be tackling the topic of &#8220;MySQL Data Storage Engine Comprehension &#8211; with focus on Automatics use cases&#8221;. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;is exactly what I&#8217;m currently trying to do. Thus, I&#8217;m out of Mediaframe, and got involved in a fascinating and very cool project. Under the lead of Dr Marek Długosz me and 2 of my friends will be tackling the topic of <strong>&#8220;MySQL Data Storage Engine Comprehension &#8211; with focus on Automatics use cases&#8221;</strong>. It&#8217;s really interesting since MySQL is so popular, yet very little people know about the dozens of 3rd party storage engines &#8211; some of them are really interesting, just to name a few:</p>
<ul>
<li><span style="font-family: Courier,Monospaced; font-size: x-small;"><strong>TokuDB</strong> <a rel="nofollow" href="http://www.google.com/url?sa=D&amp;q=http://tokutek.com/&amp;usg=AFQjCNHysF12TbB3GldusTu-K-3nhZdweQ" onclick="urchinTracker('/outgoing/www.google.com/url?sa=D_amp_q=http_//tokutek.com/_amp_usg=AFQjCNHysF12TbB3GldusTu-K-3nhZdweQ&amp;referer=');">http://tokutek.com/</a><em></em></span></li>
<li><span style="font-family: Courier,Monospaced; font-size: x-small;"><strong>InfiniDB</strong> <a rel="nofollow" href="http://www.google.com/url?sa=D&amp;q=http://www.infinidb.org&amp;usg=AFQjCNEtOl432Euej2MhI_lbktMG0d8oVw" onclick="urchinTracker('/outgoing/www.google.com/url?sa=D_amp_q=http_//www.infinidb.org_amp_usg=AFQjCNEtOl432Euej2MhI_lbktMG0d8oVw&amp;referer=');">http://www.infinidb.org</a></span><em></em></li>
<li><span style="font-family: Courier,Monospaced; font-size: x-small;"><strong>percona</strong> </span><span style="font-family: Courier,Monospaced; font-size: x-small;"><a rel="nofollow" href="http://www.google.com/url?sa=D&amp;q=http://www.percona.com/docs/wiki/Percona-XtraDB:start&amp;usg=AFQjCNGYrLuDIAVe4j8r_CQysDAw801lOg" onclick="urchinTracker('/outgoing/www.google.com/url?sa=D_amp_q=http_//www.percona.com/docs/wiki/Percona-XtraDB_start_amp_usg=AFQjCNGYrLuDIAVe4j8r_CQysDAw801lOg&amp;referer=');">http://www.percona.com/docs/wiki/Percona-XtraDB:start</a></span><span style="font-family: Courier,Monospaced; font-size: x-small;"><em></em> </span></li>
<li><span style="font-family: Courier,Monospaced; font-size: x-small;"><strong>MariaDB</strong> <a rel="nofollow" href="http://www.google.com/url?sa=D&amp;q=http://askmonty.org/wiki/index.php/Maria&amp;usg=AFQjCNHItj3nVliSHeoWXcOGI9ODkrC7iQ" onclick="urchinTracker('/outgoing/www.google.com/url?sa=D_amp_q=http_//askmonty.org/wiki/index.php/Maria_amp_usg=AFQjCNHItj3nVliSHeoWXcOGI9ODkrC7iQ&amp;referer=');">http://askmonty.org/wiki/index.php/Maria</a> <em>(Maria, PBXT, FederatedX) </em></span></li>
<li><span style="font-family: Courier,Monospaced; font-size: x-small;"><strong>IBMDB2I </strong></span><span style="font-family: Courier,Monospaced; font-size: x-small;"><a rel="nofollow" href="http://www.google.com/url?sa=D&amp;q=http://dev.mysql.com/doc/refman/5.1/en/se-db2.html&amp;usg=AFQjCNEI0fPrDd9d5U8azYUe4o_KcsauLQ" onclick="urchinTracker('/outgoing/www.google.com/url?sa=D_amp_q=http_//dev.mysql.com/doc/refman/5.1/en/se-db2.html_amp_usg=AFQjCNEI0fPrDd9d5U8azYUe4o_KcsauLQ&amp;referer=');">http://dev.mysql.com/doc/refman/5.1/en/se-db2.html</a></span></li>
<li><span style="font-family: Courier,Monospaced; font-size: x-small;">&#8230;ane some more&#8230;?<br />
</span></li>
</ul>
<p>A simple comprehension will be the first thing we&#8217;ll do for this project&#8230; Later on we&#8217;ll do some simulated &#8220;real life&#8221; tests using <strong>JMeter</strong>. It&#8217;s possible that we&#8217;ll write some app based on this database later on &#8211; but that&#8217;s somehow far off at the moment. That said, I&#8217;m really happy to be involved in an interesting and <strong>open</strong> (it&#8217;s all open source &amp; free software after all) topic.</p>
<p>Tomorrow I&#8217;m going to the university to setup our very own (awesome ;-)) <span style="font-family: Courier,Monospaced;">HP ProLiant DL380</span> server. It has 6 hard drives, thus it should be very interesting to run HEAVY database LOAD tests &#8211; can&#8217;t wait. We&#8217;ll install CentOS 5.4 and think about it&#8217;s future then&#8230;<br />
<span style="text-align:center"><br />
<a href="/wp-content/uploads/2009/12/kretos.png"><img class="alignnone" title="server" src="/wp-content/uploads/2009/12/kretos-300x151.png" alt="server" width="300" height="151" /></a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/363/aiming-higher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I got IntelliJ IDEA for my University! :-)</title>
		<link>http://www.blog.project13.pl/index.php/fun/355/i-got-intellij-idea-my-university/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/355/i-got-intellij-idea-my-university/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 20:44:06 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[intellij]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=355</guid>
		<description><![CDATA[As any JEE interested developer I&#8217;ve heard lots of praise aimed at JetBrains IntelliJ IDEA. And then it became open source&#8230; Of course I tried it out right away and was shocked how brilliant it was. Some days ago version 9.0 was introduced &#8211; still with both an open source and an normal proprietary license. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><img class="aligncenter" title="intellij" src="http://www.jetbrains.com/img/newdesign/idea9_header.jpg" alt="" width="520" height="80" />As any JEE interested developer I&#8217;ve heard lots of praise aimed at <a href="http://http://www.jetbrains.com/idea/" target="_blank" onclick="urchinTracker('/outgoing/http_//www.jetbrains.com/idea/?referer=');">JetBrains IntelliJ IDEA</a>. And then it became open source&#8230; Of course I tried it out right away and was shocked how brilliant it was. Some days ago version 9.0 was introduced &#8211; still with both an open source and an normal proprietary license. I really love how they offer their IDE for free to open source developers &#8211; they&#8217;d get the &#8220;full&#8221; version, whereas anyone can download a little slimmed down version: the &#8220;Community Edition&#8221;.</p>
<p>Some days ago while surfing their website I noticed that there is an &#8220;Classroom License&#8221;, that allows any student of an University to use IntelliJ&#8217;s full version &#8211; but only for the purpose of learning etc, no commercial stuff of course.</p>
<p>After some mailing here and there&#8230; <a href="http://home.agh.edu.pl/~sbobek/doku.php?id=progob" target="_blank" onclick="urchinTracker('/outgoing/home.agh.edu.pl/_sbobek/doku.php?id=progob&amp;referer=');">Mgr. Szymon Bobek</a> helped me out and got the license for us :-) Now I&#8217;m both really proud and happy to know that any student at AGH University of Science and Technology can use IDEA (if they want to), and <em>that I was the little &#8220;spark&#8221; that started out this chain reaction that ended up being a small yet very pleasing &#8220;firework&#8221;&#8230;</em> :-)<em><br />
</em></p>
<p><em>Well then&#8230;<br />
Off to my exams and Java coding!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/355/i-got-intellij-idea-my-university/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaCamp #1</title>
		<link>http://www.blog.project13.pl/index.php/coding/327/javacamp-1/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/327/javacamp-1/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 18:17:53 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[agh]]></category>
		<category><![CDATA[JavaCamp]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[swing]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=327</guid>
		<description><![CDATA[Today another Java User Group Meeting (more info) was held&#8230; This time at my university (AGH &#8211; University of Science and Technology). :-) I wasn&#8217;t there from the beginning as I had some work to do, but I managed to get there after the &#8220;pizza-pause&#8221; and listen to: Miroslav Kopecky, talking about Matlab in Java [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="PJUG" src="http://www.java.pl/banner/pjug_logo.jpg" alt="" width="126" height="157" />Today another <strong>Java User Group</strong> Meeting (<a href="http://www.java.pl/?p=111" onclick="urchinTracker('/outgoing/www.java.pl/?p=111&amp;referer=');">more info</a>) was held&#8230; This time at my university (<a href="http://www.agh.edu.pl/en" onclick="urchinTracker('/outgoing/www.agh.edu.pl/en?referer=');">AGH &#8211; University of Science and Technology</a>). :-)</p>
<p>I wasn&#8217;t there from the beginning as I had some work to do, but I managed to get there after the &#8220;pizza-pause&#8221; and listen to:</p>
<ul>
<li><strong>Miroslav Kopecky</strong>, talking about <strong>Matlab in Java</strong> (in English).</li>
</ul>
<p>It was quite interesting to see how MatLab can be used in Java apps to make complex calculations really simple (well&#8230; let matlab do the for you basically). I like the idea of exporting plots from matlab directly to JavaScript, thus allowing nice WebApps with heavy math behind them (stock analysis etc.). That said, matlab is closed source as you propably know, and this makes it kinda sucky to develop J2SE apps based on it, as the enduser has to buy matlab anyways to use you program. A solution mentioned is getting 1 matlab license, put it on a server ane make your aplication a webapp &#8211; I agree that this is propably the best solution to avoid this &#8220;license hell&#8221; but it&#8217;s sad that there is no other license for endusers of procucts that use matlab as their math engine&#8230; Next up was:</p>
<ul>
<li><strong>Łukasz Czerpak</strong> with the topic: “Swingowa aplikacja rozproszona dystrybuowana poprzez Java Web Start” (technologie: EJB3/JPA, Java Web Start, OpenEJB+Tomcat+Hibernate, Swing Application Framework). <em>(whoa, that&#8217;s long)</em></li>
</ul>
<p>He talked about his real live experience with an (banking) app that they &#8220;ported&#8221; to WebStart using GlassFish and then Tomcat+OpenEJB. A nice fact that I learned from this presentation was about how easy glassfish is. &#8230;and slow and big&#8230; JARs that a user needs to download from JavaWebStart are about 41MB, that&#8217;s a lot &#8211; since the app talked about was like 300KB. Tomcat on the otherhand is both quicker and smaller &#8211; there&#8217;s a little more to configure though &#8211; but I guess thats a small price to pay. Sadly he didn&#8217;t have time to say anything about Griffon which I&#8217;m a little interested in lately. It was quite interesting though&#8230; :-)</p>
<p>All in all, I liked it and will attend the next meeting in January &#8211; hope to be there from the start and not only halfway through as today. ;-)</p>
<p><em>PS: There was a sad ending for this day for me though. As I really didn&#8217;t want to miss even more of this meeting, and so I parked my car where it&#8217;s not allowed in order to save some time. When I came back to my car after the meeting my car&#8217;s wheel was &#8220;locked&#8221; (by the police) and got a ticket for wrong parking&#8230; So the free JavaCamp didn&#8217;t end up being so free for me&#8230; ;-)<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/327/javacamp-1/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

