<?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; java</title>
	<atom:link href="http://www.blog.project13.pl/index.php/category/java-coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.project13.pl</link>
	<description>The Blog of a Coder</description>
	<lastBuildDate>Fri, 23 Jul 2010 20:34:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>GWT Firefox 3.6+ plugin on 64bit Fedora 13</title>
		<link>http://www.blog.project13.pl/index.php/coding/760/gwt-firefox-3-6-plugin-on-64bit-fedora-13/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/760/gwt-firefox-3-6-plugin-on-64bit-fedora-13/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 12:17:49 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[xsolve]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=760</guid>
		<description><![CDATA[Hi again, this time a short code snippet &#8211; but a very useful one. At work I&#8217;m working on an Ubuntu 10.4 (love you guys for getting me a PC with Linux with no problems!) my laptop is on Fedora 13 i586 and my home PC is running Fedora 13 x64. Thank goodnes they&#8217;re all [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again, this time a short code snippet &#8211; but a very useful one.</p>
<p>At work I&#8217;m working on an Ubuntu 10.4 (<em>love you guys for getting me a PC with Linux with no problems!</em>) my laptop is on Fedora 13 i586 and my home PC is running <strong>Fedora 13 x64</strong>. Thank goodnes they&#8217;re all linux&#8230; ;-) The problem <span style="text-decoration: line-through;">is</span> was that the <strong>Google Web Toolkit</strong> plugin isn&#8217;t working with Firefox 3.6.4 on an x64 system on linux! So&#8230; can&#8217;t I develop GWT stuff on my super powerful home PC? Of course I can, the only thing I needed to do, is to get the latest sources for the plugin and <strong>compile it for myself</strong> ;-) Here&#8217;s how:</p>
<div class="geshi no bash">
<div class="head">mkdir gwt-source</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> gwt-<span class="kw3">source</span></div>
</li>
<li class="li1">
<div class="de1">svn checkout http:<span class="sy0">//</span>google-web-toolkit.googlecode.com<span class="sy0">/</span>svn<span class="sy0">/</span>trunk<span class="sy0">/</span> trunk</div>
</li>
<li class="li1">
<div class="de1">svn checkout http:<span class="sy0">//</span>google-web-toolkit.googlecode.com<span class="sy0">/</span>svn<span class="sy0">/</span>plugin-sdks<span class="sy0">/</span> plugin-sdks</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> trunk<span class="sy0">/</span>plugins<span class="sy0">/</span>xpcom</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">export</span> <span class="re2">BROWSER=</span>ff36</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">export</span> <span class="re2">DEFAULT_FIREFOX_LIBS=</span><span class="sy0">/</span>usr<span class="sy0">/</span>lib<span class="sy0">/</span>xulrunner-devel<span class="nu0">-1.9</span><span class="nu0">.2</span><span class="sy0">/</span>sdk<span class="sy0">/</span>lib<span class="sy0">/</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">make</span> clean</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">make</span></div>
</li>
<li class="li1">
<div class="de1">firefox prebuilt<span class="sy0">/</span>gwt-dev-plugin.xpi</div>
</li>
</ol>
</div>
<p>And we&#8217;re done &#8212; off to GWT development!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/760/gwt-firefox-3-6-plugin-on-64bit-fedora-13/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Git @ &#8220;Fridays at XSolve&#8221;</title>
		<link>http://www.blog.project13.pl/index.php/fun/758/git-fridays-at-xsolve/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/758/git-fridays-at-xsolve/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 11:59:56 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[xsolve]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=758</guid>
		<description><![CDATA[I&#8217;m curently doing an internship (It&#8217;s called: &#8220;Poławiamy perły, szlifujemy diamenty&#8221; == &#8220;Pooling pearls, polishing diamonds&#8221; &#8212; very cool :-)) at XSolve &#8211; we&#8217;re doing some GWT coding and I really like it. The team is great and everyone is really helpful and fun to talk to &#8212; the company&#8217;s &#8220;look and feel&#8221; reminds me [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m curently doing an internship (It&#8217;s called: &#8220;<em><a href="http://praktyki-staze.xsolve.pl/" onclick="urchinTracker('/outgoing/praktyki-staze.xsolve.pl/?referer=');">Poławiamy perły, szlifujemy diamenty</a></em>&#8221; == &#8220;<em>Pooling pearls, polishing diamonds</em>&#8221; &#8212; very cool :-)) at <a href="http://xsolve.pl" onclick="urchinTracker('/outgoing/xsolve.pl?referer=');"><strong>XSolve</strong></a> &#8211; we&#8217;re doing some<em> GWT coding and I really like it</em>. The team is great and everyone is really helpful and fun to talk to &#8212; the company&#8217;s &#8220;look and feel&#8221; reminds me very much of Google by the way&#8230; It&#8217;s very friendly, everyone is calling others by their names and we often play together after some chunk of work. We&#8217;ve even stayed until 20:00 one time, while mounting some servers and having fun in the process &#8211; I actually didn&#8217;t mind staying so long thanks to this&#8230; :-)</p>
<p>Having that said&#8230; there is one thing I don&#8217;t like there&#8230; it&#8217;s SVN ;-) Of course I knew that I can&#8217;t be running from SVN all my life and that I&#8217;d end up using it someday in some company&#8230; As some may know, I&#8217;m a big Git (or mercurial) fan, thus &#8211; I kinda see what SVN is doring wrong. At XSolve we have this weekly-event called <strong>&#8220;Fridays at XSolve&#8221;</strong>, where one can present in a short 30min session, something he&#8217;s been interested in lately etc. It&#8217;s a really cool idea, that allows ideas do spread throughout the company &#8211; the <strong>HR</strong> team seems to really care to keep this atmosthere in the company&#8230; :-) This Friday I was given the honour and joy to be presenting Git &#8211; as we&#8217;ve been talking about it a few times during my first week here. Below is the presentation I&#8217;ve used:</p>
<div id="__ss_4721725" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Dlaczego Git to nie SVN?" href="http://www.slideshare.net/ktoso/dlaczego-git-to-nie-svn" onclick="urchinTracker('/outgoing/www.slideshare.net/ktoso/dlaczego-git-to-nie-svn?referer=');">Dlaczego Git to nie SVN?</a></strong><object id="__sse4721725" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=git4xsolve-100709124340-phpapp01&amp;rel=0&amp;stripped_title=dlaczego-git-to-nie-svn" /><param name="name" value="__sse4721725" /><param name="allowfullscreen" value="true" /><embed id="__sse4721725" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=git4xsolve-100709124340-phpapp01&amp;rel=0&amp;stripped_title=dlaczego-git-to-nie-svn" name="__sse4721725" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<p>You can download <a href="http://www.slideshare.net/ktoso/dlaczego-git-to-nie-svn/download" onclick="urchinTracker('/outgoing/www.slideshare.net/ktoso/dlaczego-git-to-nie-svn/download?referer=');">the presentation</a> or the <a href="up.project13.pl/files/git4xsolve.tex">sources for the presentation here</a> as they are also a simple (I&#8217;ve made one about <a href="http://www.slideshare.net/ktoso/guava" onclick="urchinTracker('/outgoing/www.slideshare.net/ktoso/guava?referer=');">Guava</a> that&#8217;s a little more interesting from the TeX viewpoint) example of the <a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBgQFjAA&amp;url=http%3A%2F%2Flatex-beamer.sourceforge.net%2F&amp;ei=Il04TNvQHNCVOOHVqYoK&amp;usg=AFQjCNGjVsJ5vBpYgmyyLJOFdVxBLBetPw&amp;sig2=qf-pljl_hjhbfJIPau0R5g" onclick="urchinTracker('/outgoing/www.google.com/url?sa=t_amp_source=web_amp_cd=1_amp_ved=0CBgQFjAA_amp_url=http_3A_2F_2Flatex-beamer.sourceforge.net_2F_amp_ei=Il04TNvQHNCVOOHVqYoK_amp_usg=AFQjCNGjVsJ5vBpYgmyyLJOFdVxBLBetPw_amp_sig2=qf-pljl_hjhbfJIPau0R5g&amp;referer=');">LaTeX beamer</a> &#8211; which apparently is also an favourite tool of some team members&#8230; :-) I&#8217;ve also talked a moment after the event with an v. good (so it seems) developer who knew really a lot about many different SCMs &#8211; we mentioned &#8220;<strong>cherry picking</strong>&#8221; which is really interesting but I don&#8217;t know much about it yet. If you don&#8217;t know much about Git &#8211; take a look at the above presentation, or better, start out your new (better) life with git by visiting these links:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=4XpnKHJAok8" target="_blank" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=4XpnKHJAok8&amp;referer=');">http://www.youtube.com/watch?v=4XpnKHJAok8</a> Linusa Torvalds on Git vs CVS/SVN</li>
<li><a href="http://whygitisbetterthanx.com/" target="_blank" onclick="urchinTracker('/outgoing/whygitisbetterthanx.com/?referer=');">http://whygitisbetterthanx.com</a> &#8211; why git is better than any other SCM ;-) A biased site obviously ;-)</li>
<li><a href="http://git.or.cz/course/svn.html" target="_blank" onclick="urchinTracker('/outgoing/git.or.cz/course/svn.html?referer=');">http://git.or.cz/course/svn.html</a> &#8211; side-by-side with SVN</li>
<li><a href="http://git-scm.com/" target="_blank" onclick="urchinTracker('/outgoing/git-scm.com/?referer=');">http://git-scm.com</a> &#8211; Git homepage</li>
</ul>
<p>The presentation worked quite well I guess &#8211; some team members who knew about Git/SVN/Mecurial/Bzr etc, where adding their bits of knowledge which really made the presentation a lot more than just a bunch of boring slides&#8230; ;-) All in all it was all of those: fun, interesting and yet another occasion for me to train presenting stuff (I&#8217;m still bad at it, but well&#8230; life is study, right? :-)) I&#8217;m really happy to have the opportunity to be working in such a environment &#8211; I&#8217;ll post whatever is inseresting on this blog (if I have the time to do so :&lt;), so keep an eye ot for some Java/GWT posts&#8230; :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/758/git-fridays-at-xsolve/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ip2cntry &#8211; ex-appengine app (mainly JAX-RS)</title>
		<link>http://www.blog.project13.pl/index.php/coding/727/ip2cntry-ex-appengine-app-mainly-jax-rs/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/727/ip2cntry-ex-appengine-app-mainly-jax-rs/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 15:13:04 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[webdeveloper]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=727</guid>
		<description><![CDATA[I&#8217;ve been coding an simple RESTful &#8220;ip to country&#8221; conversion service. I&#8217;ve decided to put it up to appengine &#8211; so that everybody may use it freely even if I&#8217;d change my server etc&#8230; And if looked quite nice the first day &#8211; buw when I got to do some &#8220;real stuff&#8221; app engine started [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;"><img title="appengine and duke" src="http://api.ning.com/files/mDJ*r0VXJVM5*LNj5uct5fwBIDcQH99SKTN-zzCVyDf306EuzF6lbwkJW6cGVJOUNtAen43aPLTd9HtdVcYgFuxB-d8SufPD/dukeongae.jpg" alt="" width="151" height="138" /></div>
<p>I&#8217;ve been coding an simple RESTful &#8220;ip to country&#8221; conversion service. I&#8217;ve decided to put it up to appengine &#8211; so that everybody may use it freely even if I&#8217;d change my server etc&#8230; And if looked quite nice the first day &#8211; buw when I got to do some &#8220;real stuff&#8221; app engine started to get in my way, here&#8217;s a quick rundown of the problems I&#8217;ve found with appengine:</p>
<ol>
<li>I need to download and update the ip&lt;-&gt;country database every few days. I&#8217;d use an <strong>GZIPInputStream</strong> and <strong>BufferedReader</strong> to get the file I was interested in and update the database. Did appengine allow me to use such an simple aparoach?
<ol>
<li><strong style="color: #03c300;">pro:</strong> appengine provides a very nice cron-like mechanism. So I just had to create an <strong>cron.xml in WEB-INF</strong> and this part was ready to go! This was in fact easier and more fun than in classic <strong>Spring + Open Symphony Quartz</strong>.</li>
<li><strong style="color: #cb0007;">con:</strong>I checked if this tactic was OK with the JRE whilelist and checked the Quotas &#8211; <a href="http://code.google.com/appengine/docs/quotas.html#UrlFetch" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/quotas.html_UrlFetch?referer=');">http://code.google.com/appengine/docs/quotas.html#UrlFetch</a>, &#8220;seems ok&#8221; &#8211; I thought &#8211; &#8220;nothing about per connection limits, only daily quotas.&#8221;. After writing the code, I discovered that even though on the main quota page there was no word about per connection limits, in fact there are such quotas, but a little more hidden: <a href="http://code.google.com/appengine/docs/java/urlfetch/overview.html" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/java/urlfetch/overview.html?referer=');">http://code.google.com/appengine/docs/java/urlfetch/overview.html</a> Max request/response sizes are capped at exactly 1MB.<br />
As my gzipped file is around 1.1MB,<strong> appengine killed my simple idea&#8230;</strong> I&#8217;d have to split the file into separate ones &#8211; on another server, and then fetch the separated files onto appengine.</li>
<li><strong style="color: #cb0007;">con:</strong>The<strong> </strong>mentione CRON mechanism is quite funny. You don&#8217;t call<strong> methods </strong>but URLs &#8211; and they are normally called as if one would launch them from the browser &#8211; thus, traffic and &#8220;max time&#8221; quotas do count there as well. So rather than calling an method, as you&#8217;d do with OpenSymphony &#8211; you create an Servlet that does all the work. This may me both good, and bad&#8230; You cound do all the CRON stuff by hand if it got out of sync etc&#8230; I didn&#8217;t really like it, and as mentioned&#8230; <strong>When doing my &#8220;big batch database update&#8221; the servlet would simply timeout&#8230;</strong></li>
</ol>
</li>
<li>Let&#8217;s talk about the <strong>dataStore</strong>. As you all probably know&#8230; AppEngine does not provide and &#8220;database&#8221; per se. It&#8217;s not relational and has quite some limitations. BUT!<strong> That&#8217;s quite ok, as it&#8217;s very quick and very very scalable!</strong> And most of the time&#8230; Do you really need all those fancy relations? ;-) It was an ideal place to hold my super simple data: &#8220;ip region = country&#8221; mapping in a persistent way. &#8220;Another nice thing on appengine for this application I&#8217;m going to write.&#8221; &#8211; I thought. Was I right?
<ol>
<li><strong style="color: #03c300;">pro/con:</strong> Not really&#8230; I used JPA but JDO (which is prefered by appengine from what I&#8217;ve seen) also works nice on GAE. The setup did run quite ok while I was running tests on my local machine. Deployment is also an breeze and <strong>I didn&#8217;t have to use any complicated dependencies to get it running &#8211; &#8220;yay, no maven!&#8221;. </strong>You just have to enchance the classes you want to make persistent (just as hibernate does).</li>
<li><strong style="color: #cb0007;">con:</strong>The problems started when I wanted to <strong>clear my datastore.</strong> Nothing easier than that, right&#8230;? &#8220;delete from BlaBla&#8221; and we&#8217;re done. Yeah, but not on GAE. As even the &#8220;max rows a query touches&#8221; are limited &#8211; to 500. So there I am, with my 100.000 rows, and I have to delete them in 500 rows per query&#8230; Of course I can&#8217;t call this in an loop &#8211; as  the timeout quota would get in my way and kill the app.From what I&#8217;ve seen, people do solve this using a CRON task that calls this &#8220;clearDatabase&#8221; servlet until it&#8217;s  done &#8211; ugh, not a nice solution but I can&#8217;t think of any other solution :\</li>
<li><strong style="color: #cb0007;">con:</strong>The only query I need to do in this app is basically:
<pre>SELECT range FROM RemoteIpData as range
             WHERE range.ipFrom &lt;= ?1
               AND range.ipTo &gt;= ?2
<em>#and this would always return 1 entry!</em>
</pre>
<p>And guess what&#8230; <strong>AppEngine does not support multiple &#8220;less/more than&#8221; operands in one query!</strong> If you think hard about what BigTable is, it does make some sense. More information about &#8220;<strong>GQL</strong>&#8221; can be found here: <a href="http://code.google.com/appengine/docs/python/datastore/gqlreference.html" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/python/datastore/gqlreference.html?referer=');">http://code.google.com/appengine/docs/python/datastore/gqlreference.html</a> All the <a href="http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html" onclick="urchinTracker('/outgoing/code.google.com/appengine/docs/java/datastore/queriesandindexes.html?referer=');">restrictions about the Queries you can do are documented here</a> &#8211; some are really counter intuitive when you come from an RDBMS enviroment&#8230; Ah well ;-) Oh, and yet another <a href="http://blog.newsplore.com/2009/06/06/reviewing-google-appengine-for-java-part-2" onclick="urchinTracker('/outgoing/blog.newsplore.com/2009/06/06/reviewing-google-appengine-for-java-part-2?referer=');">great link about GAE limitations</a>.</p>
<p>Having this limitation, really sucks for my normally &#8220;super simple query&#8221;, and I&#8217;d have to change the data structure somehow or do some awful 2 queries and then combine them in Java (omg teh terrorr&#8230; :&lt;). So, while developing on appengine, keep in ming &#8211; simple things might turn out quite complicated due to the nature of BigTable. If you know all the limitations when designing the system and not while finishing it, you&#8217;ll be a happier man&#8230; ;-)</li>
<li><strong>neutral</strong>: Primary keys can&#8217;t be Integers etc, as AppEngine uses it&#8217;s own &#8220;Key&#8221; type. :-)</li>
</ol>
</li>
<li>Having that all said. Appengine&#8217;s administration panel is quite ok. And the not-so-newly-added log search etc are really fine tools. Something an plain old tomcat can not offer. On the other hand, the limitations can really be a deal breaker! My app was really fairly simple, and yet appengines quotas managed to really get in my way. Keep this in mind while thinking about using it. You may also try Amazon&#8217;s cloud or CloudForce from SalesForce etc&#8230; They all do offer a quite less restrictive enviroment.</li>
<li>If you&#8217;re interested, deployment does take about 5-7 minutes before the new version is visible on the web &#8211; so don&#8217;t panic if you&#8217;re still seeing the old version after deploying the new one.</li>
<li>My opinion about GAE&#8230;? <span style="text-size: xx-small;">(semi serious ;-))</span></li>
</ol>
<blockquote><p><em><strong>&#8220;Screw you clouds, I&#8217;m going /home!&#8221;</strong></em><br />
<span style="text-size: xx-small;">(<a href="http://www.youtube.com/watch?v=7oH5Qc2zTrs&amp;feature=related" onclick="urchinTracker('/outgoing/www.youtube.com/watch?v=7oH5Qc2zTrs_amp_feature=related&amp;referer=');">intended southpark pun</a>)</span><em><strong><br />
</strong></em></p></blockquote>
<p>I&#8217;ll finish this project using my ol&#8217; pal, <strong>Tomcat6</strong> which I&#8217;ve already got running for <a href="http://netbeans.edu.pl" onclick="urchinTracker('/outgoing/netbeans.edu.pl?referer=');">netbeans.edu.pl</a> (but that was an grails app).</p>
<p>I&#8217;ve also decided to use Spring, which I didn&#8217;t really need on appengine &#8211; as the only thing I was doing was so small that all the logic was around 10 lines in the servlets&#8230; But if using hibernate and all the other &#8220;real&#8221; JEE stuff, I felt I&#8217;d need to &#8220;do this right&#8221; so I&#8217;ve decided for Spring 3 and Maven2&#8230; I&#8217;ll try to build this project from gradle soon too!</p>
<p>ALSO! If interested in an more experienced programmers view on appengine (I&#8217;m still a novice), go and read <a href="http://art-of-software.blogspot.com/2010/04/goole-application-engine.html" onclick="urchinTracker('/outgoing/art-of-software.blogspot.com/2010/04/goole-application-engine.html?referer=');">this blog post about GAE on Sławek Sobótkas blog.</a> All in all we seem to agree that the limitations can be an pain in the a&#8230; ;-)</p>
<p>The source for the appengine version is on my github account. I&#8217;m porting it to an plain old tomcat environment and will post this version there too when it&#8217;s ready to run (<strong>tomcat deployment </strong>is somehow hell with such apps for me&#8230; Any tips are really welcome :-))</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/727/ip2cntry-ex-appengine-app-mainly-jax-rs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaCamp #4</title>
		<link>http://www.blog.project13.pl/index.php/coding/700/review-javacamp-4/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/700/review-javacamp-4/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 20:21:36 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[akka]]></category>
		<category><![CDATA[camp]]></category>
		<category><![CDATA[JavaCamp]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[parallelism]]></category>
		<category><![CDATA[pjug]]></category>
		<category><![CDATA[polishjug]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=700</guid>
		<description><![CDATA[Yup, last Saturday we&#8217;ve had yet another JavaCamp in Cracow. It was in my opinion the best yet &#8211; mostly due to our awesome speakers. One could call this &#8220;JavaCamp&#8221; an &#8220;ScalaCamp&#8221; if you think about it &#8211; as most of the topics (3/4) where mostly about scala (AKKA is avaiable as both Java and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-536" title="pjug_logo" src="http://www.blog.project13.pl/wp-content/uploads/2010/04/pjug_logo.jpg" alt="Polish Java User Group" width="126" height="157" />Yup, last Saturday we&#8217;ve had yet another JavaCamp in Cracow. It was in my opinion the best yet &#8211; mostly due to our awesome speakers. One could call this &#8220;JavaCamp&#8221; an &#8220;ScalaCamp&#8221; if you think about it &#8211; as most of the topics (3/4) where mostly about scala (AKKA is avaiable as both Java and Scala API, but the Scala API is a little &#8220;cleaner&#8221; &#8211; well, as everything written in Scala I guess :-))</p>
<h2><strong>Łukasz Kuczera</strong> &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Scala the next Java?</a></h2>
<h2><a href="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0059.jpg"><img class="alignright size-thumbnail wp-image-706" title="javacamp#4" src="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0059-150x150.jpg" alt="" width="150" height="150" /></a></h2>
<p>Łukasz&#8217;s presentation really did fit the topic and did a really good job in setting the &#8220;mood and feel&#8221; for the rest of the day. People who didn&#8217;t know any scala before &#8211; now did know it enough to understand all the code Jonas displayed later, and people who&#8217;ve known some scala before &#8211; might have got some nice information from this. I really liked it and am now more tha ever convinced of scala&#8217;s &#8220;perfect fit&#8221; nature in the JVM lanugages team. As I was sitting with my friend <a href="http://temporal.pr0.pl/devblog/" onclick="urchinTracker('/outgoing/temporal.pr0.pl/devblog/?referer=');">Temporal</a> &#8211; who&#8217;s a <strong>real Erlang and Lisp hacker ;-) -</strong> I&#8217;ve got some interesting insights about what scala took from Lisp and later on, what Akka took from Lisp and Erlang. A very good presentation in my opinion. :-)</p>
<h2><strong>Jonas Bonér</strong> (<a href="http://jonasboner.com/" onclick="urchinTracker('/outgoing/jonasboner.com/?referer=');">private site</a>) &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Akka: Simpler Scalability,  Fault-Tolerance, Concurrency &amp; Remoting through Actors</a></h2>
<p>A very very awesome speech and topic. Akka seems to do Actors and Parallelism very well. Also, thanks to my lisp/erlang friend, I&#8217;ve had some amazing insights about where Jonas got some of the implementation ideas. Also, we&#8217;d both like to note that some things are done even cleaner in  Akka than in Erlang: in erlang you&#8217;d pass an actors PID around in order  to &#8220;link&#8221; with another, and the links are always bidirectional. The actor pattern really powerful and scalable from what I&#8217;ve seen. It&#8217;s also implemented by Vaclav Pech in his GPars library (&#8220;Groovy Parallelism&#8221;).</p>
<p>This should have been just another presentation in a series of them as Jonas already had presented it on both Scala Days 2010 and GeeCON2010. But! As the present programmers really where into this topic we&#8217;ve had a lot of pauses with some chit-chat. A very valuable thing for both akka and our community :-) Too bad that Jonas didn&#8217;t have the time to go more into STM, as I still  dont really know what it essetialy is &#8220;in practice&#8221;. Later we got a glimpse of Agents and what they could be useful for. All in all&#8230; go checkout the movie &#8211; it&#8217;s worth your time if you don&#8217;t know about parallelism and akka (I guarantee it ;-)): <a href="http://pjug.project13.pl/dl.php?f=jc4-1-scala-min.mp4" onclick="urchinTracker('/outgoing/pjug.project13.pl/dl.php?f=jc4-1-scala-min.mp4&amp;referer=');">jc4-1-scala-min.mp4</a></p>
<p>Jonas covered and built upon the previous presentation, and we got to see some more scala in action &#8211; feels really natural. <strong>The transition from Java-&gt;Scala seems to be as painless as the transition from Java-&gt;Groovy. </strong>That&#8217;s a really nice thing I guess. <strong>There&#8217;s also an Java API</strong> for most the things in AKKA &#8211; so if you don&#8217;t want to adopt Scala in your project &#8211; no problems here. If you&#8217;d like to read more about AKKA, just goto their website at: <a href="http://akkasource.org/" onclick="urchinTracker('/outgoing/akkasource.org/?referer=');">http://akkasource.org/</a> &#8211; and <strong>yes, it&#8217;s open source</strong>. :-)</p>
<p>Oh, and if you&#8217;d like to see the slides Jonas used: they&#8217;re online on his slideshare: <a href="http://www.slideshare.net/jboner/akka-scala-days-2010" onclick="urchinTracker('/outgoing/www.slideshare.net/jboner/akka-scala-days-2010?referer=');">http://www.slideshare.net/jboner/akka-scala-days-2010</a><br />
Also feel free to read this very in-depth post on his blog: <a href="http://jonasboner.com/2010/01/04/introducing-akka.html" onclick="urchinTracker('/outgoing/jonasboner.com/2010/01/04/introducing-akka.html?referer=');">Introducing Akka – Simpler Scalability, Fault-Tolerance, Concurrency &amp; Remoting through Actors</a></p>
<h2>Pizza</h2>
<p>In the break we had some chats about the usual stuff &#8211; programming, companies, and of course a little something about the gaming industry ;-) The pizza was quite tasty &#8211; as always &#8211; so let&#8217;s move on to the next presentation ;-)</p>
<h2><strong>Bartosz Kowalewski</strong> &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Is OSGi ready for enterprise use?</a></h2>
<p>Yet another go with &#8220;grasping wtf OSGi is and WTF would I use it?!&#8221;. This topic was kinda new to Temporal, as he&#8217;s not into JEE Java, where OSGi now seems to be &#8220;trendy&#8221;. So after a short intro into maven/dependency stuff from me we focused on Bartosz&#8217;s presentation. I was <strong>immensly happy</strong> to see that his thoughts and presentation focused on <em>&#8220;what OSGi should solve, and why it sometimes does NOT&#8221;</em>. His code examples really cleared up what the problem is, and displayed why OSGi is sometimes a much harder to force to work properly than we&#8217;d think it should.</p>
<p>All in all, he described it as an amazing technology to play with, but if one would to use it IRL, with real deadlines etc &#8211; one should better know what he&#8217;s getting into, as OSGi does solve some things, but in exchange it introduces a lot of more compicated problems. The presentation was really good &#8211; as it focused, and really showed how/why OSGi should be awesome, and why sometimes it&#8217;s not &#8211; most of the time with needless <strong>complexity (!)</strong>.</p>
<p><strong>UPDATE: </strong>If your interested in the examples Bartosz has shown during his presentation &#8211; download this <a href="http://pjug.project13.pl/dl.php?f=jc4-3-osgi-pl-slides-sources.zip" onclick="urchinTracker('/outgoing/pjug.project13.pl/dl.php?f=jc4-3-osgi-pl-slides-sources.zip&amp;referer=');">this zip file</a> that he has made available. It includes the <strong>presentation</strong>, as well as the <strong>sources</strong> he used (plus the maven artifacts needed to run the app). Don&#8217;t worry if some tests fail &#8211; they&#8217;re designed to&#8230; :-)</p>
<h2><strong>Łukasz Kuczera</strong> &#8211; <a href="http://www.java.pl/?page_id=146" onclick="urchinTracker('/outgoing/www.java.pl/?page_id=146&amp;referer=');">Lift &#8211; simply functional web  framework</a></h2>
<p>The last presentation was again Łukasz, continuing in the spirit of this &#8220;Scala-flavoured-JavaCamp&#8221;, with Lift, an web framework with quite some nice contepts &#8211; as view first etc. As it was more of a code-trip, showing the basics of lift, there&#8217;s not much to comment on here.</p>
<p><strong>I was kind of disappointed with Lift. </strong>It really didn&#8217;t seem to be as powerful or mature as Grails of Symfony for example. The &#8220;view first&#8221; pattern is of course nice and quite well &#8220;forced&#8221;, but it didn&#8217;t strike me to be any different than just<strong> Django templates.</strong> The <strong>CRUD also does not impress someone who&#8217;s been using Rail-ish stuff for quite some time.</strong> There was not much said about the ORM, but <strong>I feel quite comfortable with GORM</strong> and the <strong>routing system is waaaay overgrown</strong> &#8211; just look at symfony/grails/rails routing files &#8211; they&#8217;re short and easy &#8211; what I&#8217;ve seen in Lift does not seem to be short &#8211; it&#8217;s quite long and with lots of empty [] etc&#8230; I may come back and take a look at lift when I have the time, but it really didn&#8217;t impress.</p>
<h2>Videos and sources from the meeting</h2>
<p><a href="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0060.jpg"><img class="alignright size-thumbnail wp-image-707" title="java camp 4 location" src="http://www.blog.project13.pl/wp-content/uploads/2010/06/IMAG0060-150x150.jpg" alt="" width="150" height="150" /></a>The 4th edition for our JavaCamp was truly amazing in my opinion, and this time, we&#8217;ve even got an amazing place, sponsors and great speakers. Have a nice holiday all! And if you didn&#8217;t manage to be there live, you can always go to the page bellow and watch the video&#8217;s I&#8217;ve recorded from the meeting :-)</p>
<p><strong>All videos are temporarily available on my server &#8211; here: <a href="http://pjug.project13.pl/" onclick="urchinTracker('/outgoing/pjug.project13.pl/?referer=');">http://pjug.project13.pl/</a></strong><br />
I&#8217;m hoping to get them up on the java.pl server soon, or better, on  parleys.com  &#8211; but we&#8217;ll see about that. :-)</p>
<p>PS: The next camp, won&#8217;t be organized so soon &#8211; but from what we&#8217;ve planed, we&#8217;ll be goring into some <span style="font-weight: bold;">groovy</span> topics most probably&#8230; But don&#8217;t take my word for it ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/700/review-javacamp-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Grails way #0: Simple Twitter TagLib</title>
		<link>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/#comments</comments>
		<pubDate>Tue, 25 May 2010 14:33:11 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=664</guid>
		<description><![CDATA[Let&#8217;s skip the introduction of taglibs, (since anyone knows what they are), and get to the code really quickly! If you&#8217;ve seen netbeans.edu.pl you probably noticed the twitter part on the right. As twitter&#8217;s API is really simple to use, one could implement this on ones own, but why do so if we&#8217;re in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/twitternbexample.png"><img class="alignleft size-medium wp-image-679" title="twitternbexample" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/twitternbexample-99x300.png" alt="" width="99" height="300" /></a>Let&#8217;s skip the introduction of taglibs, (since anyone knows what they are), and get to the code really quickly! If you&#8217;ve seen netbeans.edu.pl you probably noticed the twitter part on the right. As twitter&#8217;s API is really simple to use, one could implement this on ones own, but why do so if we&#8217;re in the Grails -&gt; Groovy -&gt; Java world, where there are amazing libraries for most things.</p>
<p>I used 2 libs to create this tag:</p>
<ul>
<li><a href="http://twitter4j.org/en/index.jsp" onclick="urchinTracker('/outgoing/twitter4j.org/en/index.jsp?referer=');">twitter4j</a> &#8211; a very good  twitter client library (java, even works on android)</li>
<li><a href="http://github.com/mzsanford/twitter-text-java" onclick="urchinTracker('/outgoing/github.com/mzsanford/twitter-text-java?referer=');">twitter-text-java</a> &#8211; the official library for parsing plaintext to produce valid @ and # links, more information about it can be found on github or <a href="http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html" onclick="urchinTracker('/outgoing/engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html?referer=');">http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html</a></li>
</ul>
<p>Anyways, first the source of the actuall taglib. We simply call the methods, get the response fill out the content of the tag with the variables we got:</p>
<div class="geshi no groovy">
<div class="head">package pl.project13</div>
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import com.twitter.Autolink</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import twitter4j.*</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">class</span> TweetsTagLib <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">static</span> namespace <span class="sy0">=</span> <span class="st0">&#39;tweets&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp;* Performs an twitter search and displays the result as an</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">def</span> fromSearch <span class="sy0">=</span> <span class="br0">&#123;</span>attrs, body -<span class="sy0">&amp;</span>gt<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Twitter twitter <span class="sy0">=</span> <span class="kw2">new</span> TwitterFactory<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getInstance</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Query query <span class="sy0">=</span> <span class="kw2">new</span> Query<span class="br0">&#40;</span>attrs.<span class="me1">query</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; QueryResult result <span class="sy0">=</span> twitter.<span class="me1">search</span><span class="br0">&#40;</span>query<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">def</span> tweetz <span class="sy0">=</span> result.<span class="me1">tweets</span>.<span class="me1">subList</span><span class="br0">&#40;</span><span class="nu0">0</span>, <span class="kw3">Integer</span>.<span class="me1">parseInt</span><span class="br0">&#40;</span>attrs.<span class="kw5">count</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; tweetz.<span class="kw5">each</span> <span class="br0">&#123;</span>Tweet tweet -<span class="sy0">&amp;</span>gt<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; Autolink parser <span class="sy0">=</span> <span class="kw2">new</span> Autolink<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; tweet.<span class="me1">text</span> <span class="sy0">=</span> parser.<span class="me1">autoLink</span><span class="br0">&#40;</span>tweet.<span class="me1">text</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; pageScope.<span class="me1">tweet</span> <span class="sy0">=</span> tweet</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; out <span class="sy0">&amp;</span>lt<span class="sy0">;</span> <span class="sy0">&amp;</span>lt<span class="sy0">;</span> body<span class="br0">&#40;</span>tweet<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="co1">//some other stuff&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Super easy, ain&#8217;t it? More stuff <a href="http://www.grails.org/doc/1.3.x/guide/single.html#6.3%20Tag%20Libraries" onclick="urchinTracker('/outgoing/www.grails.org/doc/1.3.x/guide/single.html_6.3_20Tag_20Libraries?referer=');">about taglibs in grails can be found here</a>. Now let&#8217;s go over to our view and see how to use this taglib &#8211; it&#8217;s (once again) amazingly simple:</p>
<div class="geshi no plain">
<ol>
<li class="li1">
<div class="de1">&lt;g :set var=&quot;query&quot; value=&quot;netbeans&quot;/&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;h3&gt;Twitter #${query}&lt;/h3&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;div id=&quot;twitter&quot; class=&quot;menubox&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;ul&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;tweets :fromSearch query=&quot;#${query}&quot; count=&quot;8&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &lt;li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;http://www.twitter.com/${it.fromUser}&quot; target=&quot;_blank&quot; class=&quot;twitter-author&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;img src=&quot;${it.profileImageUrl}&quot; alt=&quot;${it.fromUser}&quot; title=&quot;${it.fromUser}&quot; style=&quot;float:left; padding:2px; width:25px; height:25px&quot;/&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; %{&#8211;${it.fromUser}:&#8211;}%
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; ${it.text}&lt;br /&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;span style=&quot;font-size:0.75em&quot; class=&quot;twitter-date&quot;&gt;${it.createdAt}&lt;/span&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/tweets&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;/ul&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &amp;#187;&amp;nbsp;&lt;a href=&quot;http://twitter.com/#search?q=${query}&quot; target=&quot;_blank&quot;&gt;więcej&lt;/a&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/div&gt;</div>
</li>
</ol>
</div>
<p>All we need to do here, is set an variable thanks to some nice GSP tag, and then use it to query and echo our data the taglib is supplying us with. Note that the <strong>tweets:fromSearch</strong> acts like an foreach &#8211; no need for any extra loops here :-) That&#8217;s just a very simple tag but it&#8217;s quite nice to use, hope you enjoied it and will be more than happy to see the sources of netbeans.edu.pl published on github soon&#8230; :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</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[Project13]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></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>Don&#8217;t use += loops on Strings for duke&#8217;s sake&#8230;!</title>
		<link>http://www.blog.project13.pl/index.php/coding/593/dont-use-loops-on-strings-for-christs-sake/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/593/dont-use-loops-on-strings-for-christs-sake/#comments</comments>
		<pubDate>Tue, 04 May 2010 19:34:32 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[polish]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=593</guid>
		<description><![CDATA[It&#8217;s always kinda shocking to see that such easy tasks, and what I&#8217;ve always thought to be &#8220;common knowledge&#8220;, are not that common among some students&#8230; One such thing is always using the += on strings in Java&#8230; C&#8217;mon, everybody knows that + and += are horribly slow. Yeah, I know that when used outside [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always kinda shocking to see that such easy tasks, and what I&#8217;ve always thought to be &#8220;<strong>common knowledge</strong>&#8220;, are not that common among some students&#8230; One such thing is always using the += on strings in Java&#8230; C&#8217;mon, everybody knows that + and += are horribly slow. Yeah, I know that when used <strong>outside of loops</strong>, the javac compiler is able to optimize it, but most of the time I see people using it inside loops, to print some collection etc. And then they come to me complaining about &#8220;how slow java is&#8221;. <em><strong>Oh the horror, the madness&#8230;</strong></em></p>
<p>Anyway, this post will illustrate, very painfully, how much slower += is&#8230; Let&#8217;s do some (idiotic, yet good enough for this case) tests. First, the version everybody who _knows_ java uses:</p>
<div class="geshi no java">
<div class="head">public static void main(String []params){</div>
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; StringBuilder s = <span class="kw2">new</span> StringBuilder<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="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> i=<span class="nu0">0</span><span class="sy0">;</span> i<span class="sy0">&amp;</span>lt<span class="sy0">;</span><span class="nu0">99999</span><span class="sy0">;</span> i++<span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; s.<span class="me1">append</span><span class="br0">&#40;</span>i<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; <span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Let&#8217;s run it&#8230;</p>
<pre>[ktoso@homunculus ~]$ time `java BuilderTest`

<strong>real    0m0.209s</strong>
user    0m0.137s
sys     0m0.039s</pre>
<p>Hmm&#8230; Quite all right I guess&#8230; And now back to the monstrous version some of my colleges keep writing:</p>
<div class="geshi no java">
<div class="head">public static void main(String[] params){</div>
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw3">String</span> s = <span class="kw2">new</span> <span class="kw3">String</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; <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> i=<span class="nu0">0</span><span class="sy0">;</span> i<span class="sy0">&amp;</span>lt<span class="sy0">;</span><span class="nu0">99999</span><span class="sy0">;</span> i++<span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; s += i<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; <span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>compile and run&#8230;</p>
<pre>[ktoso@homunculus ~]$ time `java StringTest`

<strong>real    2m14.694s</strong>
user    2m10.379s
sys     0m2.254s
</pre>
<p>I even managed to make me some coffee before it finished&#8230; Why is that? For any real Java programmer its obvious, but for some students it&#8217;s not&#8230; String is immutable. Every &#8220;string modification&#8221; is creating a new string, with all the fuss with object creation/allocation, it really takes some time. It&#8217;s a &#8220;feature&#8221; of the language, so how does it fight this kind of problem? Yup, the <strong>StringBuilder is mutable</strong>, thus he is really supreme if it comes down to modifying strings.</p>
<p>So, next time before you come to me panicking about java/speed or some other nonsense, please <strong>RTFM first</strong> ;-)</p>
<hr />
<h3>Update: Let&#8217;s look into the generated bytecode!</h3>
<p>Yeah, why not? Since we&#8217;re talking about an really important feature here, let&#8217;s get more into it&#8230; You can use <strong>javap</strong> to display the bytecode from an class file. I&#8217;ve checked both examples above with it and the main difference are, of course, the lines used for appending those strings&#8230; First the StringBuilder version:</p>
<div class="geshi no java">
<div class="head">0:   new     #2; //class java/lang/StringBuilder</div>
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">3</span>: &nbsp; dup</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">4</span>: &nbsp; invokespecial &nbsp; #<span class="nu0">3</span><span class="sy0">;</span> <span class="co1">//Method java/lang/StringBuilder.&quot;&lt;init&gt;&quot;:()V</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">7</span>: &nbsp; astore_1</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">8</span>: &nbsp; iconst_0</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">9</span>: &nbsp; istore_2</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">10</span>: &nbsp;iload_2</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">11</span>: &nbsp;ldc &nbsp; &nbsp; #<span class="nu0">4</span><span class="sy0">;</span> <span class="co1">//int 99999</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">13</span>: &nbsp;if_icmpge &nbsp; &nbsp; &nbsp; <span class="nu0">28</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">16</span>: &nbsp;aload_1</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">17</span>: &nbsp;iload_2</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">18</span>: &nbsp;invokevirtual &nbsp; #<span class="nu0">5</span><span class="sy0">;</span> <span class="co1">//Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">21</span>: &nbsp;pop</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">22</span>: &nbsp;iinc &nbsp; &nbsp;<span class="nu0">2</span>, <span class="nu0">1</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">25</span>: &nbsp;<span class="kw2">goto</span> &nbsp; &nbsp;<span class="nu0">10</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">28</span>: &nbsp;return<span class="sy0">&lt;</span>/init<span class="sy0">&gt;</span></div>
</li>
</ol>
</div>
<p>Nothing weird here, right? We expected StringBuilder to be used and simply the append method to be called, quite &#8220;normal&#8221;. By the way, it&#8217;s quite interesting to see how actually java does things inside :-) Ok, now for the String += version:</p>
<div class="geshi no java">
<div class="head">0:   new     #2; //class java/lang/String</div>
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">3</span>: &nbsp; dup</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">4</span>: &nbsp; invokespecial &nbsp; #<span class="nu0">3</span><span class="sy0">;</span> <span class="co1">//Method java/lang/String.&quot;&lt;init&gt;&quot;:()V</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">7</span>: &nbsp; astore_1</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">8</span>: &nbsp; iconst_0</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">9</span>: &nbsp; istore_2</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">10</span>: &nbsp;iload_2</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">11</span>: &nbsp;ldc &nbsp; &nbsp; #<span class="nu0">4</span><span class="sy0">;</span> <span class="co1">//int 99999</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">13</span>: &nbsp;if_icmpge &nbsp; &nbsp; &nbsp; <span class="nu0">41</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">16</span>: &nbsp;<span class="kw2">new</span> &nbsp; &nbsp; #<span class="nu0">5</span><span class="sy0">;</span> <span class="co1">//class java/lang/StringBuilder</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">19</span>: &nbsp;dup</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">20</span>: &nbsp;invokespecial &nbsp; #<span class="nu0">6</span><span class="sy0">;</span> <span class="co1">//Method java/lang/StringBuilder.&quot;&lt;/init&gt;&lt;init&gt;&quot;:()V</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">23</span>: &nbsp;aload_1</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">24</span>: &nbsp;invokevirtual &nbsp; #<span class="nu0">7</span><span class="sy0">;</span> <span class="co1">//Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">27</span>: &nbsp;iload_2</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">28</span>: &nbsp;invokevirtual &nbsp; #<span class="nu0">8</span><span class="sy0">;</span> <span class="co1">//Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">31</span>: &nbsp;invokevirtual &nbsp; #<span class="nu0">9</span><span class="sy0">;</span> <span class="co1">//Method java/lang/StringBuilder.toString:()Ljava/lang/String;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">34</span>: &nbsp;astore_1</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">35</span>: &nbsp;iinc &nbsp; &nbsp;<span class="nu0">2</span>, <span class="nu0">1</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">38</span>: &nbsp;<span class="kw2">goto</span> &nbsp; &nbsp;<span class="nu0">10</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="nu0">41</span>: &nbsp;return<span class="sy0">&lt;</span>/init<span class="sy0">&gt;</span></div>
</li>
</ol>
</div>
<p>Oh! First thing you&#8217;d notice, it&#8217;s now 41 lines and not 28 as it was when we used StringBuilder directly&#8230; Let&#8217;s go on and examine the rest&#8230; What do we have here&#8230; StringBuilder?! That&#8217;s a little less expected, as I thought that the compiler wasn&#8217;t able to guess that we need a StringBuilder in such an situation. Well, it guessed right. Even though we use += StringBuilder&#8217;s append is being called&#8230; And then it&#8217;s being converted to a String&#8230; And each time in the loop there&#8217;s a new StringBuilder (line 16). </p>
<p><strong>To summarize: Even though the javac compiler does use the StringBuilder if it thinks that&#8217;s a good idea, id does it quite stupid. And in the end, we still end up with super slow code! Bottom line is, that you should &#8220;by hand&#8221; use the StringBuilder in your code. Note that even thought you might use + in your code, javac will still make this StringBuilder code :-) Sometimes better, sometimes worse &#8211; as shown in the above examples.</strong></p>
<p>Hope this post was interesting for even the more advanced users out there &#8211; that&#8217;s what for the second part was for :-) If you have any comments, feel free to post them &#8211; it really makes me happy to see people commenting my stuff ;-)</p>
<p>PS: Hmmm&#8230; I wonder how GStrings would do in such an dumb test&#8230; Guess I&#8217;ll have to check someday.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/593/dont-use-loops-on-strings-for-christs-sake/feed/</wfw:commentRss>
		<slash:comments>1</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[Project13]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[java]]></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>NetBeans Platform Certified Training Kraków 2010</title>
		<link>http://www.blog.project13.pl/index.php/coding/505/netbeans-platform-certified-training-krakow-2010/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/505/netbeans-platform-certified-training-krakow-2010/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 20:53:56 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[pjug]]></category>
		<category><![CDATA[preview]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=505</guid>
		<description><![CDATA[NetBeans.edu.pl Since Poznań JUG&#8217;s NetBeans Platform Training in January (yeah, the one where there was no place left for me ;-)), I&#8217;ve been in contact with Poznań JUG&#8216;s Adam Dudczak, Polish JUG&#8216;s Adrian Nowak, Sun&#8217;s Geertjan Wielenga and Eppleton&#8217;s Anton Epple and many more&#8230; And a little later Karol Harezlak joined the training team. We&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center; background: white;"><a style="background: white;" href="http://www.netbeans.edu.pl" onclick="urchinTracker('/outgoing/www.netbeans.edu.pl?referer=');"><img class="size-medium wp-image-506" style="background: white repeat scroll 0% 0% white;" title="NB-Platform-logo" src="http://www.blog.project13.pl/wp-content/uploads/2010/04/NB-Platform-logo1-300x41.png" alt="NetBeans Platform " width="300" height="41" /><br />
<span style="font-size: 22px; font-weight: bold;">NetBeans.edu.pl</span><br />
</a></p>
<p>Since <strong>Poznań JUG&#8217;</strong>s NetBeans Platform Training in January (<em>yeah, <a href="http://www.blog.project13.pl/index.php/fun/375/375/">the one</a> where there was no place left for me ;-)</em>), I&#8217;ve been in contact with <strong><a href="http://www.jug.poznan.pl/" onclick="urchinTracker('/outgoing/www.jug.poznan.pl/?referer=');">Poznań JUG</a>&#8216;</strong>s <strong>Adam Dudczak</strong>, <a href="http://java.pl" onclick="urchinTracker('/outgoing/java.pl?referer=');"><strong>Polish JUG</strong></a>&#8216;s <strong>Adrian Nowak</strong>, Sun&#8217;s <a href="http://blogs.sun.com/geertjan/" onclick="urchinTracker('/outgoing/blogs.sun.com/geertjan/?referer=');"><strong>Geertjan Wielenga</strong></a> and Eppleton&#8217;s<strong> <a href="http://eppleton.sharedhost.de/blog/" onclick="urchinTracker('/outgoing/eppleton.sharedhost.de/blog/?referer=');">Anton Epple</a> </strong>and many more&#8230; And a little later <a href="http://blogs.sun.com/kharezlak/" onclick="urchinTracker('/outgoing/blogs.sun.com/kharezlak/?referer=');"><strong>Karol Harezlak</strong></a> joined the training team. We&#8217;ve been planing to organize an NetBeans Platform Training in Cracow &#8211; since there was really an gigantic response to the training. Now it&#8217;s April&#8230; and just around two weeks to the <a href="http://netbeans.edu.pl" onclick="urchinTracker('/outgoing/netbeans.edu.pl?referer=');">NetBeans Platform Certified Training Kraków 2010</a> ;-) All this could not have been possible if not the great help and support from both JUGs and an <strong>amazing amount of help we got from <a href="http://www.glider.agh.edu.pl" onclick="urchinTracker('/outgoing/www.glider.agh.edu.pl?referer=');"><strong>Glider</strong></a></strong> from my University. Also I&#8217;d like to give a big thanks to<em> everyone</em> I&#8217;ve met during this long process of organizing such an meeting &#8211; you&#8217;ve all been a great help! :-)</p>
<p><strong>Allright, so what&#8217;s this</strong><strong> NetBeans Platform</strong> all about? To put it simply, it&#8217;s &#8220;something&#8221; (a platform ;-)) that allows you to use all the stuff you see when you do your daily coding in the NetBeans IDE and code up your own application really quickly. While WebFrameworks are really popular and there&#8217;s a ton of them, there is not much (worth mentioning) &#8220;Desktop App Frameworks&#8221; as one might call them. Such apps are then called <strong>Rich Client Applications</strong> (just a fancy name for &#8220;Desktop Apps&#8221; ;-)), which makes NBP an <strong>Rich Client Platform</strong>&#8230; You may have heard about &#8220;<strong>Eclipse RCP</strong>&#8221; or &#8220;<strong>SWT</strong>&#8221; or &#8220;<strong>Spring RCP</strong>&#8221; &#8211; they&#8217;re in the same legue as NBP. But why is NetBeans RCP more interesting than the rest? Well here&#8217;s a cupple of reasons I personally find important:</p>
<ul>
<li>It&#8217;s all <strong>swing</strong> based, and as Java programmers &#8211; we know swing, not necesarrily some &#8220;SWT&#8221; or &#8220;Swing RPC&#8221; &#8211; right? Less totaly new stuff = better learning curve.</li>
<li>Your app gets an windowing system abstraction, file system abstraction,  lots of GUI elements out of the box &#8211; Tree&#8217;s etc</li>
<li>You can just extend NetBeans IDE or build your own app that <a href="http://platform.netbeans.org/screenshots.html" onclick="urchinTracker('/outgoing/platform.netbeans.org/screenshots.html?referer=');">looks like an IDE</a>&#8230; or <a href="http://bluemarine.tidalwave.it/" onclick="urchinTracker('/outgoing/bluemarine.tidalwave.it/?referer=');">doesn&#8217;t look like one</a> ;-)</li>
<li>It&#8217;s 100% modular &#8211; that means you can use just the stuff you want, or can easily exchange or &#8220;<strong>lookup</strong>&#8221; (important word in the NetBeans world) stuff in order to develop apps that can handle plugins and are easily extendible.</li>
<li>There are quite some inteligent and interesting opinions about<a href="http://www.adam-bien.com/roller/abien/entry/eclipse_rcp_vs_netbeans_rcp" onclick="urchinTracker('/outgoing/www.adam-bien.com/roller/abien/entry/eclipse_rcp_vs_netbeans_rcp?referer=');"> NetBeans RCP vs Eclipse RCP on Adam Bien&#8217;s blog</a> &#8211; (found this blogpost thanks to @timoreilly)</li>
</ul>
<p>I find the Lexer Api quite interesting but didn&#8217;t have the time to really dive into it yet &#8211; basically it allows you to write programming language parsing, support into your app or netbeans IDE.<br />
The most amazing&#8230; Hmm let&#8217;s say &#8220;the most<em> visually</em> amazing&#8221; app based on the NBP I&#8217;ve seen is <a href="http://gephi.org/" onclick="urchinTracker('/outgoing/gephi.org/?referer=');">Gephi</a> (video below). There are lot&#8217;s of very complicated apps for biology or airlines and stuff) based on NBP, but let&#8217;s face it such apps don&#8217;t create an &#8220;WOW&#8221; effect, unless you totaly understand what&#8217;s going on inside of it.</p>
<p style="text-align: center;">Take a deep breath, and enjoy<br />
<strong>NetBeans Platform + Gephi = Graph Awesomeness<br />
</strong></p>
<div style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="551" height="310" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=9726202&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="551" height="310" src="http://vimeo.com/moogaloop.swf?clip_id=9726202&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div style="text-align: center;">
<p>All that said&#8230; I hope that the Training in Cracow will be a nice experience for every participant<br />
see you there &#8211; <em>24+25 April 2010</em>.<br />
<strong><a href="http://netbeans.edu.pl" onclick="urchinTracker('/outgoing/netbeans.edu.pl?referer=');">netbeans.edu.pl</a></strong></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/505/netbeans-platform-certified-training-krakow-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
