<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8842565282763151363</id><updated>2011-08-01T10:57:52.330-07:00</updated><category term='osgi'/><category term='eclipse'/><category term='scala'/><category term='eclipse rcp'/><category term='java'/><category term='jaxb'/><category term='basics'/><category term='rifidi'/><title type='text'>Random blurps</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-3757570928822574432</id><published>2009-12-22T15:20:00.001-08:00</published><updated>2009-12-22T15:22:19.341-08:00</updated><title type='text'>Moved to Wordpress</title><content type='html'>The last post was about the last thing left over from my job at Pramari.&lt;br /&gt;With my switch to Senacor I also decided to change my blog.&lt;br /&gt;The new one is here:&lt;br /&gt;&lt;a href="http://codepitbull.wordpress.com/"&gt;http://codepitbull.wordpress.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-3757570928822574432?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/3757570928822574432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=3757570928822574432' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/3757570928822574432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/3757570928822574432'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/12/moved-to-wordpress.html' title='Moved to Wordpress'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-3289301518340622085</id><published>2009-09-02T02:01:00.001-07:00</published><updated>2009-09-02T02:01:31.783-07:00</updated><title type='text'>WCI 2009 talk about CEP</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I am giving a talk at the &lt;a href='http://inka.f4.htw-berlin.de/wci/programme' target='_blank'&gt;WCI 2009&lt;/a&gt; titled "Taming the Tsunami - Tackling the exponential growth of sensor data using ESP/CEP". As one might have guessed it's about my (current) favorite topic: CEP and its applications. It's going to happen on Friday October 16th, 2009 and I am pretty excited as this is my first conference submission.&lt;br/&gt;For those who can't attend or want to get a little information on CEP I put the paper up on my &lt;a href='http://dl.getdropbox.com/u/1206468/blog/WCI2009%20Tsunami.pdf' target='_blank'&gt;dropbox&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-3289301518340622085?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/3289301518340622085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=3289301518340622085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/3289301518340622085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/3289301518340622085'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/09/wci-2009-talk-about-cep.html' title='WCI 2009 talk about CEP'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-1285858701039831950</id><published>2009-08-12T06:24:00.001-07:00</published><updated>2009-08-12T06:24:28.231-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><title type='text'>Faster developing in OSGi with '-console' and 'update'</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Just a little hint for those who work with OSGi on a daily basis.&lt;br/&gt;Starting and stopping an OSGi-framework takes time, even for small projects. Working on a bundle that requires a lot of playing around can become quite painful when you have to wait those precious 5 seconds or more until the system is restarted.&lt;br/&gt;Thankfully the OSGi-spec already provides an &lt;a href='http://www.osgi.org/javadoc/r4v41/org/osgi/framework/Bundle.html#update%28%29' target='_blank'&gt;update&lt;/a&gt; facility.&lt;br/&gt;Each bundle can be told to update itself from the location &lt;i&gt;it was loaded from&lt;/i&gt;.&lt;br/&gt;That last part is the important part and made my life a lot easier. &lt;br/&gt;Most, if not all, OSGi developers already use the console to get handy commands like 'ss' or 'services'. Another nice command is 'update &amp;lt;bundleid&amp;gt;'.&lt;br/&gt;The cool thing about 'update' is that even bundles you included from your workspace can be used.&lt;br/&gt;Just fire up the framework with the '-console' parameter and whenever you changed something in your workspace use update to get those changes into your running framework.&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-1285858701039831950?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/1285858701039831950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=1285858701039831950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1285858701039831950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1285858701039831950'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/08/faster-developing-in-osgi-with-and.html' title='Faster developing in OSGi with &amp;#39;-console&amp;#39; and &amp;#39;update&amp;#39;'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-2645705898035952694</id><published>2009-07-28T02:26:00.001-07:00</published><updated>2009-07-28T02:27:44.293-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><title type='text'>Embracing Groovy</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;font face='sans-serif'&gt;Actually it's not that much about Groovy than it is about scripting.&lt;br/&gt;After a yearlong battle I finally got my way and we added scripting capabilities to the &lt;a href='http://rifidi.org/'&gt;Rifidi Emulator&lt;/a&gt;. &lt;br/&gt;Scripting became an important issue as the scenarios we wanted to create grew more and more complicated.&lt;br/&gt;Now that we also have to support RSSI (Received Signal Strength Indication) we need to be able to simulate tons of different reads with varying tag properties. Something that simply wasn't possible in TagStreamer.&lt;br/&gt;So finally the management agreed that we had to include scripting support.&lt;br/&gt;I already had quite clear picture of what I wanted to achieve and how the thing should look in the end.&lt;br/&gt;So here is a quick outline how Groovy got hooked up to the emulator.&lt;br/&gt;&lt;/font&gt;&lt;ol&gt;&lt;li&gt;At first we had to get rid of the PlugIn-Registry from Eclipse. We were using extension points to register the different reader implementations but decided to be OSGi compliant a while back. We ripped out the registry and replaced it with OSGi-Services and &lt;a href='http://www.springsource.org'&gt;Spring&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;The nice guys at &lt;a href='http://groovy.codehaus.org'&gt;Groovy&lt;/a&gt; were kind enough to already ship an OSGi-enabled jar. So I just downloaded the current binary distribution and put groovy-all.jar into our target platform.&lt;/li&gt;&lt;li&gt;We took our RMI interface that we had added to allow TagStreamer to use Emulator instances remotely and refactored it a little.&lt;br/&gt;We basically made it more scriptable by exposing a couple of helper functions for creating tags and managing readers.&lt;/li&gt;&lt;li&gt;Integrating groovy with the new interface was the easiest part:&lt;br/&gt;Using the &lt;a target='_blank' href='http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ThreadPoolExecutor.html'&gt;executor pattern&lt;/a&gt; we start a new Groovy Shell for each script. Each script gets a reference to the reader management service injected and can now create/destroy/start/stop... readers and tags.&lt;/li&gt;&lt;li&gt;Now to the part that I like the most:&lt;br/&gt;We have been using the Equinox-OSGi-console for quite some time now and we love how extensible this little bugger is. We added a couple of new shell commands to manage the scripts.&lt;/li&gt;&lt;/ol&gt;That's it. 5 days of work and we got full scripting into the emulator. It's not perfect but it will be improved while we use it. &lt;br/&gt;Things we need to work on:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Integrate with Eclipse (We want to make use of the great tooling Groovy has there)&lt;/li&gt;&lt;li&gt;Integrate with Edge Server UI.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Start distributing scenarios.&lt;/li&gt;&lt;/ul&gt;But for now I am quite happy with what we got :)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-2645705898035952694?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/2645705898035952694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=2645705898035952694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/2645705898035952694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/2645705898035952694'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/07/embracing-groovy.html' title='Embracing Groovy'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-4554313154343652839</id><published>2009-07-21T16:04:00.001-07:00</published><updated>2009-07-28T02:27:24.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><title type='text'>Exporting an OSGi application from Eclipse</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Sometimes working with Eclipse feels like arcane science.&lt;br/&gt;Creating a pure OSGi (Equinox) application is as easy as it can get. &lt;br/&gt;Running and tuning are dead simple. Manipulating the runlevels works like a charm (needed to get load time weaving integrated).&lt;br/&gt;But then try exporting it.&lt;br/&gt;After a little painful research and some nice hints from the newgroup I got the following process:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Create a product from your launch config.&lt;/li&gt;&lt;li&gt; Open the product and go the configuration-tab. You will only see the bundles that were designated to be auto-started at a certain level. Add all other bundles and set them to auto-start at level 4. The funny thing here is that these are the default settings for every OSGi-Framework application, but in a product the default is to not auto start anything.&lt;/li&gt;&lt;li&gt;Now make sure that all fields on the overview-tab are blank (Application has always a preselection, at least on my install)&lt;/li&gt;&lt;li&gt; If you haven't done so before add org.eclipse.simpleconfigurator to be started in level 1.&lt;/li&gt;&lt;li&gt;Start the Export Wizard.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Make sure that "Synchronize before exporting" is UNSELECTED, otherwise the export will fail.&lt;/li&gt;&lt;li&gt;Export.&lt;/li&gt;&lt;li&gt;If you don't have the delta in your target platform you will now have to copy the native fragments into the export.&lt;/li&gt;&lt;/ol&gt;  There you go.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-4554313154343652839?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/4554313154343652839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=4554313154343652839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/4554313154343652839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/4554313154343652839'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/07/exporting-osgi-application-from-eclipse.html' title='Exporting an OSGi application from Eclipse'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-4354231191531349008</id><published>2009-06-29T04:41:00.001-07:00</published><updated>2009-07-28T02:27:05.903-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'>Living without friends sucks</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;font face='sans-serif'&gt;And again I stumble over a scenario where it would be so absolutely helpful to have C++-like friends in Java.&lt;br/&gt;Again I need to jump through hoops to get the desired behavior.&lt;br/&gt;I am working on an integration of our SAL (Sensor Abstraction Layer) with Esper. &lt;br/&gt;But the messages from SAL can go to other receivers like JMS, too.&lt;br/&gt;The problem comes form the fact that the messages coming from the SAL have to be readonly to not mess Esper up.&lt;br/&gt;As I like my code easy readable I prefer setters over big constructors. But in this scenario setters would be very problematic as they would allow the manipulation of data at any point in the future. Something that must not happen from the moment on the message went into Esper.&lt;/font&gt;&lt;br/&gt;So public setters are a no go. Protected setters don't work as they are only accessible from the same package. So I end up having to write a big constructor, collect all the data from the different sources and then create the object.&lt;br/&gt;Exceptions might be another way of solving the problem. But all the boilerplate code ...&lt;br/&gt;Wouldn't it be nice to declare it protected and define a list of friends who can access it?&lt;br/&gt;Then I would be able to create the object, pass it to the friends who are allowed to access the setters and then put the object into Esper without having to worry that somebody messes up my messages.&lt;br/&gt;So sad.&lt;br/&gt;Note:&lt;br/&gt;I put together a little idea using CGLib and a set of different interfaces to built a proxy based solution. As soon as I get some time I will post it here.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-4354231191531349008?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/4354231191531349008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=4354231191531349008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/4354231191531349008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/4354231191531349008'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/06/living-without-friends-sucks.html' title='Living without friends sucks'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-5312479991568582682</id><published>2009-06-25T10:24:00.001-07:00</published><updated>2009-06-25T10:24:22.650-07:00</updated><title type='text'>K.I.S.S. and the 5 rules of laziness</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;        &lt;style type='text/css'&gt;     &lt;/style&gt;   &lt;div&gt;   &lt;p&gt;This article took me a lot longer than I had expected. &lt;/p&gt;   &lt;p&gt;I could try to bring up the usual excuses like "my apartment exploded", "my dog (that I don't have) ate my laptop" or "my boss locked me up in my office until my Trac issues were all closed".&lt;/p&gt;   &lt;p&gt;Nope, the problem is that simplicity is the frickin' most complicated thing to explain.&lt;/p&gt;      &lt;p&gt;I tried to keep it simple and summarize things that I feel are important aspects of simplicity. The resulting article is not even close to what I had intended and I think I have to live with not being satisfied with the result. But at least i lived up to my promise to deliver this.&lt;/p&gt;   &lt;p/&gt;   &lt;p/&gt;   &lt;p&gt;How often did somebody use &lt;b&gt;K.I.S.S.&lt;/b&gt; ("&lt;b&gt;K&lt;/b&gt;eep &lt;b&gt;I&lt;/b&gt;t &lt;b&gt;S&lt;/b&gt;imple, &lt;b&gt;S&lt;/b&gt;tupid") to tell you how to improve your code?&lt;/p&gt;After using K.I.S.S. on a lot of fellow coders over the years I thought it should be a quite simple task to explain.&lt;br/&gt;Let's cut this short: I was wrong.&lt;br/&gt;There is so much more to this issue than you think in the first moment. Explaining K.I.S.S. would easily fill a ton of books without really getting to the point.&lt;br/&gt;After a lot of discarded posts I remembered a quote from a friend:&lt;br/&gt;"The most important attribute of a good developer is laziness."&lt;br/&gt;Good coding skills in combination with laziness leads to effective simplicity.&lt;br/&gt;&lt;p&gt;So here they are: &lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;My 5 Rules Of Laziness.&lt;/b&gt;&lt;br/&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Be lazy: Look, the world is full of developers, you are most certainly not the first one to run into that particular problem. Search for an open source project or some sample code&lt;span lang='en-US'&gt; that fixes your problem at hand&lt;/span&gt; (Never ever forget to give credit to the source of your solution!).&lt;/li&gt;&lt;li&gt;If 1. failed remember being lazy: Ok, so your google-fu is weak. Most likely you will have several possible ways to get the job done. Always pick the easier route.&lt;/li&gt;&lt;li&gt;If you are working on 2., be more lazy: This is a lesson learned from doing projects in an agile way: &lt;br/&gt;Solve your problems at hand (the ones defined for the current iteration), not the ones that &lt;b&gt;MIGHT&lt;/b&gt; occur. Don't forget about the &lt;b&gt;MIGHTs&lt;/b&gt;, put them as issues in your tracking system. Discuss them &lt;b&gt;BRIEFLY&lt;/b&gt; with your project lead to see if you can replace the &lt;b&gt;MIGHT&lt;/b&gt; with a &lt;b&gt;WILL&lt;/b&gt; see if it is urgent enough to put in the current iteration. If not, leave it.&lt;/li&gt;&lt;li&gt;If you are impressed by the beauty and complexity of your code:&lt;br/&gt;- Print out a copy of it.&lt;br/&gt;- Put it on the wall next to the picture of Picard.&lt;br/&gt;- Start refactoring until you feel like your cat could understand the code.&lt;/li&gt;&lt;li&gt;Document it!&lt;/li&gt;&lt;/ol&gt;                                          &lt;p/&gt;   &lt;p&gt;1 is quite self explanatory. If you can have somebody else do your work: Have him do it.&lt;/p&gt;   &lt;p/&gt;   &lt;p&gt;2 is a little more interesting. It deals with the arch enemy of of software developers:&lt;/p&gt;   &lt;p&gt;Complexity&lt;/p&gt;   &lt;p&gt;It's a mythical beast more vicious than Grendel and sneakier than Loki. It is secretly plotting to turn your beautiful source code into a pile of gibberish.&lt;/p&gt;   &lt;p&gt;Every software development project has the tendency to grow bigger and more complex. The accomplices of complexity (customers, management, team colleagues) are lurking everywhere. Through feature requests and performance improvements they will make your code more complex. But you don't have to make it worse. &lt;/p&gt;   &lt;p&gt;If you can pick and choose always go for the solution that is easier to implement.&lt;/p&gt;   &lt;p&gt;If  you need to do sorting and you can choose between different algorithms: pick the simplest one. If that proves to be a problem swap it out later on (you should be using something like the the strategy pattern anyway).&lt;/p&gt;   &lt;p&gt;Note (let's not talk about why I have to point this out):&lt;/p&gt;   &lt;p&gt;Don't take shortcuts (singletons, declaring things static, breaking the separation of concerns principle....).&lt;/p&gt;   &lt;p&gt;My 3rd rule is actually an extension of 2. A lot of times you will discover new problems while you are working on your items. If you find something that breaks the software &lt;b&gt;RIGHT NOW&lt;/b&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;open an issue&lt;/li&gt;&lt;li&gt;tell the project lead &lt;/li&gt;&lt;li&gt;fix it. &lt;/li&gt;&lt;/ul&gt;            &lt;p&gt;If it &lt;b&gt;MIGHT&lt;/b&gt; be a problem there is a 80% chance that it will never actually happen:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;report it&lt;/li&gt;&lt;li&gt;discuss it&lt;/li&gt;&lt;li&gt;If you can still put a &lt;b&gt;MIGHT&lt;/b&gt; in the sentence describing the problem, leave it.&lt;/li&gt;&lt;/ul&gt;            &lt;p/&gt;   &lt;p&gt;An example from my personal experience:&lt;/p&gt;   &lt;p&gt;A developer was working on a fairly simple piece of model code. After seeing that the issue wasn't resolved after 4 days of work I asked the developer what was going on. He pointed out that the code for adding and removing items to the model wasn't threadsafe, so he started making it threadsafe. He had turned the whole thing into an intricated (an adjective that should make all your warning lights light up at the same time) piece of threadsafe beauty. At least that was what he thought.&lt;/p&gt;   &lt;p&gt;The model class was used exclusively inside an Eclipse RCP application. Eclipse uses the reactor pattern, therefore everything is executed in the same thread. &lt;/p&gt;   &lt;p&gt;He not only added tons of code that were simply not needed he also broke some things in the process.&lt;/p&gt;   &lt;p/&gt;   &lt;p&gt;My 4th rule is quite simple: &lt;/p&gt;   &lt;p&gt;Nobody will be impressed by a complicated piece of code with the exception of the author. And he will lose the love for that code when he has to go back and understand it a few weeks after he wrote it.&lt;/p&gt;   &lt;p&gt;Just remember that somebody will have to maintain it. And it will most likely be yourself.&lt;/p&gt;   &lt;p/&gt;   &lt;p&gt;Number 5 I just threw in because without documenting your code (and I mean in your code and not some fancy user docs) rules 1 - 4 are worthless.&lt;/p&gt;   &lt;p/&gt;   &lt;p/&gt;   &lt;p/&gt;   &lt;p/&gt;   &lt;p/&gt;  &lt;/div&gt; &lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-5312479991568582682?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/5312479991568582682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=5312479991568582682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/5312479991568582682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/5312479991568582682'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/06/kiss-and-5-rules-of-laziness.html' title='K.I.S.S. and the 5 rules of laziness'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-8666010346575322652</id><published>2009-05-19T06:02:00.001-07:00</published><updated>2009-05-19T06:04:27.120-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>New distinct operator in Esper 3.1.0</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;REJOICE: Esper 3.1.0 got released yesterday and I am currently moving our code to use it.&lt;br/&gt;A couple of leaks got fixed and some behavior have changed. But that's not what made do this post.&lt;br/&gt;After reading through the changelog I discovered this little gem:&lt;br/&gt;&lt;i&gt; - A new "every-distinct" operator has been introduced to the pattern language. Very similar to the "every" operator, this operator suppresses duplicate results received from sub-expressions based on a set of expressions returning distinct-values.&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;Before the this new keyword got introduced I had to create a separate data window and use the following query to fill it with unique events:&lt;br/&gt;&lt;i&gt;insert into collectwin select * from reader as tagevent where not exists (select * from collectwin as collected where collected.key=tagevent.key)&lt;/i&gt;&lt;br/&gt;Thanks to the new keyword I can now define a pattern for that job:&lt;br/&gt;&lt;i&gt;pattern[every-distinct(res.value) res = ParsedEvents]&lt;/i&gt;&lt;br/&gt;As I am doing ALE I need the parsed events to be unique within a certain time frame. To reset the set of unique events do the following:&lt;br/&gt;&lt;i&gt;pattern[every-distinct(res.value) (res = ParsedEvents where timer:within(5 sec))]&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;This makes the whole thing a lot easier and better looking :)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-8666010346575322652?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/8666010346575322652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=8666010346575322652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/8666010346575322652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/8666010346575322652'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/05/new-distinct-operator-in-esper-310.html' title='New distinct operator in Esper 3.1.0'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-6786164553897331812</id><published>2009-05-12T11:11:00.001-07:00</published><updated>2009-05-12T11:11:40.026-07:00</updated><title type='text'>Recent Activities</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;The last few months were quite busy and once again it was my blog that had to suffer. We rewrote our whole middleware, I got into Esper, we had a big show in Orlando and I had to travel back and forth between Germany and the US.&lt;br/&gt;But I didn't stop writing.&lt;br/&gt;I finally pulled myself together to try write articles for software magazins. To my personal amazement it looks like as if people actually like the things I write ;)&lt;br/&gt;The German &lt;a href='http://it-republik.de/jaxenter/java-magazin' target='_blank'&gt;Java Magazin&lt;/a&gt; published a 2 part series of articles on RFID and Open Source RFID tools in issues 4.09 and 5.09.&lt;br/&gt;I mentioned &lt;a href='http://codepitbull.blogspot.com/2008/12/spring-comparable-osgi-eclipse-rcp-in.html' target='_blank'&gt;before&lt;/a&gt; that I am writing on an article for the German Eclipse Magazin. The article was published in December 2008.&lt;br/&gt;Yes, I know you won't be able to buy them as there are already new issues of both magazins out. I hope to be able to post links to the articles as both magazins tend to republish them online.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=d39d3c95-d8e6-8672-9943-edfa5d664d69' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-6786164553897331812?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/6786164553897331812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=6786164553897331812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/6786164553897331812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/6786164553897331812'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/05/recent-activities.html' title='Recent Activities'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-1401484503227148739</id><published>2009-04-12T18:58:00.001-07:00</published><updated>2009-06-25T10:25:47.487-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'>Software development basics</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;style type='text/css'&gt;     &lt;/style&gt;   &lt;div&gt;   &lt;p&gt;Software development is my passion. I love creating code, brooding over algorithms, learning new languages or frameworks and just about everything that is related to it.&lt;/p&gt;   &lt;p&gt;Having started to code on the C64 more than 20 years ago I can savely assume that I know a lot about the process and the required mindset for coding.&lt;/p&gt;   &lt;p&gt;And it's exactly that mindset that I miss in a lot of coders that come out of university.&lt;/p&gt;   &lt;p&gt;It's not there fault. Universities tend to just teach the tools, like a programming language or UML, skipping the essential basics. &lt;/p&gt;   &lt;p&gt;I don't want to get started on how much I think it is wrong to start coding with a language like java. &lt;/p&gt;   &lt;p&gt;What I want to get started on is the basic set of principles and rules that should be the mantras of every developer and most engineers.&lt;/p&gt;   &lt;p&gt;So this article marks the beginning of a small series about what I think are essential rules to follow to become a good coder.&lt;/p&gt;   &lt;p&gt;   &lt;/p&gt;&lt;p&gt;In the series I will cover the following things:&lt;/p&gt;   &lt;p&gt;   &lt;/p&gt;&lt;p&gt;&lt;a href='http://codepitbull.blogspot.com/2009/06/kiss-and-5-rules-of-laziness.html'&gt;K.I.S.S.&lt;/a&gt;&lt;/p&gt;   &lt;p&gt;Divide and Conquer&lt;/p&gt;   &lt;p&gt;Premature optimization is the death of software&lt;/p&gt;   &lt;p&gt;Separation of concerns&lt;/p&gt;  &lt;/div&gt; &lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-1401484503227148739?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/1401484503227148739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=1401484503227148739' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1401484503227148739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1401484503227148739'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/04/software-development-basics.html' title='Software development basics'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-5690709294360877374</id><published>2009-03-15T20:33:00.001-07:00</published><updated>2009-03-15T20:33:02.110-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Buildr + Scala on Ubuntu</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;So I got started on my Scala adventure.&lt;br/&gt;Scala is a functional language and I wanted to get started with it since forever.&lt;br/&gt;After playing around with it for some time I had to accept the sad truth:&lt;br/&gt;The Eclipse plugin is a piece of crap.&lt;br/&gt;Tons of crashes, inconsistent behavior, faulty auto-completion ....&lt;br/&gt;So I had to go back to my old friend &lt;a href='http://www.vim.org/'&gt;vim&lt;/a&gt;. The only problem was that without eclipse I needed something to do the building. I could have written some shell scripts but as we are looking for a better build system for our projects at Pramari I thought this might be the right time to do so.&lt;br/&gt;Ant was no option, I already knew it and I wanted something new :)&lt;br/&gt;Maven was also not an option. This tool is an abomination and if there is any tool that is able to singlehandedly make agile software development impossible then it is this monster (more rants to come, for now: If you need to dedicate a person to learn the build system you know that there is trouble coming).&lt;br/&gt;After reading a ton of blog-posts I decided to give &lt;a href='http://buildr.apache.org/'&gt;buildr&lt;/a&gt; a shot.&lt;br/&gt;The tool looked very promising, getting scripting and building together looked very intriguing to me.&lt;br/&gt;But before building the wise creators of Ubuntu and Buildr teamed up to give you a thrilling installation experience.&lt;br/&gt;I have been working with Ruby on Rails for some time (Buildr is built on top of &lt;a href='http://www.ruby-lang.org'&gt;Ruby&lt;/a&gt; and &lt;a href='http://rake.rubyforge.org/'&gt;Rake&lt;/a&gt;) so I expected a smooth installation using &lt;a href='http://rubygems.org/'&gt;gem&lt;/a&gt;.&lt;br/&gt;Boy, I was wrong.&lt;br/&gt;It took me two days to figure out how to get it up and running.&lt;br/&gt;First of all: I thought gem was a system comparable to apt-get. it's not. I tried doing &lt;i&gt;gem install buildr&lt;/i&gt; which failed with a ton of error reports. After manually installing the required versions of rake and several other tools I ended up with a version of buildr.&lt;br/&gt;To my surprise it wasn't added to a directory that in the shell path. After finding the file and calling it manually it failed with a couple of error reports.&lt;br/&gt;To cut this short:&lt;br/&gt;I just figured out how to get it running.&lt;br/&gt;First of all: Don't try to do it from the debian gem repositories, you need to specify the version from rubyforge.&lt;br/&gt;So here is what you need to do:&lt;i&gt;&lt;br/&gt;&lt;br/&gt;gem install net-ssh -version 2.0.4&lt;br/&gt;gem install net-ssh -v 2.0.4&lt;br/&gt;gem install net-sftp -v 2.0.1&lt;br/&gt;gem install highline -v 1.4.0&lt;br/&gt;gem install rubyforge -v 1.0.0&lt;br/&gt;gem install hoe -v 1.7.0&lt;br/&gt;gem install rjb -v 1.1.6&lt;br/&gt;gem install rspec -v 1.1.5&lt;br/&gt;gem install xml-simple -v 1.0.11&lt;br/&gt;&lt;/i&gt;&lt;br/&gt;&lt;i&gt;gem install --source http://gems.tron.name/gems.rubyforge.org/  buildr&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;This will give you a working version of Buildr 1.3.3.&lt;br/&gt;To get builder to run with scala and java you need to specify SCALA_HOME and JAVA_HOME.&lt;br/&gt;Uh, before I forget it:&lt;br/&gt;Your buildfile needs to contain &lt;i&gt;require 'buildr/scala'&lt;/i&gt; to be able to build a scala project. For some reason this line is not added if automatically creating a buildfile inside a directory hierarschy containing scala files.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=836e7764-9d14-4851-918a-761e664debd4' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-5690709294360877374?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/5690709294360877374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=5690709294360877374' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/5690709294360877374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/5690709294360877374'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/03/buildr-scala-on-ubuntu.html' title='Buildr + Scala on Ubuntu'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-7183886898650040055</id><published>2009-02-22T20:24:00.001-08:00</published><updated>2009-02-22T20:24:34.911-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Apache Commons Logging. IT'S A TRAP!</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Apache Commons Logging (ACL) is a nice idea when you first stumble upon it:&lt;br/&gt;Develop your app using commons logging, use whatever logging backend you want to use and let the guy deploying decide what he wants to use for logging.&lt;br/&gt;So far so good. I liked the idea. We are using commons logging all over the place.&lt;br/&gt;Now reality hits.&lt;br/&gt;Two weeks ago we started a new project. This time we wanted to do everything right and wanted to get all logging centralized. Piece of cake when everybody is using it ... which is simply not the case.&lt;br/&gt;Having tons of open source libraries in there we finally had to realize that not all coders bought into the idea of ACL. Which is perfectly understandable as it adds another layer to your logging, another jar to the classpath and it takes away the logging interface you came to love over the years.&lt;br/&gt;People use ACL, log4J and *shudders* Java-Logging. How do you handle that?&lt;br/&gt;A while ago I read a &lt;a href='http://www.theserverside.com/news/thread.tss?thread_id=46698'&gt;post&lt;/a&gt; about a new logging wrapper. The post was incredibly misleading and bad researched so I almost dismissed &lt;a href='http://www.slf4j.org/'&gt;slf4j&lt;/a&gt;. Thankfully I looked again.&lt;br/&gt;slf4j was actually what we needed.&lt;br/&gt;So what does it do?&lt;br/&gt;It's quite simple:&lt;br/&gt;It's a log syndication tool. It just collects logging output from all kinds of different sources and redirects it to your logge rof choice.&lt;br/&gt;Awesome, finally someone got it right. &lt;br/&gt;Using it in OSGi makes my life a lot easier. Using OSGi I could sneak in the replacements for org.apache.commons into all libraries and could also catch logging output from all other sources.&lt;br/&gt;Give it a shot and please, remove ACL from your project, it's a waste of time and space.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=e70b43da-c5dc-4f25-96d8-8f13c6d7f421' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-7183886898650040055?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/7183886898650040055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=7183886898650040055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/7183886898650040055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/7183886898650040055'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2009/02/apache-commons-logging-it-trap.html' title='Apache Commons Logging. IT&amp;#39;S A TRAP!'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-762067164337577133</id><published>2008-12-31T09:19:00.001-08:00</published><updated>2009-07-12T12:04:50.266-07:00</updated><title type='text'>Double Check in Java is broken .. not</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Coders from the C world are most likely to use the so called double check idiom at some point of their coding career. If those same coders (like me) do their first multithreaded app in java will probably run into some problems.After my first trials with java several years ago I ran into some pretty weird problems. Sometimes my nice apps would expose the weirdest behaviour. After searching around I got educated in a newsgroup.&lt;br/&gt;Before I start to explain what the problem is I should probably explain what double-check is.&lt;br/&gt;Let's say there is a certain object that needs to be initialized. An initialization should only take place once. Sometimes it might be required to postpone the initialization until the first use of the object (lazy init) or until certain conditions in the systems are met (service orientated architectures).&lt;br/&gt;The following piece of code illustrates the naive approach:&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;pre class='source-code'&gt;Test initValue=null;&lt;br /&gt;&lt;br /&gt;if(initValue==null){&lt;br /&gt;  synchronized(this){&lt;br /&gt;      if(initValue==null){&lt;br /&gt;          initValue=new Test();&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;So we first check if the variable has been initialized, if not we synchronize and check again and if this second check is succeeds we do the init work. The second check is done because another thread might have initilaized in the meantime.&lt;br/&gt;The problem is that this won't work in Java. The JDK does a lot of work under the hood. On of these things is that threads can keep a local copy of variables. This behavior completely breaks double check.&lt;br/&gt;That's where my story ended some years ago. I never touched it or bothered researching into it again.&lt;br/&gt;Until I recently discovered atomic variables in Java and stumbled over the new memory model introduced with JDK 5.&lt;br/&gt;After reading up on it I finally found the solution to fix double-check:&lt;br/&gt;The volatile keyword.&lt;br/&gt;Volatile indicates that the variable will be modified by several threads. This tells the JVM that threads are simply not allowed to keep local copies of variables.&lt;br/&gt;Fixed double check locking looks like this:&lt;br/&gt;&lt;pre class='source-code'&gt;volatile Test initValue=null;&amp;lt;br /&amp;gt;if(initValue==null){&amp;lt;br /&amp;gt;    synchronized(this){&amp;lt;br /&amp;gt;        if(initValue==null){&amp;lt;br /&amp;gt;            initValue=new Test();&amp;lt;br /&amp;gt;        }&amp;lt;br /&amp;gt;    }&amp;lt;br /&amp;gt;}&lt;/pre&gt;&lt;br/&gt;Yep, I got my double-check locking back but there are still some things to consider:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Performance: If using &lt;b&gt;volatile&lt;/b&gt; on a variable better do some benchmarking.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;JDK 5: Yep, volatile only works like this with JDK 5 and later.&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-762067164337577133?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/762067164337577133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=762067164337577133' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/762067164337577133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/762067164337577133'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2008/12/double-check-in-java-is-broken-not.html' title='Double Check in Java is broken .. not'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-2185276706448368181</id><published>2008-12-10T04:22:00.001-08:00</published><updated>2008-12-10T04:37:00.030-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse rcp'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><title type='text'>Spring, @Comparable, OSGi, Eclipse RCP in Eclipse Magazin</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I wanted to post how I got Spring to use AspectJ for DI in Eclipse RCP applications. The post won't happen as I wrote an article about it for the German Eclipse Magazin. As soon as the article is out you will find a link to it in here.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-2185276706448368181?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/2185276706448368181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=2185276706448368181' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/2185276706448368181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/2185276706448368181'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2008/12/spring-comparable-osgi-eclipse-rcp-in.html' title='Spring, @Comparable, OSGi, Eclipse RCP in Eclipse Magazin'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-7170963823181751687</id><published>2008-11-27T04:30:00.001-08:00</published><updated>2008-12-10T04:36:38.070-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jaxb'/><title type='text'>JAXB vs Interfaces</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;A more detailed post about my battle with Spring (I WON) will follow soon. &lt;br/&gt;Right now I want to talk about some JAXB stuff.&lt;br/&gt;JAXB is our tool of choice to store scene descriptions to a xml file. We are not working with a predefined schema but with annotated classes.&lt;br/&gt;After all the trouble that people gave us by including a (IMHO) outdated version of JAXB  in earlier JDK 6 versions (Note: There is STILL no nice way to replace libraries shipped with Java with different versoins. Is it really that hard to provide Java with some hooks that would allow developers to do that??)  we were very happy when JAXB 2 finally found its way into later releases.&lt;br/&gt;But that's where the happiness ends. Don't get me wrong JAXB is a nice tool to handle  lot of different scenarios. But why the hell did they have to make it so complicated to use interfaces?&lt;br/&gt;If you start googling for 'JAXB and Interfaces' you will find a ton of people having problems to get this to work.&lt;br/&gt;One of the first links you will stumble over is probably &lt;a href='https://jaxb.dev.java.net/guide/Mapping_interfaces.html'&gt;this one&lt;/a&gt;. A nice round up of the whole issue.&lt;br/&gt;But still.&lt;br/&gt;Right now I need to annotate a class in Designer using @XmlElement(Object.class).&lt;br/&gt;The reason is that I need to keep a reference to a class that implements a given interface. I can't assume that the interface is implemented by a certain class.&lt;br/&gt;I can think of several reasons why this is a problem for an xml-file but there has to be a nicer way to do this.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-7170963823181751687?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/7170963823181751687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=7170963823181751687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/7170963823181751687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/7170963823181751687'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2008/11/jaxb-vs-interfaces.html' title='JAXB vs Interfaces'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-4626878857671983438</id><published>2008-11-24T16:56:00.001-08:00</published><updated>2008-11-24T16:56:08.752-08:00</updated><title type='text'>Fragments!!!!!!!</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Another hard lesson learned.&lt;br/&gt;In my quest to get Spring-DM plus Equinox plus @Configurable to run the following fact almost killed the remains of my sanity:&lt;br/&gt;A plugin and its fragment need to be in the same directory for equinox to actually aply the fragment.&lt;br/&gt;So, if you, like me, are a person that likes to keep things nicely separated into different directories you are screwed.&lt;br/&gt;I battled for hours. In an act of desparation I copied everything into one directory (thereby destroying my nice targte-platform-structure) and suddenly it worked. I sorted out my stuff and finally came to this conlusion.&lt;br/&gt;Yeah, seems that I got everything running by now.&lt;br/&gt;*sigh*&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-4626878857671983438?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/4626878857671983438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=4626878857671983438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/4626878857671983438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/4626878857671983438'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2008/11/fragments.html' title='Fragments!!!!!!!'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-7278210316651134110</id><published>2008-11-23T03:36:00.001-08:00</published><updated>2008-12-10T04:35:52.850-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse rcp'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><title type='text'>OSGi + Spring = ?</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;It took me a while to get back to my beloved &lt;a href='http://www.springframework.org'&gt;Spring&lt;/a&gt;.&lt;br/&gt;Before I start raving about this great framework some intro why I am doing this.&lt;br/&gt;Dependency Injection is one of my most beloved patterns. It removes a lot of boilerplate code from your software if correctly applied.&lt;br/&gt;When we started the Designer project we were looking into spring-osgi but decided to wait for the first final release to incorporate it.&lt;br/&gt;Lookign back I don't know if that was the best way to go. We had to implement our own DI-Service in OSGi. So far it has worked pretty good but with a growing project you want get rif od as many headaches as possible.&lt;br/&gt;One headache is that now almost all aspects of Rifidi are using our custom DI-Service and that means we have to deal with new features (unbelievable, some people really want software to evolve).&lt;br/&gt;It would be great to get replace it with Spring-DM (the Spring OSGi project). &lt;br/&gt;So today is the great day:&lt;br/&gt;I will try to get services injected into an eclipse view.&lt;br/&gt;&lt;br/&gt;Things accomplished this morning:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Target platform is up and running (will be up in Rifidi subversion as soon as I am done fighting with it)&lt;/li&gt;&lt;li&gt;Services get deployed to OSGi&lt;/li&gt;&lt;li&gt;Dependencies get injected (right now using xml config files)&lt;/li&gt;&lt;/ol&gt;Next steps:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Get AOP up and running.&lt;/li&gt;&lt;li&gt;Inject services using annotations&lt;/li&gt;&lt;li&gt;Get a view injected with a service&lt;br/&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-7278210316651134110?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/7278210316651134110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=7278210316651134110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/7278210316651134110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/7278210316651134110'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2008/11/osgi-spring.html' title='OSGi + Spring = ?'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-1856547594258513215</id><published>2008-03-26T16:54:00.000-07:00</published><updated>2008-03-26T17:06:27.564-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><category scheme='http://www.blogger.com/atom/ns#' term='jaxb'/><title type='text'>JAXB vs OSGI</title><content type='html'>&lt;div style="text-align: justify;"&gt;A side note to those poor souls who have to get JAXB running with OSGI:&lt;br /&gt;It works, but it is ugly.&lt;br /&gt;A little story about the problem:&lt;br /&gt;We have a ton of classes implementing different interfaces.&lt;br /&gt;After putting a lot of work into refactoring the first release of designer I had created a ton of new interfaces.&lt;br /&gt;We came to the point where we wanted to save all those nice classes with all the nice interfaces they implement to an XML file.&lt;br /&gt;Since JDK 1.6 update 4 JAXB 2 is included in the JDK and we figured it might be good to give it another shot.&lt;br /&gt;To make it short: as soon as one of our properties had an interface as its type the saving failed.&lt;br /&gt;We followed the instructions on this &lt;a href="https://jaxb.dev.java.net/guide/Mapping_interfaces.html"&gt;site&lt;/a&gt; but JAXB kept telling us that it is unable to handle interfaces.&lt;br /&gt;After some fiddling in a sandbox and reading through some osgi stuff I finally found out what to do:&lt;br /&gt;Add the following JVM parameters and you are good:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-Dosgi.compatibility.bootdelegation=true -Dorg.osgi.framework.bootdelegation=*&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;It's a little brute force to do it this way and you will have a small performance impact on your app but at least it works.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-1856547594258513215?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/1856547594258513215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=1856547594258513215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1856547594258513215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1856547594258513215'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2008/03/jaxb-vs-osgi.html' title='JAXB vs OSGI'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-8443517227321634096</id><published>2007-11-24T22:59:00.000-08:00</published><updated>2008-12-10T04:34:31.416-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse rcp'/><category scheme='http://www.blogger.com/atom/ns#' term='rifidi'/><title type='text'>Chopped off arm, body is healthy</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;div style='text-align: justify;'&gt;Yep, it was a very, very hard decision.&lt;br/&gt;Today i finalized the removal of Common Navigator from Designer.&lt;br/&gt;Probably one of the toughest decision I had to make so far.&lt;br/&gt;CNF is an awesome framework but the lack of good documentation makes it quite a task to use it.&lt;br/&gt;I got everything to work, with one exception:&lt;br/&gt;Non objectContribution contributed actions.&lt;br/&gt;Getting your actions to show up in the CNF popup based on the selected object(s) is a piece of cake.&lt;br/&gt;Everything else is a completely different story.&lt;br/&gt;I followed the instructions on &lt;span style='text-decoration: underline;'&gt;&lt;a href='http://scribbledideas.blogspot.com/'&gt;digital paper napkin&lt;/a&gt;&lt;/span&gt; up to that point of adding stuff using action providers.&lt;br/&gt;And there it failed. I dodn't know what I did wrong, I got the demo sourcecode, got the same exception: "Incorrect number of expressions: enablement in navigator extension: null in plugin"&lt;br/&gt;A quick googling showed me that some other people hit that problem but no answers so far.&lt;br/&gt;That did it and for now we will live without CNF.&lt;br/&gt;I still hope to get it back in some time but right now we are back to old fashioned RCP.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-8443517227321634096?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/8443517227321634096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=8443517227321634096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/8443517227321634096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/8443517227321634096'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2007/11/chopped-off-arm-body-is-healthy.html' title='Chopped off arm, body is healthy'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-1123280696742646224</id><published>2007-11-20T21:56:00.000-08:00</published><updated>2008-12-10T04:33:49.978-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse rcp'/><title type='text'>Leg, Arm, Head</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;div style='text-align: justify;'&gt;What would you be willing to lose?&lt;br/&gt;I am sitting here, after weeks of coding with the CommonNavigator framework in eclipse, just to realize that I might have to completely remove it or lose the last tiny shard of sanity left in my head.&lt;br/&gt;Yes, CommonNavigator is awesome, somewhat.&lt;br/&gt;The absolute absence of debugging help in it is just frustrating.&lt;br/&gt;Not knowing what is wrong with your XMl and not getting any help from eclipse is rather frustrating.&lt;br/&gt;By googling a little you will discover pretty soon that I am not the only person who is unable to get actions to show in the places you actually want em to show up.&lt;br/&gt;By now I think I got a pretty good grasp on eclipse and the dreaded toolBar/menuBar-paths.&lt;br/&gt;I even understand how the objectContributions work.&lt;br/&gt;But the vieweContribution stuff is a complete mystery to me.&lt;br/&gt;Seems like as if I will have to read some source code to figure out what I am doing wrong.&lt;br/&gt;Would it really be that hard to provide some help in the logfiles for that?&lt;br/&gt;What about adding just some lines that tell me where actions end up.&lt;br/&gt;Or *ghasp* what about giving me a warning if I declare an invalid path?&lt;br/&gt;So right now I have to come to a decision:&lt;br/&gt;Keep CommonNavigator and all the nice goodies OR&lt;br/&gt;cut it out and do it in a clean RCP-App.&lt;br/&gt;And my frustration will probably lead to the latter one.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-1123280696742646224?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/1123280696742646224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=1123280696742646224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1123280696742646224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/1123280696742646224'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2007/11/leg-arm-head.html' title='Leg, Arm, Head'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-699501372772929455</id><published>2007-11-14T23:07:00.000-08:00</published><updated>2007-11-14T23:14:50.554-08:00</updated><title type='text'>Restart</title><content type='html'>Ok, it took a while and I am the king of procrastination.&lt;br /&gt;But now all my excuses are gone.&lt;br /&gt;Got my diploma, got rid of a lot old burdens and started with a lot new things.&lt;br /&gt;I am still working for Pramari, LLC and I intend to use this as my developer blog for my current projects.&lt;br /&gt;Right now I am working in three areas of coding:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Eclipse: the good stuff (CommonNavigator, yeah)&lt;/li&gt;&lt;li&gt;OpenGL: mostly jMonekEngine&lt;/li&gt;&lt;li&gt;Android: just for fun&lt;/li&gt;&lt;/ul&gt;Eclipse and OpenGL I currently use for RiFiDi-Designer which I am working on full time with my team for Pramari, LLC.&lt;br /&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Ysa-JU_vwtk&amp;amp;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Ysa-JU_vwtk&amp;amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The voice job in the video is done by Prasith, the manager of Pramari.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-699501372772929455?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/699501372772929455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=699501372772929455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/699501372772929455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/699501372772929455'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2007/11/restart.html' title='Restart'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-8843480747336382673</id><published>2007-07-28T12:50:00.000-07:00</published><updated>2007-07-28T13:14:08.779-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse rcp'/><title type='text'>How to get a navigator view in RCP</title><content type='html'>I am struggling with the Common Navigator Framework right now.&lt;br /&gt;After finding a good &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html"&gt;tutorial&lt;/a&gt; on CNF I started hacking away.&lt;br /&gt;The problem was that I needed a navigator view to actually do something with my fancy new CNF.&lt;br /&gt;Creating the view is only half the deal and after some google research I finally found the part that was missing:&lt;br /&gt;&lt;br /&gt;In your perspective add the Navigator View&lt;br /&gt;&lt;pre style="overflow: auto; width: 500px; height: 100px;"&gt;&lt;br /&gt;&lt;span style="font-family:mon,mon;"&gt;IFolderLayout topLeft= layout.createFolder("topLeft",IPageLayout.LEFT,&lt;br /&gt;0.25f,layout.getEditorArea());&lt;br /&gt;topLeft.addView(IPageLayout.ID_RES_NAV);&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;And now for the part that I was missing.&lt;br /&gt;In your WorkbenchAdvisor (normally called ApplicationWorkbenchAdvisor if you used the PlugIn wizard) overwrite the preStartup method and add the following line:&lt;br /&gt;&lt;pre style="overflow: auto; width: 500px; height: 100px;"&gt;&lt;br /&gt;&lt;span style="font-family:mon,mon;"&gt;WorkbenchAdapterBuilder.registerAdapters();&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;Uh, I almost forgot about the dependencies:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;org.eclipse.ui.navigator&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;org.eclipse.ui.navigator.resources&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;org.eclipse.ui.ide&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;org.eclipse.ui.navigator&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-8843480747336382673?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/8843480747336382673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=8843480747336382673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/8843480747336382673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/8843480747336382673'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2007/07/how-to-get-navigator-view-in-rcp.html' title='How to get a navigator view in RCP'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8842565282763151363.post-2518018583379307388</id><published>2007-07-27T11:26:00.000-07:00</published><updated>2007-07-27T11:42:08.295-07:00</updated><title type='text'>First post</title><content type='html'>I finally did it.&lt;br /&gt;My first blog.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Err, yep, enough applause.&lt;br /&gt;This blog will basically cover my daily work as a software developer.&lt;br /&gt;I want to provide, hopefully, useful information on java and eclipse RCP.&lt;br /&gt;I realized, after fighting for the 10000000 time with some eclipse issues I had solved a year ago, that it would be great to keep track of these things and probably help some people who might stumble upon the same issues.&lt;br /&gt;About myself:&lt;br /&gt;I am a software developer currently working for Pramari, LLC.&lt;br /&gt;We are developing java based open source software (for those who want to know: we are working on a RFID simulation environment called &lt;a href="http://www.rifidi.org/"&gt;RiFiDi&lt;/a&gt;).&lt;br /&gt;I am currently developing a 3d simulation that incorporates &lt;a href="http://www.jmonkeyengine.com/"&gt;jMonkey&lt;/a&gt; and &lt;a href="http://www.jmonkeyengine.com/"&gt;eclipse&lt;/a&gt;.&lt;br /&gt;And another side note:&lt;br /&gt;I am German, so English is not my native languag, I am a fluent speaker but when it comes to written language I might have some weaknesses. If you find misspellings or grammar problems feel free to send me a note.&lt;br /&gt;Thanks&lt;br /&gt;Codepitbull&lt;br /&gt;&lt;a href="http://www.jmonkeyengine.com/"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8842565282763151363-2518018583379307388?l=codepitbull.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codepitbull.blogspot.com/feeds/2518018583379307388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8842565282763151363&amp;postID=2518018583379307388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/2518018583379307388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8842565282763151363/posts/default/2518018583379307388'/><link rel='alternate' type='text/html' href='http://codepitbull.blogspot.com/2007/07/first-post.html' title='First post'/><author><name>Jochen Mader</name><uri>http://www.blogger.com/profile/10250762410038605596</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_VJlW-TJEb3Q/SStP3K9ZYiI/AAAAAAAAAAg/M44F03IFRjI/S220/me.png'/></author><thr:total>0</thr:total></entry></feed>
