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

<channel>
	<title>Johannes Thönes &#187; Programming</title>
	<atom:link href="http://blog.jthoenes.net/category/programmierung/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jthoenes.net</link>
	<description>Thoughts, Remarks and Tutorials from my Life and my Works.</description>
	<lastBuildDate>Wed, 02 May 2012 14:04:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Java 8 Status Updates</title>
		<link>http://blog.jthoenes.net/2011/12/23/java-8-status-updates/</link>
		<comments>http://blog.jthoenes.net/2011/12/23/java-8-status-updates/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 22:10:26 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java8]]></category>
		<category><![CDATA[project jigsaws]]></category>
		<category><![CDATA[project lambda]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=299</guid>
		<description><![CDATA[The two big new language features of the upcoming Java SE 8 release are Lambda Expressions and Modularity. For both, status updates have been released these days. I&#8217;ll share the links with you, so you might read through them over the holidays The Java SE 8 release is planned for mid 2013 by Oracle. Project [...]]]></description>
			<content:encoded><![CDATA[<p>The two big new language features of the upcoming Java SE 8 release are Lambda Expressions and Modularity. For both, status updates have been released these days. I&#8217;ll share the links with you, so you might read through them over the holidays <img src='http://blog.jthoenes.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The Java SE 8 release is planned for mid 2013 by Oracle.<br />
<span id="more-299"></span></p>
<span id="Project_Lambda"><h2>Project Lambda</h2></span>
<p>Project Lambda as well as the <a href="http://jcp.org/en/jsr/detail?id=335">JSR-335</a> wants to provide means for modelling of code as data in Java &#8211; in non-exact, colloquial words one could say it aims for functions as <a href="http://en.wikipedia.org/wiki/First-class_function">first-class objects</a> in Java. To do so, Project lambda wants to provide the following four extensions to the Java language:</p>
<ol>
<li><em>Lambda Expressions</em> or <em>Closures</em> which allow the programmer to specify a piece of executable code  in an idomatic way. They can be stored in a variable, passed to a method as argument or used as return value of a method.</li>
<li><em>Expandend Target Typing</em> to bind the Lambda Expressions to objects of a specific type (type inference). These types can be so-called <em>Function Interfaces</em> &#8211; Java interfaces with exactly one method.</li>
<li><em>Method and Constructor References </em>to allow the programmer to use existing methods on objects to be bound to a a Function Interface.</li>
<li><em>Default or Virtual Extension Methods</em> to add more methods to existing interfaces without breaking existing implementations  (especially in the collection library).</li>
</ol>
<div>To give you an idea, here is a piece of code using anonymous inner-classes for some collection logic.</div>
<pre class="brush: java; title: ; notranslate">
List students = // ...
students.filter(new FilerFunction(){
    @Override
    public boolean filter(Student s){
      return s.getEntryYear() == 2011;
    }
    })
  .map(new MapFunction&lt;Student,Integer&gt;(){
    @Override
    public Integer map(Student s){
      return s.getGrade();
    }
  })
  .reduce(new ReduceFunction&lt;Integer&gt;(){
    @Override
    public Integer reduce(Integer value1, Integer value2){
      Math.max(value1, value2);
    }
  });
</pre>
<p>In contrast the following code using the features on their way with Project Lambda:</p>
<pre class="brush: java; title: ; notranslate">List students = // ...
students.paralell()
  .filter(s -&gt; s.getEntryYear() == 2011)
  .map(s -&gt; s.getGrade())
  .reduce(Math::max);</pre>
<p>The information about the current state from Specification Lead and OpenJDK Project Lead Brian Goetz can be found at <a href="http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html">State of the Lambda</a>.</p>
<span id="Project_Jigsaw_8211_Modularity_for_the_Java_Platform"><h2>Project Jigsaw &#8211; Modularity for the Java Platform</h2></span>
<p>In Project Jigsaw, the OpenJDK community lead by Oracle tries to introduce modularity into Java the language. The approach will be different from e.g. OSGi, because they want to establish it on the language level &#8211; with static compile time checking. The Oracle people always say they strive for compatibility of Jigsaw with OSGi.</p>
<p>Marc Reinhold, Oracles Chief Platform Architect and OpenJDK Project Lead, describes three principles of the modularity approach:</p>
<blockquote>
<ul>
<li><em>Modularity is a language construct</em> &#8211; The best way to support modular programming in a standard way in the Java platform is to extend the language itself to support modules. Developers already think about standard kinds of program components such as classes and interfaces in terms of the language; modules should be just another kind of program component.</li>
<li><em>Module boundaries should be strongly enforced</em> &#8211;  A class that is private to a module should be private in exactly the same way that a private field is private to a class. In other words, module boundaries should determine not just the visibility of classes and interfaces but also their accessibility. Without this guarantee it is impossible to construct modular systems capable of running untrusted code securely.</li>
<li><em>Static, single-version module resolution is usually sufficient</em> &#8211; Most applications do not need to add or remove modules dynamically at run time, nor do they need to use multiple versions of the same module simultaneously. The module system should be optimized for common scenarios but also support narrowly-scoped forms of dynamic multi-version resolution motivated by actual use cases such as, e.g., application servers, IDEs, and test harnesses.</li>
</ul>
</blockquote>
<p>For the programmer using Jigsaw, it will be especially noticable because the language will now have three phases (instead of two):</p>
<ul>
<li><em>Compile Time</em>: The classes of a module are compiled. The compiled classes together with the resources (configuration files, metadata files etc.) are packed together in an archive in the format of JMOD (for java module):</li>
<li><em>Install Time: </em>On any computer having the JRE installed, there will be a module library. Here the user can install java modules.</li>
<li><em>Run Time: </em>A module defining a main class (<em>Invokable Module</em>) can be executed. The JVM will load this module and any module it requires from the module library and then execute the code.</li>
</ul>
<p>Information about the the current state of Project Jigsaw from Marc Reinhold can be found at <a href="http://cr.openjdk.java.net/~mr/jigsaw/notes/jigsaw-big-picture-01">Project Jigsaw: The Big Picture — DRAFT 1</a>.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=299&amp;md5=e5b327783cd3140104eb8c99114d8976" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2011/12/23/java-8-status-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2011%2F12%2F23%2Fjava-8-status-updates%2F&amp;language=en_GB&amp;category=text&amp;title=Java+8+Status+Updates&amp;description=The+two+big+new+language+features+of+the+upcoming+Java+SE+8+release+are+Lambda+Expressions+and+Modularity.+For+both%2C+status+updates+have+been+released+these+days.+I%26%238217%3Bll+share+the...&amp;tags=java%2Cjava8%2Cproject+jigsaws%2Cproject+lambda%2Cblog" type="text/html" />
	</item>
		<item>
		<title>14 Golden Eggs of Good UI Design</title>
		<link>http://blog.jthoenes.net/2011/11/24/14-golden-eggs-of-good-ui-design/</link>
		<comments>http://blog.jthoenes.net/2011/11/24/14-golden-eggs-of-good-ui-design/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 22:04:44 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[devoxx]]></category>
		<category><![CDATA[devoxx 2011]]></category>
		<category><![CDATA[golden eggs]]></category>
		<category><![CDATA[ui design]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=291</guid>
		<description><![CDATA[As I discussed, I have been to &#8220;Rules for Good UI Design&#8221; by Joe Nuxoll (@joeracer) at Devoxx 2011.  In this talk, he was giving 14 &#8220;Golden Eggs&#8221; for designing a user interface (UI). The &#8220;Golden Eggs&#8221; have been written down from Joe&#8217;s slides &#8211; I hope without big mistakes. The comments are my summaries [...]]]></description>
			<content:encoded><![CDATA[<p>As I <a href="http://jthoenes.bergischweb.de/2011/11/18/devoxx-2011-ive-been-in-paradise/">discussed</a>, I have been to &#8220;Rules for Good UI Design&#8221; by Joe Nuxoll (<a href="http://twitter.com/joeracer">@joeracer</a>) at Devoxx 2011.  In this talk, he was giving 14 &#8220;Golden Eggs&#8221; for designing a user interface (UI).</p>
<p>The &#8220;Golden Eggs&#8221; have been written down from Joe&#8217;s slides &#8211; I hope without big mistakes. The comments are my summaries from his talk.</p>
<p>The full version of Joe&#8217;s talk will be available at <a href="http://www.parleys.com/">Parleys</a> soon.</p>
<p><span id="more-291"></span></p>
<span id="The_underlying_data_structure_should_not_define_the_user_interface"><h3>1 &#8211; The underlying data structure should not define the user interface</h3></span>
<p>This is a topic Joe has been talking about in a few <a href="http://javaposse.com/">Java Posse</a> episodes already. And it is simple: By looking at the UI, you should not be able to see already the data structure. The UI should be solely tailored to be easy to perceive and understand by the user. Users don&#8217;t think in data structures typically &#8211; don&#8217;t make them.</p>
<span id="The_interface_should_not_define_the_data_structure"><h3>2 &#8211; The interface should not define the data structure</h3></span>
<p>With the former rule at hand, some of us <em>engineers</em> tend to go out, design a view and make the data structure look exactly the same. This it not how it is supposed to be. We have layers in all of our applications to abstract away the data structure, for example in the database, from the user interface. So we should do it. Design the data structure to be efficient and elegant for storing. Not like in the user interface.</p>
<span id="Need_must_proceed_technology"><h3>3 &#8211; Need must proceed technology</h3></span>
<p>You never ever should user HTML 5 because it is HTML 5. You should not use anything for the sake of technology.</p>
<p>Think about the user, think about their expectations. What user experience do you want to give them? <em>This</em> should lead your technology decisions.</p>
<span id="Start_the_process_with_real_use_cases"><h3>4 &#8211; Start the process with real use cases</h3></span>
<p>When starting to design a UI, use a real use case. Not an abstract one, a generalized one. Use something the user will really do with the application. Use example interactions and data which are realistic.</p>
<span id="Identify_distinct_categories_of_people_that_will_use_your_app"><h3>5 &#8211; Identify distinct categories of people that will use your app</h3></span>
<p>Identify which kind of persons will use your apps. Split them into categories and give them a real name like &#8216;Ben&#8217; or &#8216;Anna&#8217;. Give them a personality &#8211; this is called <em>personas</em> in a design process. Attach one persona to each use case you want to discuss.</p>
<p>As a side note: If you have two very different personas, think about the trade-off for creating two UIs compared to making one configurable. It is sometimes cheaper to create two UIs.</p>
<span id="Think_in_flows_not_in_features"><h3>6 &#8211; Think in flows not in features</h3></span>
<p>For the user experience it is important to think in application flows. Meaning the process of clicking through an &#8220;Login Process&#8221; with all state changes and transitions. Don&#8217;t think about a login screen.</p>
<p>Similar &#8211; if you design a design prototype, make it functional. The steps going through the design is as important as the look on the screen.</p>
<span id="Prototype_often._Abandom_prototypes_often"><h3>7 &#8211; Prototype often. Abandom prototypes often</h3></span>
<p>UI design is developed in prototypes. Create a prototype of your apps UI &#8211; and then throw it away. If you do not throw it away, it is not a prototype!</p>
<span id="Make_the_next_step_obvious"><h3>8 &#8211; Make the next step obvious</h3></span>
<p>When you are inside a dialog of your application, the next step the user wants to do should always be very obvious. Make it never hard to find the <em>login button</em>, the <em>next button</em> or the <em>create new user button</em> if this is, what the user wants to do.</p>
<span id="Reduce_the_number_of_perceived_things"><h3>9 &#8211; Reduce the number of perceived things</h3></span>
<p>To understand this, you have to understand how our brain works, when it perceives a user interface. There are always three phases:</p>
<ol>
<li>In the <em>emotional phase</em>, the brain recognizes colors, layouts and images on the screen. It sets the tone of the interaction with the UI.</li>
<li>In the <em>parsing phase</em>, the brain figures out the purpose of <em>every element</em> on the screen. It prepares the user for the task.</li>
<li>In the <em>execute phase</em>, the user starts to interact with the first element of the UI.</li>
</ol>
<div>The more elements are on the screen, the more elements have to be parsed in the second phase. The more elements, the harder it is to understand for the user what he should do. The more elements, the more time the user needs, to understand the UI.</div>
<span id="Leverage_muscle_memory._Be_consistent"><h3>10 &#8211; Leverage muscle memory. Be consistent</h3></span>
<p>Our brain is a muscle. It can be trained. It reacts to common patterns. So make your UI consistent to use. Same things should always look the same. And they should align with the behavior the user expects from his operating system.</p>
<span id="Think_outside_the_page_load._If_you_can_do_stuff_in-place"><h3>11 &#8211; Think outside the page load. If you can do stuff in-place</h3></span>
<p>If you are inside the web, avoid complete page loads. Use the techniques offered by AJAX to load new elements or information in place. So the user does not have to re-parse all the elements because they are gone temporarily.</p>
<span id="Use_transitions_to_change_state"><h3>12 &#8211; Use transitions to change state</h3></span>
<p>If your application changes the state, use simple transitions to make clear what is happening. For example, if you hide someting, fade it out so the user knows where to look if he wants to have it back.</p>
<span id="Iterate_amp_Refine._Iterate_amp_Refine"><h3>13 &#8211; Iterate &amp; Refine. Iterate &amp; Refine</h3></span>
<p>The process of designing a UI is iterative. You have to make a lot of proposals and be ready to change your mind. Extend them. Add new designs. Combine them. Throw some ideas away and use others to iterate further.</p>
<span id="Provide_your_customer_with_great_experience."><h3>14 -Provide your customer with great experience.</h3></span>
<div>Never break the experience of a user. This is not limited to the user interface of your app. It includes your support contatcs, your twitter feed and your homepage. Everything should be friendly to the user and provide him with the best experience he can have. The best customer experience.</div>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=291&amp;md5=2aa58b6e8e9ebefe3171d9a12cbc5817" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2011/11/24/14-golden-eggs-of-good-ui-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2011%2F11%2F24%2F14-golden-eggs-of-good-ui-design%2F&amp;language=en_GB&amp;category=text&amp;title=14+Golden+Eggs+of+Good+UI+Design&amp;description=As+I+discussed%2C+I+have+been+to+%26%238220%3BRules+for+Good+UI+Design%26%238221%3B+by+Joe+Nuxoll+%28%40joeracer%29+at+Devoxx+2011.+%C2%A0In+this+talk%2C+he+was+giving+14+%26%238220%3BGolden+Eggs%26%238221%3B+for+designing...&amp;tags=devoxx%2Cdevoxx+2011%2Cgolden+eggs%2Cui+design%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Devoxx 2011 &#8211; I&#8217;ve been in Paradise</title>
		<link>http://blog.jthoenes.net/2011/11/18/devoxx-2011-ive-been-in-paradise/</link>
		<comments>http://blog.jthoenes.net/2011/11/18/devoxx-2011-ive-been-in-paradise/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 16:00:22 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[courage]]></category>
		<category><![CDATA[devoxx]]></category>
		<category><![CDATA[devoxx 2011]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java7]]></category>
		<category><![CDATA[java8]]></category>
		<category><![CDATA[java9]]></category>
		<category><![CDATA[paradise]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=274</guid>
		<description><![CDATA[Devoxx 2011 is over &#8211; we have left the paradise. I had &#8211; again &#8211; the luck to attend and it was an awesome experience. I&#8217;m really thankful that Stephan and his team is doing this works. We love you guys! So &#8211; let me try to give you a very brief overview on what [...]]]></description>
			<content:encoded><![CDATA[<p>Devoxx 2011 is over &#8211; we have left the paradise.</p>
<p>I had &#8211; again &#8211; the luck to attend and it was an awesome experience. I&#8217;m really thankful that Stephan and his team is doing this works. We love you guys!</p>
<p>So &#8211; let me try to give you a very brief overview on what I found most interesting at Devoxx 2011.</p>
<p><span id="more-274"></span></p>
<span id="Java_7"><h4>Java 7</h4></span>
<p>As you might know, Java 7 has shipped this summer. I don&#8217;t describe the features in depth &#8211; but here are the most important ones:</p>
<ul>
<li><em>Project Coin </em> (<a href="http://jcp.org/en/jsr/summary?id=334">JSR-334</a>) which does some small changes to the language to make developers life easier (I wrote about this <a href="http://jthoenes.bergischweb.de/2011/03/13/jdk-7-features-project-coin/">here</a> and <a href="http://jthoenes.bergischweb.de/2011/03/17/jdk-7-features-project-coin-exception-improvements/">here</a> already).</li>
<li>The <em>DaVinci Virtual Machine</em> project aims to introduce some features for dynamic languages to the JVM. In Java 7 they introduced <em>invokedynamic</em> (<a href="http://jcp.org/en/jsr/summary?id=292">JSR-292</a>), which allows more performant dynamic method invocation.</li>
<li>The <em>Fork-Join framework</em> (<a href="http://jcp.org/en/jsr/summary?id=166">JSR-166</a>) allows a command-and-conquer style execution of big tasks on multiple CPU cores.</li>
</ul>
<span id="Java_8"><h4>Java 8</h4></span>
<p>Java 8 will be a revolutional release. On contrary, Java 7 was considered evolutional.</p>
<p>The are two revolutional features in Java 8:</p>
<ul>
<li><em>Project Lambda</em> (<a href="http://jcp.org/en/jsr/summary?id=335">JSR-335</a>)</li>
<li><em>Project Jigsaw</em> (Marc Reinhold (<a href="http://twitter.com/mreinhold">@mreinhold</a>) want to file a JSR soon)</li>
</ul>
<p><strong><em>Lambda</em></strong> will allow lambda expressions on the JVM. You can think of a lambda as a function, which stands on its own. A method without an explicit class context. These lambdas can be mapped to SAM-Types (Single-Abstract-Method) types and therefore be very useful for a lot of purposes.</p>
<p>Here is a syntax grap, which is subject to change (as always):</p>
<pre class="brush: java; title: ; notranslate">List&lt;Students&gt; students = // ...
students.paralell()
  .filter(s -&gt; s.getEntryYear() == 2011)
  .map(s -&gt; s.getGrade())
  .reduce(Math#max);</pre>
<p>The feature will be coupled with <em>virtual extension methods. </em>A virtual extension method is a default implementations of interface methods. This default implementation will be used, if the implementing class does not provide one.</p>
<p><em><strong>Project Jigsaw</strong></em> will introduce a modularity system for the core Java platform. I haven&#8217;t been to a Jigsaw talk this year, so I have no new knowlegde. Nevertheless, Jigsaw will allow you to group your classes into modules and make those modules depend on each other &#8211; just like the dependencies section in a maven POM. However, it will be checked by the compiler.</p>
<p>There will be a new file format <em>jmod</em> as well to replace <em>jar</em> files. This will allow you to use modules already installed on your systems, instead of having to package them everywhere.</p>
<p><em><strong>Other features</strong></em> of Java 8 will be:</p>
<ul>
<li>Convergance of the <em>Hotspot VM</em> (former Sun&#8217;s VM) and the<em> JRockit VM</em> (Oracle&#8217;s own one)</li>
<li><em>Type Annotation</em> (<a href="http://jcp.org/en/jsr/summary?id=308">JSR-308</a>) to allow annotations in more places.</li>
<li>A new <em>Date/Time API</em> (<a href="http://jcp.org/en/jsr/summary?id=310">JSR-310</a>) base on the <a href="http://joda-time.sourceforge.net/">joda-time</a> efforts.</li>
</ul>
<p>Java 8 will be release summer 2013. I bet it will at least have some release at 2013/08/08 <img src='http://blog.jthoenes.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  . Oracle wants to stay with the two years release cycle. We&#8217;ll have to find out, if they can.</p>
<span id="Java_9"><h4>Java 9</h4></span>
<p>The features planned for Java SE are numerous &#8211; and still more in a planning phase. Nevertheless, they give you an idea what might come:</p>
<ul>
<li>Convergance of the <em>Java SE</em> and the <em>Java ME</em> platform</li>
<li>Supporting to handle <em>Big Data</em></li>
<li><em>Reification of Generics</em> to make generics more accesible via the reflection APIs</li>
<li>Unification of <em>primitives</em> and <em>objects</em> in Java</li>
<li>Having a common <em>Meta-Data Object Protocol</em> for all languages on the JVM.</li>
<li><em>Tails Calls &amp; Continuations</em></li>
<li>Support for <em>Multi-Tenancy</em></li>
<li><em>Self-tuning VM</em> which is able to inspect and improve its own parameters.</li>
</ul>
<span id="Courage_in_Software_Development_amp_The_Diabolic_Developer"><h4>Courage in Software Development &amp; The Diabolic Developer</h4></span>
<p>There have been two talks which I shamelessly will handle together, because in my opinion they had the same overall statement. The first one was &#8220;Courage in Software Development&#8221; by Dick Wall (<a href="http://twitter.com/dickwall">@dickwall</a>). The other one was &#8220;The Diablic Developer&#8221; by Martijn Verburg (<a href="http://twitter.com/karianna">@karianna</a>). The latter one was acutally over-exagerated and ironic, so  beware I might have misinterpreted it.</p>
<p>Both were actually making the point, that you should not over-estimate the power of best practices. You should always strive for better coding &#8211; but this does not mean reading best practices from a book. Most important, you need to try out the things yourself. Try out new things, improve your practice.</p>
<p>Dick was talking a lot about taking risk in software development (and mountain biking). He thinks, that risks as well as failure are part of life, part of learning and part of getting better. So we should do it. Well, I agree on this.</p>
<p>Both stessed the need, to think yourself. &#8220;Don&#8217;t trust the giant&#8221; &#8211; said Martijn. This means, don&#8217;t unreflectively repeat the heros of our industry. Think about what they say. Think about why they say it. Think about what is there agenda.</p>
<p>Actually I think both talks were pretty good.</p>
<span id="Rules_of_Good_UI_Design"><h4>Rules of Good UI Design</h4></span>
<p>This was a Talk from Joe Nuxoll (<a href="http://twitter.com/joeracer">@joeracer</a>) &#8211; trying to teach engineers like us how designers thinks. According to him, the most important thing is to communicate. And for this communcation, designs and engineers have to understand each others language. So &#8230;</p>
<p>One common misunderstanding is, that design is about &#8220;make things pretty&#8221;. But this is acutally the last step. Design is a process. It starts with the idea of a product and it continues through several stages very closely analysing what the different user types (personas) need. The bullet points for this are:</p>
<ol>
<li>Concept</li>
<li>Information Architecture &amp; Interaction Design</li>
<li>Visual Desing / Interaction Polish</li>
<li>Production Plan</li>
</ol>
<p>You have to understand, that this process is highly iterative and comparative. Designer iterate a lot and make a lot of different drafts and prototypes for there design work. They are also highly interested to critique each others work.</p>
<p>One of the most importants skills of a designer is to listen to the potential users &#8211; especially listen between the lines.</p>
<p>After this introduction Joe gave a few golden eggs for UI design. Maybe I&#8217;ll blog about them some time later (if asked <img src='http://blog.jthoenes.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<span id="Devoxx_France"><h4>Devoxx France</h4></span>
<p>It was announced in the wednesday keynote, that the Devoxx will be branching out. April, 18th till 20th 2012 a second Devoxx will take place in France, Paris (see <a href="http://devoxx.fr/display/FR12/Accueil">http://devoxx.fr/display/FR12/Accueil</a>). The talks will be 25 percent in English, the rest will be in French.</p>
<p>The original Devoxx will of course stay as it is: In Antwerp Belgium and in November.</p>
<span id="Notes"><h4>Notes</h4></span>
<p>Other things shortly noted</p>
<ul>
<li>The whole Devoxx talks as well as some talks from JavaOne this year will be on Parleys <a href="http://www.parleys.com/">http://www.parleys.com/</a></li>
<li>Oracle stopped funding the work in Swing. So Swing is effectively dead.</li>
<li>There we loads of talk about HTML5 &#8211; and they were very well attended. Feels like it is on top of the Hype now.</li>
<li>There is a &#8220;Adopt a JSR&#8221; Programm from the London Java User Group to envolve the community in the Java Community Process: <a title="Adopt a JSR Program" href="http://java.net/projects/ljc-london-jug/pages/AdoptAJSRProgram">http://java.net/projects/ljc-london-jug/pages/AdoptAJSRProgram</a></li>
<li>The Technial Discussion Panel with Emmanuel Bernard, Brian H. Prince, Mark Reinhold, Brian Goetz, Joshua Bloch and Ben Evans has been great. You should watch it on parleys.</li>
</ul>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=274&amp;md5=897c42926881f97bb3a2212eb6710a6d" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2011/11/18/devoxx-2011-ive-been-in-paradise/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2011%2F11%2F18%2Fdevoxx-2011-ive-been-in-paradise%2F&amp;language=en_GB&amp;category=text&amp;title=Devoxx+2011+%26%238211%3B+I%26%238217%3Bve+been+in+Paradise&amp;description=Devoxx+2011+is+over+%26%238211%3B+we+have+left+the+paradise.+I+had+%26%238211%3B+again+%26%238211%3B+the+luck+to+attend+and+it+was+an+awesome+experience.+I%26%238217%3Bm+really+thankful+that+Stephan...&amp;tags=courage%2Cdevoxx%2Cdevoxx+2011%2Cjava%2Cjava7%2Cjava8%2Cjava9%2Cparadise%2Csoftware+development%2Cui%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Git Introduction Presentation at DNUG Koblenz</title>
		<link>http://blog.jthoenes.net/2011/09/25/git-introduction-presentation-at-dnug-koblenz/</link>
		<comments>http://blog.jthoenes.net/2011/09/25/git-introduction-presentation-at-dnug-koblenz/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 16:20:00 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>
		<category><![CDATA[slides]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=269</guid>
		<description><![CDATA[I gave an introduction presentation about Git and Distributed Version Control Systems in general at the DNUG Koblenz last Wednesday. You can find the slides at SlideShare, the are under a Creative Commons license. So feel free to re-use and adapt them: Git View more presentations from Johannes Thönes.]]></description>
			<content:encoded><![CDATA[<p>I gave an introduction presentation about Git and Distributed Version Control Systems in general at the DNUG Koblenz last Wednesday. You can find the slides at SlideShare, the are under a Creative Commons license. So feel free to re-use and adapt them:</p>
<div style="width:425px" id="__ss_9414764"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/jthoenes/git-9414764" title="Git">Git</a></strong><object id="__sse9414764" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=git-110925111500-phpapp01&#038;stripped_title=git-9414764&#038;userName=jthoenes" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse9414764" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=git-110925111500-phpapp01&#038;stripped_title=git-9414764&#038;userName=jthoenes" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/jthoenes">Johannes Thönes</a>.</div>
</div>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=269&amp;md5=fd018d368c94ea0a9ae68ee80b6b5b2c" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2011/09/25/git-introduction-presentation-at-dnug-koblenz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2011%2F09%2F25%2Fgit-introduction-presentation-at-dnug-koblenz%2F&amp;language=en_GB&amp;category=text&amp;title=Git+Introduction+Presentation+at+DNUG+Koblenz&amp;description=I+gave+an+introduction+presentation+about+Git+and+Distributed+Version+Control+Systems+in+general+at+the+DNUG+Koblenz+last+Wednesday.+You+can+find+the+slides+at+SlideShare%2C+the+are+under...&amp;tags=git%2Cgit-svn%2Cslides%2Csubversion%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Using GIT as Frontend for SVN</title>
		<link>http://blog.jthoenes.net/2011/08/01/using-git-as-frontend-for-svn/</link>
		<comments>http://blog.jthoenes.net/2011/08/01/using-git-as-frontend-for-svn/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 17:30:15 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[distributed version control systems]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control system]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=240</guid>
		<description><![CDATA[Our main source code management tool at my employer is SVN. However, in the last year, distributed version control systems have become popular. Especially GIT, which has been developed by the linux kernel developers has some momentum. Furthermore it has a very nice integration into SVN, so that you can use GIT as an interface [...]]]></description>
			<content:encoded><![CDATA[<p>Our main source code management tool at my employer is <em>SVN</em>. However, in the last year, distributed version control systems have become popular.</p>
<p>Especially <em>GIT</em>, which has been developed by the linux kernel developers has some momentum. Furthermore it has a very nice integration into <em>SVN</em>, so that you can use <em>GIT</em> as an interface to a remote subversion repository. In this post, I will show a little bit how I currently use <em>GIT</em> to interface with different branches of the blueprint and training project.</p>
<p><span id="more-240"></span><br />
<div class='toc toc'>
<h2>Contents</h2>
<ul class='toc-odd level-1'>
	<li>
		<a href="#Distributed_Version_Control_Systems">Distributed Version Control Systems</a>
	</li>
	<li>
		<a href="#Why_do_you_want_to_use_GIT">Why do you want to use <em>GIT</em>?</a>
		<ul class='toc-even level-2'>
			<li>
				<a href="#Private_Branches">Private Branches</a>
			</li>
			<li>
				<a href="#Easy_Merging">Easy Merging</a>
			</li>
			<li>
				<a href="#Changing_History">Changing History</a>
			</li>
			<li>
				<a href="#Local_Commits">Local Commits</a>
			</li>
		</ul>
	<li>
		<a href="#Installation_of_GIT">Installation of <em>GIT</em></a>
	</li>
	<li>
		<a href="#Checkout_the_PetClinic">Checkout the PetClinic</a>
		<ul class='toc-even level-2'>
			<li>
				<a href="#Setting_up_the_GIT_Repository">Setting up the <em>GIT</em> Repository</a>
			</li>
			<li>
				<a href="#Fetching_the_whole_SVN_history">Fetching the whole <em>SVN</em> history</a>
			</li>
			<li>
				<a href="#Importing_SVNs_Ignore_Information">Importing <tt>SVN</tt>s Ignore Information</a>
			</li>
		</ul>
	<li>
		<a href="#Basic_Operations">Basic Operations</a>
		<ul class='toc-even level-2'>
			<li>
				<a href="#GitK"><em>GitK</em></a>
			</li>
			<li>
				<a href="#New_Branch">New Branch</a>
			</li>
			<li>
				<a href="#Commit">Commit</a>
			</li>
			<li>
				<a href="#Push_to_SVN">Push to <em>SVN</em></a>
			</li>
		</ul>
	<li>
		<a href="#Outlook">Outlook</a>
	</li>
</ul>
</ul>
</ul>
</div>
<div class='toc-end'>&nbsp;</div></p>
<span id="Distributed_Version_Control_Systems"><h3>Distributed Version Control Systems</h3></span>
<p>Subversion is a central source control management systems. This means, that there is only one repository where you commit your changesets to. In contrast, on your local machine, you just have a working copy of that repository. Meaning you have the files from a particular branch in a particular revision on your local machine.</p>
<p>In a distributed version control system, everyone has a complete repository. So you have all the code, in all branches and all revisions on your local computer. To share code, you can now syncronize with other repositories over the internet/intranet, but as well locally or via a usb drive.</p>
<p>You can find a more extensive explaination with really nice graphics <a href="http://www.kalekold.net/index.php?post=13" rel="nofollow">here</a>.</p>
<span id="Why_do_you_want_to_use_GIT"><h3>Why do you want to use <em>GIT</em>?</h3></span>
<p>This sounds very nice. But why should I use it? I will give you some reasons why I use it currently.</p>
<p>To give you some background: I currently work in a department, which supports other developers working with an company internal framework. So we have a project, which is called PetClinic. This PetClinic is used, in different states, as QA project, as training project, as experiment project and as blueprint project.</p>
<span id="Private_Branches"><h4>Private Branches</h4></span>
<p>In the PetClinic we are trying out the latest features from our framework. As we try those on the development versions of the framework, we naturally run into bugs and might therefore break somethings &#8211; which would hinder my collegues work, if I check it into subversion, before the bugs I report get fixed.</p>
<p>For this, <em>GIT</em> enables me to create a private branch. This branch and all the commits to it only lives on my machine. When the bugs are fixed, I can check in everything &#8211; but still have a nice history.</p>
<span id="Easy_Merging"><h4>Easy Merging</h4></span>
<p>Merging in <em>SVN</em> is a pain. Especially when you look at our situation. We have a branch for the current snapshot blueprint, a branch &#8216;exercises&#8217; where we have the final solutions of all exercises  and finally a branch &#8216;starter&#8217; which is the base project for our training where the training starts from.</p>
<p>These branches require to be synchronized often, with a very fine grained, selective level. It is very often the case, that I want to merge a few revisions from &#8216;exercises&#8217; back to &#8216;starter&#8217;. This happens as well, when in training I discover something I want to have in &#8216;exercise&#8217; and/or in &#8216;starter&#8217; for the next training. Or if some new feature from the blueprint branch needs to be ported to one of the training branches.</p>
<p><em>GIT</em> helps me here with a sophisticated merging mechanism. Furthermore I can use <tt>git cherry-pick</tt> to select one specific changeset I want to have in a branch.</p>
<span id="Changing_History"><h4>Changing History</h4></span>
<p>Especially for Training, I want, that all my commits are complete and make sense. So someone who looks into my history, should have a step by step description what I did.</p>
<p>Unfortunatly I don&#8217;t get everything right the first time. So I often discover after one or two commits, that one line has been missing in a commit or one particular change should belong to another commit.</p>
<p><em>GIT</em> gives me the opportunity to do so using <tt>git rebase</tt>.</p>
<span id="Local_Commits"><h4>Local Commits</h4></span>
<p>When working with <em>SVN</em>, you always need a network connection to your <em>SVN</em> server to commit your changes. So typically when in the airplane above the atlantic, you code and make a monster commit.</p>
<p>Furthermore, when you have a network connection, on every commit you wait a few seconds (or more) before the commit is through with the central server. This takes alot of time, I you are not in the company and maybe on a slow VPN connection.</p>
<p>In <em>GIT</em> you commit locally. Against your machine. No network connection required. Only if you synchronize with the external repository &#8211; calling push and pull in <em>GIT</em> terminology &#8211; you need a connection to this repository. But in this step, you could synchronize hundred nice, small changesets. And you can do it, after your done &#8211; while watching TV or brushing your teeth.</p>
<span id="Installation_of_GIT"><h3>Installation of <em>GIT</em></h3></span>
<p><em>GIT</em> has been done by the linux kernel developers. So it has been made for linux. And it has been made for the command-line. On linux, you can easily install the <tt>git-core</tt> package via the package manager.</p>
<p>On windows, I would recommend using <a href="http://www.cygwin.com/" rel="nofollow">cygwin</a> and install <em>GIT</em> via its package manager &#8211; I use it every day and it just works fine. I have installed the packages <em>git</em>, <em>git-svn</em>, <em>gitk</em> and <em>git-gui</em>.</p>
<p>You can install <em>GIT</em> on Windows. There is a <a href="http://code.google.com/p/tortoisegit/" rel="nofollow">TortoiseGit</a> on the internet. I have no idea how the quality is now, but one or two years ago I had some problems using it.</p>
<p>For this blog, I&#8217;ll show you the stuff on the command line, as real developers use the command-line ;-)</p>
<span id="Checkout_the_PetClinic"><h3>Checkout the PetClinic</h3></span>
<span id="Setting_up_the_GIT_Repository"><h4>Setting up the <em>GIT</em> Repository</h4></span>
<p>So, first lets setup a petclinic project connected to our trunk blueprint:</p>
<pre class="brush: bash; title: ; notranslate">
$ mkdir petclinic # create an empty directory
$ cd petclinic # switch to the new directory
$ git svn init http://someserver/svnrepos/common \
    -Ttrunk/blueprints/petclinic \
    -bbranches/QA/*/petclinic \
    -ttags/blueprints/petclinic
</pre>
<p>This will lead to the following message</p>
<pre class="brush: plain; title: ; notranslate">Initialized empty git repository in /tmp/petclinic/.git/</pre>
<p>This initializes the repository with telling the <em>GIT-SVN</em> tool, where it can find trunk (which is essentially just a branch for <em>GIT</em>), where it can find the other branches and where it can find the tags.</p>
<p>The star <tt>*</tt> in the branches tells <em>GIT</em>, that at this place it should take the folder name as name of the branch. So the folder name <tt>branches/QA/2.11.1.x/petclinic</tt> will be the branch <tt>2.11.1.x</tt> for <em>GIT</em>. For the tags it automatically assumes the name at the end, because I didn&#8217;t specify anything different.</p>
<p>The GIT repository has now been created. It is located in the <tt>.git</tt> folder. Your working copy is in the normal file system once you selected a current branch.</p>
<span id="Fetching_the_whole_SVN_history"><h4>Fetching the whole <em>SVN</em> history</h4></span>
<p>Ok, now we can fetch the data:</p>
<pre class="brush: bash; title: ; notranslate">$ git svn fetch</pre>
<p>This will now fetch the whole history of all the branches in the PetClinic. So take some time. On larger histories it can take a whole night or more. So be aware &#8211; but it has only to be done once.</p>
<span id="Importing_SVNs_Ignore_Information"><h4>Importing <tt>SVN</tt>s Ignore Information</h4></span>
<p>In <em>SVN</em> you have properties <tt>svn:ignore</tt> on folders, to tell the version control system which files it should not consider when commiting to the repository. In <em>GIT</em> there are configuration files called <tt>.gitignore</tt> in the root of your repository which define which files to be ignored.</p>
<p>For example this <tt>.gitignore</tt> file excludes <tt>.project</tt> files and the <tt>target</tt> folder:</p>
<pre class="brush: plain; title: .gitignore; notranslate">
.project
target/*
</pre>
<p>But I do not want to check this file into want to check in this file into version control &#8211; it might confuse the SVN users. There is another option: <tt>.git/info/exclude</tt>. This file works just the same &#8211; but is local to your repository.</p>
<p>I can generate the <tt>.git/info/exclude</tt> file from the <tt>svn:ignore</tt> information with the following command:</p>
<pre class="brush: bash; title: ; notranslate">
$ git svn show-ignore &gt;&gt; .git/info/exclude
</pre>
<span id="Basic_Operations"><h3>Basic Operations</h3></span>
<span id="GitK"><h4><em>GitK</em></h4></span>
<p>So first of all, I want to see how the different tags and branches behave. A nice point to check this is <em>GITK</em>:</p>
<pre class="brush: bash; title: ; notranslate">$ gitk --all</pre>
<p>This will show something like this:</p>
<p><a href="http://jthoenes.bergischweb.de/wp-content/uploads/2011/07/gtk.png"><img class="alignnone size-large wp-image-245" title="gtk" src="http://jthoenes.bergischweb.de/wp-content/uploads/2011/07/gtk-1024x962.png" alt="GTK Screenshot" width="450" height="422" /></a></p>
<span id="New_Branch"><h4>New Branch</h4></span>
<p>Ok. After I know, what I have in my repository I want do do some work. I want to try out the some new featuer in a local branch. So I create a new branch based on the current trunk:</p>
<pre class="brush: bash; title: ; notranslate">$ git checkout -b new_experiment svn/trunk</pre>
<p>So, what does this mean?</p>
<ul type="square">
<li><tt>git checkout</tt> means, that git should &#8220;open&#8221; the a branch</li>
<li><tt>-b</tt> mean, it should create the branch first.</li>
<li><tt>view_compiler_experiment</tt> is the name of this new branch</li>
<li><tt>svn/trunk</tt> means the new branch should be based on the <tt>trunk</tt> branch, from the remote repository called <tt>trunk</tt></li>
</ul>
<span id="Commit"><h4>Commit</h4></span>
<p>So now, I&#8217;m in this branch &#8211; and I made some changes to some files. Now I want to commit them.</p>
<p>In <em>GIT</em> I have a very fine-grained control over what I want to commit. First I need to stage the changes I want to commit. I can do this by using <tt>git add path/to/file</tt>. In contrast to <em>SVN</em>, I need to do this on all changes &#8211; not only on the files which are actually new.</p>
<p>Then commit my changes locally by doing:</p>
<pre class="brush: bash; title: ; notranslate">$ git commit</pre>
<p>I could as well do</p>
<pre class="brush: bash; title: ; notranslate">$ git commit -a</pre>
<p>This would automatically stage all changes in files under version control (so this is like the <em>SVN</em> behaviour).</p>
<span id="Push_to_SVN"><h4>Push to <em>SVN</em></h4></span>
<p>So now I have a bunch of commits and want to push them up to <em>SVN</em>. But first I want to get any changesets from <em>SVN</em>. This is done by</p>
<pre class="brush: bash; title: ; notranslate">git svn rebase</pre>
<p>This will fetch the changesets one by one from the <em>SVN</em> an try to merge them with your branch. In my experience, this does not raise so many merge conflicts as usual &#8211; and if it does, they are smaller.</p>
<p>Then I am ready to push my changes into the <em>SVN</em></p>
<pre class="brush: bash; title: ; notranslate">$ git svn dcommit</pre>
<span id="Outlook"><h3>Outlook</h3></span>
<p><em>GIT</em> and <em>GIT-SVN</em> have a ton of features. I only use a fraction of them &#8211; and from those I only showed a even smaller fractions. There is a <a href="https://git.wiki.kernel.org/images-git/7/78/Git-svn-cheatsheet.pdf" rel="nofollow">Cheatsheet</a> on the <em>GIT</em> page only for <em>GIT-SVN</em>. An the internet is full of other tutorials.</p>
<p>I would really encourage you to use it. Just use the comments, if you need any help with it. I might write a sequel in future.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=240&amp;md5=d569c3bd353002077915af1617e1c27a" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2011/08/01/using-git-as-frontend-for-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2011%2F08%2F01%2Fusing-git-as-frontend-for-svn%2F&amp;language=en_GB&amp;category=text&amp;title=Using+GIT+as+Frontend+for+SVN&amp;description=Our+main+source+code+management+tool+at+my+employer+is+SVN.+However%2C+in+the+last+year%2C+distributed+version+control+systems+have+become+popular.+Especially+GIT%2C+which+has+been+developed+by...&amp;tags=distributed+version+control+systems%2Cgit%2Cgit-svn%2Csubversion%2Csvn%2Cversion+control+system%2Cblog" type="text/html" />
	</item>
		<item>
		<title>JDK 7 Features: Project Coin Exception Improvements</title>
		<link>http://blog.jthoenes.net/2011/03/17/jdk-7-features-project-coin-exception-improvements/</link>
		<comments>http://blog.jthoenes.net/2011/03/17/jdk-7-features-project-coin-exception-improvements/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 08:05:18 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java7]]></category>
		<category><![CDATA[jdk7]]></category>
		<category><![CDATA[openjdk]]></category>
		<category><![CDATA[project coin]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=176</guid>
		<description><![CDATA[In this post I&#8217;ll present the new features in JDK7/Java 7 regarding exceptions, namely &#8220;multi-catch and final rethrow&#8221; and the &#8220;try-with-resources&#8221; of Project Coin. The other four Project Coin improvements were already discussed in an post a few days ago. So, let&#8217;s dive into the topic: Multi-Catch and Final Rethrow Sometimes in Java, you face [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;ll present the new features in JDK7/Java 7 regarding exceptions, namely &#8220;multi-catch and final rethrow&#8221; and the &#8220;try-with-resources&#8221; of Project Coin. The other four Project Coin improvements were already discussed in an <a href="http://jthoenes.bergischweb.de/2011/03/13/jdk-7-features-project-coin/">post</a> a few days ago.</p>
<p>So, let&#8217;s dive into the topic:</p>
<p><span id="more-176"></span></p>
<span id="Multi-Catch_and_Final_Rethrow"><h2>Multi-Catch and Final Rethrow</h2></span>
<p>Sometimes in Java, you face the problem that a certain set of method calls may throw more than one checked exceptions. This is especially true, if you are working with reflections.</p>
<p>You often want to do the same thing with those exceptions. You might, for example, box them into a RuntimeException because you and your caller methods will not be able to do anything, if the method toString() on the String class is suddenly missing.</p>
<p>The problem might be, that the only common parent of all those checked exceptions is java.lang.Exception. But you cannot really use java.lang.Exception in a catch block, because you are garanteed to catch exceptions you don&#8217;t want to catch as well. One of those examples might be the famous java.lang.NullPointerException.</p>
<p>So you have to dublicate your code. This might look like this:</p>
<pre class="brush: java; title: ; notranslate">try {
  callWithReflection(arg);
} catch (NoSuchMethodException e) {
  throw new RuntimeException(e);
} catch (IllegalAccessException e) {
  throw new RuntimeException(e);
} catch (InvocationTargetException e) {
  throw new RuntimeException(e);
} catch (ClassNotFoundException e) {
  throw new RuntimeException(e);
} catch (IOException e) {
  throw new RuntimeException(e);
}</pre>
<p>JDK 7 will improve the situation for the specific case of reflections, by offering a common parent for all reflection related operations: ReflectiveOperationException. So the following code looks a little better &#8211; but we still have two catch blocks, so we are dublicating our code still:</p>
<pre class="brush: java; title: ; notranslate">try {
  callWithReflection(arg);
} catch (ReflectiveOperationException e) {
  throw new RuntimeException(e);
} catch (IOException e) {
  throw new RuntimeException(e);
}</pre>
<p>This is were multi-catch comes to help. You will be allowed to catch any type of exception &#8211; you just have to declare the parameter in the catch block final and seperate the types by a pipe |.</p>
<pre class="brush: java; title: ; notranslate">try {
  callWithReflection(arg);
} catch (final ReflectiveOperationException | IOException e) {
  throw new RuntimeException(e);
}</pre>
<p>In the exception logic, you can still use only methods on which are available on the first common parent of all the exception types you specified. But if you need more specific methods, you better want to use different catch blocks anyway.</p>
<p>The next features is related. Because you declare the method parameter final, the compiler knows, which checked exceptions might occur in a catch block. So if you are catching IOException and ReflectiveOperationException with a final parameter and rethrow them, you only need to declare those two on the method. So it can look like this:</p>
<pre class="brush: java; title: ; notranslate">public void call() throws ReflectiveOperationException, IOException {
    try {
      callWithReflection(arg);
    } catch (final Exception e) {
      logger.trace(&quot;Exception in reflection&quot;, e);
      throw e;
    }
}</pre>
<p>You can &#8211; and should &#8211; of course combine multi-catch and final rethrow.</p>
<span id="try-with-resources"><h2>try-with-resources</h2></span>
<p>There is a second place were exception handling can be nasty: If you have a resource, which needs to be closed. It becomes especially unhealthy if you have more than one resource to close.</p>
<p>Here I want to read the data from a database. The example is the same I used in the <a href="http://jthoenes.bergischweb.de/2011/03/13/jdk-7-features-project-coin/">first post</a> as an example for the diamond operator. We  have a table, were we have a patient, a medication date and a medication description.</p>
<p>For this we need the following resources: a database connection, a jdbc statement and a jdbc result set. So let&#8217;s try the code with JDBC 4.1 (which is new in JDK 7 as well, by the way):</p>
<pre class="brush: java; title: ; notranslate">public void readData() {
  Connection conn = null;
  Statement statement = null;
  ResultSet resultSet = null;
  try {
    conn = DriverManager.getConnection(CONNECTION_STRING);
    statement = conn.createStatement();
    resultSet = statement.executeQuery(&quot;SELECT patient, medication_day, medication_desc FROM medications&quot;);
    while (resultSet.next()) {
      String patient = resultSet.getString(&quot;patient&quot;);
      LocalDate medication_day = LocalDate.fromDateFields(resultSet.getDate(&quot;medication_day&quot;));
      String medication_desc = resultSet.getString(&quot;medication_desc&quot;);&lt;/p&gt;
      System.out.println(String.format(&quot;'%s','%s','%s'&quot;, patient, medication_day, medication_desc));
    }
  } catch (SQLException ex) {
    logger.error(&quot;Error in Database&quot;, ex);
  } finally {
    try {
      resultSet.close();
      statement.close();
      conn.close();
    } catch (SQLException ex) {
      logger.error(&quot;Error in Database&quot;, ex);
    }
  }
}</pre>
<p>The problem is, that this code does not account for all possible error which might occur. Here are some of those:</p>
<ul>
<li>connection could not be opened (NullPointerException line 22)</li>
<li>statement could not be opened (NullPointerException line 22)</li>
<li>sql exception when creating the result set (NullPointer Exception in line 22)</li>
<li>exception in one of the close statements (unclosed exceptions)</li>
</ul>
<p>So I did an &#8211; probably not perfectly correct &#8211; attempt to do a more sophisticated error handling:</p>
<pre class="brush: java; title: ; notranslate">finally {
  try {
    if (resultSet != null) {
      resultSet.close();
    }
  } catch (SQLException ex) {
    logger.error(&quot;Error in Database&quot;, ex);
  } finally {
    try {
      if (statement != null) {
        statement.close();
      }&lt;/p&gt;
    } catch (SQLException ex) {
      logger.error(&quot;Error in Database&quot;, ex);
    } finally {
      try {
       if (conn != null) {
         conn.close();
       }
     } catch (SQLException ex) {
      logger.error(&quot;Error in Database&quot;, ex);
    }
  }
}</pre>
<p>This is a lot of code. And the problem with it is: It might even be still wrong. You can do exceptions handling with resources correct, but  you cannot do innovation. It is a stultifying work.</p>
<p>And stultifying work can be done by compilers! So &#8211; with Project Coin &#8211; the compiler can do the work for you.</p>
<p>You have to allocate you resources inside of parentheses after the try statement. Then the compiler will care for the resources.</p>
<p>This made my example so easy that I could add another resource (using NIO.2 which is also new with JDK 7) to write the data into a CSV file.</p>
<pre class="brush: java; title: ; notranslate">try (Connection conn = DriverManager.getConnection(CONNECTION_STRING);
        Statement statement = conn.createStatement();
        ResultSet resultSet = statement.executeQuery(&quot;SELECT patient, medication_day, medication_desc FROM medications&quot;);
        BufferedWriter output = Files.newBufferedWriter(target, Charset.forName(&quot;utf-8&quot;))) {
  while (resultSet.next()) {
    String patient = resultSet.getString(&quot;patient&quot;);
    LocalDate medication_day = LocalDate.fromDateFields(resultSet.getDate(&quot;medication_day&quot;));
    String medication_desc = resultSet.getString(&quot;medication_desc&quot;);&lt;/p&gt;
    output.write(String.format(&quot;'%s','%s','%s'\n&quot;, patient, medication_day, medication_desc));&lt;/p&gt;
  }
} catch (SQLException ex) {
  logger.error(&quot;Error in Database&quot;, ex);
} catch (IOException ex) {
  logger.error(&quot;Error in File Writing&quot;, ex);
}</pre>
<p>You still need to handle the exception with the try-with-resources concept. You can either rethrow or catch them &#8211; but the system will care to close the resources you have.</p>
<p>One thing, which requires mentioning, is that in a try-with-resources statement it might happen, that more than one exception occur in the handling of closes. You can find those exceptions as &#8220;supressed&#8221; in the new method on Throwable <a href="http://download.java.net/jdk7/docs/api/java/lang/Throwable.html#getSuppressed()">getSuppressed()</a>.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=176&amp;md5=323a6f8071415bdf6b5d073d6e66aaeb" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2011/03/17/jdk-7-features-project-coin-exception-improvements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2011%2F03%2F17%2Fjdk-7-features-project-coin-exception-improvements%2F&amp;language=en_GB&amp;category=text&amp;title=JDK+7+Features%3A+Project+Coin+Exception+Improvements&amp;description=In+this+post+I%26%238217%3Bll+present+the+new+features+in+JDK7%2FJava+7+regarding+exceptions%2C+namely+%26%238220%3Bmulti-catch+and+final+rethrow%26%238221%3B+and+the+%26%238220%3Btry-with-resources%26%238221%3B+of+Project+Coin.+The+other+four+Project+Coin+improvements...&amp;tags=java7%2Cjdk7%2Copenjdk%2Cproject+coin%2Cblog" type="text/html" />
	</item>
		<item>
		<title>JDK 7 Features: Project Coin</title>
		<link>http://blog.jthoenes.net/2011/03/13/jdk-7-features-project-coin/</link>
		<comments>http://blog.jthoenes.net/2011/03/13/jdk-7-features-project-coin/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 22:55:05 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java7]]></category>
		<category><![CDATA[jdk7]]></category>
		<category><![CDATA[openjdk]]></category>
		<category><![CDATA[project coin]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=143</guid>
		<description><![CDATA[Last recently I did a talk about the some of the new features in JDK7 or Java 7 (Project Coin, Concurrency Utils and InvokeDynamic) at the freshly founded Koblenz Java User Group . I&#8217;ll present the content of this presentation in written form in a series of  three or four blog post over the next [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 13px; font-weight: normal;">Last recently I did a <a href="http://prezi.com/zjm09vnsv-rg/java-7/">talk</a> about the some of the new features in <a href="http://openjdk.java.net/projects/jdk7/features/">JDK7</a> or Java 7 (Project Coin, Concurrency Utils and InvokeDynamic) at the freshly founded <a href="http://groups.google.com/group/kojug">Koblenz Java User Group</a> . I&#8217;ll present the content of this presentation in written form in a series of  three or four blog post over the next few weeks or so.</span><br />
In this post I&#8217;ll start with the first four features of &#8220;Project Coin&#8221;.<br />
<span id="more-143"></span></p>
<span id="Project_Coin"><h2>Project Coin</h2></span>
<p><a href="http://openjdk.java.net/projects/coin/">Project Coin</a> is a project about &#8220;small language changes&#8221;. Those are changes, mostly inside the compiler, that do improve the productivity of the developers but are small of scope.</p>
<p>The changes by Coin are very easy to grasp if you see them in code, so I&#8217;ll demonstrate them to you here.</p>
<p>You can test all the Coin features (as you can test all JDK 7 features) with the <a href="http://jdk7.java.net/preview/">developer preview build </a>available from OpenJDK. For Coin you need to use <a href="http://netbeans.org/community/releases/70/">Netbeans 7 Beta</a>, because Coin brings a few syntax changes. Netbeans even shows you, where you could use the new Coin features instead of old style and helps you with the conversion:</p>
<p><a href="http://jthoenes.bergischweb.de/wp-content/uploads/2011/03/netbeans_coin_convert.png"><img class="alignnone size-medium wp-image-149" title="netbeans_coin_convert" src="http://jthoenes.bergischweb.de/wp-content/uploads/2011/03/netbeans_coin_convert-300x102.png" alt="" width="300" height="102" /></a></p>
<span id="Integer_Literal_Enhancements"><h3>Integer Literal Enhancements</h3></span>
<p>With Java you could always specify integer values (int or long) using the decimal notation, the octal notation (starting with 0) or the hexadecimal notation (starting 0x). For binaries you could use the Integer.parseInt(&#8230;) method. In JDK7 you will be able to specify such values in binary notation as well, if you start your declaration with an 0b. The definition of the decimal number 153 in all four representation can be found below:</p>
<pre class="brush: java; title: ; notranslate">int dec = 153;
int hex = 0x99;
int oct = 0231;
int bin = 0b10011001;

Assert.assertEquals(dec, hex);
Assert.assertEquals(hex, oct);
Assert.assertEquals(oct, bin);
Assert.assertEquals(bin, dec);</pre>
<p>Besides this, you can now insert an underscore _ into an inger literal. You can use this, to make the literal more readable. The compiler will just ignore it. It  will look like this:</p>
<pre class="brush: java; title: ; notranslate">private long salary = 15_500_000_000L;
private int bitmask = 0b1010_1011;</pre>
<span id="Switch_with_Strings"><h3>Switch with Strings</h3></span>
<p>In Java you have a switch satement available to check for the value of a variable and do several different thing in consequence. One of the thing you might do is, to perform an action for &#8220;yes&#8221;, &#8220;no&#8221;, &#8220;cancel&#8221; or &#8220;yes to all&#8221; according to the input of a user. You can determine what to do, by giving the user the possibilty to enter a char Y,N,C or A according to their wishes. This char can be used in a switch-case statement like this:</p>
<pre class="brush: java; title: ; notranslate">public void perfom(char userInput) {
  userInput = Character.toUpperCase(userInput);
  switch (userInput) {
    case 'Y':
      performYes();
      break;
    case 'N':
      performNo();
      break;
    case 'C':
      performCancel();
      break;
    case 'A':
      performYesToAll();
      break;
    default:
       throw new IllegalArgumentException();
  }
}</pre>
<p>If you now want to add a new method &#8220;no to all&#8221;, you have a problem because there is no obivous char mapping. So you might want to use strings as user input instead. Unfortunalty, if you are using Java 6 or below, you cannot use switch-case with strings. So you have to use if-else statements, which some people consider to be a bit boilerplate:</p>
<pre class="brush: java; title: ; notranslate">public void perfom(String userInput) {
  userInput = userInput.toLowerCase(Locale.US);
  if (userInput.equals(&quot;YES&quot;)) {
    performYes();
  } else if (userInput.equals(&quot;NO&quot;)) {
    performNo();
  } else if (userInput.equals(&quot;CANCEL&quot;)) {
    performCancel();
  } else if (userInput.equals(&quot;YES TO ALL&quot;)) {
    performYesToAll();
  } else if (userInput.equals(&quot;NO TO ALL&quot;)) {
    performNoToAll();
  } else {
    throw new IllegalArgumentException();
  }
}</pre>
<p>With Java 7 you can use switch for strings as well. So the code now can look like this:</p>
<pre class="brush: java; title: ; notranslate">public void perfom(String userInput) {
  userInput = userInput.toLowerCase(Locale.US);
  switch (userInput) {
    case &quot;YES&quot;:
      performYes();
      break;
    case &quot;NO&quot;:
      performNo();
      break;
    case &quot;CANCEL&quot;:
       performCancel();
       break;
    case &quot;YES TO ALL&quot;:
       performYesToAll();
       break;
    case &quot;NO TO ALL&quot;:
      performNoToAll();
      break;
    default:
      throw new IllegalArgumentException();
  }
}</pre>
<span id="The_Diamond_Syntax"><h3>The Diamond Syntax</h3></span>
<p>I studied medical informatics &#8211; so I give you an example from the medical domain. You want to have a data structure, were you can find the medications of the patients groupped by the date they received their medication. For this you could come up with something like this:</p>
<pre class="brush: java; title: ; notranslate">Map&gt;&gt; medications = new HashMap&gt;&gt;();</pre>
<p>What you can see is, that there is a very lengthy generic type declaration. But what is more: you have to repeat it. You have to write it inside the Map&lt;&#8230;&gt; of the type declation and inside the HashMap&lt;&#8230;&gt; of the intialization. You should not specify anything different in the initialization, because it breaks you program.</p>
<p>So why writing it? The good new is: You don&#8217;t neet to anymore. You can use the diamond syntax.</p>
<pre class="brush: java; title: ; notranslate">Map&gt;&gt; medications = new HashMap&lt;&gt;();</pre>
<p>These  two angle brackes &lt;&gt; look like a diamond &#8211; that&#8217;s why it is called diamond syntax. They tell the compiler to copy the generic type from the declaration to the initialization. That&#8217;s all <img src='http://blog.jthoenes.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<span id="Improved_Var-args_Warnings"><h3>Improved Var-args Warnings</h3></span>
<p>To know, what this warning really is about, you have to understand what heap pollution means. As did not know this before, so I&#8217;ll explain it. If you already know, you can skip all the text and code until the last two code blocks. In Java, Arrays and generic types do not go well together. If you want to create an Array of objects which can be typed generically, you can define the generic type on declaration. But you cannot use it in initiazation:</p>
<pre class="brush: java; title: ; notranslate">List[] matrix = new List[23];</pre>
<p>This can lead to something called Heap Pollution, when you assign an object with an &#8220;illegal&#8221; generic type to that array. If you try to access the object from the array as the type-signature tells you, you can face a ClassCastException, where you never though you would cast anything.</p>
<pre class="brush: java; title: ; notranslate">List[] matrix = new List[23];
List[] nonGenericMatrix = matrix;
// No exception
nonGenericMatrix[0] = Arrays.asList(&quot;String1&quot;, &quot;String1&quot;);
// java.lang.Integer cannot be cast to java.lang.String
List vectorList = matrix[0];</pre>
<p>This behaviour is contradictory to the behaviour of a array, without generic types. Here you would receive an ArrayStoreException, when you try to assign an illegally typed object to the array.</p>
<pre class="brush: java; title: ; notranslate">Integer[] vector = new Integer[3];
Object[] vectorObjects = vector;
// java.lang.ArrayStoreException
vectorObjects[0] = &quot;String&quot;;</pre>
<p>Heap Pollution becomes really tricky, when it comes to var-args were you pass an object with a generic type. Var-args will be treated by the virtual machine as arrays, so the problem is essentially the same.</p>
<p>What makes it more difficult, is that you might not have implemented the method you call yourself. You call the method and maybe store the result. And then, 10 years later you are using values from the array you once stored and &#8230;</p>
<pre class="brush: java; title: ; notranslate">public static  L[] createHeapPollution(L... args) {
  Object[] elements = args;
  elements[0] = Arrays.asList(12, 12);

 return args;
}

public static void main(String... args) {
  List[] polluted = createHeapPollution(Arrays.asList(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;));
  // java.lang.Integer cannot be cast to java.lang.String
  String element = polluted[0].get(0);
}</pre>
<p>This was the reason, that in Java 6 you got the compiler warning &#8220;[unchecked] unchecked generic array creation of type java.util.ArrayList&lt;java.lang.String&gt;[] for varargs parameter&#8221; on the method call which used generic typed objects and var-args. This warning confused users of APIs, while the authors of those APIs got no warnings. To avoid this, a new compiler warning &#8220;[unchecked] Possible heap pollution from parameterized vararg type L&#8221; has been introduced, so the author of the library will get notified about the problem. He also can use the @SafeVars annotation, to promise that his method will not generate heap pollution. In this case the warning will dissapear on the side of the implementer and the caller of the method.</p>
<pre class="brush: java; title: ; notranslate">@SafeVarags
public static  L[] createHeapPollution(L... args) {
  return args;
}

public static void main(String... args) {
  List[] unpolluted = createNoHeapPollution(Arrays.asList(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;));
  String element = unpolluted[0].get(0);
}</pre>
<span id="What_is_comes_next"><h3>What is comes next?</h3></span>
<p>There are two addtitional features Project Coin introduces. They will be described in the next post on the JDK 7 subject. Stay tuned &#8230;</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=143&amp;md5=c3a4bcacb78b08174e82b595fd30ab6c" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2011/03/13/jdk-7-features-project-coin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2011%2F03%2F13%2Fjdk-7-features-project-coin%2F&amp;language=en_GB&amp;category=text&amp;title=JDK+7+Features%3A+Project+Coin&amp;description=Last+recently+I+did+a+talk+about+the+some+of+the+new+features+in+JDK7+or+Java+7+%28Project+Coin%2C+Concurrency+Utils+and+InvokeDynamic%29+at+the+freshly+founded+Koblenz+Java...&amp;tags=java7%2Cjdk7%2Copenjdk%2Cproject+coin%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Insertion Sort in Scala</title>
		<link>http://blog.jthoenes.net/2010/10/22/insertion-sort-in-scala/</link>
		<comments>http://blog.jthoenes.net/2010/10/22/insertion-sort-in-scala/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 22:41:32 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[sorting]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=111</guid>
		<description><![CDATA[Implementation of the Insertion Sort in Scala in a classical C-like and a modern Scala-like way.]]></description>
			<content:encoded><![CDATA[<p>Finally beeing a bit more serious about learning the Scala language, I wanted to do some exercises to get a little fluent in the language. Because I&#8217;m only four Chapters into &#8220;Programming in Scala&#8221;, I choose the simple one: Implementing search algorithms &#8211; today the insertion sort. Here is the the &#8220;easy&#8221; solution coming from a mostly object-orientated background transcoded from a text book:</p>
<p><span id="more-111"></span></p>
<pre class="brush: scala; title: ; notranslate">def insertionSort(unsortedList : List[String]) = {
    val F = unsortedList.toArray
    for(i &lt;- (2 until F.length)){
      val m = F(i)
      var j = i;
      while(j &gt; 1 &amp;&amp; !sorted){
        if (F(j-1) &gt;= m) {
          F(j) = F(j-1)
          j -= 1
        }
      }
      F(j) = m
    }
    F.toList
 }

// Note:
// This algorithm has been transcribed from:
// Saake and Sattler. &quot;Algorithmen und Datenstrukturen. Eine Einführung in Java&quot;.
// dpunkt.verlag Heidelberg, 2004. page 123f</pre>
<p>So, the program iterates over the indexes of the elements from 2 to unsortedList.lenght (line 3). Then it grabs the element of the current index (line 4) and and checks that all elements bigger than the current one get moved one index higher (line 6-11). The it assigns the current element to the place the last element from has been moved from &#8211; and everything is sorted.<br />
What I left out from the original algorithm from my source, is a <em>break</em>. This is not critical as the <em>break</em> is a green-cut, to save some performance. This is because scala doesn&#8217;t offer a <em>break</em>. This does not really look like scala code. It uses an Array, which is a mutable class &#8211; and it uses index based access to a large extend. So I thought about the algorithm and came up (after some trying) with this alternative implementation:</p>
<pre class="brush: scala; title: ; notranslate">def insertionSort(source : List[String]) = {
  var sorted = List(source.head)
  var unsorted = source.tail
  while(unsorted.tail != Nil){
    val index = sorted.indexWhere( _ &gt; unsorted.head)

    if(index &lt; 0){
      sorted = sorted ::: List(unsorted.head)
    }
    else {
      sorted = sorted.take(index) ::: unsorted.head :: sorted.drop(index)
    }

    unsorted = unsorted.tail
  }
  sorted
}</pre>
<p>So first of all, we now have two lists. One with the unsorted and one with the sorted elements. At first the program puts the head of the source list into the sorted list, the tail ends up in the unsorted list (lines 2 and 3). Then it does a <em>while</em> loop until the unsorted list is empty (<em>Nil</em> is an empty list in scala, line 4)- always putting its head into the sorted list and putting its tail in the unsorted list itself, so the unsorted list gets smaller every <em>while</em>-iteration.</p>
<p>The sorting happens based on index (as I understand it, this cannot be avoided in insertion sort, or do you have a solution?). First it finds the index of the first element smaller than the current one (line 5). Then the program creates a new sorted list (the lists are immutable, so we have to create one and assign it to the variable) &#8211; with the elements before at the top, the current element in the middle and the elements after at the end (line 11). If the current element is the biggest one (which would mean the index is -1), the element is put at the end (line 8).</p>
<p>So this is my approach. Do you have a better one? Or at least a different one?</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=111&amp;md5=5a76ff7a7f0229224c8d215da6730763" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2010/10/22/insertion-sort-in-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2010%2F10%2F22%2Finsertion-sort-in-scala%2F&amp;language=en_GB&amp;category=text&amp;title=Insertion+Sort+in+Scala&amp;description=Finally+beeing+a+bit+more+serious+about+learning+the+Scala+language%2C+I+wanted+to+do+some+exercises+to+get+a+little+fluent+in+the+language.+Because+I%26%238217%3Bm+only+four+Chapters...&amp;tags=learning%2Cscala%2Csorting%2Cblog" type="text/html" />
	</item>
		<item>
		<title>A Ruby Script for Upgrading Multiple DokuWiki Installations</title>
		<link>http://blog.jthoenes.net/2010/01/24/a-ruby-script-for-upgrading-multiple-dokuwiki-installations/</link>
		<comments>http://blog.jthoenes.net/2010/01/24/a-ruby-script-for-upgrading-multiple-dokuwiki-installations/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 14:59:36 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[DokuWiki]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=85</guid>
		<description><![CDATA[After DokuWiki has been released multiple times in the last few days because of security problems, I though it was a good time, to write a little script for automatically updating multiple instances. You can find the ruby script at http://gist.github.com/285219. The ruby script basically automates the upgrade instructions from the DokuWiki main page. So the [...]]]></description>
			<content:encoded><![CDATA[<p>After <a title="DokuWiki" href="http://www.splitbrain.org/projects/dokuwiki">DokuWiki</a> has been released multiple times in the last few days because of security problems, I though it was a good time, to write a little script for automatically updating multiple instances. You can find the ruby script at <a href="http://gist.github.com/285219">http://gist.github.com/285219</a>.</p>
<p>The ruby script basically automates the <a href="http://www.dokuwiki.org/install:upgrade">upgrade instructions</a> from the DokuWiki main page. So the following actions are performed when executing the script:</p>
<ol>
<li>Making a backup into /tmp/dokuwiki_backup_#{timestamp} of every installation.</li>
<li>Downloading the dokuwiki release (passed in as a parameter).</li>
<li>Extracting the files and copying everything to the installations (execept for the content of the /data directory).</li>
<li>Creating missing folders in the /data directory, making the owner www-data:www-data and chmodding them to 664.</li>
<li>Deleting files from a list of file from older revisions.</li>
</ol>
<p>Within the script you need to specifiy this snipped for setting your DokuWiki installations:</p>
<pre class="brush: ruby; title: ; notranslate"># Definition of existing installation
INSTALLATIONS = [
  '/path/to/docu/wiki/installation1',
  '/path/to/docu/wiki/installation2'
].freeze</pre>
<p>Then you can call for a new release as follows:</p>
<pre class="brush: bash; title: ; notranslate">/path/to/script/upgrade_dokuwiki.rb http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2009-12-25c.tgz</pre>
<p>If you want to improve the script, feel free to fork me on <a href="http://gist.github.com/285219">Gist</a>.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=85&amp;md5=f8c909dd32ac8d5114bbc313ca6f2ca9" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2010/01/24/a-ruby-script-for-upgrading-multiple-dokuwiki-installations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2010%2F01%2F24%2Fa-ruby-script-for-upgrading-multiple-dokuwiki-installations%2F&amp;language=en_GB&amp;category=text&amp;title=A+Ruby+Script+for+Upgrading+Multiple+DokuWiki+Installations&amp;description=After+DokuWiki+has+been+released+multiple+times+in+the+last+few+days+because+of+security+problems%2C+I+though+it+was+a+good+time%2C+to+write+a+little+script+for+automatically...&amp;tags=DokuWiki%2CRuby%2CScripts%2CUpgrade%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Print-Version anzeigen mit Greasemonkey und JQuery</title>
		<link>http://blog.jthoenes.net/2008/08/14/print-version-anzeigen-mit-greasemonkey-und-jquery/</link>
		<comments>http://blog.jthoenes.net/2008/08/14/print-version-anzeigen-mit-greasemonkey-und-jquery/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 09:29:11 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Grease Monkey]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=20</guid>
		<description><![CDATA[Ich habe in letzter Zeit viel mit JQuery gearbeitet und als erste Javascript-Bibliothek habe ich bei JQuery das Gefühl, dass man richtig schönen Code schreiben kann. Nun trug es sich aber zu (;-)), dass heise.de sein Design geändert hat. Mich hat deren Design schon vorhher immer genervt, wenn ich aus meinem RSS-Reader auf die einzelnen [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe in letzter Zeit viel mit <a href="http://jquery.com" target="_blank">JQuery</a> gearbeitet und als erste Javascript-Bibliothek habe ich bei JQuery das Gefühl, dass man richtig schönen Code schreiben kann.</p>
<p>Nun trug es sich aber zu (;-)), dass heise.de sein Design geändert hat. Mich hat deren Design schon vorhher immer genervt, wenn ich aus meinem RSS-Reader auf die einzelnen Artikel bin. Aber jetzt war definitiv die Schmerzensgrenze überschritten. Um nicht alle Elemente nachstylen zu müssen (was ja auch sehr fragil ist, da die ids und classes ja jederzeit geändert werden können), habe ich mir überlegt, das ich erstmal die Styles der Printversion nehme. Das ging erstaunlich einfach:</p>
<pre class="brush: jscript; title: ; notranslate">// Erstmal JQuery ins Dokument einführen
// Der Code zum einbinden von JQuer ist ist von:
// http://www.joanpiedra.com/jquery/greasemonkey/ und ist unter MIT-Lizenz gestellt
// Kommentare sind angepasst.
var GM_JQ = document.createElement('script');
GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
GM_JQ.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(GM_JQ);

// Warten bis JQuery nachgeladen ist
function GM_wait() {
if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait,100); }
else { $ = unsafeWindow.jQuery; letsJQuery(); }
}
GM_wait();

// Das normale Greasemonkey Skript, nur jetzt mit JQuery
function letsJQuery() {
// Lösche alle Stylesheets die nicht media=print sind
$('link[rel=stylesheet]').not('[media=print]').remove();
// Ändere das media von print auf screen
$('link[rel=stylesheet]').filter('[media=print]').attr('media', 'screen');
}</pre>
<p>Ich habe das Skript speziell für heise.de noch etwas erweitert &#8230; wen das interessiert, der möge mich ansprechen.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=20&amp;md5=0562f09184cf407cdb6700c9a4e2eef4" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2008/08/14/print-version-anzeigen-mit-greasemonkey-und-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2008%2F08%2F14%2Fprint-version-anzeigen-mit-greasemonkey-und-jquery%2F&amp;language=en_GB&amp;category=text&amp;title=Print-Version+anzeigen+mit+Greasemonkey+und+JQuery&amp;description=Ich+habe+in+letzter+Zeit+viel+mit+JQuery+gearbeitet+und+als+erste+Javascript-Bibliothek+habe+ich+bei+JQuery+das+Gef%C3%BChl%2C+dass+man+richtig+sch%C3%B6nen+Code+schreiben+kann.+Nun+trug+es+sich...&amp;tags=Grease+Monkey%2CJQuery%2Cblog" type="text/html" />
	</item>
		<item>
		<title>EURUKO 2008</title>
		<link>http://blog.jthoenes.net/2008/03/31/euruko-2008/</link>
		<comments>http://blog.jthoenes.net/2008/03/31/euruko-2008/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 14:27:01 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=8</guid>
		<description><![CDATA[Wie der eine oder andere von euch mitbekommen hat, bin ich dieses Wochenende auf der European Ruby Conference in Prag gewesen. Damit die Banausen, die zu Hause geblieben sind auch ungefähr mitbekommen, was sich dort so abgespielt hat, hier eine kurze Zusammenfassung von mir: Ruby 1.9 Matz und Koichi Sasada haben das neue Ruby 1.9 [...]]]></description>
			<content:encoded><![CDATA[<p>Wie der eine oder andere von euch mitbekommen hat, bin ich dieses Wochenende auf der European Ruby Conference in Prag gewesen. Damit die Banausen, die zu Hause geblieben sind auch ungefähr mitbekommen, was sich dort so abgespielt hat, hier eine kurze Zusammenfassung von mir:</p>
<p><strong>Ruby 1.9</strong></p>
<p>Matz und Koichi Sasada haben das neue Ruby 1.9 vorgestellt. Und einen Überblick darüber gegeben, was war, was ist und was noch  kommen wird. Neben den technischen Details (die man übrigens sehr gut auch aus dem Google TechTalk Vortrag von Matz entnehmen kann) hat Matz vorallem herausgehoben, dass für ihn die Innovation der Sprache Ruby sehr wichtig ist. Er möchte nicht mit dem zufrieden sein was ist, sondern möchte weiter gehen und Ruby weiter entwickeln.<br />
Weiterhin ist natürlich zu erwähnen: Ruby programming is fun &#8230;</p>
<p><strong>JRuby</strong></p>
<p>Für mich war JRuby die absolute Überraschung. Bisher hat man sich immer gefragt, was eigentlich JRuby soll &#8211; nun im Prinzip ist JRuby dazu da, Ruby Code zu schreiben und gleichzeitig Java-Klassen zu verwenden. Whant so see some?<br />
<em>(Nach Installation via apt-get install jruby1.0 und interaktiv, also jirb1.0)</em></p>
<pre class="brush: ruby; title: ; notranslate">require 'java'
include_class 'javax.swing.JFrame'
include_class 'javax.swing.JLabel'
include_class 'java.awt.event.ActionListener'
include_class 'javax.swing.JOptionPane'

frame = JFrame.new &quot;Das JRuby Fenster&quot;
frame.setSize 400,200
# Überlagerter Setter von
# frame.set_default_close_operation(JFrame::EXIT_ON_CLOSE)
frame.default_close_operation=JFrame::EXIT_ON_CLOSE
label = JLabel.new &quot;Hello World&quot;
frame.add label

frame.visible= true</pre>
<p>Dinge wie obejct.method etc gehen natürlich auch, sodass man super neuer Java-Bibliotheken über jruby ausprobieren kann, selbst wenn man sie &#8216;nur&#8217; für Java selbst verwenden will.<br />
Übrigens wurde die 1.1 Release während der Konferenz bekannt gegeben.</p>
<p><strong>Weitere Vorträge</strong></p>
<p>Wurden auch gehalten. Alle waren sehr interessant und haben vorallem eines gezeigt: Mit Ruby kann man verdammt viel mehr machen, als bloß Rails. Und dass heißt ja nun wirklich etwas &#8230; Ich fands jedenfalls sehr cool (schon alleine wegen der T-Shirts <img src='http://blog.jthoenes.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )</p>
<p>Die Folien sollten in Kürze http://www.euruko2008.org zu finden sein.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=8&amp;md5=e131f1a7ecd489aacab6cd6e08357b76" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2008/03/31/euruko-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2008%2F03%2F31%2Feuruko-2008%2F&amp;language=en_GB&amp;category=text&amp;title=EURUKO+2008&amp;description=Wie+der+eine+oder+andere+von+euch+mitbekommen+hat%2C+bin+ich+dieses+Wochenende+auf+der+European+Ruby+Conference+in+Prag+gewesen.+Damit+die+Banausen%2C+die+zu+Hause+geblieben+sind+auch...&amp;tags=JRuby%2CRails%2CRuby%2Cblog" type="text/html" />
	</item>
		<item>
		<title>RANDI2 kommt zurück</title>
		<link>http://blog.jthoenes.net/2008/02/12/randi-2-kommt-zuruck/</link>
		<comments>http://blog.jthoenes.net/2008/02/12/randi-2-kommt-zuruck/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 21:49:26 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Klinische Studien]]></category>
		<category><![CDATA[Randi2]]></category>
		<category><![CDATA[Randomisation]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/2008/02/12/randi-2-kommt-zuruck/</guid>
		<description><![CDATA[Mit einem Vortrag im Deutschen Krebsforschungszentrum in Heidelberg ist heute der Startschuss zur Weiterentwicklung von Randi 2 gefallen. Randi 2 ist eine Plattform zur Randomisation in klinischen Studien. In klinischen Studien &#8211; also Studien in denen neue Therapien im Gesundheitswesen am Menschen getestet werden &#8211; ist es Standard, Patienten zu randomisieren. Das bedeutet, dass man [...]]]></description>
			<content:encoded><![CDATA[<p>Mit einem Vortrag im Deutschen Krebsforschungszentrum in Heidelberg ist heute der Startschuss zur Weiterentwicklung von Randi 2 gefallen. Randi 2 ist eine Plattform zur Randomisation in klinischen Studien.</p>
<p>In klinischen Studien &#8211; also Studien in denen neue Therapien im Gesundheitswesen am Menschen getestet werden &#8211; ist es Standard, Patienten zu randomisieren. Das bedeutet, dass man Patienten auf zwei, manchmal auch mehrere, sog. Arme aufteilt und das, wie der Name schon vermuten lässt, zufällig. Patienten bzw. Probanden die zu einem Arm randomisiert wurden, erhalten dann eine Behandlung gemäß ihrem Arm. Das sieht so aus, dass zum einen die neue Therapie und zum anderen die Standarttherapie bzw.  Placebo zu der Zielerkrankung angewendet wird. Diese beiden Arme können nachher verglichen werden, sodass festgestellt werden kann, ob das neue Medikament besser ist als das andere oder eben nicht.</p>
<p>Randi 2 ist eine webbasierte J2EE Anwendung, die es ermöglicht, eben jene Randomisation durchzuführen.  Dabei kann sich &#8211; wenn eine Klinische Studie angelegt ist &#8211; der Arzt einloggen und die von ihm rekrutierten Probanden sofort randomisieren lassen.</p>
<p>Randi 2 ist im Studiengang Medizinische Informatik an der Universität Heidelberg/Hochschule Heilbronn in einem Softwarepraktikum entstanden. Ich war damals auch Mitglied des ca. 18-köpfigen Teams, dass die jetzige Version von Randi2 in zwei Semestern entwickelt hat. Jetzt soll das Projekt als Open Source unter GNU GPL 3.0 weiterentwickelt werden.</p>
<p>Seit gut einer Woche gibt es die Seite http://randi2.hs-heilbronn.de und ab heute sind wir auch unter http://sourceforge.net/projects/randi2 zu finden. Auf der ersten Seite findet man die wichtigsten News rund um Randi 2 und seine Entwicklung. Die zweite ist unsere Kommunikationsplattform die auch gerne genutzt werden darf, um Wünsche zu äußern.</p>
<p>Bis die Software für die erste klinische Studie produktiv eingesetzt wird, wird es vermutlich noch etwas arbeit bedürfen. Daher ist jeder willkommen, der das Open Source Projekt unterstützen will. Dazu einfach  Mail an randi2@hs-heilbronn.de. Ich freue mich auf euch!</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=7&amp;md5=7f8fe6e55cc90f934f66adb8d5021b2f" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2008/02/12/randi-2-kommt-zuruck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2008%2F02%2F12%2Frandi-2-kommt-zuruck%2F&amp;language=en_GB&amp;category=text&amp;title=RANDI2+kommt+zur%C3%BCck&amp;description=Mit+einem+Vortrag+im+Deutschen+Krebsforschungszentrum+in+Heidelberg+ist+heute+der+Startschuss+zur+Weiterentwicklung+von+Randi+2+gefallen.+Randi+2+ist+eine+Plattform+zur+Randomisation+in+klinischen+Studien.+In+klinischen...&amp;tags=Klinische+Studien%2CRandi2%2CRandomisation%2Cblog" type="text/html" />
	</item>
		<item>
		<title>APIs verschiedener Programmiersprachen meistern</title>
		<link>http://blog.jthoenes.net/2008/02/06/apis-verschiedener-programmiersprachen-meistern/</link>
		<comments>http://blog.jthoenes.net/2008/02/06/apis-verschiedener-programmiersprachen-meistern/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 12:28:57 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[API Webseiten]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/2008/02/06/apis-verschiedener-programmiersprachen-meistern/</guid>
		<description><![CDATA[Vielleicht fällt es dem einen oder anderen unter euch auch so schwer, die verschiedenen APIs aus Java, Ruby, Ruby on Rails, GWT etc. immer zu finden. Sicher, es gibt Lesezeichen. Aber ich habe etwas gefunden, was mir deutlich besser zusagt: http://gotapi.com. Die Seite bietet neben dem Suchen (natürlich mit Aut-Expansion), was ja bei der traditionellen [...]]]></description>
			<content:encoded><![CDATA[<p>Vielleicht fällt es dem einen oder anderen unter euch auch so schwer, die verschiedenen APIs aus Java, Ruby, Ruby on Rails, GWT etc. immer zu finden. Sicher, es gibt Lesezeichen. Aber ich habe etwas gefunden, was mir deutlich besser zusagt: <a href="http://gotapi.com" title="http://gotapi.com" target="_blank">http://gotapi.com</a>.</p>
<p>Die Seite bietet neben dem Suchen (natürlich mit Aut-Expansion), was ja bei der traditionellen Java-API immernoch fehlt, in einer API, auch das Suchen in mehreren sowie das Merken von den gewünschten Favoriten. Außerdem können die Suchwidgets einzelner APIs auch in andere Seiten integriert werden &#8211; müsste theoretisch sogar mit iGoogle gehen. Heißt: Lieblings-API auf der Browser-Startseite serviert?<br />
Der Inhalt der APIs wird nicht von gotAPI gepflegt, sondern es werden die Seiten angezeigt, die in der Ursprünglichen API benutzt werden. So ist man auch bei Änderungen &#8211; etwa durch SUN &#8211; immernoch auf dem neuesten Stand. Wenngleich hier anzumerken wäre, dass die Java 1.6.0 API noch nicht zur Verfügung steht. Lediglich 1.5.0.<br />
Was mich als Rails Entwickler natürlich freut ist, dass Ruby und Rails in einer API aufgeführt werden. Das macht das Suchen nach Funktionen einfacher bzw. spart mir einfach die Überlegung, ob das eine Ruby oder eine Rails frage ist.</p>
<p>Fazit: Unbedingt ansehen!</p>
<p><a href="http://jthoenes.bergischweb.de/wp-content/uploads/2008/02/bildschirmfoto.png" title="gotAPI java"><img src="http://jthoenes.bergischweb.de/wp-content/uploads/2008/02/bildschirmfoto.thumbnail.png" alt="gotAPI java" /></a></p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=4&amp;md5=b7efec3cbacb6f36edab5c5dae322a2d" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2008/02/06/apis-verschiedener-programmiersprachen-meistern/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jthoenes&amp;url=http%3A%2F%2Fblog.jthoenes.net%2F2008%2F02%2F06%2Fapis-verschiedener-programmiersprachen-meistern%2F&amp;language=en_GB&amp;category=text&amp;title=APIs+verschiedener+Programmiersprachen+meistern&amp;description=Vielleicht+f%C3%A4llt+es+dem+einen+oder+anderen+unter+euch+auch+so+schwer%2C+die+verschiedenen+APIs+aus+Java%2C+Ruby%2C+Ruby+on+Rails%2C+GWT+etc.+immer+zu+finden.+Sicher%2C+es+gibt+Lesezeichen....&amp;tags=API+Webseiten%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

