<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Fabrizio Giudici&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/" />
<modified>2008-05-09T01:41:17Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2008, fabriziogiudici</copyright>
<entry>
<title>And I made it</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/05/and_i_made_it.html" />
<modified>2008-05-09T01:41:17Z</modified>
<issued>2008-05-09T01:41:12Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9752</id>
<created>2008-05-09T01:41:12Z</created>
<summary type="text/plain">Now I can say, at last, that I&apos;m a JavaOne speaker, really, not only a successful submitter. This year no headache, sore throat, cold, flu, pain in the ass prevented me from performing my talk. Not even the stinking MacBook...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>
<dc:subject>JavaOne</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>Now I can say, at last, that I'm a JavaOne speaker, really, not only a <a href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/05/latest_refineme.html">successful submitter</a>. This year no headache, sore throat, cold, flu, pain in the ass prevented me from performing my talk. Not even the stinking MacBook Pro power supply that broke again a couple of days ago (men, I had to buy the third in two years). There could have been more attendees to my talk, but an agenda change a few days ago anticipated Romain's and Chet's talk to my same time slot, so figure it out. But it's good as it is.<br />
 <br />
Whoa. I presume I'll have an adrenaline drop, now.</p>

<p>PS Yesterday and today I met other people too, but since I didn't keep the list I'm surely forgotting somebody: Adam Bien, Michael Bien, Chris Adamson, Joshua Marinacci. I also met again Dennis Reedy after a few years. Unfortunately I haven't met Kohsuke so far, so I couldn't offer him the promised beer, and Romain is up there busy in signing copies of his book. But there's one day more.</p>

<p>PS2 wsnyder6, I owe you a beer too. If you are around, come on.</p>]]>

</content>
</entry>
<entry>
<title>Community One</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/05/community_one.html" />
<modified>2008-05-06T14:34:28Z</modified>
<issued>2008-05-06T14:34:22Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9703</id>
<created>2008-05-06T14:34:22Z</created>
<summary type="text/plain">Well, I really can&apos;t express all my feelings in these days - even because I&apos;m still suffering from the jet lag. My first thought is that I&apos;m happy to be in San Francisco again, after six years, and to attend...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>
<dc:subject>JavaOne</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[Well, I really can't express all my feelings in these days - even
because I'm still suffering from the jet lag. My first thought is that
I'm happy to be in San Francisco again, after six years, and to attend
Java One again. I didn't remember the Moscone Center was so huge and
yesterday morning it took some time for me to find the room for the
NetBeans track.<br>
<br>
As I said so many times, in this age the real added value of
conferences is to breathe the air and to personally meet people. The
latter point is especially true when it happens that you "know" people
for a long time, but only by means of virtual channels such as the
email (I'm not talking about other "social" tools because <a
 href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/02/officially_i_ha.html">I
don't like them</a>).<br>
<br>
So, I must say that my first great joy for the Community One day has
been to meet personally Geertjan Wielenga (which is the main
responsible for me being part of the NetBeans community) and Tom
Wheeler, from the NetBeans Dream Team. I've also met Glenn Holmer,
which brings to three the number of NBDTers I've met so far (the first
one being Vincent Brabant met at JavaPolis). Today should be the turn
of Adam Bien.<br>
<br>
But yesterday I've met so many other persons. Here's just a partial
list, in random order:<br>
<ul>
  <li>Judith Lilienfeld</li>
  <li>Tim Boudreau</li>
  <li>Tomas Pavek</li>
  <li>Geertjan Wielenga</li>
  <li>Arseniy Kusnezov</li>
  <li>Yarda Tulach</li>
  <li>Rich Unger (I'm particularly happy of meeting him since he
was recently in Italy but we weren't able to be in the same town at the
same date)</li>
  <li>Adam Myatt</li>
  <li>David Botteril</li>
  <li>Chris Palmer</li>
  <li>Tor Norbye</li>
  <li>Tinu Awopetu</li>
  <li>Ruth Kusterer</li>
  <li>Janice Campbell</li>
  <li>Fabiane Bizinella Nardon</li>
</ul>
I've even shot some photos, but now I can't find the time for uploading
them. <br>
<br>
And this was just "JavaOne Day -1"...<br>
<br>From a technical point of view, I'd say these are the three main points
I've seen so far:<br>
<ul>
  <li>The official release of OpenSolaris Indiana. Roman just
blogged about having installed it in place of Windows on his laptop. So
maybe I'll be finally able to install it on my MacBook Pro? But not
before Thursday, it would be embarassing to erroneously scratch a
partition before my presentation... :-)</li>
  <li>The support for PHP in NetBeans.</li>
  <li>The support for JavaScript (including a debugger) in
NetBeans. This has been probably around for a while but I didn't
noticed it.</li>
</ul>]]>

</content>
</entry>
<entry>
<title>Latest refinements</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/05/latest_refineme.html" />
<modified>2008-05-03T21:35:59Z</modified>
<issued>2008-05-03T21:35:51Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9678</id>
<created>2008-05-03T21:35:51Z</created>
<summary type="text/plain">Well, tomorrow morning I&apos;m leaving for San Francisco. There are two basic reasons for my excitement: The last time I&apos;ve been in San Francisco was in 2002 - a lot of time ago. I should have been there in 2005,...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[Well, tomorrow morning I'm leaving for San Francisco. There are two
basic reasons for my excitement:<br>
<ol>
  <li>The last time I've been in San Francisco was in 2002 - a
lot of time ago.</li>
  <li>I should have been there in 2005, since my paper about <a
 href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=270915&amp;ilocation_id=93-1&amp;ilanguage=english">Jini
in Formula One</a> had been accepted; but I fell ill the day
before leaving. The presentation was performed by two excellent
co-workers of mine, but my morale had been under the ground for weeks.
So this is my second chance.</li>
</ol>
There will be intense days next week, also because I'm trying to
release a new stable version of blueMarine and there are still failing
tests. On the other hand, no problems of course for the JavaOne demo -
I'm just trying to see whether I manage in integrating the latest
release (0.5.0) of <a
 href="http://worldwind.arc.nasa.gov/java/index.html">NASA
World Wind</a>, which is still hot (published two days ago).
Thanks to Dave Collins from the <a
 href="http://forum.worldwindcentral.com/forumdisplay.php?f=39">WWJ
forum</a> that sent me a patch I've been able to deal with a few API
changes and blueMarine seems to work. Now it's a matter of passing some
more integration tests to see whether the update qualifies for the
demo. <br>
<br>
I'm pretty excited for this release since it includes an <a
 href="http://www.openstreetmap.org/">OpenStreetMap</a>
layer, which is pretty useful - and looks nice, as you can see (Pat
Murris also <a
 href="http://patmurris.blogspot.com/2008/05/nasa-world-wind-java-sdk-05-released.html">blogged
about it</a>).<br>
<br>
<br>
<img alt=""
 src="https://bluemarine.dev.java.net/nonav/Blog/20080504/WWJ+OSM.jpg"><br>
<br>
<a href="http://java.sun.com/javaone"><img
 style="border: 0px solid ; width: 170px; height: 93px;" alt=""
 src="http://java.sun.com/javaone/images/2008/170x93_Speaker_v4.gif"></a>]]>

</content>
</entry>
<entry>
<title>A little desktop quiz</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/05/a_little_deskto.html" />
<modified>2008-05-02T23:56:51Z</modified>
<issued>2008-05-02T23:26:25Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9671</id>
<created>2008-05-02T23:26:25Z</created>
<summary type="text/plain">This blueMarine screenshot has been just taken on Mac OS X. Do you note something different than usual? Clicking the image you can see the original capture. I&apos;ll pay a beer at JavaOne to the first guy that guesses what&apos;s...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[This <a href="http://bluemarine.tidalwave.it">blueMarine</a>
screenshot has been just taken on Mac OS X. Do you note something
different than usual? Clicking the image you can see the original
capture. I'll pay a beer at JavaOne to the first guy that guesses what's
going on (*).<br>
<br>
<a
 href="https://bluemarine.dev.java.net/nonav/Blog/20080503/Quiz.jpg"><img
 style="border: 0px solid ; width: 800px; height: 476px;" alt=""
 src="https://bluemarine.dev.java.net/nonav/Blog/20080503/Quiz-800.jpg"></a><br>
<br>
<a href="http://java.sun.com/javaone"><img
 style="border: 0px solid ; width: 170px; height: 93px;" alt=""
 src="http://java.sun.com/javaone/images/2008/170x93_Speaker_v4.gif"></a><br>
<br>
(*) This is the second beer I'll have to offer, the first being due to <a
 href="http://weblogs.java.net/blog/kohsuke/">Kohsuke</a>.]]>

</content>
</entry>
<entry>
<title>Apple&apos;s Java 6 on Mac OS X available</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/apples_java_6_o.html" />
<modified>2008-04-30T07:27:39Z</modified>
<issued>2008-04-30T07:27:30Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9640</id>
<created>2008-04-30T07:27:30Z</created>
<summary type="text/plain">Now the scoop is not that we had to wait 1.5 years before it to be available, but the fact that it only supports 64bit Intel processors. No support for 32bit, no support for PPC. Yeah, PPC is dead, but...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
Now the scoop is not that we had to wait 1.5 years before it to be available, but the fact that it only supports 64bit Intel processors. No support for 32bit, no support for PPC. Yeah, PPC is dead, but how many existing installations exist with PPC and 32 bit Intel? And how long you&apos;ll have to wait before there&apos;s a decent percentage of 64bit installations so you can put it as a requirement for your app? Not counting that if you bought a Mac earlier than 2 years ago, like me, you just need to buy some new gear to start developing with it.

Of course this is just whining. As a lot of people will hurry to say today, life is good, Apple is nice, and there&apos;s absolutely no need to worry about.

</content>
</entry>
<entry>
<title>Benchmarks and (less) surprises (?)</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/benchmarks_and_1.html" />
<modified>2008-04-27T10:15:07Z</modified>
<issued>2008-04-27T01:46:44Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9614</id>
<created>2008-04-27T01:46:44Z</created>
<summary type="text/plain">As a follow-up of my previous post, I&apos;ve cleaned up my benchmark code (the log files have been reduced in size from 40MB to 800kB, some bugs have been fixed and the UUID strategy has been chosen for generating primary...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[As a follow-up of my <a
 href="http://weblogs.java.net/blog/fabriziogiudici/">previous
post</a>, I've cleaned up my benchmark code (the log files have
been reduced in size from 40MB to 800kB, some bugs have been fixed and
the UUID strategy has been chosen for generating primary keys in the
database, thus reducing contention chances with multiple threads).<br>
<br>
At this point the impact of logging should be neglectable, thus the
comparison makes more sense (if you haven't read my previous post, the
test reads metadata from about 150+ photos and insert them into a Derby
database, with both single- and multi-thread approaches; the test is
run with different software combinations but always on the same
hardware, my MacBook Pro first generation, 2GHz, 2GB RAM; numbers are
seconds per photo, the lower the better).<br>
<pre>Workers Linux Ubuntu 8.04&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Windows XP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mac OS X 10.5<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Java 1.6.0_06&nbsp;&nbsp; Java 1.5.0_15&nbsp;&nbsp; Java 1.6.0_05&nbsp;&nbsp; Java 1.5.0_15&nbsp;&nbsp; SoyLatte 1.0.2&nbsp; Java 1.5.0_13<br>-----------------------------------------------------------------------------------------------------<br>1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.50/0.35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.55/0.47&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.48/0.37&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.52/0.47&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.80/0.66&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.80/0.74<br>2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.40/0.26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.42/0.42&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.32/0.25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.34/0.33&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.49/0.43&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.47/0.50<br>3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.39/0.26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.41/0.42&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.32/0.25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.43/0.39&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.48/0.43&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.52/0.53<br>4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.39/0.25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.41/0.45&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.31/0.26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.45/0.41&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.49/0.43&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.53/0.55</pre>
In this round of tests I introduced a double benchmarking for every
platform, by using both the "Client" JIT (java -client) and the
"Server" one (java -server). &nbsp;Here are some points:<br>
<ol>
  <li>I discovered my ignorance in a basic aspect of the
configuration of the VM. While I presumed that by default the "Client"
JIT was always selected, I learned that this isn't necessarily true
since Java 5. <a
 href="http://java.sun.com/docs/hotspot/gc5.0/ergo5.html">This
document clearly states</a> that when running in machines defined
as "server-class" (at least 2 processors/cores and 2GB of RAM, and my
MacBook Pro falls within this class) the default JIT is the Server
one.&nbsp;</li>
  <li>In spite of that, the&nbsp;Server JIT is selected by
default only on Linux. Window XP and Mac OS X still select the "Client"
one. While we are somewhat used to Apple's policy of doing things
differently, Windows is a bit of a surprise because it's another
Sun-made VM.</li>
  <li>This explains a big deal of the differences seen in my
previous round of benchmarks: Linux resulted the winner since it was
the only one running with the Server JIT, which is clearly the best
option since the benchmark doesn not use any guy, but does repetitive
tasks.</li>
</ol>
So at least part of the surprise in the previous set of numbers has
gone. But several new questions arise:<br>
<ol>
  <li>Comparing Java 5 VMs omogeneously (Client JIT vs Client JIT
and Server JIT vs server JIT) Mac OS X still has the worse performance.</li>
  <li>Turning the Server JIT on Mac OS X and other operating systems does almost no good:
small improvements with a single processor, and no improvements at all
with multiple processors (indeed, it also looks like there's a slight
degradation of performance in some cases).</li>
  <li>After the verbose logging went off, SoyLatte Client JIT is
no better than Apple's JVM. Server JIT for SoyLatte is marginally
better, but much slower than Linux or Windows.</li>
</ol>
At first sight, one could argue that the Server JIT does not bring advantages on any operating system, but the bad performance of SoyLatte is raising
doubts about Mac OS X. Is there anything specific in Mac OS X that makes things go
worse (again, maybe the file system performance)? Or, given that
SoyLatte is still young, a lot of optimizations have been disabled?<br>
<br>
The instructions to reproduce this are in my <a
 href="http://weblogs.java.net/blog/fabriziogiudici/">previous
post</a>, this time you must use -r 5368 for checking out the
blueMarine code.<br>
<br style="font-style: italic;">
<span style="font-style: italic;">In any case, at least
with Windows and Linux I'm reaching my performance goal, which is 0.20
seconds per photo. Indeed, considering some known issues of my code, I
should be able to make better than it.</span><br>

<i>*** Edited to add:</i><br>
<br>
To make things easier to read, I'm adding a table with normalized
values. The percentages indicates how slow a test runs (e.g. 100%
means that it runs at half speed). Best performers are marked in green,
worse performes in red; also a specific comparison among Java 5 only
VMs is given. In each column pair, the "Client" JIT figure is at the
left side, the "Server" JIT figure at the right.<br>
<br>
<img alt=""
 src="http://bluemarine.dev.java.net/nonav/Blog/20080427/Comparisons.jpg">


<br>
<a href="http://java.sun.com/javaone"><img
 style="border: 0px solid ; width: 170px; height: 93px;" alt=""
 src="http://java.sun.com/javaone/images/2008/170x93_Speaker_v4.gif"></a>]]>

</content>
</entry>
<entry>
<title>Benchmarks and surprises</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/benchmarks_and.html" />
<modified>2008-04-14T22:45:29Z</modified>
<issued>2008-04-14T22:45:23Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9535</id>
<created>2008-04-14T22:45:23Z</created>
<summary type="text/plain">I&apos;m posting some results from my latest benchmarks on the Metadata
facility of blueMarine - take them with half a pinch of salt, since
I&apos;ve checked them but not double-checked, sorry but I have just a
little time in these days. They gave some little surprise to me.</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[I'm posting some results from my latest benchmarks on the Metadata
facility of blueMarine - take them with half a pinch of salt, since
I've checked them but not double-checked, sorry but I have just a
little time in these days. They gave some little surprise to me.
<br>
<br>
In short, the test takes about 160 photos and imports all the metadata
into a Derby database (details for reproducing it below). In
total,&nbsp;10000+ records are imported. The tests run with a
classic Master / Worker pool with 1, 2, 3 and 4 workers on a MacBook
Pro 2GHz, 2GB RAM in all the combinations of (Java 5, Java 6) x (Mac OS
X 10.5, Linux Ubuntu 8.04, Windows XP) - note that I've used Soylatte
on Java 6 since I don't have a 64 bit computer and can't run the Java 6
previews from Apple (thanks, Apple). The benchmark figure is the number
of seconds needed to import a photo, so the lower the number, the
better.<br>
<br>
<table style="text-align: left;" border="1"
 cellpadding="4" cellspacing="0">
  <tbody>
    <tr>
      <td style="font-weight: bold; text-align: center;"
 colspan="2" rowspan="1">Linux</td>
      <td style="font-weight: bold; text-align: center;"
 colspan="2" rowspan="1">Windows XP</td>
      <td style="font-weight: bold; text-align: center;"
 colspan="2" rowspan="1">Mac OS X 10.5</td>
    </tr>
    <tr>
      <td style="font-weight: bold; text-align: center;">Java
6</td>
      <td style="font-weight: bold; text-align: center;">Java
5</td>
      <td style="font-weight: bold; text-align: center;">Java
6</td>
      <td style="font-weight: bold; text-align: center;">Java
5</td>
      <td style="font-weight: bold; text-align: center;">Java
6 (*)</td>
      <td style="font-weight: bold; text-align: center;">Java
5</td>
    </tr>
    <tr>
      <td style="text-align: center;">0.48</td>
      <td style="text-align: center;">0.73</td>
      <td style="text-align: center;">0.60</td>
      <td style="text-align: center;">0.70</td>
      <td style="text-align: center;">0.83</td>
      <td style="text-align: center;">1.00</td>
    </tr>
    <tr>
      <td style="text-align: center;">0.37</td>
      <td style="text-align: center;">0.58</td>
      <td style="text-align: center;">0.39</td>
      <td style="text-align: center;">0.46</td>
      <td style="text-align: center;">0.56</td>
      <td style="text-align: center;">0.63</td>
    </tr>
    <tr>
      <td style="text-align: center;">0.38 - 1.13</td>
      <td style="text-align: center;">0.58</td>
      <td style="text-align: center;">0.39</td>
      <td style="text-align: center;">0.52</td>
      <td style="text-align: center;">0.60</td>
      <td style="text-align: center;">0.68 - 1.04</td>
    </tr>
    <tr>
      <td style="text-align: center;">0.36 - 0.76&nbsp;</td>
      <td style="text-align: center;">0.60</td>
      <td style="text-align: center;">0.48 - 0.78</td>
      <td style="text-align: center;">0.56</td>
      <td style="text-align: center;">0.61</td>
      <td style="text-align: center;">1.06</td>
    </tr>
  </tbody>
</table>
(*) SoyLatte 1.0.2<br>
<br>
Before commenting, keep in mind the following points:<br>
<ol>
  <li>The tests still run with logs at maximum power (each run
produces 40MB of files), so the computation is more disk intensive than
it should</li>
  <li>There are some optimizations I have to do yet, for instance
photos are read multiple times</li>
  <li>Tests with multiple workers have a bug so about 1% of data
don't get imported (there must be a failed transaction somewhere and it
doesn't get properly logged), but this low number of errors can't
change numbers dramatically.</li>
</ol>
So I expect to have even lower numbers after some fixes, but the
comparison is fair across all the environments. Here my points:<br>
<ol>
  <li>As expected, there's no advantage in having more workers
than available processors (2). In this case, tests have a huge
variance, since some times they trigger a lot of contentions in the
database (with a lock timing out for one second and causing the
transaction to be re-run).</li>
  <li>Java 6&nbsp;is <span style="font-style: italic;">really</span>
faster than Java 5 and for free.</li>
  <li>Mac OS X is clearly the loser here, even in comparison with
Windows XP, especially with a single processor. Even Java 6 is not
exceptional, but I presume the problem is related to the low
performance of the file system, that I've <a
 href="http://weblogs.java.net/blog/fabriziogiudici/archive/2007/05/profiling_your.html">already
measured some time ago</a>.&nbsp;</li>
</ol>
Now I've got a simple question. Unfortunately I don't have a quad-core,
so I can't test: is it expected that Derby scales well with four
workers? Or should I put a limit to 2? When contentions on the database
don't occur, it seems that even with only 2 processors a larger number
of workers don't introduce significant degradation, which is promising;
on the other hand, when contentions occur things are really worse. And
the more workers, the more chances of having a contention.<br>
<br>
To reproduce:<br>
<ol>
  <li>Check out sources with <span
 style="font-family: monospace;">svn co
https://bluemarine.dev.java.net/svn/bluemarine/trunk/src/blueMarine-core
-r 5237</span></li>
  <li>Check out test files with <span
 style="font-family: monospace;">svn co
https://imaging.dev.java.net/svn/imaging/trunk/www/TestSets -r 49</span></li>
  <li>Open the project <span style="font-family: monospace;">blueMarine-core</span>
with NetBeans 6.0.1 or NetBeans 6.1</li>
  <li>Quit NetBeans just after opening the project</li>
  <li>Run from the command line <span
 style="font-family: monospace;">ant generate-platform nbms</span></li>
  <li>Edit <span style="font-family: monospace;">Metadata/MetadataOperations/nbproject/private/private.properties</span>
and add the line <span style="font-family: monospace;">test-unit-sys-prop.testset.folder=<span
 style="font-style: italic;">path-to-TestSets</span></span></li>
  <li>From the command line, go to <span
 style="font-family: monospace;">Metadata/MetadataOperations</span></li>
  <li>run <span style="font-family: monospace;">ant
test |&amp; grep seconds</span>&nbsp;</li>
</ol>
<br>]]>

</content>
</entry>
<entry>
<title>Historic series of profiling data</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/historic_series.html" />
<modified>2008-04-06T14:30:24Z</modified>
<issued>2008-04-06T14:30:12Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9485</id>
<created>2008-04-06T14:30:12Z</created>
<summary type="text/plain">After fighting with some showstoppers in the NetBeans Profiler (involving RCP projects) and finding a decent workaround, I&apos;ve started the tuning of the Metadata facility for blueMarine. I&apos;ve already done tuning in the past, of course, but I have always...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>After fighting with some showstoppers in the NetBeans Profiler (involving RCP projects) and finding a decent workaround, I've started the tuning of the Metadata facility for blueMarine. I've already done tuning in the past, of course, but I have always had some frustration in how I easily lost the traceability of the thing. I'm giving an example: a few days a go I ran the profiler and got some figures; in particular two methods were the hot spots of the test and I realized it was not good. Working on those methods, I was able to push them down in the list. To help during the job, I exported some dumps of the NetBeans Profiler, manually spotted the most important numbers and manually tracked them build after build.</p>

<p><img alt="xxx.png" src="http://weblogs.java.net/blog/fabriziogiudici/archive/xxx.png" width="800" height="325" /></p>

<p><br />
Now the hot spots distribution is better, but there's still work to do and I won't be able to work on it before some days. When I'll put some further optimization, I will get a new list of hot spots that will look better. And so on until I feel satisfied for this interaction. Then I'll work for several weeks again on new features and bug fixing, leaving tuning alone. I'll run another tuning session probably in a couple of months, etc. By that time, it could happen that the design changes have at least partially invalidated the optimizations done in the current tuning session. Looking back at the code I wrote years ago (and some code I wrote for customers) I can see a lot of maybe-smart optimizations that now could be pretty useless, since the context where they were good has changed (often I see in customers code that this is even made worse by premature optimization, which greatly increases the chances that the selected optimizations are inappropriate).</p>

<p>Of course, you can deal with it: just run another session of profiling, get the new list of hot spots, etc... The point is that since I run profiling sessions every in a while, I'm likely to have forgotten a bit about the context. I can fix this by writing comments and entries in the issue tracker, but this is time expensive. My point is that it would be nice to put some automatic stuff in the CI facility. For instance, I could run a test in profiling mode, dump the hot spots data and plot a graph showing the values (percentage and time ticks) for the five methods on the top of the list and a sixth record with the data of all the rest. This would save me a lot of time and - in the spirit of CI - it would be done incrementally for each build, allowing you to relate repository modifications with sudden changes in the performance (e.g. you see that a method at a certain build has suddenly moved up to the top of the hot spots, and you could easily track the commit version and find out which changes are responsible for that.</p>

<p>What do you think? I don't think there's a plugin for Hudson already available, but I could make one - I think there's already a plugin for plotting graphs if you produce a file with a given format, the only thing I need is a (FLOSS) library that allows me to read a profiler dump.</p>]]>

</content>
</entry>
<entry>
<title>The troubles with dinosaur and close technologies...</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/the_troubles_wi.html" />
<modified>2008-04-03T14:16:34Z</modified>
<issued>2008-04-03T14:14:47Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9468</id>
<created>2008-04-03T14:14:47Z</created>
<summary type="text/plain">Adobe has just announced that it will be impossible to have the next Photoshop to support 64 bits on Mac OS X systems. The reason is that Apple notified, the past June, that it won&apos;t support 64 bits for Carbon,...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>Adobe has just announced that <a href="http://www.macrumors.com/2008/04/03/adobe-photoshop-cs4-to-be-64-bit-for-windows-32-bit-for-mac/">it will be impossible to have the next Photoshop to support 64 bits on Mac OS X systems</a>. The reason is that Apple notified, the past June, that it won't support 64 bits for Carbon, so Adobe has to rewrite it on Cocoa and this would affect about one million (!) LOCs.</p>

<p>While in the past Java has had big troubles for supporting the desktop, and nowadays still a few issues remain, it appears clear how big is its advantage in such scenarios: with Java you can get 64 bit support almost for free (supposing you have a good 64 bit VM support, which happens in Windows and Linux).</p>

<p>It's also appalling to me to learn that strategic software manufacturers such as Adobe (I don't think Apple would have been so successful in some marketing segments that were strategic in the past without the contributions of superb products such as the Adobe Suite) don't get early warnings from Apple about its close technologies such Carbon and Cocoa (Adobe's statement refers to WWDC news). This makes me understand even better how important is to work with open technologies.</p>]]>

</content>
</entry>
<entry>
<title>blueMarine goes semantic</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/bluemarine_goes_1.html" />
<modified>2008-04-01T14:13:40Z</modified>
<issued>2008-04-01T14:13:31Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9452</id>
<created>2008-04-01T14:13:31Z</created>
<summary type="text/plain">Today Jazoon &apos;08 has published the final program and I don&apos;t see my proposal there, so I&apos;ve not been selected. Usual business in the conference world, sometimes you get accepted and sometimes not - it&apos;s only strange that I didn&apos;t...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>Today <a href="http://jazoon.com/">Jazoon '08 has published the final program</a> and I don't see my proposal there, so I've not been selected. Usual business in the conference world, sometimes you get accepted and sometimes not - it's only strange that I didn't receive any personal notification about that, it must have been lost somewhere.</p>

<p>In any case, the proposed paper was named "blueMarine goes semantic" and - you get it - it was about the integration of blueMarine with <a href="http://en.wikipedia.org/wiki/Semantic_Web">semantic technologies</a> - note that I'm not strictly referring to semantic web, but semantic technologies in general. There is some preliminary code (not yet in the public source repository) and, given the Jazoon news, at this point I'm suspending the work until past JavaOne. So, this is just a teaser, expect me blogging about that after next May.</p>

<p>PS And not, this is not another April's fool :-)</p>]]>

</content>
</entry>
<entry>
<title>I must admit: Eclipse is the best tool in its class</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/i_must_admit_ec.html" />
<modified>2008-04-01T08:22:58Z</modified>
<issued>2008-04-01T08:22:51Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9449</id>
<created>2008-04-01T08:22:51Z</created>
<summary type="text/plain">Well, this is the sound opinion of a person who has been using it for years. There&apos;s no history: Eclipse is just the best tool of its class.</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>
<dc:subject>Community: NetBeans</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>Well, this is the sound opinion of a person who has been using it for years. There's no history: Eclipse is just the best tool of its class. I've tried some alternatives, but nothing allowed me to operate quickly and having such a clean result as Eclipse did. Just nothing. And if you're in pain, trying to deliver when operating in the field, maybe in a problematic environment, Eclipse just gets you out of your troubles in a few minutes.</p>

<p>Don't trust of what competitors say, it's marketing hype, Eclipse is just the best tool of its class.</p>

<p>Long life to Eclipse! :-)</p>

<p><br />
<a href="http://www.photosol.com/eclipseproduct.htm"><img src="http://www.climaxphoto.com/images/eclipse_200.jpg" border="0" /></a></p>

<p><a href="http://www.photosol.com/eclipseproduct.htm"><img src="http://www.cleaningdigitalcameras.com/resources/swabmethod.jpg" border="0" /></a></p>]]>

</content>
</entry>
<entry>
<title>Designing flexible method calls</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/03/designing_flexi.html" />
<modified>2008-03-25T14:58:30Z</modified>
<issued>2008-03-25T14:54:31Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9415</id>
<created>2008-03-25T14:54:31Z</created>
<summary type="text/plain">In the latest months I&apos;ve not blogged a lot about technical topics, yet
I&apos;m still intensively working of stuff about my opensource projects
(well, of course I also work on other stuff, but I can&apos;t blog on that
because of NDAs with customers). </summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[In the latest months I've not blogged a lot about technical topics, yet
I'm still intensively working of stuff about my opensource projects
(well, of course I also work on other stuff, but I can't blog on that
because of NDAs with customers). <br><br>
The point is that 95% of the development of blueMarine has been
focused, since the latest XMas, on the Metadata component. It is a
thing to import, store and query metadata extracted from photos and
other documents, and I put some demanding requirements on it, including
the capability of being pretty modular and extensible. It turned out to
be a meta-persistence facility on its own for JavaBeans, that will be
even useful for futher developments. Of course I didn't reinvent the
wheel, the thing still uses JPA + Derby, but adds a layer of services
that are focused on the special kind of JavaBeans I'll be using.<br>
<br>
The design has been changed two or three times so far, and I'm pretty
happy this is the first time I went in mostly-TDD mode for blueMarine
(thus having 90%+ test coverage since the beginning), since I was able
to perform dramatic changes with no fear of breaking anything. After
some integration tests passed yesterday, I think that the design is
almost complete, so I started consolidating and documenting (and also
removing some possible over-engineering).<br>
<br>
So here it is a quick technical post about it and I like to have some
feedback before I freeze the APIs.<br>
<br>
As I said, the facility should be extensible, and this implies having
stable APIs that can be used by third parties. Stable APIs must be
however extensible as far as it's possible. A <span
 style="font-family: monospace;">Metadata</span>
interface is central in the facility, as it manages a collection of
metadata items associated to a given object. Among other operations, <span
 style="font-family: monospace;">Metadata</span>
exposes a <span style="font-family: monospace;">findOrCreateItem()</span>
and a <span style="font-family: monospace;">storeItem()</span>.
The implementation is SPI-based, that is independent implementations of
providers will be activated on request. Providers might be able to read
data from a photo file, read or store from/to an XMP file or work
directly with the database. I can't predict in advance which kind of
providers will be able in future, including some hopefully provided by
third parties, so I'd like to have an open door so the application can
pass some special parameter to them.<br>
<br>
So, everything boils down in how to construct a method whose arguments
are flexible enough, yet controllable, and also keeping an eye on
readability of the code. Up to a few months ago, my usual way was to
avoid fixed parameters such as:<br>
<br>
<span style="font-family: monospace;">public void
myOperation (int param1, String param2, float param3);</span><br>
<br>
in favour of the use of a specific JavaBean and a method with a single
parameter:<br>
<br>
<span style="font-family: monospace;">public class
MyOperationParameters</span><br style="font-family: monospace;">
<span style="font-family: monospace;">{</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;
&nbsp;public void setParam1 (int v)...</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;
&nbsp;public int getParam1()...</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">}</span><br
 style="font-family: monospace;">
<br>
<span style="font-family: monospace;">MyOperationParameters
p = new MyOperationParameters();</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">p.setParam1(...);</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">public void
myOperation (p);</span><br style="font-family: monospace;">
<br>
In this way you can add new properties to <span
 style="font-family: monospace;">MyOperationParameters</span>
and make sure that they have the proper default values. &nbsp;Not
bad, but it make it worse the readability of the caller code. Of
course, you could initialize <span style="font-family: monospace;">MyOperationParameters</span>
properties in the constructor and/or use a fluent interface, etc... But
even worse, from the design point of view, is that <span
 style="font-family: monospace;">MyOperationParameters</span>
becomes a focal point and any eventual extension (e.g. adding new
parameters) performed by added code must use subclassing, which is evil
in this case.<br>
<br>
This time I opted for a different solution. For instance, the method <span
 style="font-family: monospace;">storeItem()</span> is
declared as:<br>
<br>
<span style="font-family: monospace;">public
&lt;Item&gt; int storeItem
(MetadataItemHolder&lt;Item&gt; holder, Metadata.StoreOption...
options);</span><br>
<br>
where&nbsp;<span style="font-family: monospace;">holder</span>
is a fixed and mandatory parameter; all the remaining stuff is a
varargs of classes implementing&nbsp;<span
 style="font-family: monospace;">StoreOption</span>,
that are straigthly passed to SPI implementations.&nbsp;<span
 style="font-family: monospace;">StoreOption</span> is
just a tagging interface, that is it's empty, only used to have a
minimal syntax cheking from the compiler (so I can't pass arbitrary
objects). Then I have some concrete classes:<br>
<br>
<span style="font-family: monospace;">public interface
Metadata </span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp; {</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
public static interface StoreOption</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
public static enum StorageType implements&nbsp;StoreOption</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ANY_TYPE</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public boolean includes (final StorageType sourceType)</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return true;</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
},</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
INTERNAL</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public boolean includes (final StorageType sourceType)</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return sourceType == INTERNAL;</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
},</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
EXTERNAL</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public boolean includes (final StorageType sourceType)</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return sourceType == EXTERNAL;</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
};</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public abstract boolean includes (final StorageType sourceType);</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
public static enum ReplaceOption implements Metadata.StoreOption</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DONT_REPLACE,</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
REPLACE</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
public static class OriginFilter implements StoreOption</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
private final String name;</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public OriginFilter (final String name)</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
this.name = name;</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public String getName()</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return name;&nbsp;&nbsp;&nbsp; </span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;
&nbsp;...</span><br style="font-family: monospace;">
<span style="font-family: monospace;">}</span><br>
<br>
As you can see, some of the classes have their own logic, as for the <span
 style="font-family: monospace;">includes()</span>
method in <span style="font-family: monospace;">StorageType</span>
(in contrast, adding several specific pieces of logic to a central <span
 style="font-family: monospace;">MyOperationParameters</span>
would quickly turn it into a "small" fat class, if you pardon the pun).<br>
<br>
With the proper static import, I can call:<br>
<br>
<span style="font-family: monospace;">metadata.storeItem(holder, INTERNAL, new
OriginFilter("Database"),&nbsp;REPLACE);</span><br
 style="font-family: monospace;">
<br>
which seems pretty readable and self-documenting to me. New SPI
implementations can define their own parameter types by just
implementing <span style="font-family: monospace;">StoreOption</span>.
&nbsp;Method implementations retrieve the arguments by a special
lookup static method such as <span style="font-family: monospace;">findOption()</span>
in the example below (which also provides the default value, just to
avoid extra checks for <span style="font-family: monospace;">null</span>
values):<br>
<br>
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
public void storeMetadataItem (final
MetadataItemHolder&lt;Item&gt; holder, final StoreOption...
options)</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
throws Exception</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
logger.fine(String.format("storeMetadataItem(%s, %s)", holder,
Arrays.toString(options)));</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReplaceOption
scratchOption = MetadataSpiUtils.findOption(options, DONT_REPLACE,
ReplaceOption.class);</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;
&nbsp; &nbsp; &nbsp; ...</span><br
 style="font-family: monospace;">
<span style="font-family: monospace;">&nbsp;
&nbsp; &nbsp; }</span><br
 style="font-family: monospace;">
<br>
Last but not least, using <span style="font-family: monospace;">Arrays.toString()</span>
it's easy to produce a pretty good logging information such as:<br>
<pre>12:04:39.736 [main] FINE MetadataItemProviderSuppor - storeItem(PhotoDataObject[V7210188.JPG], [Basic@131], [INTERNAL, REPLACE])</pre>
<br>
I don't think it's new stuff, and I'm sure people is already using this
style somewhere, but I could not find examples.<br>
<br>
So, what do you think?]]>

</content>
</entry>
<entry>
<title>Mailing list di NetBeans in Italiano</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/03/mailing_list_di.html" />
<modified>2008-03-21T20:50:38Z</modified>
<issued>2008-03-21T20:50:30Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9402</id>
<created>2008-03-21T20:50:30Z</created>
<summary type="text/plain">Well, as an exceptional case I&apos;m going to blog here in italian. The point is that we have an italian mailing list for NetBeans, so it&apos;s a pretty local interest.</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>
<dc:subject>Community: NetBeans</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>Well, as an exceptional case I'm going to blog here in italian. The point is that we have an italian mailing list for NetBeans, so it's a pretty local interest.</p>

<p>Dunque, o voi tutti utilizzatori italiani di NetBeans, abbiamo finalmente una mailing list in cui possiamo scriverci nella nostra lingua madre. Questo strumento mi è stato chiesto da alcuni di voi durante i NetBeans Days tenuti nello scorso Settembre a Roma, Milano e Cagliari e Sun Microsystems è stata molto gentile nel risponderci positivamente. <a href="http://blogs.sun.com/janicec/entry/ciao_mondo_di_netbeans">Janice Campbell</a>, responsabile del programma di localizzazione, ci ricorda che questa è l'ottava mailing list su NetBeans non in inglese.</p>

<p>L'indirizzo della mailing list è <a href="mailto:nbdiscuss_it@netbeans.org">nbdiscuss_it@netbeans.org</a> e per iscriversi basta mandare un messaggio vuoto a <a href="mailto:nbdiscuss_it-subscribe@netbeans.org">nbdiscuss_it-subscribe@netbeans.org</a>. Gli archivi sono disponibili su <a href="http://www.netbeans.org/servlets/SummarizeList?listName=nbdiscuss_it">http://www.netbeans.org/servlets/SummarizeList?listName=nbdiscuss_it</a></p>

<p>Ora, non ci resta che far partire un po' di discussioni interessanti!</p>]]>

</content>
</entry>
<entry>
<title>A success for the &quot;IDEs of March&quot;</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/03/a_success_for_t.html" />
<modified>2008-03-18T09:04:09Z</modified>
<issued>2008-03-18T09:04:02Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9381</id>
<created>2008-03-18T09:04:02Z</created>
<summary type="text/plain">A very smart comment by JavaLobby played with words and called &quot;the IDEs of March&quot; (*) the event that saw two italian JUGs to organize a new edition of the IDE shootout initiated by JUG Cologne. Now that the event...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>
<dc:subject>Community: Java User Groups</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>A very smart comment by JavaLobby played with words and called "the IDEs of March" (*) the event that saw two italian JUGs to organize a new edition of the IDE shootout initiated by JUG Cologne. Now that the event is over, I can say that it has been a success: 200 persons could enjoy Roman Strobl (Sun Microsystems), Paolo Ramasso (Oracle) and Vaclav Pech (JetBrains) demonstrating the virtues of their products. A special thanks to our guests that made the event possible (too bad for the problems that prevented an Eclipse speaker to come). We know that attendees really enjoyed the event, so I can only recommend other JUG leaders in the world to repeat it in their home countries.</p>

<p>My congratulations to JUG Genova and JUG Roma, especially to the former since they resumed the activities just one year ago, after a period of stall. Here are some photos of the event (and - as some photos demonstrate - in the better italian tradition the thing ended up in with a great dinner!). All the official photos are available on <a href="http://www.ideday.org/index.php/Site/Photos">http://www.ideday.org/index.php/Site/Photos</a>.</p>

<p><i>(*) "The <a href="http://en.wikipedia.org/wiki/Ides_of_march">Ides of March</a> is the name of the date 15 March in the Roman calendar. The term ides was used for the 15th day of the months of March, May, July, and October, and the 13th day of the other eight months. In modern times, the term Ides of March (Latin: Idus Martiae) is best known as the date that Julius Caesar was assassinated, in 44 BC, the story of which was famously retold in William Shakespeare's play Julius Caesar.<Ui></p>


<img src="http://lh3.google.com/juggenova/R99vHPdTj3I/AAAAAAAAADk/ohAhwoSuAkE/P3100476n.jpg?imgmax=720"><br><br>

<img src="http://lh6.google.com/juggenova/R99wA_dTklI/AAAAAAAAAKI/SyIc4d-pfLs/P3100528n.jpg?imgmax=720"><br><br>

<img src="http://lh6.google.com/juggenova/R99vK_dTj6I/AAAAAAAAAD8/lvoasMAgGb4/P3100527n.jpg?imgmax=720"><br><br>

<img src="http://lh4.google.com/juggenova/R99vRfdTj_I/AAAAAAAAAEk/aoudTCVS82w/P3100490n.jpg?imgmax=720"><br><br>

<img src="http://lh5.google.com/juggenova/R99wCvdTknI/AAAAAAAAAKY/zQ0tsr3LBJk/P3100583n.jpg?imgmax=720"><br><br>

<img src="http://lh4.google.com/aldaran.org/R9kPq9b_tFI/AAAAAAAACII/2qrKbuvVlJM/DSC_3687.JPG?imgmax=800"><br><br>

<img src="http://lh5.google.com/aldaran.org/R9kRPNb_tqI/AAAAAAAACM4/-yRBQDEU6u8/DSC_3726.JPG?imgmax=800"><br><br>]]>

</content>
</entry>
<entry>
<title>Feedback from the IDE Day in Genoa</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/fabriziogiudici/archive/2008/03/feedback_from_t.html" />
<modified>2008-03-12T12:28:22Z</modified>
<issued>2008-03-12T10:14:17Z</issued>
<id>tag:weblogs.java.net,2008:/blog/fabriziogiudici/357.9344</id>
<created>2008-03-12T10:14:17Z</created>
<summary type="text/plain">A quick feedback from the IDE Day in Genoa, waiting for the other IDE Day in Rome to be over before posting a final report. Well, the day in Genoa was a success: while I don&apos;t have gotten yet the...</summary>
<author>
<name>fabriziogiudici</name>

<email>Fabrizio.Giudici@tidalwave.it</email>
</author>
<dc:subject>Community: NetBeans</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/fabriziogiudici/">
<![CDATA[<p>A quick feedback from the IDE Day in Genoa, waiting for the other IDE Day in Rome to be over before posting a final report. Well, the day in Genoa was a success: while I don't have gotten yet the official data, there should have been 130+ attendees, which is very good. The talks by our guests from IntelliJ, Oracle and Sun were of very high quality, as expected; and the large number of questions proved that they caught the attention of people. Congratulations to the JUG steering commitee for their first large event, even considering that they resumed the JUG almost from zero about one year ago.</p>

<p>In spite of being my home town, unfortunately I wasn't able to attend it because of an engagement in Milan; I only got in in the latest minutes of the panel session. But I fully enjoyed the final dinner based on genoese cuisine and fish... :-) </p>

<p></p>

<center>
<img alt="P3100482n.jpg" src="http://weblogs.java.net/blog/fabriziogiudici/archive/geideday/P3100482n.jpg" width="800" height="600" />
</center>

<p><br><br />
<center><br />
<img alt="ge1.jpg" src="http://weblogs.java.net/blog/fabriziogiudici/archive/geideday/ge1.jpg" width="702" height="448" /><br />
</center></p>]]>

</content>
</entry>

</feed>