<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Johannes Thönes</title>
	
	<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>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/jthoenes" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="jthoenes" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Prime Directive of a Personal Retrospective</title>
		<link>http://blog.jthoenes.net/2012/03/30/prime-directive-of-a-personal-retrospective/</link>
		<comments>http://blog.jthoenes.net/2012/03/30/prime-directive-of-a-personal-retrospective/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 10:15:50 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Personal Retrospectives Series]]></category>
		<category><![CDATA[Retrospectives]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[personal retrospectives]]></category>
		<category><![CDATA[prime directive]]></category>
		<category><![CDATA[retrospectives]]></category>

		<guid isPermaLink="false">http://blog.jthoenes.net/?p=390</guid>
		<description><![CDATA[In this article, I will write about the directives or rules you should put in place for yourself while doing a personal retrospective. This article is part of my Personal Retrospective Series &#8211; so read the other articles, if you want to learn more about personal retrospectives. Norman Kerth Prime Directive Norman Kerth &#8211; the [...]]]></description>
			<content:encoded><![CDATA[<p>In this article, I will write about the directives or rules you should put in place for yourself while doing a personal retrospective. This article is part of my <a href="http://blog.jthoenes.net/personal-retrospectives/">Personal Retrospective Series</a> &#8211; so read the other articles, if you want to learn more about personal retrospectives.</p>
<p><span id="more-390"></span></p>
<span id="Norman_Kerth_Prime_Directive"><h2>Norman Kerth Prime Directive</h2></span>
<p>Norman Kerth &#8211; the author of &#8220;Project Retrospectives: A Handbook for Team Reviews&#8221; &#8211; formulated the following prime directive for retrospectives:</p>
<blockquote><p>Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand.</p></blockquote>
<p>This is true for team retrospectives. But it is true for your personal retrospective as well. I did adapt this directive a little bit for my personal retrospective. You can and should adapt it, too. A personal retrospective is your personal thing.</p>
<p>However, you should keep in mind, that a personal retrospective is not about blaming yourself, just like project or team retrospectives are not about blaming others.</p>
<p>This is hard, because we (or at least I) get easy in the mode of blaming ourselves. But by doing the retrospective, you need to accept that you cannot change the past. You will analyse it. And you will learn from it.</p>
<span id="An_example"><h2>An example</h2></span>
<p>So let me make an example. Let&#8217;s say I failed an exam &#8211; how would I treat this in a personal retrospective?</p>
<ul>
<li>&#8220;Why did I fail the exam?&#8221;  - &#8220;Because I did not learn enough.&#8221;</li>
<li>&#8220;Why didn&#8217;t I learn enough?&#8221; &#8211; &#8220;Because I was lazy.&#8221;</li>
<li>&#8220;Why were I lazy?&#8221; &#8211; &#8220;Because I felt exhausted.&#8221;</li>
<li>&#8220;Why were you exhausted?&#8221; &#8211; &#8220;Because before I was doing  XYZ.&#8221;</li>
<li>(And so on &#8230;.)</li>
</ul>
<p>The key here is to break the circle of blaming yourself. Especially when it comes to &#8220;I am to lazy&#8221; &#8211; which could be something other people might have said about you. Don&#8217;t fall into that trap! Nobody is harming himself and his goals on purpose.</p>
<p>As you can see, being positive about what you did does not mean you shy away from problems. You need to tackle problems. But to tackle them, you have to understand why the problem occured. You need to find the reason why you acted in some way. And than you can think about strategies, how to tackle the problems. Tackling might mean, to change things &#8211; or to stop expecting to much from yourself.</p>
<span id="How_to_live_Prime_Directive"><h2>How to live Prime Directive</h2></span>
<p>So, how do you make sure you really follow the prime directive in your retrospective?</p>
<p>The first step is to accept intellectually, that the this prime directive is the right strategy. You can do this by reading this article, as well as other resources on project and personal retrospectives.</p>
<p>If you have accepted it, the next step is to get it into your heart during the personal retrospective. I do this in two ways:</p>
<ul>
<li>By <em>calling it into mind </em>during the retrospective. I do it by reading the prime directive aloud before the retrospective to myself. Or I write it on a paper and keep it visible during the whole retrospective. You could use other means, like writing it down every retrospectives or anything which is appropriate for you.</li>
<li>By <em>experience</em> you can convince yourself. If you practice the &#8220;the best you can&#8221; strategy as outlined in the example long enough, you may learn and therefore start to believe it. At least it worked for me. I found out, that  there is always a way to explain my actions afterwards &#8211; even if they seem strage at  the time.</li>
</ul>
<span id="Were_can_you_learn_more"><h2>Were can you learn more?</h2></span>
<p>This article is the part of my <a href="http://blog.jthoenes.net/networks/personal-retrospective">Personal Retrospectives Series</a>. I was strongly influence by other people – look at the <a href="http://blog.jthoenes.net/personal-retrospectives#Further_Material">Further Material</a> section to find out more.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=390&amp;md5=22a864f8cd4ff560d208b119c838138f" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/jthoenes/~4/ToZ0NhXWXH0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2012/03/30/prime-directive-of-a-personal-retrospective/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%2F2012%2F03%2F30%2Fprime-directive-of-a-personal-retrospective%2F&amp;language=en_GB&amp;category=text&amp;title=Prime+Directive+of+a+Personal+Retrospective&amp;description=In+this+article%2C+I+will+write+about+the+directives+or+rules+you+should+put+in+place+for+yourself+while+doing+a+personal+retrospective.+This+article+is+part+of+my+Personal...&amp;tags=agile%2Cpersonal+retrospectives%2Cprime+directive%2Cretrospectives%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Slides for Personal Retrospectives</title>
		<link>http://blog.jthoenes.net/2012/03/09/slides-for-personal-retrospectives/</link>
		<comments>http://blog.jthoenes.net/2012/03/09/slides-for-personal-retrospectives/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 18:02:05 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Retrospectives]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[personal retrospectives]]></category>
		<category><![CDATA[slides]]></category>

		<guid isPermaLink="false">http://blog.jthoenes.net/?p=386</guid>
		<description><![CDATA[This tuesday I gave a presentation at the Koblenz Java User Group (KoJUG) about Personal Retrospectives. I uploaded the presentation to SlideShare: Personal Retrospectives View more presentations from Johannes Thönes.]]></description>
			<content:encoded><![CDATA[<p>This tuesday I gave a presentation at the Koblenz Java User Group (KoJUG) about Personal Retrospectives. I uploaded the presentation to SlideShare:</p>
<div style="width:425px" id="__ss_11942439"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/jthoenes/personal-retrospectives" title="Personal Retrospectives">Personal Retrospectives</a></strong><object id="__sse11942439" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=personalretrospective-nonoticen-120309115912-phpapp02&#038;stripped_title=personal-retrospectives&#038;userName=jthoenes" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><param name="wmode" value="transparent"/><embed name="__sse11942439" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=personalretrospective-nonoticen-120309115912-phpapp02&#038;stripped_title=personal-retrospectives&#038;userName=jthoenes" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" 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=386&amp;md5=785a380f9888cb2a3d71cacfd35895f3" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/jthoenes/~4/LMBVa_cOg1o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2012/03/09/slides-for-personal-retrospectives/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%2F2012%2F03%2F09%2Fslides-for-personal-retrospectives%2F&amp;language=en_GB&amp;category=text&amp;title=Slides+for+Personal+Retrospectives&amp;description=This+tuesday+I+gave+a+presentation+at+the+Koblenz+Java+User+Group+%28KoJUG%29+about+Personal+Retrospectives.+I+uploaded+the+presentation+to+SlideShare%3A+Personal+Retrospectives+View+more+presentations+from+Johannes+Th%C3%B6nes.&amp;tags=agile%2Cpersonal+retrospectives%2Cslides%2Cblog" type="text/html" />
	</item>
		<item>
		<title>5 Phases of a Personal Retrospective</title>
		<link>http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/</link>
		<comments>http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 22:59:56 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Personal Retrospectives Series]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[personal retrospectives]]></category>
		<category><![CDATA[retrospectives]]></category>

		<guid isPermaLink="false">http://blog.jthoenes.net/?p=373</guid>
		<description><![CDATA[In this article I will write about the five different phases of a personal retrospective. If you are new to the topic of personal retrospectives, you should read my introduction. The phases of a personal retrospective describe the different steps you can identify in virtually any retrospective. Everyones personal retrospective is unique &#8211; but these [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will write about the five different phases of a personal retrospective. If you are new to the topic of personal retrospectives, you should read <a href="http://blog.jthoenes.net/2012/02/20/personal-retrospectives-an-introduction/">my introduction</a>.</p>
<p>The phases of a personal retrospective describe the different steps you can identify in virtually any retrospective. Everyones personal retrospective is unique &#8211; but these phases serve you as a framework, when planning your own retrospectives.</p>
<p>In terms of phases, there is really not much of a difference between project retrospectives and personal retrospectives. So I looked for phases in the literature &#8211; <a href="http://www.dorsethouse.com/books/pr.html">Norman Kerth</a> names three phases: Start, Middle and End. These are a good starting point, however I think for the purpose of discussion it is better to use the stages Ester Derby and Dianne Larsen <a href="http://pragprog.com/book/dlret/agile-retrospectives">introduced</a>.</p>
<p>For each phase you can select certain exercises or activities. These practices help people to recall and better understand what happened. They try to unearth hidden success stories and problems. You can find description of those exercises in</p>
<ul>
<li>Kerth NL. Project Retrospectives: A Handbook for Team Reviews (<a href="http://www.amazon.com/dp/0932633447/?tag=bergischwebte-21">amazon</a>)</li>
<li>Derby E and Larsen D. Agile Retrospectives: Making Good Teams Great (<a href="http://www.amazon.com/dp/0977616649/?tag=bergischwebte-21">amazon</a>)</li>
<li>The Agile Retrospectives Resources Wiki (<a href="http://retrospectivewiki.org/" target="_blank">link</a>)</li>
</ul>
<div>Some of these exercises can be used in personal retrospectives. However every exercise needs to be adapted to personal retrospectives, as it needs to be adapted to your retrospectives. I will hint at those exercises during this article. In later articles I will focus more on the individual exercises.</div>
<p><span id="more-373"></span></p>
<div class='toc toc'>
<h2>Contents</h2>
<ul class='toc-odd level-1'>
	<li>
		<a href="#Phase_1:_Set_the_Stage">Phase 1: Set the Stage</a>
	</li>
	<li>
		<a href="#Phase_2:_Gather_Data">Phase 2: Gather Data</a>
	</li>
	<li>
		<a href="#Phase_3:_Generate_Insights">Phase 3: Generate Insights</a>
	</li>
	<li>
		<a href="#Phase_4:_Decide_What_to_Do">Phase 4: Decide What to Do</a>
	</li>
	<li>
		<a href="#Phase_5:_Close_the_Retrospective">Phase 5: Close the Retrospective</a>
	</li>
	<li>
		<a href="#Were_can_you_learn_more">Were can you learn more?</a>
	</li>
</ul>
</ul>
</div>
<div class='toc-end'>&nbsp;</div>
<p>Now lets look into the five phases.</p>
<span id="Phase_1:_Set_the_Stage"><h2>Phase 1: Set the Stage</h2></span>
<p>The goal of this phase is to create the atmosphere and mood for a retrospective. Stopping and thinking about yourself is not a normal activity. You have to get in the mood to take time to breath, to take time to think.</p>
<p>To get into this mood, I have for example a special music playlist I always play when I do my heartbeat retrospective. My brain is now, after some time, conditioned to switch into the reflection mode, if I hear the starting sound.</p>
<p>Another thing is, that I read an adapted form of the <a href="http://www.retrospectives.com/pages/retroPrimeDirective.html">Retrospective Prime Directive</a> to myself &#8211; aloud.</p>
<p>For the more extensive quarter retrospectives, I will move to a different table. Rather than working on my usual desk, I will position myself in the living room. This helps me, to recognize that I am not doing usual work &#8211; but reflection work.</p>
<span id="Phase_2:_Gather_Data"><h2>Phase 2: Gather Data</h2></span>
<p>In the <em>Gather Data</em> phase, you want to accumulate as much data about the retrospectives subject as you can get. The goal is, to gather objective information that help you, to check your experience with reality. You will remember things  better with these information.</p>
<p>The easiest way to gather data is with the information sources you already have:</p>
<ul>
<li>I look into my calendar what actually was plannend. I occasonally correct the old plan with what really happend and add important unplanned events into it afterwards.</li>
<li>I have a <a href="https://www.rememberthemilk.com">task list</a>, were I can check what were the task I completed in the retrospective time frame.</li>
<li>I look at who I made contact with in the time frame.</li>
</ul>
<div>Another possibility is to use lists, as very nicely described in <a href="http://www.infoq.com/presentations/Personal-Retrospectives">Ainsley Nies&#8217; presentation</a>. For quarter retrospectives I use the &#8220;Timeline&#8221; exercise, were I put relevant events onto a long paper in relation to the time it happend in.</div>
<span id="Phase_3:_Generate_Insights"><h2>Phase 3: Generate Insights</h2></span>
<p>In <em>Generate Insights</em>, you analyse the data to understand what it might tell you. You try to see patterns: What contributed to this success? Which action I did caused that breakdown?</p>
<p>In this phase, I use the data from calendar, task list and contact log. This data helps me to recall things &#8211; and see connections between the events. I use this, for example to write a few key-points for every day down during the heartbeat retrospectives.</p>
<p>On the timeline, I use colors to indicate how I felt about certain events. If you work with list, you can write down three things you ituitively associate whit each item. If you wan to have more ideas what you can do, you should really watch <a href="http://www.infoq.com/presentations/Personal-Retrospectives">Aisley Nies&#8217; presentation</a> - she calls this phase &#8220;Distill the Learning&#8221;.</p>
<span id="Phase_4:_Decide_What_to_Do"><h2>Phase 4: Decide What to Do</h2></span>
<p>From the Insights you gained, now you need to pick what you want to do. But be aware, you should not do everything immediately. Make one or two steps forward &#8211; and start with the easy one, which will make biggest impact in the short term.</p>
<p>I have essentially three types of ToDos:</p>
<ul>
<li>Big goals, which are more like visions and ideas were I want to go. They are in the timescope of a year, a quarter and maybe sometimes a month.</li>
<li>To achieve these goals, I attach SMART-Objective to them. This means a <strong>S</strong>pecific objective, were you can <strong>M</strong>easure if you completed it. Therefore it has to be <strong>A</strong>chievable. To make sense, it has to be <strong>R</strong>elevant for achieving the goal and it has to be<strong> T</strong>ime-boxed &#8211; which means 6 weeks maximum for me.<br />
I learned about those from Andy Hunts excellent <a href="http://pragprog.com/book/ahptl/pragmatic-thinking-and-learning">Effective Thinking and Learning</a> - were you can and should read more.</li>
<li>Most of the time, a SMART-Objective has certain sub tasks. These will be concrete tasks in my task list &#8211; together with a concrete due date. Tasks which take longer to complete will also be put into the calendar at a heartbeat retrospective, to block enough time to execute them.</li>
</ul>
<span id="Phase_5:_Close_the_Retrospective"><h2>Phase 5: Close the Retrospective</h2></span>
<p>In the <em>Closing the Retrospective</em> phase, you want to move back into the normal work after the retrospective. You need to appreciate yourself (yes you can do it!) for your work and your retrospective. You should as well reflect on how the retrospective went and what you might chance next time.</p>
<p>I usually close the heartbeat retrospectives with a special closing song &#8211; this is the only song with vocals.</p>
<p>In quarter retrospectives I write a letter to myself, to summarize the retrospective. I will open the letter the next quarter retrospective. Moreover, I will make my favorite cocktail and will enjoy the insights and lessons learned in the retrospective time frame and the retrospective itself.</p>
<span id="Were_can_you_learn_more"><h2>Were can you learn more?</h2></span>
<p>This article is the part of my <a href="http://blog.jthoenes.net/networks/personal-retrospective">Personal Retrospectives Series</a>. I was strongly influence by other people &#8211; look at the <a href="http://blog.jthoenes.net/personal-retrospectives#Further_Material">Further Material</a> section to find out more.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=373&amp;md5=4d996c5b6d5d2233452aee79c325c8d8" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/jthoenes/~4/__-liKqm9-k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/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%2F2012%2F03%2F05%2F5-phases-of-a-personal-retrospective%2F&amp;language=en_GB&amp;category=text&amp;title=5+Phases+of+a+Personal+Retrospective&amp;description=In+this+article+I+will+write+about+the+five+different+phases+of+a+personal+retrospective.+If+you+are+new+to+the+topic+of+personal+retrospectives%2C+you+should+read+my+introduction....&amp;tags=agile%2Cpersonal%2Cpersonal+retrospectives%2Cretrospectives%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Personal Retrospectives – An Introduction</title>
		<link>http://blog.jthoenes.net/2012/02/20/personal-retrospectives-an-introduction/</link>
		<comments>http://blog.jthoenes.net/2012/02/20/personal-retrospectives-an-introduction/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 13:46:17 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Personal Retrospectives Series]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[personal retrospectives]]></category>
		<category><![CDATA[project retrospectives]]></category>
		<category><![CDATA[retrospectives]]></category>

		<guid isPermaLink="false">http://blog.jthoenes.net/?p=323</guid>
		<description><![CDATA[A personal retrospective is a regularly practiced ritual, during which you take time and think about yourself. In this article, I will describe what a project retrospective is as well as what is similar to and different from a personal retrospective. Furthermore, I outline why to do a personal retrospective and tell a tiny bit about why I [...]]]></description>
			<content:encoded><![CDATA[<p>A personal retrospective is a regularly practiced ritual, during which you take time and think about yourself.</p>
<p>In this article, I will describe what a project retrospective is as well as what is similar to and different from a personal retrospective. Furthermore, I outline why to do a personal retrospective and tell a tiny bit about why I write about it.</p>
<p><span id="more-323"></span><br />
<div class='toc toc'>
<h2>Contents</h2>
<ul class='toc-odd level-1'>
	<li>
		<a href="#What_is_a_Project_Retrospective">What is a Project Retrospective?</a>
		<ul class='toc-even level-2'>
			<li>
				<a href="#Time_to_Think">Time to Think</a>
			</li>
			<li>
				<a href="#Retrospective_Key_Questions">Retrospective Key Questions</a>
			</li>
		</ul>
	<li>
		<a href="#What_is_a_Personal_Retrospective">What is a Personal Retrospective?</a>
	</li>
	<li>
		<a href="#Why_to_do_a_Personal_Retrospective">Why to do a Personal Retrospective?</a>
	</li>
	<li>
		<a href="#Why_do_I_write_about_this">Why do I write about this?</a>
	</li>
	<li>
		<a href="#Were_can_you_learn_more">Were can you learn more?</a>
	</li>
</ul>
</ul>
</div>
<div class='toc-end'>&nbsp;</div></p>
<span id="What_is_a_Project_Retrospective"><h2>What is a Project Retrospective?</h2></span>
<span id="Time_to_Think"><h3>Time to Think</h3></span>
<p>A project retrospective is a ritual of taking time to think about and reflect on what happend in a project. For a retrospective, a project team takes a certain amount of time, to talk about what happened during the project.</p>
<p>In a retrospective you will talk with your team mates about your own thoughts on and experiences of the projects. In addition to that, you learn how your colleagues experienced the project.</p>
<p>So why should you do project retrospectives? Because you want to learn from the experience. But don&#8217;t you do this anyway?</p>
<p><a href="http://www.lindarising.org/" target="_blank">Linda Rising</a> always brings up the nice example of her friend, who has been married and divorced three times. Did this lady really learn from her experience?</p>
<p>If you want to learn from your experience you have to acknowledge it. You have to draw conclusions from on what you did, the steps you took and how they affected the team and the project. This is why you do retrospectives.</p>
<p>An important aspect to note is, that retrospectives are not about blaming anyone, including yourself. They are not an evaluation on what was good and what was bad.</p>
<p><a href="http://www.retrospectives.com/pages/BiographicalSketch.html" target="_blank">Norman Kerth</a> has formulated a <a href="http://www.retrospectives.com/pages/retroPrimeDirective.html" target="_blank">Retrospective Prime Directive</a> which should be the spirit of any retrospective:</p>
<blockquote><p>Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand.</p></blockquote>
<span id="Retrospective_Key_Questions"><h3>Retrospective Key Questions</h3></span>
<p>There are <a href="http://www.retrospectives.com/pages/RetrospectiveKeyQuestions.html">four key questions</a> you try to answer in every retrospective:</p>
<blockquote><p>1. What did we do well, that if we don’t discuss we might forget?</p></blockquote>
<p>For this question, your team will look at your success stories. What was really good in the team or the project? Why were you successful? Could you use the similar means to be successful in the future?</p>
<blockquote><p>2. What did we learn?</p></blockquote>
<p>In this question, the team will look at the past from a more general point of view. What are the patterns you noticed as a team? What wisdom can you derive from the experience?</p>
<blockquote><p>3. What should we do differently next time?</p></blockquote>
<p>With this question you look at the aspects, that went bad. Why did it not go well? What can we change to do better next time?</p>
<blockquote><p>4. What still puzzles us?</p></blockquote>
<p>This question is more about the open topics in your team or project. It is worth noting those and making them transparent to everyone. What is worrying you? Are there circumstances, which make the work harder for the team which the team cannot control?</p>
<p>To answer this questions, there are a number of retrospective exercises which are practices derived from dysfunctional family therapies. I&#8217;ll refer to these exercises in later articles on personal retrospectives.</p>
<span id="What_is_a_Personal_Retrospective"><h2>What is a Personal Retrospective?</h2></span>
<p>In essence, the personal retrospective is the same as the project retrospective. It is a retrospective where the team is just you. You think about your life on your own. You can optionally have a retrospective where your significant other or a good friend facilitates the retrospective. However, I always do the personal retrospective by myself.</p>
<p>Personal retrospectives are an active framework for self-review. What works for me, might or might not work for you. You have to create your unique and individual retrospectives.</p>
<p>The biggest difference between project retrospectives and personal ones is that there are no communications within a group. In project retrospectives the discussion takes place orally with the help of whiteboards and index cards. If you do a personal retrospective, it is in your head.</p>
<p>I always do the personal retrospective always on paper. I write down my thoughts by hand &#8211; on paper. I feel writing them down helps me to clarify my line of thoughts. Afterwards, I write summaries and important aspects into my private wiki. But I keep the paper.</p>
<p>Personal retrospectives are a tool for me, to asses my whole life. I reflect on my work, my tech hobbies, my non-tech hobbies, my relationship to all kinds of people and everything else.</p>
<p>A personal retrospective should not be about creating an ambitious ToDo list. For me, it is sometimes more important to notice, that I need some rest or I really want talk to somebody again. These important insights for my life would go unnoticed, if I were not doing personal retrospectives.</p>
<p>So, how often do I do a personal retrospective?</p>
<ul>
<li>I do a <em>quarterly retrospective</em> to reflect on the bigger items in my life. I then take four hours to think about myself. I want to notice what happened to me and my life for the last three month. In this time I check and massage the goals I have in my life as well as the means I use to achieve them. At the end, I  think about my retrospectives activities and restructure them.</li>
<li>I do a <em>heartbeat retrospective every week</em>. I always hold the retrospective on the evening before the working week starts (usually Sunday). I have a paper template were I answer the questions I want to answer for this week. The questions are about what happened in the passed week and about what I plan to do next week.</li>
</ul>
<span id="Why_to_do_a_Personal_Retrospective"><h2>Why to do a Personal Retrospective?</h2></span>
<p>So, why to do this personal retrospectives thing? Why do I spend four hours of life time to do it?</p>
<p>After having done it, I really feel that it would be too expensive not do it. There are so many details which would go unnoticed in my life, if I didn&#8217;t do personal retrospectives. I start to see patterns in my life which I think I would not see without taking the time to think. With retrospectives I see more clearly what happened to me and my life &#8211; and how I feel about it.</p>
<p>I use retrospectives to learn what happens to me and what I do affects my life. I use it to improve my working practice and my personal well being.</p>
<p>Doing personal retrospective helped me to gain a new level of self-awareness. Since I do retrospectives I learned a lot about my self, although this might as well be just an effect of getting older..</p>
<span id="Why_do_I_write_about_this"><h2>Why do I write about this?</h2></span>
<p>I never had an external facilitated project retrospective with my team. And I certainly never faciliated a project retrospective. So I&#8217;m really not an expert on retrospectives.</p>
<p>I write this blog series because I want to share my experience with personal retrospectives. I started doing personal retrospectives at the beginning of 2009. Since then, I have developed my unique framework over the course of more than two years.</p>
<p>So I will just write down, what I think is valuable to know.</p>
<p>You have to note that I did no formal research on this. I will report techniques which worked for me. I can by no means comment on how and if they will work for you. You will have to experiment with what works for you. I will of course be happy to hear what you think and would really like to hear, what works for you.</p>
<p>In the end, I strongly believe that it can almost never harm yourself if you think and reflect on yourself.</p>
<span id="Were_can_you_learn_more"><h2>Were can you learn more?</h2></span>
<p>This post is the first part of my <a href="http://blog.jthoenes.net/networks/personal-retrospective">Personal Retrospectives Series</a>. I was strongly influence by other people &#8211; look at the <a href="http://blog.jthoenes.net/personal-retrospectives#Further_Material">Further Material</a> section to find out more.</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=323&amp;md5=841d35a4629a52ef2ff26fbdc05b9344" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/jthoenes/~4/gJOGzl93oKQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2012/02/20/personal-retrospectives-an-introduction/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%2F2012%2F02%2F20%2Fpersonal-retrospectives-an-introduction%2F&amp;language=en_GB&amp;category=text&amp;title=Personal+Retrospectives+%26%238211%3B+An+Introduction&amp;description=A+personal+retrospective+is+a%C2%A0regularly%C2%A0practiced+ritual%2C+during+which+you+take+time+and+think+about+yourself.+In+this+article%2C+I+will+describe+what+a+project+retrospective+is+as+well+as+what...&amp;tags=agile%2Cpersonal%2Cpersonal+retrospectives%2Cproject+retrospectives%2Cretrospectives%2Cblog" type="text/html" />
	</item>
		<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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/VFfkU51mvxg" height="1" width="1"/>]]></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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/Jwx3KGqM6K0" height="1" width="1"/>]]></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 – I’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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/eiVUOaq1bHo" height="1" width="1"/>]]></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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/nQV5lSDNOjc" height="1" width="1"/>]]></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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/4JG4OEVbG6g" height="1" width="1"/>]]></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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/vkJp1n6bAGA" height="1" width="1"/>]]></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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/JeuNoFfedGg" height="1" width="1"/>]]></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>Devoxx 2010</title>
		<link>http://blog.jthoenes.net/2010/11/19/devoxx-2010/</link>
		<comments>http://blog.jthoenes.net/2010/11/19/devoxx-2010/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 16:13:34 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[devoxx]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java7]]></category>
		<category><![CDATA[java8]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[nextjava]]></category>
		<category><![CDATA[puzzlers]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=123</guid>
		<description><![CDATA[I was very lucky to attend the Devoxx 2010 (the conference part) this year. So this is reason enought, to blog about the thing I found most valuable to report: The discussion panel This was a discussion panel lead by Joe Nuxoll (with Dick Wall as keeper of the minutes) between Josh Bloch, Mark Reinhold, [...]]]></description>
			<content:encoded><![CDATA[<p>I was very lucky to attend the Devoxx 2010 (the conference part) this year. So this is reason enought, to blog about the thing I found most valuable to report:</p>
<p><strong>The discussion panel</strong></p>
<p>This was a discussion panel lead by Joe Nuxoll (with Dick Wall as keeper of the minutes) between Josh Bloch, Mark Reinhold, Antonio Goncalves, Stephen Colebourne, Jürgen Hoeller and Bill Venners. They did a fanominal job in covering up for James Goslings cancellation (get well soon James!).</p>
<p><span id="more-123"></span></p>
<p>They did discuss the Future of the JCP and expressed throughout the bord (in some sense) the need for an incompatible version of Java &#8211; maybe under a different name. Sadly we also found out, that Apache Harmony will not get the TCK &#8211; and the Oracle statement seems to be, that this decision is final.</p>
<p><strong>The next big JVM language</strong></p>
<p>This was a talk of Stephen Colebourne where he lined out the principles he thinks a next big JVM language should have. There are namely (hope  I don&#8217;t forget any):</p>
<ul>
<li>no checked exceptions</li>
<li>no primitives and no arrays (but of course a collection with the name Array)</li>
<li>static typing</li>
<li>a better and easier approach to generic wild cards</li>
<li>closures</li>
<li>language support for null-handling (like the groovy ?. operator)</li>
<li>function types and method handles to get rid of factories</li>
<li>simpler reflections</li>
<li>a java like {} syntax &#8211; but maybe no semicolons &#8216;;&#8217;</li>
<li>modules</li>
<li>resource management</li>
</ul>
<p>He then when rapidly over disqualifiy Closure and Groovy as the next BIG JVM language (not as JVM language &#8211; don&#8217;t misqoute me or him like that). He spend a little more time rubbing up Scala and Fantom &#8211; Scala for having the ability to write Perl like code in it and beeing to complex, Fantom for not having generics at all.</p>
<p>He proposed to have a non-compatible Java instead to be the next big JVM language.</p>
<p>I think he has a point in all he says. I might ask however, if there really will be a &#8220;next big JVM language&#8221;. Do we really have to have a new major language? Or will we drift more in specific languages and write application in more than one language?</p>
<p>I would at least not take it for granted, that there will be a successor in terms of adoption to Java.</p>
<p>If there is, the consequence of a JavaNG &#8211; a non backwarts compatible Java &#8211; seems appealing to me. So anyway: Great Talk Stephen!</p>
<p><strong>Java SE 7 (More than one talk)</strong></p>
<p>Well &#8211; we all knew, that Oracle is going for <a href="http://blogs.sun.com/mr/entry/rethinking_jdk7">Plan B</a>. But it felt there were dedicated to bring it out next year &#8211; they named the date for general availability to be 2010/07/28. Hopefully this dedication will lead to a release at last!<br />
It is supposed to be feature comple soon (2010712/16) and everyone is encouraged to try it out and use it at: <a href="http://download.java.net/jdk7/">http://download.java.net/jdk7/</a>. The latest netbeans beta version already carries the Project Coin &#8220;small language changes&#8221; that make huge differrent to your productivity. You can check out the examples from <a href="http://blogs.sun.com/darcy/entry/project_coin_javaone_2010">http://blogs.sun.com/darcy/entry/project_coin_javaone_2010</a></p>
<p>Beyond Coin, the JDK 7 will hold the Fork-Join framework as well as the invokedynamic bytecode. So good times for my old buddies from my thesis: Fork-Join and beloved JRuby.</p>
<p>And by the way &#8230; we no have filed JSRs for Project Coin (JSR 334), Project Lambda (325), Java 7 (JSR 336) and Java 8 (JSR 337).</p>
<p><strong>Java SE 8 (More than one talk)</strong></p>
<p><strong> </strong>So the two main features for the late 2012 planned JDK 8 are closures and modules</p>
<p><em>Closures</em>. They will be in &#8211; the syntax seems to be debated the most &#8211; but the protagonist seemed to be tired of it. In fact they said, the wanted to talk about features. I personally was very glad, they god rid of a function type idea and just wanted to use SAM types (that is a class or interface with a &#8220;Single Abstract Method&#8221;) as a replacement type for a type-safe closure. This allows us to have libraries done with the intent for use in closures &#8211; but beeing used in pre Java 8 code as well. So we don&#8217;t have any &#8220;first-class&#8221; and &#8220;second-class&#8221; closure methods. As Brian Goetz did put it: &#8220;Forward-compatible&#8221; <img src='http://blog.jthoenes.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><em>Modules</em>. Well &#8211; as partly Ruby guy I have to say: The want rubygems for Java. And they want it type-safe. Of course they want to split up the whole rt.jar (AWT, Swing, CORBA, java.io, NIO 1+2 &#8230; you get the picture). That is hard work I believe. So lets hope they get it done &#8211; it would help us alot.<br />
While Mark Reinhold stated, they will aim for interoperability with Maven (in both directions), OSGi seems to be left aside. This does not bother me personally, but it seems to bother alot of other folks.</p>
<p>But all in all, Java SE 8 is something to really look forward to.</p>
<p>(Of course Project Coin will add some small improvements that make big differences as well again.)</p>
<p><strong>Java Puzzlers </strong></p>
<p>Josh Bloch and his brother William Pugh did six new buzzlers this time. I cannot recall them &#8211; so wait for them to be available on <a href="http://parleys.com/">parleys.com</a> (and make Stephan happy by buying a subscription). But I wrote down some of the morals, which I&#8217;ll happily share with you here:</p>
<ul>
<li>Don&#8217;t use the BigDecimal(double) constructor. By using a double you already lost precision. Use BigDecimal(String) instead. BigDecimal.valueOf(double) is better, but still not perfect.</li>
<li>Don&#8217;t worsen your API to improve performance</li>
<li>Avoid having regular expressions to have overlapping matchings for the same thing &#8211; otherwise you can have very easy denial-of-service attacks by very long strings.</li>
<li>Don&#8217;t mix generics and var-args.</li>
<li>Don&#8217;t ignore warnings (an old one &#8230; but you know &#8230; the generic warnigs are hard to understand, but sometimes important)</li>
<li>When you construct an object with an raw-type (non-generic) constructor, which could have been generic, all generics are gone from this object. Even if they do not relate! (This was referenced as raw typed mode).</li>
</ul>
<p><strong>Reflection Madness</strong></p>
<p>The title of this talk by Heinz Kabutz was very well choosen. The author of the Java Specialists&#8217; Newsletter showed some things you though never possible. Everyone of those was already presented in a newletter before . The highlights from my point of view are:</p>
<ul>
<li>Change Strings in the constant pool</li>
<li>Change values of integers in the constant pool of the Integer class (very nasty thing when you loop)</li>
<li>Adding an enum at runtime or changing enum values</li>
<li>Modify final fields</li>
<li>Construct without constructor</li>
</ul>
<p><strong>The BOFs</strong></p>
<p><strong></strong> I don&#8217;t want to name a BOF specificly &#8211; but if you are at devoxx go to them! Even if you are tired &#8211; they are so informative. How it goes: There are your heros in a room, and you can ask questions. Any question! Ok the ones about aquisition and law suites will not get answered &#8230; but the interesting technical ones. And even if you don&#8217;t have questions, you can just listen to them. Other people in the community always have great questions!</p>
<p>I think this is somewhat like an open spaces conference in &#8220;light&#8221;. I surely must go to one of these soon &#8230;</p>
<p><strong>The JavaPosse Live</strong></p>
<p>Ok &#8230; that one you cannot describe. You have to be there! Feel it. It is great.</p>
<p><strong>The litte kangaroo</strong></p>
<p>No &#8211; not a talk. We brought our mascott this year. It is a little kangoroo &#8211; well see your self: <a href="http://twitter.com/#!/search/%23daskleinekaenguru">http://twitter.com/#!/search/%23daskleinekaenguru</a></p>
<p><strong>Last but no least</strong></p>
<p>Devoxx Team I love you! You do a phenomenal job! *hug*</p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=123&amp;md5=3da499e294590d349bc7ffef67a31f24" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/jthoenes/~4/9weJY2SVTIk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2010/11/19/devoxx-2010/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%2F11%2F19%2Fdevoxx-2010%2F&amp;language=en_GB&amp;category=text&amp;title=Devoxx+2010&amp;description=I+was+very+lucky+to+attend+the+Devoxx+2010+%28the+conference+part%29+this+year.+So+this+is+reason+enought%2C+to+blog+about+the+thing+I+found+most+valuable+to+report%3A...&amp;tags=devoxx%2Cjava%2Cjava7%2Cjava8%2Cjvm%2Cnextjava%2Cpuzzlers%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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/QqN8gVdLswc" height="1" width="1"/>]]></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>Get All SVN Commiters from a Repository or Working Copy</title>
		<link>http://blog.jthoenes.net/2010/01/30/get-all-svn-commiters-from-a-repository-or-working-copy/</link>
		<comments>http://blog.jthoenes.net/2010/01/30/get-all-svn-commiters-from-a-repository-or-working-copy/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 17:38:32 +0000</pubDate>
		<dc:creator>Johannes Thönes</dc:creator>
				<category><![CDATA[No Category]]></category>

		<guid isPermaLink="false">http://jthoenes.bergischweb.de/?p=99</guid>
		<description><![CDATA[Short &#8211; but unfortunatly to long for Twitter. With this little snippet you can get all commits from an svn working copy, repository or from a pure log: Who has any guess why I did need this?]]></description>
			<content:encoded><![CDATA[<p>Short &#8211; but unfortunatly to long for Twitter. With this little <a href="http://gist.github.com/290641">snippet</a> you can get all commits from an svn working copy, repository or from a pure log:</p>
<pre class="brush: bash; title: ; notranslate">svn log | ruby -e &quot;puts STDIN.read.split(/\n/).select{|l| l =~ /^r\d+/}.map{|l| l.split('|')[1].strip}.uniq.sort&quot;</pre>
<p>Who has any guess why I did need this? </p>
 <p><a href="http://blog.jthoenes.net/?flattrss_redirect&amp;id=99&amp;md5=d1f136921dd20cb3cb04c631831ac595" title="Flattr" target="_blank"><img src="http://blog.jthoenes.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/jthoenes/~4/3CRZhbKIkog" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jthoenes.net/2010/01/30/get-all-svn-commiters-from-a-repository-or-working-copy/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%2F30%2Fget-all-svn-commiters-from-a-repository-or-working-copy%2F&amp;language=en_GB&amp;category=text&amp;title=Get+All+SVN+Commiters+from+a+Repository+or+Working+Copy&amp;description=Short+%26%238211%3B+but+unfortunatly+to+long+for+Twitter.+With+this+little+snippet+you+can+get+all+commits+from+an+svn+working+copy%2C+repository+or+from+a+pure+log%3A+Who+has...&amp;tags=blog" 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><img src="http://feeds.feedburner.com/~r/jthoenes/~4/EGvg5zX_JJc" height="1" width="1"/>]]></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>
	</channel>
</rss>

