<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Johannes Thönes]]></title>
  <link href="http://blog.jthoenes.net/atom.xml" rel="self"/>
  <link href="http://blog.jthoenes.net/"/>
  <updated>2020-10-11T12:50:52+00:00</updated>
  <id>http://blog.jthoenes.net/</id>
  <author>
    <name><![CDATA[Johannes Thönes]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[My 2016 Personal Futurespective]]></title>
    <link href="http://blog.jthoenes.net/2016/01/02/my-2016-personal-futurespective/"/>
    <updated>2016-01-02T19:11:17+01:00</updated>
    <id>http://blog.jthoenes.net/2016/01/02/my-2016-personal-futurespective</id>
    <content type="html"><![CDATA[<p>A few people asked me to share the agenda for this year&rsquo;s personal retrospective.</p>

<p><img src="http://blog.jthoenes.net/images/articles/2016/01/futurespective-plan.jpg" alt="article-image" /></p>

<p>This year, instead of focusing on what happened, I wanted to focus on the future. Therefore it&rsquo;s a futurespective rather than a retrospective.</p>

<p>I create a custom agenda for every big retrospective. This one was created for this year, exclusively. For a different example for a year 2015 retrospective have a look at <a href="https://www.thekua.com/atwork/2015/12/running-a-personal-retrospective-for-2015/">this writeup from my colleague Pat Kua</a>. If you need help creating yours feel free to reach out to me.</p>

<p>You will notice that the agenda&rsquo;s focus is creating a vision for my life in the future. I have been making very good progress with smaller goals from retrospectives in the past, but I felt it was time to more big picture.</p>

<!-- more -->


<h3>&ldquo;The best three days of my life&rdquo; (Day one)</h3>

<p>I first imagined, how the best three days of my life could look like. These three days are in a glorious future - not necessarily in 2016. I didn&rsquo;t want to restrict my imagination.</p>

<h4>Steps</h4>

<ol>
<li>Brainstorm circumstances and events that should take place within these three days. As a result I have a big collection of ideas that could form the three best days of my life. One of this events, for example, was giving a keynote at a conference.</li>
<li>Create a schedule of the events. Remove obsolete ideas or circumstances. Fill in the gaps in the days. The result will be
a schedule of how the best days of my life could look like. As an example, I chose the keynote to be on Friday at 10:00am (day one<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>).</li>
<li>Write an essay about these three days. The result will be a story of the three days. Writing a story helps to make it more real. To make it more vivid, I also imagined less relevant facts - for instance a concrete topic for the keynote.</li>
<li>Analyse the underlying needs of the events and circumstances captured.</li>
</ol>


<h3>Find goals for 2016 (Day two)</h3>

<p>On the second day, I reviewed some retrospective material and created goals for 2016. It was helpful to do the second part while the  material from the three days was still in mind.</p>

<h4>Steps</h4>

<ol>
<li>Read the last <a href="http://blog.jthoenes.net/2013/09/15/write-a-letter-to-yourself-personal-retrospectives-exercises">retrospective letter</a> and review events since the last retrospective.</li>
<li>Reflect on life patterns that I want to change. Use the <a href="https://en.wikipedia.org/wiki/5_Whys">5 Why&rsquo;s</a> to understand the root cause and how they could be changed.</li>
<li>Brainstorm stretch goals<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup> for the year 2016. The goals need to be in relation to the needs identified on day one.</li>
<li>Select a maximum of two stretch goals for 2016.</li>
<li>Assume when I fully reach the stretch goal, it is a status 5. Also assume that the current status is a 0. Write up all statuses from 5 to 0 with one or two sentences. The result will be two big goals and also smaller steps to get nearer to these goals<sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup>.</li>
<li>Create a plan for a weekly heartbeat retrospective to support the achievement of these goals.</li>
<li>Summarise the retrospective by writing a <a href="http://blog.jthoenes.net/2013/09/15/write-a-letter-to-yourself-personal-retrospectives-exercises">retrospective letter</a> for this retrospective.</li>
</ol>


<h3>Results</h3>

<p>I&rsquo;ve now done this futurespective and gained some interesting insights. I also have two stretch goals for the new year<sup id="fnref:4"><a href="#fn:4" rel="footnote">4</a></sup>. I noticed while executing this plan that I also need space for goals besides the two big ones. Amongst the four I selected is learning to draw and start to learn more from other people rather than books. But, none of the side goals is a stretch goal.</p>

<p>Hope this writeup was interesting or useful to you.</p>
<div class="footnotes">
<hr/>
<ol>
<li id="fn:1">
<p>Of course the best three days of my life have to include a full weekend ;-)<a href="#fnref:1" rev="footnote">&#8617;</a></p></li>
<li id="fn:2">
<p>Stretch goals are goals you don&rsquo;t know to how achieve easily, but they are somewhat in reach. Something like learn a foreign language you don&rsquo;t know at all - not impossible, but a lot of effort in a year. I like to have stretch goals, because they give you a direction where you want to go. To actually reach something, I find it useful to have a few <a href="https://en.wikipedia.org/wiki/SMART_criteria">SMART objectives</a> to be the first steps to reach the stretch goals.<a href="#fnref:2" rev="footnote">&#8617;</a></p></li>
<li id="fn:3">
<p>I got the feedback that this 5 statuses for a goal are hard to grasp. I will explain this exercise in a separate post. So stay tuned!<a href="#fnref:3" rev="footnote">&#8617;</a></p></li>
<li id="fn:4">
<p>Both of the stretch goals are personal. So no public sharing, sorry.<a href="#fnref:4" rev="footnote">&#8617;</a></p></li>
</ol>
</div>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[3 Things I Learned at ThoughtWorks I Did Not Expect to Learn]]></title>
    <link href="http://blog.jthoenes.net/2014/04/15/3-things-i-learned-in-thoughtworks-i-did-not-expect-to-learn/"/>
    <updated>2014-04-15T18:00:45+00:00</updated>
    <id>http://blog.jthoenes.net/2014/04/15/3-things-i-learned-in-thoughtworks-i-did-not-expect-to-learn</id>
    <content type="html"><![CDATA[<p>In May 2014 it will be two years since I joined ThoughtWorks Germany. The time here has been an amazing journey. I have learned many things.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2014/03/3_things_article.jpg" alt="article-image" /></p>

<p>I learned more about agile software development and I worked with interesting technologies. I am also dealing with clients and represent my company at a client site. I did learn of all that - and I don&rsquo;t expect to stop learning anytime soon.</p>

<p>But there were a few things I learned, which I did not expect to learn at ThoughtWorks. I want to share three of them with you.</p>

<!-- more -->


<h2>1 - It is OK not to know everything</h2>

<p>It seems like pretty common sense that we cannot know everything. If you had asked me in April 2012 if I needed to know everything, my response would have been &ldquo;no&rdquo;. But it is a difference to know it, or to feel and act upon it.</p>

<p>When I joined, my impression was: &ldquo;I needed to foresee potential problem which might arise in a project&rdquo;. So I needed to know all the technology and all the implications, right?</p>

<p>Well, I couldn&rsquo;t. Nobody can. But I learned that we have a different approach. At ThoughtWorks we tend to deal with problems when they arise. This is the moment you know the most about it. We avoid dealing with problems that <em>might</em> arise at <em>some point</em>.</p>

<p>This is engrained in the company. &ldquo;I don&rsquo;t know&rdquo; is a sentence you&rsquo;ll often hear. But it is usually accompanied with: &ldquo;But I&rsquo;ll find out (when it&rsquo;s necessary)&lsquo;.</p>

<h2>2 - Everyone can contribute</h2>

<p>Since I heard what pair programming is, I always wanted to try it. I had tried pair programming before - but not as extensive as at ThoughtWorks. Pair programming gives developers the opportunity to contribute to the movement of a project. Starting on day one.</p>

<p>When I joined my first billable project, I didn&rsquo;t know anything about the project. Nor did I know anything about the client. But I knew Ruby. In fact, I had done more Ruby programming than any other developer on the team.</p>

<p>It was my the first day on the project. I was a grad consultant in a team full of senior developers. And I could suggest improvements in the application while my pair was showing it to me.</p>

<p>This is not limited to pair programming. Everyone - be it a graduated or an experienced developer - has a different experience or point of view. Maybe it is even a stupid but important question. Everything can be valuable input.</p>

<h2>3 - The most fun you get is out of people you work with</h2>

<p>Before ThoughtWorks, I believed that the most important thing about work is what you do. But it is with whom I work, which has the most influence on my work happiness.</p>

<p>When I joined, I had a 4 week project simulation for training with a simple technology stack. Nothing new, nothing exciting. Before ThoughtWorks, I had been working for almost three years with a similar technology stack. I had even been teaching it to other developers. So technology wise it could not have been a more boring start.</p>

<p>But I was there with a bunch of other graduate consultants. Some of them new to the technology. I learned, how fun it can be to pair and work with people who immediately pick up what you are coaching them. And the next day, they will teach you something!</p>

<p>Can there be more fun than this?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[HTML5: Offline Upload of Images]]></title>
    <link href="http://blog.jthoenes.net/2014/04/07/html5-offline-upload-of-images/"/>
    <updated>2014-04-07T06:14:21+00:00</updated>
    <id>http://blog.jthoenes.net/2014/04/07/html5-offline-upload-of-images</id>
    <content type="html"><![CDATA[<p>I am currently working on an application which has needs to work offline. This has the beneficial side effect, we use the different HTML5 storage capabilities. One of the is the <a href="http://www.w3.org/TR/FileAPI/">File API</a>, which we are using to store images locally - before queuing them for upload to a backend server.</p>

<p>In this article, I will share some code how we did this. The example works in Google Chrome - for DOM manipulation I will use JQuery.</p>

<!-- more -->


<p>Starting simple, we have one file input for images and an area to show the uploaded images.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='html'><span class='line'><span class="nt">&lt;body&gt;</span>
</span><span class='line'> <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;file&quot;</span> <span class="na">accept=</span><span class="s">&quot;image/*&quot;</span> <span class="na">class=</span><span class="s">&quot;js-image-upload&quot;</span><span class="nt">/&gt;</span>
</span><span class='line'> <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;js-image-container&quot;</span><span class="nt">&gt;&lt;/div&gt;</span>
</span><span class='line'><span class="nt">&lt;/body&gt;</span>
</span></code></pre></td></tr></table></div></figure>


<p>When the user select a file, we want to store the image.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="nx">$</span><span class="p">(</span><span class="nb">document</span><span class="p">).</span><span class="nx">on</span><span class="p">(</span><span class="s1">&#39;change&#39;</span><span class="p">,</span> <span class="s1">&#39;.js-image-upload&#39;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="kd">var</span> <span class="nx">file</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">files</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
</span><span class='line'>  <span class="kd">var</span> <span class="nx">fileName</span> <span class="o">=</span> <span class="nx">createTempName</span><span class="p">(</span><span class="nx">file</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'>  <span class="nx">writeImage</span><span class="p">(</span><span class="nx">fileName</span><span class="p">,</span> <span class="nx">file</span><span class="p">);</span>
</span><span class='line'><span class="p">});</span>
</span></code></pre></td></tr></table></div></figure>


<p>The image storage is handled by this method.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">function</span> <span class="nx">writeImage</span><span class="p">(</span><span class="nx">fileName</span><span class="p">,</span> <span class="nx">file</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="nx">getFileSystem</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">fileSystem</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="nx">fileSystem</span><span class="p">.</span><span class="nx">root</span><span class="p">.</span><span class="nx">getFile</span><span class="p">(</span><span class="nx">fileName</span><span class="p">,</span> <span class="p">{</span><span class="nx">create</span><span class="o">:</span> <span class="kc">true</span><span class="p">},</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">fileEntry</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>      <span class="nx">fileEntry</span><span class="p">.</span><span class="nx">createWriter</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">fileWriter</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>        <span class="nx">fileWriter</span><span class="p">.</span><span class="nx">onwriteend</span> <span class="o">=</span> <span class="nx">writeSuccessFull</span><span class="p">;</span>
</span><span class='line'>        <span class="nx">fileWriter</span><span class="p">.</span><span class="nx">onerror</span> <span class="o">=</span> <span class="nx">errorFct</span><span class="p">;</span>
</span><span class='line'>        <span class="nx">fileWriter</span><span class="p">.</span><span class="nx">write</span><span class="p">(</span><span class="nx">file</span><span class="p">);</span>
</span><span class='line'>      <span class="p">},</span> <span class="nx">errorFct</span><span class="p">);</span>
</span><span class='line'>    <span class="p">});</span>
</span><span class='line'>  <span class="p">});</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>What is happening here?</p>

<ul>
<li>Retrieve the file system</li>
<li>Create a file by the specificied name on its root</li>
<li>Create a writer for this file</li>
<li>Configure a success and error callback when the asynchronous file write happend</li>
<li>Write the blob of the file using the writer</li>
</ul>


<p>The retrieval of the file system is a two step procedure. We need to request quota from the browser and than get the file system.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">var</span> <span class="nx">SIZE</span> <span class="o">=</span> <span class="mi">100</span> <span class="o">*</span> <span class="mi">1024</span> <span class="o">*</span> <span class="mi">1024</span><span class="p">;</span> <span class="c1">// 100 MB</span>
</span><span class='line'><span class="kd">var</span> <span class="nx">getFileSystem</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">successFct</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="nx">navigator</span><span class="p">.</span><span class="nx">webkitPersistentStorage</span><span class="p">.</span><span class="nx">requestQuota</span><span class="p">(</span><span class="nx">SIZE</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
</span><span class='line'>    <span class="nb">window</span><span class="p">.</span><span class="nx">webkitRequestFileSystem</span><span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">PERSISTENT</span><span class="p">,</span> <span class="nx">SIZE</span><span class="p">,</span> <span class="nx">successFct</span><span class="p">,</span> <span class="nx">errorFct</span><span class="p">);</span>
</span><span class='line'>  <span class="p">},</span> <span class="nx">errorFct</span><span class="p">);</span>
</span><span class='line'><span class="p">};</span>
</span></code></pre></td></tr></table></div></figure>


<p>The user will be asked to grant the website the access to a persistent storage. There are <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileError">some errors</a> you can get, e.g. when the user does not accept our request.</p>

<p>But let&rsquo;s assume the user trusts us. Then we want to react to the successful write and show the image. We can use a local file storage url and add the file to a queue to upload the file to the server.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">var</span> <span class="nx">showImage</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">fileName</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="kd">var</span> <span class="nx">src</span> <span class="o">=</span> <span class="s1">&#39;filesystem:&#39;</span> <span class="o">+</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span> <span class="o">+</span> <span class="s1">&#39;/persistent/&#39;</span> <span class="o">+</span> <span class="nx">fileName</span><span class="p">;</span>
</span><span class='line'>  <span class="kd">var</span> <span class="nx">img</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s1">&#39;&lt;img /&gt;&#39;</span><span class="p">).</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;src&#39;</span><span class="p">,</span> <span class="nx">src</span><span class="p">);</span>
</span><span class='line'>  <span class="nx">$</span><span class="p">(</span><span class="s1">&#39;.js-image-container&#39;</span><span class="p">).</span><span class="nx">append</span><span class="p">(</span><span class="nx">img</span><span class="p">);</span>
</span><span class='line'><span class="p">};</span>
</span><span class='line'>
</span><span class='line'><span class="kd">var</span> <span class="nx">writeSuccessFull</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
</span><span class='line'>  <span class="nx">addToSyncQueue</span><span class="p">(</span><span class="nx">fileName</span><span class="p">);</span>
</span><span class='line'>  <span class="nx">showImage</span><span class="p">(</span><span class="nx">fileName</span><span class="p">);</span>
</span><span class='line'><span class="p">};</span>
</span></code></pre></td></tr></table></div></figure>


<p>I&rsquo;m omitting the queue logic here. You can keep a queue of images for uploaded in the <a href="http://www.w3.org/TR/webstorage/">web storage</a> or <a href="http://www.w3.org/TR/IndexedDB/">IndexedDB</a> of your application. To read the image from storage you can use something like this</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">var</span> <span class="nx">readImage</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">fileName</span><span class="p">,</span> <span class="nx">successFct</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="nx">getFileSystem</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">fileSystem</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="nx">fileSystem</span><span class="p">.</span><span class="nx">root</span><span class="p">.</span><span class="nx">getFile</span><span class="p">(</span><span class="nx">fileName</span><span class="p">,</span> <span class="p">{},</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">fileEntry</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>
</span><span class='line'>        <span class="nx">fileEntry</span><span class="p">.</span><span class="nx">file</span><span class="p">(</span><span class="nx">successFct</span><span class="p">,</span> <span class="nx">errorFct</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'>      <span class="p">},</span> <span class="nx">errorFct</span><span class="p">);</span>
</span><span class='line'>    <span class="p">}</span>
</span><span class='line'>  <span class="p">);</span>
</span><span class='line'><span class="p">};</span>
</span></code></pre></td></tr></table></div></figure>


<p>So this is a brief overview of what we did here. The working example code can be found here: <a href="https://gist.github.com/jthoenes/3668856a188d600e02d6">https://gist.github.com/jthoenes/3668856a188d600e02d6</a></p>

<p>Hope it has been useful to a few people dealing with similar issues. Feel free to ask questions, when something pops up in your mind.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Retrospectives Without Action Items?]]></title>
    <link href="http://blog.jthoenes.net/2014/02/13/retrospectives-without-action-items/"/>
    <updated>2014-02-13T17:08:01+00:00</updated>
    <id>http://blog.jthoenes.net/2014/02/13/retrospectives-without-action-items</id>
    <content type="html"><![CDATA[<p>Have you ever had a retrospective where you didn&rsquo;t define actions to be executed and checked up on in the next retrospective? I did.
<img src="http://blog.jthoenes.net/wp-content/uploads/2014/01/retrospectives-without-action-items_article.jpg" alt="article-image" /></p>

<p>I facilitated a retrospective using the <em>Lean Coffee</em> exercise. This helped to generate some good discussion, but in the end there was no action item. Is that a bad thing?</p>

<!-- more -->


<p>Let me give you some context.</p>

<p>I facilitated my fourth or fifth retrospective about two weeks ago. For the &lsquo;gather data&rsquo; and &lsquo;generate insight phase&rsquo;, we ran a 40-minute <a href="http://leancoffee.org"><em>Lean Coffee</em></a>. This means:</p>

<ol>
<li>everyone writes topics to discuss on post-it notes</li>
<li>the topics get democratically prioritised by <a href="http://martinfowler.com/bliki/DotVoting.html">dot-voting</a></li>
<li>the topics with highest priority get discussed in a time-box</li>
</ol>


<p>I used this exercise for the second time in a retrospective. Both times it was good, because it created an open discussion and thought exchange about topics important to the team.</p>

<p>But each time, the discussion ended with no concrete conclusions or action items.</p>

<p>I think the <em>Avoiding the Do-Nothing Retrospective</em> principle is quite important (see <a href="http://www.amazon.de/Agile-Retrospectives-Making-Pragmatic-Programmers/dp/0977616649">Agile Retrospectives</a>). And this kind of retrospective violates this principle in my eyes.</p>

<p>Nevertheless, I believe that this is fine in some situations. There may be topics in a team that need to be discussed. Sometimes even topics which linger for weeks to months. I feel these topics cannot be discussed in a one to two hour iteration retrospective.</p>

<p>For me, starting a discussion is the outcome of the retrospective. Maybe the discussion will continue during the iteration or within the next retrospective and eventually yield action items. Would you agree?</p>

<p>I was wondering if there is a way to keep the very open format of the <em>Lean Coffee</em> (or something similar), while still generating to more action items. Is there some exercise to do later to pick up ideas shared? Maybe by helping the team to set potential milestones in discussion?</p>

<p>Do you have some ideas?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Safety Check in a Retrospective: How to Handle a Low Result?]]></title>
    <link href="http://blog.jthoenes.net/2014/02/05/safety-check-in-a-retrospective-how-to-handle-a-low-result/"/>
    <updated>2014-02-05T07:58:55+00:00</updated>
    <id>http://blog.jthoenes.net/2014/02/05/safety-check-in-a-retrospective-how-to-handle-a-low-result</id>
    <content type="html"><![CDATA[<p>When the safety check returns a low result (e.g. lots of 2s and 3s) there are ways to react in a retrospective.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2014/02/safety-check_article.jpg" alt="article-image" /></p>

<p>But how can you deal with low safety in a team outside the retrospective, e.g. in stand-ups or estimation meetings?</p>

<!-- more -->


<p>A few retrospectives ago, I had the feeling it was time to do a &lsquo;<a href="http://www.akashb.com/blog/2012/05/28/agile-retrospectives-the-safety-check/">Safety Check</a>&rsquo; - grading the participants willingness to share from 5 (highest) to 1 (lowest). The result with 6 people was:</p>

<ol>
<li>-</li>
<li>2 people</li>
<li>3 people</li>
<li>-</li>
<li>1 person</li>
</ol>


<p>The exercise indicated that safety was an issue. I used techniques to continue the retrospective supporting people who are not willing to share ideas publicly (e.g. they could ask to not discuss a topic without revealing their identity). I had explained how I would react to a low level of safety before performing the check, so participants knew the result would not be a show stopper. The retrospective was surprisingly well received and we actually discussed a few things more openly than usual.</p>

<p>While I felt it was good to do the safety check, I&rsquo;m unsure how to deal with the outcome outside of the retrospective. Before the team worked together under the unspoken assumption that it was actually safe to speak up.</p>

<p>I know there are plenty of good ideas out there how about to handle safety issues in a retrospective. Unfortunately, I feel I don&rsquo;t have a good answer on how we can handle or improve the situation on a daily basis working.</p>

<p>What came to my mind was:</p>

<ul>
<li>Talking to people individually and casually.</li>
<li>Running another safety check about 2 month later and discuss the result with the team.</li>
<li>Don&rsquo;t take the result personally.</li>
<li>Don&rsquo;t overreact. This has been a snapshot and maybe there are certain barriers to speak - but it&rsquo;s not the end of the world.</li>
</ul>


<p><strong>What would you suggest?</strong></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Write a Letter to Yourself - Personal Retrospectives Exercises]]></title>
    <link href="http://blog.jthoenes.net/2013/09/15/write-a-letter-to-yourself-personal-retrospectives-exercises/"/>
    <updated>2013-09-15T18:15:04+00:00</updated>
    <id>http://blog.jthoenes.net/2013/09/15/write-a-letter-to-yourself-personal-retrospectives-exercises</id>
    <content type="html"><![CDATA[<p>The write a letter to yourself exercise is an exercise to create continuity between two personal retrospectives. You write a letter - addressed to yourself - where you summarise what you learned and decided in this personal retrospective.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/09/write_a_letter_article.jpg" alt="article-image" /></p>

<p>Then you put the letter in an envelope and close it. At the beginning of the next retrospective you open the envelope and read the letter. Thereby you can bridge two personal retrospectives together.</p>

<!-- more -->


<h3>Purpose</h3>

<p>The purpose of the &lsquo;Write a Letter to Yourself&rsquo; exercise is to write an essay to document the most important hopes, wishes, lessons and decisions of your personal retrospective. It&rsquo;s a little bit like the final declaration.</p>

<p>Besides that, you do it create a continuity and strengthen the <a href="http://blog.jthoenes.net/2012/07/31/creating-a-ritual-for-a-personal-retrospective/">ritual</a> of a personal retrospective.</p>

<h3>Steps</h3>

<ul>
<li><p>Get a clean sheet of paper - I always use special letter paper for the exercise.</p></li>
<li><p>Start with &ldquo;Dear <your name>&rdquo;.</p></li>
<li><p>Summarise the following things (each is optional):</p>

<ul>
<li>What you did in the retrospective.</li>
<li>What you experienced in the retrospected time frame.</li>
<li>What you learned during the retrospective.</li>
<li>What you decided to change until the next retrospective.</li>
<li>What you hope or wish to happen until the next retrospective - caused by your commitments.</li>
</ul>
</li>
<li><p>Close the letter positive.</p></li>
<li><p>Put the letter in an envelop and close the envelope.</p></li>
<li><p>Store the letter somewhere safe and read it before your next personal retrospective. Alternatively - give it to someone you trust and ask them to send it to you at a defined date.</p></li>
<li><p>At the beginning of the next personal retrospective: Read the letter and see what happens.</p></li>
</ul>


<h3>Remarks</h3>

<p>The writing part of the &lsquo;Write a Letter to Yourself&rsquo; is done at the end of the retrospective, therefore it belongs to the <a href="http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/">Closing the Retrospective phase</a>. The reading part will happen at the very beginning of the next retrospective and therefore belongs to the <a href="http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/">Set the Stage phase</a>.</p>

<p>In a personal retrospective, I think it&rsquo;s very difficult to have this phases explicitly. The letter exercise helps me to work them out.</p>

<p>I like this exercise a lot, because it helps me to focus on the most important things I hope for and want to achieve for the next few month. It helps as well, to build a continuity between two retrospectives.  I do this exercise in every personal retrospective I hold, except for my weekly heartbeat retrospectives.</p>

<p>Some people asked me, if it isn&rsquo;t weird to write a letter to yourself. I have to say: yes it is. But it&rsquo;s an interesting experience and easily done. So you should try it at least once.</p>

<p>I did it first after a seminar in rhetorics about 12 years ago. For me, it was really helpful to get a fresh summary of my own lessons four weeks later. When <a href="http://www.lindarising.org/">Linda Rising</a> mentioned an letter exercise during her <a href="http://www.se-radio.net/2008/07/episode-105-retrospectives-with-linda-rising/">SE Radio interview</a>, I adopted it to be used for personal retrospectives.</p>

<h3>Alternatives</h3>

<p>To be honest, I haven&rsquo;t used any other exercise to creating a final summary of my retrospective.  I can imagine people drawing a picture, creating a mind map or even writing a song about it. But other than that, I don&rsquo;t know a real alternative which really helps to strengthen the <em>Closing the Retrospective</em> and <em>Set the Stage</em> phases as well as supporting the ritual of a personal retrospective.</p>

<p>Do you know or use any alternatives?</p>

<hr />

<p>Picture: <a href="http://www.flickr.com/photos/gbaku/3770390554">http://www.flickr.com/photos/gbaku/3770390554</a>, Creative Commons: <a href="http://creativecommons.org/licenses/by/2.0/">http://creativecommons.org/licenses/by/2.0/</a> </p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Personal Retrospectives Exercises: Open Thoughts Paper]]></title>
    <link href="http://blog.jthoenes.net/2013/08/29/personal-retrospectives-exercises-open-thoughts-paper/"/>
    <updated>2013-08-29T16:30:11+00:00</updated>
    <id>http://blog.jthoenes.net/2013/08/29/personal-retrospectives-exercises-open-thoughts-paper</id>
    <content type="html"><![CDATA[<p>The &lsquo;open thought paper&rsquo; is simple a place, where you can write down your thoughts during a personal retrospective.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/08/open_thoughts_paper_article.jpg" alt="article-image" /></p>

<p>I use it, to capture thoughts that otherwise are in danger to be forgotten. This is especially helpful during focused exercises like the timeline ([<a href="http://blog.jthoenes.net/2013/08/18/personal-retrospectives-execises-fill-a-timeline/">1</a>] and [<a href="http://blog.jthoenes.net/2013/08/25/personal-retrospectives-execises-colour-the-timeline/">2</a>]), where there will be thoughts coming up, you cannot process into the current context.</p>

<!-- more -->


<h3>Purpose</h3>

<p>During a personal retrospective, you think about a lot of things. So it can be hard to focus on the things which you want to focus on. The &lsquo;open thoughts paper&rsquo; is a way, to dump ideas on a paper and out of your brain - to allow the brain to focus on the subject matter.</p>

<h3>Steps</h3>

<ul>
<li><p>Before you start the retrospective, you place enough paper with a separate pen at the side of the table.</p></li>
<li><p>While you do other exercises, when there is a though you don&rsquo;t want to process within the current exercise, write it down. Continue with the original exercise.</p></li>
<li><p>Examples for these thoughts are:</p>

<ul>
<li>&ldquo;Oh, I really need to book that train ticket.&rdquo;</li>
<li>&ldquo;Shouldn&rsquo;t I have called my mum yesterday.&rdquo;</li>
<li>&ldquo;Hm, the connection between what happened at that party and my behaviour at work the next day is intersting. I need to spend more time thinking about it.&rdquo;</li>
</ul>
</li>
<li><p>At some point of the retro, you need to have the time to process these thoughts.</p></li>
</ul>


<h3>Remarks</h3>

<p>I use this in all my retrospective. It helps me, to not be afraid of flowing thoughts while still being focused on what I really want to reflect on. I usually catch up on the paper in a specific exercise at the end of my personal retrospective. For example, I can use the content for &lsquo;an essay&rsquo;, the &lsquo;retrospective letter&rsquo; or the &lsquo;retrospective questions key point lists&rsquo;. Simple tasks will of course find their way in my <a href="http://www.rememberthemilk.com">todo list</a>.</p>

<p>The &lsquo;open thoughts paper&rsquo; is not really an exercises. It is a continuous companion of a personal retrospective. You could group it somewhere between the <a href="http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/">Gather Data and the Generate Insights phase</a>.</p>

<h3>Alternatives</h3>

<p>I don&rsquo;t know any direct alternatives to the &lsquo;open thoughts paper&rsquo;. Of course, you can note the ideas down on a tablet, notebook or anything else. But I think, its important to have them written down, so your not afraid of forgetting them.</p>

<p>But maybe you have an idea? Have you ever tried something similar? Will you share it with me?</p>

<hr />

<p>Picture: <a href="http://www.flickr.com/photos/freddyfromutah/4424199420">http://www.flickr.com/photos/freddyfromutah/4424199420</a>, Creative Commons: <a href="http://creativecommons.org/licenses/by/2.0/">http://creativecommons.org/licenses/by/2.0/</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Personal Retrospectives Exercises: Colour the Timeline]]></title>
    <link href="http://blog.jthoenes.net/2013/08/25/personal-retrospectives-execises-colour-the-timeline/"/>
    <updated>2013-08-25T06:34:35+00:00</updated>
    <id>http://blog.jthoenes.net/2013/08/25/personal-retrospectives-execises-colour-the-timeline</id>
    <content type="html"><![CDATA[<p>Now I want to introduce the &lsquo;colour the timeline&rsquo; exercise for you <a href="http://blog.jthoenes.net/personal-retrospectives/">personal retrospective</a>.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/08/colour_the_timeline_article.jpg" alt="article-image" /></p>

<p>A timeline is a chronological overview over the period you are reflecting on. This has been filled with facts <a href="http://blog.jthoenes.net/2013/08/18/personal-retrospectives-execises-fill-a-timeline/">before</a>. Now you analyse it deliberate by using colours to describe your feelings.</p>

<h3>Purpose</h3>

<p>When you have filled a timeline, now its time to analyse it. On way is to colour code the events, so you can see, when you had which kind of feelings over the timeframe. Use this in the generate insight phase, to get a clearer understanding of the connection of what happened and what you did.</p>

<!-- more -->


<h3>Steps</h3>

<ul>
<li>In the previous steps, you <a href="http://blog.jthoenes.net/2013/08/18/personal-retrospectives-execises-fill-a-timeline/">filled the timeline</a> with events.</li>
<li>Choose colour coding for specific feelings you had, e.g.

<ul>
<li>Happy: green, Sad: red, Surprise: yellow</li>
<li>Mad: red, Sad: blue, Glad: green</li>
</ul>
</li>
<li>Take a step back and look at the patterns over the timeline.

<ul>
<li>Can you see new connections?</li>
<li>Can you explain why the red came in?</li>
<li>What happened to make it all yellow?</li>
</ul>
</li>
<li>As a result, you can

<ul>
<li>Add more colour to the timeline.</li>
<li>Connect events with colours.</li>
<li>Have multiple colours in one event - potentially of different strength.</li>
<li>Write down things you noted.</li>
</ul>
</li>
<li>Iterate over this a bit until you feel your done.</li>
</ul>


<h3>Remarks</h3>

<p>I&rsquo;ve so far always used colours in some form when I did a timeline. It&rsquo;s fairly easy, because I can easily model my feelings. Also, the colours help me to quickly get an overview over certain periods of time. Was there a red month? Oh, suddenly everything became green? That&rsquo;s interesting.</p>

<p>I write this down on a &lsquo;open thoughts&rsquo; paper, save them for &lsquo;an essay&rsquo; or even put then on &lsquo;retrospective questions key point lists&rsquo;.</p>

<p>The &lsquo;colour the timeline&rsquo; exercise belongs to the <a href="http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/">Generate Insights phase</a>. As such, you want to use the timeline you have, to find out what happened with you and your feelings.</p>

<p>You can, if you want to, colour anything in the timeline. Feelings is just what I always have done so far.</p>

<h3>Alternatives</h3>

<p>A part from all the other &lsquo;generate insights&rsquo; exercises, there are a few tailored to using a timeline.</p>

<p>One is the so called &lsquo;emotional seismograph&rsquo;, where you draw a seismograph of your feelings under a timeline. I&rsquo;ve done the exercise a few times, but I think its more useful for team retrospectives as you can see the different seismograph curves.</p>

<p>The &lsquo;mine the timeline for gold&rsquo; is rather for thinking and writing insights down in a list. This is especially helpful, I think, if you have a focus of your retrospective.</p>

<p>As always, you personal retrospective has to be tailored to you. Any thoughts? How would you analyse your timeline?</p>

<hr />

<p>Picture: <a href="http://www.flickr.com/photos/7897906@N06/487018802">http://www.flickr.com/photos/7897906@N06/487018802</a>, Creative Commons: <a href="http://creativecommons.org/licenses/by/2.0/">http://creativecommons.org/licenses/by/2.0/</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Personal Retrospectives Execises: Fill a Timeline]]></title>
    <link href="http://blog.jthoenes.net/2013/08/18/personal-retrospectives-execises-fill-a-timeline/"/>
    <updated>2013-08-18T12:16:35+00:00</updated>
    <id>http://blog.jthoenes.net/2013/08/18/personal-retrospectives-execises-fill-a-timeline</id>
    <content type="html"><![CDATA[<p>I give a short introduction to the &lsquo;fill the timeline&rsquo; <a href="http://blog.jthoenes.net/personal-retrospectives/">personal retrospective</a> exercise, which is the basis for further analysis of the timeline. A timeline is a hand-written, temporal overview of the events important to you in a defined timeframe.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/08/fill_te_timeline_article.jpg" alt="article-image" /></p>

<p>I use timelines often - therefore it&rsquo;s the first exercise I share with you. I&rsquo;ll try to keep the structure of this post for the following posts as well: <em>purpose</em>, <em>steps</em>, <em>remarks</em> and <em>alternatives</em>.</p>

<!-- more -->


<h3>Purpose</h3>

<p>The purpose of the timeline activity is to get a chronological overview over what happened in the timeframe you are reflecting on. Use it to gather data and excel your remembering by finding temporal connections between events.</p>

<h3>Steps</h3>

<ul>
<li><p>Select a paper to do the timeline on. I usually tape together three or four A4 papers horizontally, so I have a long line of paper on the table.</p></li>
<li><p>Divide the paper into sub timeframes,  for example weeks, and mark them clearly, for example with the start date.</p></li>
<li><p>Go through your calendar or diary and write events relevant to you at their appropriate place in the timeline.</p></li>
<li><p>Use other sources as well to remember important events:</p>

<ul>
<li><p>I have a weekly log from my heartbeat retrospective. This is a great resource for a yearly or quarterly retrospective.</p></li>
<li><p>Others Ideas for sources are: call history on the phone, e-mails, text messages, twitter/facebook status updates, etc.</p></li>
<li><p>Any kind of log  at work serves as well. I used: git/svn commit logs, jira ticket logs and my engineering log.</p></li>
</ul>
</li>
<li><p>When filling in the timeline, you will probably recall other events, which are not from the sources. Put them in the timeline as well.</p></li>
</ul>


<p>Now that the timeline is filled, you can analyse it. I will write about how I analyse it in future posts.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/08/IMG_1601-1024x768.jpg" title="Empty timeline with timeframes marked." alt="Empty timeline with timeframes marked." /></p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/08/IMG_1602-1024x768.jpg" title="Filled timeline with my calendar as source" alt="Filled timeline with my calendar as source" /></p>

<h3>Remarks</h3>

<p>The timeline exercise is the heart of any of my long term retrospectives. I like to use it, because the temporal connection between the events helps me a lot to remember things I otherwise would have overlooked.</p>

<p>The &lsquo;fill the timeline&rsquo; part belongs to the <a href="http://blog.jthoenes.net/2012/03/05/5-phases-of-a-personal-retrospective/">Gather Data phase</a>. The analysis of the timeline is part of the Generate Insights phase. There are a few exercises, you can use to analyse it like &lsquo;emotional seismograph&rsquo;, &lsquo;colour coding&rsquo;, &lsquo;mine the timeline for gold&rsquo; etc. I will write about some of them, give a comment if you are interested in a particular one.</p>

<p>While doing the timeline, I often already get ideas for the Generate Insights or Decide What to Do phases. I keep an &lsquo;open thoughts paper&rsquo; on my side, to not forget those - but still focus on the gathering of the temporal data.</p>

<h3>Alternatives</h3>

<p>As this exercise is for gathering the data, you can use any other means to gather data. I have been using &lsquo;collecting notes on the move&rsquo; and the &lsquo;feedback mind map&rsquo; exercise for it. But to be honest, for me personally the timeline feels the best way.</p>

<p>Of course, this will be different for other people. What is your favourite? Any thoughts, ideas, suggestions? Please share them with me! I&rsquo;m really looking forward to hear them.</p>

<hr />

<p>Picture: <a href="http://www.flickr.com/photos/94168846@N00/1461630711">http://www.flickr.com/photos/94168846@N00/1461630711</a>, Creative Commons: <a href="http://creativecommons.org/licenses/by/2.0/">http://creativecommons.org/licenses/by/2.0/</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Waiting for a JavaScript Event With Selenium/Capybara]]></title>
    <link href="http://blog.jthoenes.net/2013/08/16/waiting-for-a-javascript-event-with-seleniumcapybara/"/>
    <updated>2013-08-16T19:00:19+00:00</updated>
    <id>http://blog.jthoenes.net/2013/08/16/waiting-for-a-javascript-event-with-seleniumcapybara</id>
    <content type="html"><![CDATA[<p>I came a cross the question, how I could wait for a JavaScript Event in Capybara using the Selenium Webdriver.</p>

<p>This is what I came up with:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="kp">protected</span>
</span><span class='line'><span class="k">def</span> <span class="nf">wait_for_javascript_event</span> <span class="n">event_name</span>
</span><span class='line'>  <span class="n">selenium_bridge</span><span class="o">.</span><span class="n">setScriptTimeout</span><span class="p">(</span><span class="no">Capybara</span><span class="o">.</span><span class="n">default_wait_time</span> <span class="o">*</span> <span class="mi">1000</span><span class="p">)</span>
</span><span class='line'>
</span><span class='line'>  <span class="n">selenium_driver</span><span class="o">.</span><span class="n">execute_async_script</span><span class="p">(</span>
</span><span class='line'>    <span class="s2">&quot;var callback = arguments[arguments.length - 1];</span>
</span><span class='line'><span class="s2">    $(window).one(&#39;</span><span class="si">#{</span><span class="n">event_name</span><span class="si">}</span><span class="s2">&#39;, function() {setTimeout(callback, 1); return true;});&quot;</span>
</span><span class='line'>    <span class="p">)</span>
</span><span class='line'><span class="k">end</span>
</span><span class='line'>
</span><span class='line'><span class="kp">private</span>
</span><span class='line'><span class="k">def</span> <span class="nf">selenium_driver</span>
</span><span class='line'>  <span class="n">page</span><span class="o">.</span><span class="n">driver</span><span class="o">.</span><span class="n">browser</span>
</span><span class='line'><span class="k">end</span>
</span><span class='line'>
</span><span class='line'><span class="k">def</span> <span class="nf">selenium_bridge</span>
</span><span class='line'>  <span class="n">selenium_driver</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="ss">:bridge</span><span class="p">)</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>


<h3>So, what is going on?</h3>

<!-- more -->


<ul>
<li><p>Capybara does not provide the feature to execute asynchronous JavaScript. So I get the selenium driver in and grab the private Selenium bridge. The bridge gives me access to this API: <a href="http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/JavascriptExecutor.html">JavascriptExecutor</a></p></li>
<li><p>I set the script timeout to the timeout I set in Capybara. I found, that otherwise there is a timeout of 2ms, which was not enough for me.</p></li>
<li><p>Then I execute asynchronous javascript. This Javascript will get a callback as last parameter of arguments injected, which I need to call, once I&rsquo;m finished with waiting for the event.</p></li>
<li><p>Inside the JavaScript, I set up a listener for the event I&rsquo;m interested in. When I get the event I&rsquo;ll immediately return true - so the event propagation goes on and I don&rsquo;t change anything in the actual website.</p></li>
<li><p>A millisecond later, I execute the callback. Why later? Because without it, the execution of the normal JavaScript in the browser stopped. I guess, but haven&rsquo;t verified, that otherwise the Ruby code will directly come back - therefore the JavaScript in the browser is in a weird state.</p></li>
</ul>


<h3>Is there a better solution?</h3>

<p>I don&rsquo;t know. I googled a bit and found none - so I came up with this solution. If there is a better one, I would be really glad. The code is not really obvious, has a lot of technical details and is tied quite strongly to the selenium bridge. I cannot switch to another driver, say poltergeist.</p>

<p>Do you have a better solution? Tell me!</p>

<h3>Why do we need to do that at all?</h3>

<p>When looking for solutions, I found a lot of people who asked how you actually can wait for events in Capybara. The answers were mostly around changing something in the websites JavaScript itself, e.g. showing a hidden element.</p>

<p>That&rsquo;s not possible for us. We are building a smoke test. The event is coming from a different system, which is not under our control. In theory, I could try to get the other guys to change something in their page. But that&rsquo;s not something to be done easily and fast.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Crucial Conversations (Book Review)]]></title>
    <link href="http://blog.jthoenes.net/2013/05/14/crucial-conversations-book-review/"/>
    <updated>2013-05-14T21:59:59+00:00</updated>
    <id>http://blog.jthoenes.net/2013/05/14/crucial-conversations-book-review</id>
    <content type="html"><![CDATA[<p>I recently finished &ldquo;Crucial Conversations. Tools for Talking When Stakes Are High&rdquo; (<a href="http://www.amazon.com/dp/0071771328/?tag=weinni-21">Amazon</a>) from Patterson et al, which describes how to productively hold emotionally challenging conversations. The book had been recommended to me by several colleagues.</p>

<h3>What is the book about?</h3>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/05/crucialconversations200.png" alt="article-image" /></p>

<p>According to the book, <em>crucial conversations</em> are define as those conversations were:</p>

<ul>
<li><p>there are <em>high stakes</em></p></li>
<li><p>there are <em>opposing opinions</em></p></li>
<li><p>there are <em>strong emotions</em></p></li>
</ul>


<p>The aim is, to hold these crucial conversations as a dialog.  A dialog is a conversation where everyone can freely contribute to a growing pool of opinion. In non-dialog conversations people tend to make accusations or don&rsquo;t contribute their views. In other words: they get <em>violent</em> or <em>silent</em>.<!-- more --></p>

<p>The book outlines a strategy to manage your own emotions in those conversations. Your emotions are created based on your interpretation (<em>named story</em>) of the facts you observe. It presents techniques to notice your interpretation explicitly and thereby handle your emotions better.</p>

<h3>What was particularly interesting?</h3>

<p>The most important learning for me was the part about being silent in a conversation. I have been silent in multiple crucial conversations in the past. In fact, I was confusing it with being diplomatic. But the authors of the book stress, that it is important to get all ideas freely on the table.</p>

<p>It was helpful to me to learn which techniques you can use - they are usually presented with an acronym. For instance the AMPP (ask, mirror, paraphrase and prime) technique to help others to overcome the silence, or the observe, tell a story, feel, act technique for understanding how emotions develop.</p>

<h3>What is my conclusion?</h3>

<p>I think the book has very interesting content. I'll definitely incorporate some of the ideas into my conversations. The book was presented in an easy to read way including many examples, which made the ideas presented very obvious.</p>

<p>I was expecting a bit more advice on conversations which don&rsquo;t necessary involve so strong emotions - but maybe I should have rather picked a moderation book for that.</p>

<p>I didn&rsquo;t like the introduction. It sounded a lot like an advertisement - and like the book would solve all problems humanity every had (which it doesn&rsquo;t).</p>

<p>In summary, I think it is a good book to read for everyone who wants to learn about how humans communicate in emotional situations.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ACE! Conference 2013 - My Impressions]]></title>
    <link href="http://blog.jthoenes.net/2013/04/17/ace-conference-2013-my-impressions/"/>
    <updated>2013-04-17T18:49:59+00:00</updated>
    <id>http://blog.jthoenes.net/2013/04/17/ace-conference-2013-my-impressions</id>
    <content type="html"><![CDATA[<p>I had the opportunity to spend the last two days at the <a href="http://aceconf.com/">ACE! Conference</a> in Krakow, Poland. ACE! is a nice conference about Agile and Lean practices - this year the guiding theme was Kanban.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2013/04/aceconference_2013_article.jpg" alt="article-image" /></p>

<h2>Format</h2>

<p>The conference is one track and every speaker has 30 minutes or an hour to present his topic. At the end, there is no opportunity for questions - that is were the <a href="http://en.wikipedia.org/wiki/Open-space_technology">open spaces</a> are for.</p>

<p>There are open spaces for two hours on both days. You can and should use this time to talk directly with the speaker about their ideas or your questions and suggestions. This allows you to really dive into the topics - rather than only getting the answer to one question. And of course, you can discuss any other topic you like.</p>

<h2>Content</h2>

<p>I&rsquo;m not going to cover all topics - you can find them <a href="http://aceconf.com/speakers/">here</a>. And there should be videos out soon. But I will summarise a bit.</p>

<!-- more -->


<p>As the guiding theme was Kanban, there was a lot about Kanban in the program. The recurrent theme to me was to look at the human side of Lean and Agile, mostly on Kanban as example: How can we communicate with Kaban? Why are we doing Kanban? And when should we stop doing it? How do we understand and respect individuals as part of the Kanban process?</p>

<p>We also had a very interesting discussion about Personal Kanban in the &lsquo;Personal Lean and Agile&rsquo; open space. It definitely made me curious to finally read <a href="http://www.amazon.de/Personal-Kanban-Mapping-Navigating-ebook/dp/B004R1Q642/ref=sr_1_2?ie=UTF8&amp;qid=1366222666&amp;sr=8-2&amp;keywords=personal+kanban">the book</a> and see how I can combine it with my <a href="http://blog.jthoenes.net/personal-retrospectives/">Personal Retrospectives</a>.</p>

<p>There are three talks I would like to mention specifically. You might want to watch them once the videos are available:</p>

<ul>
<li><p>The <em>Keynote</em> by Dave Snowden were he introduced the <a href="http://de.wikipedia.org/wiki/Cynefin-Framework">Cynefin framework</a>, which is a very intersting idea to get into your mind. Also he introduced the concept of an invention as an helpful error: <em>serendipity. </em>A very interesting idea.</p></li>
<li><p>Jasper Sonnevelt talked about <em>Kanban, remember why? </em>were he reminded us, that we introduce Lean and Agile for a reason - not for itself. And that we need to challenge the system, to spot the big improvement potentials.</p></li>
<li><p>In <em>The Other Side of Kanban</em> Chris McDermott explained the importance of understanding and respect for the people in a Agile or Lean adoption process. Especially to those who are resistant.</p></li>
</ul>


<h2>Reflections</h2>

<p>So, how was it for me?</p>

<p>I met a lot of people and was engaged in a lot of interesting conversations. The open spaces especially support interactions between participants. I really liked that.</p>

<p>I come back, with a ton of new ideas what to do and at least five books which I would really like to read (well, there have been some before in this category).</p>

<p>The way the open spaces were ran, could be improved.</p>

<p>What I think is sad, was that sometimes open spaces were in polish. I know, that its hard to discuss in a foreign language. But please think of the people, who want to join a open space later.</p>

<p>Also the groups were a bit big - in some conversations I had the feeling, a lot of people were not really able to engage in the discussion. Maybe more smaller spaces could help?</p>

<p>Of course, in such a conference the number of things you find to be directly applicable to your context are limited. However, there were a lot of things which got me thinking - what is all you can expect from a conference. And there is at least one thing I would like to try out.</p>

<p>In conclusion: I really liked the conference. The discussions and topics were very interesting. The people were open and positive - and Krakow is a lovely city to visit.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My Personal Retrospective Plan for 2012]]></title>
    <link href="http://blog.jthoenes.net/2012/12/30/my-personal-retrospective-plan-for-2012/"/>
    <updated>2012-12-30T14:50:59+00:00</updated>
    <id>http://blog.jthoenes.net/2012/12/30/my-personal-retrospective-plan-for-2012</id>
    <content type="html"><![CDATA[<p>It is time for a personal retrospective, as the year 2012 comes to an end. I took some time on the train to plan my retrospective.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2012/12/plan_pr_article.jpg" alt="article-image" /></p>

<p>So I&rsquo;m sharing what I plan to do at the 2nd or 10th of January:</p>

<ul>
<li><p><strong>Intro Music</strong>: Listen to my retrospective song, to start the retrospective ritual.</p></li>
<li><p><strong>Read Retrospective Letter</strong>: I write a letter to myself at the end of every longer retrospective. This time I&rsquo;ll read the letters from 2011, Q1 2012 and the letter from the TWU retrospective.</p></li>
<li><p><strong>Social Interaction Analysis</strong></p>

<ul>
<li><p><em>Queries</em>: I&rsquo;ll search in Facebook, Xing, LinkedIn, Twitter, E-Mail, Call-Log for some interesting patterns. I will prepare some statistics before the retrospective. In this step I&rsquo;ll analyse those data.</p></li>
<li><p><em>Social MindMap</em>: Integrate the insights gained from the queries into the a MindMap which should includes also the feedback I received directly from my peers.<!-- more --></p></li>
</ul>
</li>
<li><p><strong>Timeline</strong></p>

<ul>
<li><p><em>Enter Facts</em>: Put the facts into a timeline to see the development over time. Data sources will be: Calendar, Heartbeat Retrospectives, other Retrospectives, Notes and my brain.</p></li>
<li><p><em>Color the timeline</em>: green for positive feelings, red for negative feelings and blue for surprises. Which each color, try to find out, why this made me feel this way.</p></li>
</ul>
</li>
<li><p><strong>5 Why&rsquo;s</strong>: Select the three most important topics and ask why five times to find out the rood cause.</p></li>
<li><p><strong>Decide what to do</strong></p>

<ul>
<li><p><em>Define goals</em>: Define a limited set of main goals for next year.</p></li>
<li><p><em>Define measures</em>: Find way to archieve these goals. Select the ones which I want to pursue. Reject some as well.</p></li>
<li><p><em>Select SMART-Objectives</em>: For every measure find at least one SMART-Objectives so I can commit to it. The commitment itself happens in a heartbeat retrospective.</p></li>
</ul>
</li>
<li><p><strong>Heartbeat Retrospectives</strong></p>

<ul>
<li><p><em>Effectiveness</em>: Think about, why heartbeat retrospective lost their effectiveness this year.</p></li>
<li><p><em>Time</em>: Think about, why heartbeat retrospectives were not so regular this year?</p></li>
<li><p><em>Goal</em>: Find means to make heartbeat retrospectives to support the goals I defined before.</p></li>
<li><p><em>Plan</em>: Create a new plan and form for the heartbeat retrospective.</p></li>
</ul>
</li>
<li><p><strong>Write Retrospective Letter</strong>: Write a letter to yourself to be read before the next retrospective.</p></li>
<li><p><strong>Outro Music</strong>: Listen to the outro music to close the retrospective.</p></li>
</ul>


<p>That&rsquo;s the plan for now. What do you think? Do you have any questions?</p>

<p>I plan to do an article on every item of this plan in the first 6 month of the next year. So if you are interested, stay tuned.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[When to Do a Personal Retrospective?]]></title>
    <link href="http://blog.jthoenes.net/2012/10/21/when-to-do-a-personal-retrospective/"/>
    <updated>2012-10-21T16:16:12+00:00</updated>
    <id>http://blog.jthoenes.net/2012/10/21/when-to-do-a-personal-retrospective</id>
    <content type="html"><![CDATA[<p>What is the right time to do a <a href="http://blog.jthoenes.net/personal-retrospectives/">personal retrospective</a>? As always, the answer is: &ldquo;it depends&rdquo;.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2012/10/ankuendigung.jpg" alt="article-image" /></p>

<p>I have done personal retrospectives at different times, using different schemes.</p>

<p>There are two basic schemes I separate the timing of a personal retrospective into:</p>

<ul>
<li>regular retrospectives</li>
<li>event triggered and topic oriented retrospectives</li>
</ul>


<!-- more -->


<h2>Regular Retrospectives</h2>

<p>Let&rsquo;s start with the regular retrospectives. A regularly held retrospective has a fixed time, when you do the retrospective regardless of your current situation. You do the personal retrospective simply because it is the time for it.</p>

<p>This has the obvious advantage, that you spot things about yourself in a retrospective, which you might not have noticed when you were in the middle of your daily stress. In a way such retrospectives are the more natural ones - their reason ia, to take time, breathe a little bit and notice things about yourself, which are important to notice.</p>

<h2>Topics oriented retrospectives</h2>

<p>There is one problem with regular retrospectives though, especially with the very short heartbeat retrospectives. You might feel the lack of time to think about an individual, but important topic. These topics can come up, in relation to a certain event in your life. For instance, when you moved into a new city or switched your job.</p>

<p>These topics can become the topic of a special targeted retrospective. You can prepare yourself thoughoutly, gather feedback from important peers and tailor the retrospective timetable towards this very topic.</p>

<p>The caveat of this kind of retrospective is, to not start them open minded. Preparation can lead you to conclusions before the retrospective. This can be fine - but it can also make you blindsided for other solutions.</p>

<h2>My timing scheme</h2>

<p>My current strategy is - as you may have guessed - a mix of both schemes:</p>

<ul>
<li>A regular heartbeat retrospective every week</li>
<li>A topic retrospective at certain event or raised from the heartbeat retrospective</li>
<li>A regular year-end retrospective in the first week of a new year</li>
</ul>


<p>I conduct my<em> heartbeat retrospective</em> every week. It takes place on the evening before the next work week starts. This is mostly sunday evening, but the rule is adaptive to covert e.g. a bank holiday on monday.</p>

<p>This type of retrospective helps me to notice, if there are topics I need to dive into. It is both a weekly planning session and a safety net, to notice bigger topics in my live to reflect upon. The heartbeat retrospectives are structured very simple - they take between 10 and 15 minutes and can be held nearly everywhere.</p>

<p>The topics raised in the heartbeat retrospective are extended into a <em>topic oriented retrospective</em>. This helps to keep the heartbeat retrospective short. A topic retrospective can take from one hour up to four hours. Sometimes they need some pre-research, e.g. in my private wiki, in my mails or in my calendar. Depending on the topic, I might talk to people and ask what they think about the topic in question.</p>

<p>A typical example for a topic retrospective is a retrospective I recently did, when I came back from India having been a grad of <a href="http://join.thoughtworks.com/graduates">ThoughtWorks University</a>. I reflected on everything which happened in these six weeks - and tried to infer the lessons I can learn from this time.</p>

<p>The final retrospective is the <em>year-end retrospective</em>. It takes up to 8 hours and when doing the retrospective, I try to look back on my whole year. I try to cover all important topics and distill the most important learnings from one year.</p>

<p>In terms of topics, I don&rsquo;t do any research upfront. However, there is a lot of things I do in preparation in terms of time, food, material and ritual support.</p>

<h2>What about you?</h2>

<p>As I wrote <a href="http://blog.jthoenes.net/2012/09/20/how-to-do-your-own-personal-retrospective/">before</a>, everyone needs to develop his own way of doing his personal retrospective. So, do <em>you</em> have a specific timing scheme? What do you think might work for you?</p>

<p>How often do you do a your personal retrospective? What are your timing schemes? Where is you approach different from mine?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Hunting a Random Bug - a True Story]]></title>
    <link href="http://blog.jthoenes.net/2012/10/02/hunting-a-random-bug-a-true-story/"/>
    <updated>2012-10-02T21:37:17+00:00</updated>
    <id>http://blog.jthoenes.net/2012/10/02/hunting-a-random-bug-a-true-story</id>
    <content type="html"><![CDATA[<p>A few weeks ago, I finished a bug hunt for the <a href="http://rapidftr.com/">RapidFTR</a> open source project, which took me three evenings. I thought it might be worth sharing the story of the hunt.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2012/09/iStock_000001990131XSmall.jpg" alt="article-image" /></p>

<p>This article will describe what I did. I will give an overview of my journey to actually find the root cause of what was going on. My goal with this article is to highlight examples of techniques you can use, to actually track down strange and random bug.</p>

<p>In the end, I found a pretty clear explanation what and why the problem happened.  And it is not a coincidence, that there is a &lsquo;random&rsquo; in the title of this article.<!-- more --></p>

<h2>Start - What was the problem</h2>

<p>The problem was, that when following the <a href="https://github.com/jorgej/RapidFTR/wiki/Using-a-VM-for-development">guide for using a development virtual machine</a>, sometimes starting up the application took a long time and then failed. I had the issue right away, after starting the application twice. <a href="https://groups.google.com/d/topic/rapidftr/GfKH_uIoGYs/discussion">Other people had the same problem.</a></p>

<p>I was told, nobody really knew, why it was behaving this way - but restarting the VM would probably fix it. It didn&rsquo;t for me.</p>

<p>But I enjoy digging into problems - so I wanted to know, what was going wrong.</p>

<h2>Rake File to Solr</h2>

<p>The error occurred when running rake app:run, <em>sometimes</em>. From running rake with &ndash;trace &ndash;verbose, the debug option, I was able to see, that the application was waiting for <a href="http://sunspot.github.com/">sunspot</a> to start the <a href="http://lucene.apache.org/solr/">Apache Solr</a> search service.</p>

<p>So the question was, where does the process take all the time? The good thing to start with was, that rake and sunspot are written in Ruby. So I read the code and added a few output statements to see, which statement took so long. It turned out, it was the Java process starting Solr.</p>

<h2>Digging into the Java</h2>

<p>Apache Solr sends some output to sdtout - but sunspot hides it from you. But as any output is very helpful when debugging, I wanted to see the output.</p>

<p>I used ps -aux to find the exact command-line arguments sunspot was issuing and started the process manually from the command-line. Luckily, it still took some time - so I knew the problem was not in the Ruby Code.</p>

<p>With the port mapper <a href="http://nmap.org/">nmap</a> I found out, that it took between 2 seconds to over 2 minutes to start the service. But the rake task only waited for 10 seconds.</p>

<p>Now having the the console output, I could see, that Solr internally uses <a href="http://jetty.codehaus.org/jetty/">Jetty</a> - and it was <a href="http://svn.codehaus.org/jetty/jetty/tags/jetty-6.1.3">Jetty in version 6.1.3</a>, which took all the time - <em>in the case,</em> it took the time. So I downloaded the tag for version 6.1.3 from source control and looked into the code.</p>

<p>I found a system property called DEBUG which increases the output. I enabled it and saw that the last debug output, before it took so long, was something about starting the session service (I&rsquo;ve lost pointer to the code - unfortunately).</p>

<p>This didn&rsquo;t really help me. I unsuccessfully tried to make the Jetty log work with log4j to eventually see more - but I failed and had to give up for the evening (the 2nd one).</p>

<h2>Debug the Java Code</h2>

<p>So if your not getting anything out of the log, you can still use a debugger. The code was however failing on the VM - an Ubuntu box, but not on my local machine. But fortunately Java has a <a href="http://java.dzone.com/articles/how-debug-remote-java-applicat">remote debugger</a>.</p>

<p>I started the Java process with the remote debugging arguments and attached a listener in IntelliJ with the Jetty code from SVN. I tried to get the execution stopped at a breakpoint near the last log output - but this method was called very often and I didn&rsquo;t get it to hit the breakpoint at the right moment.</p>

<p>However, when something takes very long, it can be helpful just to stop the running process and look at the stack trace. So I stopped the execution and searched for the last method frame from Jetty, which was calling into the JDK - and there I found the following comment:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="c1">//This operation may block on some systems with low entropy. See this page</span>
</span><span class='line'><span class="c1">//for workaround suggestions:</span>
</span><span class='line'><span class="c1">//http://docs.codehaus.org/display/JETTY/Connectors+slow+to+startup</span>
</span><span class='line'><span class="n">Log</span><span class="o">.</span><span class="na">debug</span><span class="o">(</span><span class="s">&quot;Init SecureRandom.&quot;</span><span class="o">);</span>
</span><span class='line'><span class="n">_random</span><span class="o">=</span><span class="k">new</span> <span class="nf">SecureRandom</span><span class="o">();</span>
</span></code></pre></td></tr></table></div></figure>


<h2>The Solution</h2>

<p>Finally - I did go to the <a href="http://docs.codehaus.org/display/JETTY/Connectors+slow+to+startup">Jetty wiki page</a> referenced. I found out, that Java&rsquo;s java.util.SecureRandom uses real entropy from the operating system - which can block when there is none available.</p>

<p>The solution from the wiki page, just to use the normal java.util.Random, would have been difficult, because the configuration file lives deep inside sunspot and Solr. But the line &lsquo;NB Some workaround reports use /dev/./urandom instead of /dev/urandom&rsquo; gave me a hint, were to look otherwise.</p>

<p>I googled for the solution and found on <a href="http://stackoverflow.com/questions/137212/how-to-solve-performance-problem-with-java-securerandom">Stack Overflow</a>, that you can replace /dev/urandom random with /dev/./urandom in your Java process. This can be done by using the command-line argument -Djava.security.egd=file:/dev/./urandom or by replacing it in the file /usr/lib/jvm/java-6-openjdk/jre/lib/security/java.security (on an Ubuntu box).</p>

<p>So what was the matter? <a href="http://bugs.sun.com/view_bug.do?bug_id=6202721">Java&rsquo;s secure random will not accept /dev/urandom as source for random numbers</a>. /dev/urandom is unblocking, which means it will return random numbers which can be guessed - when there is no real entropy available. So Java defaults to /dev/random which will block and wait, until entropy is present.</p>

<p>This is the reason, why blocking is very unlikely to occur on a production or development machine - however it did happen, when using a virtual machine, which does not have a lot of network traffic and IO. It happens especially often, when you restart an application often - as you tend to do, when something is not working.</p>

<p>The fix is a little funny. Java rejects /dev/urandom based on the string. It does not reject /dev/./urandom which of course points to the same potentially unsafe random number generator.</p>

<h2>Last Words</h2>

<p>The fix introduces a potential security risk - but on a development virtual machine this is not a problem.</p>

<p>As you can see, finding a bug or problem in a system involves to use techniques, which bring you nearer to the root cause. However, there is no golden path. Sometimes one technique will not get you any more information. So you will have to try a different technique. Sometimes your gut feeling might help you as well.</p>

<p>Having arrived here, what are your thoughts on the story?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[How to Do Your Own Personal Retrospective?]]></title>
    <link href="http://blog.jthoenes.net/2012/09/20/how-to-do-your-own-personal-retrospective/"/>
    <updated>2012-09-20T18:17:30+00:00</updated>
    <id>http://blog.jthoenes.net/2012/09/20/how-to-do-your-own-personal-retrospective</id>
    <content type="html"><![CDATA[<p>In <a href="http://blog.jthoenes.net/personal-retrospectives/">previous articles</a> I wrote, that when doing your very own Personal Retrospective, it has to be in your personal way. But you may have asked yourself how it can work for you. To give you some ideas, I&rsquo;ll share the approaches of three different people: Linda Rising, Ilias Bartolini and myself.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2012/09/iStock_000021086344XSmall-300x199.jpg" alt="article-image" /></p>

<p>A retrospective has to be &ldquo;tailor made&rdquo; as Derby and Larsen [<a href="http://pragprog.com/book/dlret/agile-retrospectives">1</a>] point out. This is in my opinion even more important for personal retrospectives. They need to fit to your thinking, your needs and your timetable. However, it is good to start with something - and over time adapt it to your own needs. I have done this, and probably everyone doing personal retrospectives is doing it.</p>

<p>So here are three approaches you can derive and mix and match from.</p>

<!-- more -->


<h2>Write, Re-Write and Read Retrospective Notes - Linda Rising</h2>

<p>For Linda Rising[<a href="http://www.lindarising.org/">2</a>], a well-known retrospective facilitator, personal retrospectives are an important tool, to know about herself. She writes:</p>

<blockquote><p>The cognitive psychologists tell us that it&rsquo;s difficult, perhaps impossible, to really know ourselves and why we make the decisions in our lives. Our only hope, it seems to me, is to use some of the same techniques that we use to discover what teams have done well, what they might think about doing
differently, and what still puzzles them :-)!</p></blockquote>

<p>After finishing an activity she thinks she might do again, she will think about that activity and note her thoughts on paper. She usually does this right after finishing the activity while traveling. When she arrives at home, she will type the notes and safe them into a folder called <em>&ldquo;Retrospective&rdquo;.</em></p>

<p>__Before she will start doing a similar activity, she will read though the retrospective notes to prepare for it. She noticed, &ldquo;that many of the lessons learned become internalized over time, but there are always surprises - things we have completely forgotten&rdquo;.</p>

<p>On activities Linda shares with her husband - like traveling or going to a music workshop - he is joining in to the retrospective. On the way home, they talk about their experience and Linda takes notes of it. Arrived at home, she will send him an e-mail to give him the opportunity to add his comments. When they do a similar activity again, they&rsquo;ll read the retrospective notes together.</p>

<p>All this writing, re-writing and reading is not without a purpose.</p>

<blockquote><p>Cognitive scientists tell us that writing is important so I always write or sketch first and then type to save. Going through the comments twice also helps with learning &ndash; and that&rsquo;s what it&rsquo;s all about :-)!</p></blockquote>

<h2>Shared Feedback MindMap - Ilias Bartolini</h2>

<p>Ilias Bartolini[<a href="http://iliasbartolini.dyndns.org/">3</a>], my colleague and coach at ThoughtWorks University[<a href="http://join.thoughtworks.com/graduates">4</a>], has an approach centered around a mind map. He started with his self-review in the beginning of 2012, with a small mind map. He collected the data of what happened in 2011 both for work and life related aspects. The mind map grew and evolved over a couple of weeks - having the mind map always open on his laptop and capturing any important thought, when it came to Ilias' mind.</p>

<p>An important part of this mind map is the feedback Ilias received from friends and colleagues. But then he moved one step further: He shared the result of his personal retrospectives with the people who gave him feedback. Seeing their feedback was recognised encouraged them to give more feedback to Ilias. They supported him in his efforts to change himself and gave input how he can implement the feedback they gave.</p>

<p>In his blog series about his approach to self-reviews ([<a href="http://iliasbartolini.dyndns.org/~brain/index.php/2012/01/30/a-feedback-based-review-why-part1/">5</a>], [<a href="http://iliasbartolini.dyndns.org/~brain/index.php/2012/01/31/a-feedback-based-review-how-part2/">6</a>], [<a href="http://iliasbartolini.dyndns.org/~brain/index.php/2012/02/02/a-feedback-based-personal-review-you-part3/">7</a>] and [<a href="http://iliasbartolini.dyndns.org/~brain/index.php/2012/02/03/a-feedback-based-personal-review-us-part4">8</a>]), Ilias tells us, that this approach helped him to create an epiphany of what happened in his year 2011. Doing the self-review gave him self-confidence and helped him to improve his effectiveness. Most of it, because he started to understand what really matters at his work and at his life.</p>

<p>He internalized this approach so much, that he is constantly applying it. Recently, he put parts of his mind map onto a whiteboard and asked his colleagues to give their comments to it. Here is what he got:</p>

<p><a href="http://blog.jthoenes.net/wp-content/uploads/2012/09/DSCF20581.jpg"><img src="http://blog.jthoenes.net/wp-content/uploads/2012/09/DSCF20581.jpg" alt="" /></a></p>

<p>Currently Ilias is perpetually changing his feedback mind map. When he receives new feedback, he will update the mind map. This is his way, to keep track in which areas he needs to work on himself. But more important, it gives him confidence by clearly documenting what he already has archived.</p>

<blockquote><p>I find going back to the mind map summary very useful in many more situations!</p></blockquote>

<h2>Building on top of Retrospective Practices - my own approach</h2>

<p>In 2008 I listen to the excellent Software Radio Episode 105
&ldquo;Retrospective with Linda Rising&rdquo;[<a href="http://www.se-radio.net/2008/07/episode-105-retrospectives-with-linda-rising/">9</a>]. I was excited about potential
retrospectives could unveil inside a team. But at this time, I was a
student and had no team were a retrospective could be hold. However,
in the beginning of the episode, Linda told that she believed,
everyone should have a retrospective of their own. It sunk
into my brain and stayed there unused for a while.</p>

<p>In mid 2009 I graduated and got my first programming job. I started to
work, moved to a new city and met new people. All was going as
planned. But I was not clear about what my next goal in life would be.
Up until this point, my whole life was working towards this very
point. But what to do next?</p>

<p>This became clear to me shortly before christmas, as I told
it to my father. Telling it someone, made something explicit to
myself. But I suppose it has been in me quite a bit earlier.
Consequently, I decided to do a year-end retrospective for 2009.</p>

<p>I bought some nice food, drinks paper and coloured crayons and blocked
4 hours in my calendar on a Sunday afternoon. Then I created a
timetable of the retrospective practices I wanted to do</p>

<ul>
<li><p>Create a timeline of the year 2009 and then make your feeling towards the events visible with colors.</p></li>
<li><p>Make notes and later write an essay about: &lsquo;What works well&rsquo;, &lsquo;what to do differently&rsquo;, &lsquo;What did I learn and what puzzles me&rsquo;</p></li>
<li><p>Make a mindmap of the result of the retrospective.</p></li>
</ul>


<p>I executed the plan - and was very delighted with the outcome. It
really helped me to see things in my life, I did not notice before. On
this day, I started to understand more about myself - and I did set
goals for myself and selected action items to reach these
goals.</p>

<p>One action item was to make personal retrospectives a ritual every
three month. Six month later, during one of these
quarter-retrospectives, I decided to do a heartbeat retrospective
every week. I have adapted the way I do retrospectives and the scheme
of having them since. I&rsquo;ll write about this in a different article.</p>

<h2>There are more possibilities</h2>

<p>There are hundreds of more ways to do personal retrospectives. I&rsquo;ve talked to someone, who travels home by train for one hour every day. Instead of reading or listening she spends the time reflecting about her day - having a retrospective every day.</p>

<p>Aisley Nies[<a href="http://www.infoq.com/presentations/Personal-Retrospectives">9</a>] takes some time around her birthday every year and travels somewhere. She gets &ldquo;away from everything&rdquo; and spends some time thinking about herself.</p>

<p>You can also read the retrospective reports from Aimee Daniells [<a href="http://sermoa.wordpress.com/2011/12/31/aimees-2011-retrospective-a-year-in-review/">10</a>] and Mark Neeham [<a href="http://www.markhneedham.com/blog/2012/01/03/my-software-development-journey-2011/">11</a>] on their blogs. This gives you a hint, how they did their own personal retrospectives for the year 2011.</p>

<h2>What about you?</h2>

<p>Have you started or scheduled your own personal retrospectives? How will you make personal retrospectives work for yourself? What hinders you to start?</p>

<p>Please leave a comment or blog about it and drop me a link. I&rsquo;m very interested in the different approaches.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Testing Google Analytics Custom Events With Capybara and Poltergeist]]></title>
    <link href="http://blog.jthoenes.net/2012/09/02/testing-google-analytics-custom-events-with-capybara-and-poltergeist/"/>
    <updated>2012-09-02T15:14:44+00:00</updated>
    <id>http://blog.jthoenes.net/2012/09/02/testing-google-analytics-custom-events-with-capybara-and-poltergeist</id>
    <content type="html"><![CDATA[<p>In our current client project, we are using Google Analytics to track custom events of what users are doing on our website.</p>

<p><img src="http://blog.jthoenes.net/wp-content/uploads/2012/09/google-analytics-test.png" alt="article-image" /></p>

<p>To make sure, this is working in the way we expect, we want to write functional tests to check if the events are send to Google Analytics when we expect them.</p>

<p>In this article, I will describe how we created a solution were the events sent are made visible on the website in a &lsquo;debug mode&rsquo;. They are captured and tested against in our Cucumber Test suite using Capybara and Poltergeist.</p>

<h2>Testing Google Analytics Custom Events</h2>

<p><a href="https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide">Custom Events in Google Anayltics</a> are a great way to enhance your usage statistics by tracking events specific to your website. However, as they are specific to your web page, they require you to write custom logic and call <a href="https://developers.google.com/analytics/devguides/collection/gajs/">ga.js</a> when done: <em>gaq.push(&lsquo;</em>trackEvent&rsquo;, &lsquo;Contract&rsquo;, &lsquo;scrollToEnd&rsquo;, &lsquo;landLine&rsquo;).</p>

<!-- more -->


<p>This means you will want to test this behaviour. So, let&rsquo;s assume for this article you want to satisfy a Cucumber behaviour like this (./features/google-analytics.feature):</p>

<p>[code]
Feature: Google Analytics Tracking</p>

<p>  Scenario: Reading land line contract
    Given I am on the &ldquo;/contracts/land-line&rdquo; page
    And I scroll to the bottom
    GA should get an event {&ldquo;Contract&rdquo;, &ldquo;scrollToEnd&rdquo;, &ldquo;landLine&rdquo;}</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>
</span><span class='line'>
</span><span class='line'>So how to test this? We are currently working in Ruby. And there is a Ruby framework called [WAAT](https://github.com/anandbagmar/WAAT-ruby) to help test what is send to Google Analytics. It uses the [Ruby Java Bridge](http://rjb.rubyforge.org) and the [jpcap library](http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/) to monitor your HTTP traffic and capture the events send to Google Analytics. While this is working, we didn't like to use Java and jpcap, especially on our CI and preview boxes.
</span><span class='line'>
</span><span class='line'>So we thought of something different: What if we have a 'debug mode' where we just print the messages send to Google Analytics to the HTML and read them from Capybara? Turns out is no to hard.
</span><span class='line'>
</span><span class='line'>
</span><span class='line'>## Print Messages send to Google Analytics
</span><span class='line'>
</span><span class='line'>
</span><span class='line'>When you send any data to Google Analytics, you are using the global variable _gaq and call the push method with an array as argument. To hook into this mechanism, just implement and own push method and replace calls to _gaq.push with your own method:
</span><span class='line'>
</span></code></pre></td></tr></table></div></figure>


<p>javascript</p>

<p>var Example = Example || {};
Example.Analytics = Example.Analytics || {};
var <em>gaq = </em>gaq || [];</p>

<p>Example.Analytics.push = function () {
  <em>gaq.push.apply(</em>gaq, arguments);
}</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>
</span><span class='line'>
</span><span class='line'>Next, add a hidden DIV somewhere to your website and use CSS to style it the way you like (I include my styles in the gist for this blog post).
</span><span class='line'>
</span></code></pre></td></tr></table></div></figure>


<p>html</p>

<div id="google-analytics-debug"></ol></div>




<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>
</span><span class='line'>
</span><span class='line'>This should be made visible (e.g. with the help of [JQuery](http://jquery.com/)), when there is a get parameter google-analytics-debug somewhere in the in URL, so for example in http://example.com/contracts/land-line?google-analytics-debug:
</span><span class='line'>
</span></code></pre></td></tr></table></div></figure>


<p>javascript</p>

<p>Example.Analytics.is_debug = window.location.href.match(/[\?&amp;]google-analytics-debug([&amp;#]|$)/);</p>

<p>$(function () {
  if (Example.Analytics.is_debug) {
    $(&ldquo;#google-analytics-debug&rdquo;).show();
  }
});</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>
</span><span class='line'>
</span><span class='line'>And then you can add code to make the message send to Google Analytics appear in the DIV:
</span><span class='line'>
</span></code></pre></td></tr></table></div></figure>


<p>javascript</p>

<p>Example.Analytics.push = function () {
  <em>gaq.push.apply(</em>gaq, arguments);</p>

<p>  if (Example.Analytics.is_debug) {
    var args = arguments[0];
    $(function () {
      var li = $(&ldquo;<li/>&rdquo;).text(JSON.stringify(args));
      $(&ldquo;#google-analytics-debug ol&rdquo;).append(li);
    });
  }
}</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>
</span><span class='line'>
</span><span class='line'>This will add any message send to Google Analytics to the DIV. In my example this looks like this:
</span><span class='line'>
</span><span class='line'>[![](/wp-content/uploads/2012/09/Google-Analytics-Debug.png)](/wp-content/uploads/2012/09/Google-Analytics-Debug.png)
</span><span class='line'>
</span><span class='line'>
</span><span class='line'>## Write Cucumber steps with Capybara and Poltergeist
</span><span class='line'>
</span><span class='line'>
</span><span class='line'>Now we want to automate the testing using the [Cucumber](http://cukes.info/) BDD framework. To handle the browser part in a headless mode, we use [Capybara](http://jnicklas.github.com/capybara/) and [Poltergeist](https://github.com/jonleighton/poltergeist)/[PhantomJS](http://phantomjs.org/) to simulate JavaScript. I assume you have cucumber already running on your project.
</span><span class='line'>
</span><span class='line'>To get going, install PhantomJS, add the following gems to your [Gemfile](http://gembundler.com/gemfile.html) and run bundle install:
</span><span class='line'>
</span><span class='line'>[code]
</span><span class='line'>group :test do
</span><span class='line'>  gem 'cucumber'
</span><span class='line'>  gem 'capybara'
</span><span class='line'>  gem 'poltergeist'
</span><span class='line'>  gem 'rspec'
</span><span class='line'>end
</span></code></pre></td></tr></table></div></figure>


<p>Next add the following lines to ./support/env.rb</p>

<p>[code language=&ldquo;ruby&rdquo;]
require &ldquo;capybara&rdquo;
require &ldquo;capybara/cucumber&rdquo;
require &lsquo;capybara/poltergeist&rsquo;</p>

<p>require &ldquo;json&rdquo;
Capybara.app_host= &lsquo;localhost:4567&rsquo;
Capybara.default_selector= :css
Capybara.default_driver = :poltergeist</p>

<p>include Capybara::DSL</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>
</span><span class='line'>
</span><span class='line'>Now you can use capybara to read all Google Analytics events pushed. Add a file ./support/google_analytics.rb with the method ga_pushes to extract them from the website:
</span><span class='line'>
</span><span class='line'>[code language="ruby"]
</span><span class='line'>def ga_pushes
</span><span class='line'>  ga_pushes = []
</span><span class='line'>  all('#google-analytics-debug li').each do |li|
</span><span class='line'>    ga_pushes &lt;&lt; JSON.parse(li.text)
</span><span class='line'>  end
</span><span class='line'>  ga_pushes
</span><span class='line'>end
</span></code></pre></td></tr></table></div></figure>


<p>Finally implement the steps for the cucumber feature above:</p>

<p>[code language=&ldquo;ruby&rdquo;]
Given /^I am on the &ldquo;([^&rdquo;]*)&ldquo; page$/ do |path|
  visit "<a href="http://localhost:4567/#">http://localhost:4567/#</a>{path}?google-analytics-debug&rdquo;
end</p>

<p>When /^I scroll to the bottom$/ do
  page.execute_script &ldquo;window.scrollBy(0,100000)&rdquo;
end</p>

<p>Then /^GA should get an event {&ldquo;([^&rdquo;]<em>)&ldquo;, &rdquo;([^&ldquo;]</em>)&rdquo;, &ldquo;([^&rdquo;]*)&ldquo;}$/ do |category, action, value|
  ga_pushes.should include([&rdquo;_trackEvent", category, action, value])
end</p>

<p>```</p>

<p>When you run the Cucumber feature you should see a passing test result.</p>

<h2>Discussion</h2>

<p>The solution I propose in this article to test Google Analytics Custom Events consists of two parts:</p>

<ul>
<li><p>Making Google Analytics Events visible with JavaScript</p></li>
<li><p>Reading them from Cucumber tests</p></li>
</ul>


<p>The underlying assumption of this is, that the ga.js library actually works - which I think you can. The other assumption is, that the first line of your Example::Analytics.push function does work as well. You have to make sure, this is true by code review and by manually testing using the ga_debug.js <a href="https://developers.google.com/analytics/resources/articles/gaTrackingTroubleshooting">library</a> or <a href="https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna">Chrome extension</a>.</p>

<p>A nice benefit of this mechanism is, that you can see what Google Analytics Events are send even when you are doing development or manual testing.</p>

<p>On the down side, because of the get parameter, you have slightly different code in production than development and testing. You have to make your own judgement if you want to make this trade-off.</p>

<p>Another thing we discussed is, that people will be able to actually turn on the debugging in production as well. We don&rsquo;t see a security issue here, because this will only tell people what they could already know, e.g. when using the Google Analytics Debugger Chrome extension.</p>

<p>All code presented in this article can be found at <a href="https://gist.github.com/3600363">https://gist.github.com/3600363</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Java 8: Testing the Lambda Water]]></title>
    <link href="http://blog.jthoenes.net/2012/08/02/java-8-testing-the-lambda-water/"/>
    <updated>2012-08-02T23:00:05+00:00</updated>
    <id>http://blog.jthoenes.net/2012/08/02/java-8-testing-the-lambda-water</id>
    <content type="html"><![CDATA[<p>Java 8 is about a year away and comes with a language feature I really look forward to: <a href="http://openjdk.java.net/projects/lambda/">Lambda Expression</a>.</p>

<p><img src="http://blog.jthoenes.net/images/articles/lambda-expressions-java8-300x225.png" alt="article-image" /></p>

<p>Sadly the other big feature, Modules for the Java Platform, has been <a href="http://mreinhold.org/blog/late-for-the-train">delayed</a> to Java 9. But nevertheless, bringing lambda expressions (or closures if you like) into the language will make programming in Java much better.</p>

<p>So nearly one year to go - but as Java is developed open source now, we can have a look and try to use it right now. So let&rsquo;s go!</p>

<h3>Download and Install Lambda enabled Java 8</h3>

<p>First, I expected that I have to compile Java 8 myself, as it has not yet been release. But I was pleasantly surprised to see, that there are binary build available for all platforms at <a href="http://jdk8.java.net/lambda">http://jdk8.java.net/lambda/</a>. So I just downloaded the latest developer preview build and installed it on my computer.</p>

<!-- more -->


<p>To make sure it works, I created an LambdaIntro class containing a &ldquo;Hello, World!&rdquo;, compiled and executed it:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>~ <span class="nv">$ </span><span class="nb">export </span><span class="nv">JAVA_HOME</span><span class="o">=</span>~/Devtools/Java/jdk1.8.0/
</span><span class='line'>~ <span class="nv">$ </span><span class="nb">cd </span>spikes/lambda-water
</span><span class='line'>~ <span class="nv">$ $JAVA_HOME</span>/bin/javac  src/net/jthoenes/blog/spike/lambda/LambdaIntro.java
</span><span class='line'>~ <span class="nv">$ $JAVA_HOME</span>/bin/java -cp src net.jthoenes.blog.spike.lambda.LambdaIntro
</span><span class='line'>Hello from Java 8!
</span></code></pre></td></tr></table></div></figure>


<p><em>Note</em>: I use the command-line to compile and execute here, because IDEs do not support Java 8 as of now.</p>

<h3>The Non-Lambda Way</h3>

<p>As an example lets assume I want to loop through a list of objects. But for my business logic, I need to have the value and the index of the list item.  If I want to do it with current Java, I have to handle the index together with the actual logic:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="n">List</span> <span class="n">list</span> <span class="o">=</span> <span class="n">Arrays</span><span class="o">.</span><span class="na">asList</span><span class="o">(</span><span class="s">&quot;A&quot;</span><span class="o">,</span> <span class="s">&quot;B&quot;</span><span class="o">,</span> <span class="s">&quot;C&quot;</span><span class="o">);</span>
</span><span class='line'><span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">index</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">index</span> <span class="o">&lt;</span> <span class="n">list</span><span class="o">.</span><span class="na">size</span><span class="o">();</span> <span class="n">index</span><span class="o">++)</span> <span class="o">{</span>     <span class="n">String</span> <span class="n">value</span> <span class="o">=</span> <span class="n">list</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="n">index</span><span class="o">);</span>     <span class="n">String</span> <span class="n">output</span> <span class="o">=</span> <span class="n">String</span><span class="o">.</span><span class="na">format</span><span class="o">(</span><span class="s">&quot;%d -&gt; %s&quot;</span><span class="o">,</span> <span class="n">index</span><span class="o">,</span> <span class="n">value</span><span class="o">);</span>
</span><span class='line'>    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">output</span><span class="o">);</span>
</span><span class='line'><span class="o">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>This will output</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="mi">0</span> <span class="o">-&gt;</span> <span class="n">A</span>
</span><span class='line'><span class="mi">1</span> <span class="o">-&gt;</span> <span class="n">B</span>
</span><span class='line'><span class="mi">2</span> <span class="o">-&gt;</span> <span class="n">C</span>
</span></code></pre></td></tr></table></div></figure>


<p>This is not too bad, but I did two things in the same few lines of code: controlling the iteration and providing some (very simple) business logic. Lambda expressions can help me to separate those two.</p>

<h3>The eachWithIndex method signature</h3>

<p>So I want to have a method eachWithIndex which can be called like this:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="n">List</span> <span class="n">list</span> <span class="o">=</span> <span class="n">Arrays</span><span class="o">.</span><span class="na">asList</span><span class="o">(</span><span class="s">&quot;A&quot;</span><span class="o">,</span> <span class="s">&quot;B&quot;</span><span class="o">,</span> <span class="s">&quot;C&quot;</span><span class="o">);</span>
</span><span class='line'><span class="n">eachWithIndex</span><span class="o">(</span><span class="n">list</span><span class="o">,</span>
</span><span class='line'>    <span class="o">(</span><span class="n">value</span><span class="o">,</span> <span class="n">index</span><span class="o">)</span> <span class="o">-&gt;</span> <span class="o">{</span>
</span><span class='line'>        <span class="n">String</span> <span class="n">output</span> <span class="o">=</span> <span class="n">String</span><span class="o">.</span><span class="na">format</span><span class="o">(</span><span class="s">&quot;%d -&gt; %s&quot;</span><span class="o">,</span> <span class="n">index</span><span class="o">,</span> <span class="n">value</span><span class="o">);</span>
</span><span class='line'>        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">output</span><span class="o">);</span>
</span><span class='line'>    <span class="o">}</span>
</span><span class='line'><span class="o">);</span>
</span></code></pre></td></tr></table></div></figure>


<p>The method receives two parameter. The first one is the list and the second one is a lambda expression or closure which instructs the method what to do with each list item. As you can see in line 3, the lambda expression receives two argument: the current value und the current index. These arguments do not have a type declaration. The type information will be inferred by the Java 8 compiler. After the arguments, there is a -> and a block of code which should be executed for every list item.</p>

<p><em>Note</em>: You will have to write this method in a normal text editor or ignore the error messages inside your IDE.</p>

<h3>Implement the eachWithIndex method</h3>

<p>To use a lambda in Java 8, you need to declare a functional interface. A functional interface is an interface which has exactly one method - the method which will be implemented by the lambda expression. In this case, I need to declare a method which receives an item and an index and returns nothing. So I define the following interface:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="kd">public</span> <span class="kd">static</span> <span class="kd">interface</span> <span class="nc">ItemWithIndexVisitor</span><span class="o">&lt;</span><span class="n">E</span><span class="o">&gt;</span> <span class="o">{</span>
</span><span class='line'>    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">visit</span><span class="o">(</span><span class="n">E</span> <span class="n">item</span><span class="o">,</span> <span class="kt">int</span> <span class="n">index</span><span class="o">);</span>
</span><span class='line'><span class="o">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>With this interface I can now implement the eachWithIndex method.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="kd">public</span> <span class="kd">static</span> <span class="o">&lt;</span><span class="n">E</span><span class="o">&gt;</span> <span class="kt">void</span> <span class="nf">eachWithIndex</span><span class="o">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">E</span><span class="o">&gt;</span> <span class="n">list</span><span class="o">,</span> <span class="n">ItemWithIndexVisitor</span><span class="o">&lt;</span><span class="n">E</span><span class="o">&gt;</span> <span class="n">visitor</span><span class="o">)</span> <span class="o">{</span>
</span><span class='line'>    <span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">list</span><span class="o">.</span><span class="na">size</span><span class="o">();</span> <span class="n">i</span><span class="o">++)</span> <span class="o">{</span>
</span><span class='line'>         <span class="n">visitor</span><span class="o">.</span><span class="na">visit</span><span class="o">(</span><span class="n">list</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="n">i</span><span class="o">),</span> <span class="n">i</span><span class="o">);</span>
</span><span class='line'>    <span class="o">}</span>
</span><span class='line'><span class="o">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>The method makes use of the generic parameter <E>, so the item passed to the visit method will be inferred to be of the same type than the list.</p>

<p>The nice thing about using functional interfaces is, that there are a lot of them already out there in Java. Think for example of the java.util.concurrent.Callable interface. It can be used as a lambda without having to change the code which consumes the Callable. This makes a lot of the JDK and frameworks lambda enabled by default.</p>

<h3>Using a method reference</h3>

<p>One little handy thing coming from Project Lambda are method references. They are a way, to re-use existing methods and package them into a functional interface object. So let&rsquo;s say I have the following method</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="kd">public</span> <span class="kd">static</span> <span class="o">&lt;</span><span class="n">E</span><span class="o">&gt;</span> <span class="kt">void</span> <span class="nf">printItem</span><span class="o">(</span><span class="n">E</span> <span class="n">value</span><span class="o">,</span> <span class="kt">int</span> <span class="n">index</span><span class="o">)</span> <span class="o">{</span>
</span><span class='line'>    <span class="n">String</span> <span class="n">output</span> <span class="o">=</span> <span class="n">String</span><span class="o">.</span><span class="na">format</span><span class="o">(</span><span class="s">&quot;%d -&gt; %s&quot;</span><span class="o">,</span> <span class="n">index</span><span class="o">,</span> <span class="n">value</span><span class="o">);</span>
</span><span class='line'>    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">output</span><span class="o">);</span>
</span><span class='line'><span class="o">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>and I want to use this method in my eachWithIndex method, than I can use the :: notation inside my method call:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='java'><span class='line'><span class="n">eachWithIndex</span><span class="o">(</span><span class="n">list</span><span class="o">,</span> <span class="nl">LambdaIntro:</span><span class="o">:</span><span class="n">printItem</span><span class="o">);</span>
</span></code></pre></td></tr></table></div></figure>


<p>Looks nice and concise, doesn&rsquo;t it?</p>

<h3>Summary</h3>

<p>This makes my first lambda example run. I couldn&rsquo;t avoid a smile on my face to see closures running in one of my Java program after longing for them so long. Lambda Expression are currently only available as a developer preview build. If you want to find out more, read the current <a href="http://download.oracle.com/otndocs/jcp/lambda-0_5_1-edr2-spec/index.html">Early Draft Review</a> or go to the <a href="http://openjdk.java.net/projects/lambda/">Project Lambda</a> project page.</p>

<p>I uploaded the full example code to <a href="https://gist.github.com/3225689">gist</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Creating a Ritual for a Personal Retrospective]]></title>
    <link href="http://blog.jthoenes.net/2012/07/31/creating-a-ritual-for-a-personal-retrospective/"/>
    <updated>2012-07-31T19:01:58+00:00</updated>
    <id>http://blog.jthoenes.net/2012/07/31/creating-a-ritual-for-a-personal-retrospective</id>
    <content type="html"><![CDATA[<p><img src="http://blog.jthoenes.net/images/articles/IMG_0842-225x300.jpg" alt="article-image" /></p>

<p>Creating a ritual is a core part of planning your personal retrospective. In this article I will share briefly some thoughts on how make them a ritual.</p>

<p>This article is part of my <a href="http://blog.jthoenes.net/personal-retrospectives/">Personal Retrospective Series</a> – so read the other articles, if you want to learn more about personal retrospectives.</p>

<h3>Why creating a ritual?</h3>

<p>You might have noticed that it is fairly easy to notice mistakes of other people. But it is very hard to notice mistakes you made yourself. After all, you probably would have avoided the mistake in the first place if you knew, right?</p>

<p>Detecting own mistakes requires reflection. And as such, reflection is not something which is natural to human kind. So if you want to do reflection to learn from yourself, you can give yourself some support by creating a ritual: your personal retrospective.</p>

<!-- more -->


<p>It is not a coincidence, that the first section in the introduction chapter of &ldquo;Project Retrospectives - A Handbook for Team Reviews&rdquo; is named &ldquo;The Need for a Ritual&rdquo;. A ritual helps teams as well as individuals to acknowledge that this is a special time.</p>

<p>Your personal retrospective is something special: You are spending time just with yourself to improve yourself. The ritual character helps you to get in this &ldquo;Retrospective Mode&rdquo;.  It gives your retrospective the necessary structure and meaning.</p>

<h3>Preparations</h3>

<p>There are a bunch of things I do before going into the retrospective, which help to create the ritual and make the retrospective productive. I noticed over time, that my retrospectives are more effective the more careful I plan them.</p>

<h4>Enough Time</h4>

<p>The most obvious and maybe hardest part is to plan enough time. It is essential to have the time in my schedule - because than I can start with other preparations.</p>

<p>For a year-end retrospective I need about four to six hours time. I usually try to have the day free from anything except the retrospective. This helps me to focus on the retrospective rather than rushing through it, because I need to be somewhere else afterwards.</p>

<h4>Material and Environment</h4>

<p>The next thing I make sure is to have the right material and prepare environment for the retrospective. This includes a few things:</p>

<ul>
<li>A space were I can be uninterrupted.</li>
<li>A room and table different than my usual desk to stress the fact that I&rsquo;m doing something special.</li>
<li>Paper and coloured crayons so I can express my thoughts on paper and in color.</li>
<li>Other writing equipment like ruler, whiteouts, pencils and an eraser.</li>
</ul>


<h4>Prepare Snacks &amp; Drinks</h4>

<p>If I do the retrospective for four hours or more, I certainly need something to drink. And having nice snacks available is an easy way to make myself more comfortable. So I select something special I usually don&rsquo;t buy. This is a reward to myself for taking the time to do the retrospective.</p>

<h4>No Interruptions</h4>

<p>Minutes before I start the retrospective I make sure, nothing will pull my focus from it. So I switch off my phones and make sure nobody needs something from me for the time being. If I use a computer for the retrospective, I also make sure everything which issues notifications or is otherwise suspicious of pulling away my attention is turned off.</p>

<p>Now I&rsquo;m all set for the retrospective.</p>

<h3>Ritual Supporting Exercises</h3>

<p>I do a few personal retrospective exercises supporting the ritual. They are:</p>

<h4>Music</h4>

<p>Every ritual has a clear start and a clear end. For example in Christian marriages, the ritual starts with the bride walking into the church (with her father) and it ends with the bride walking out of the church (now with her newly acquired husband).</p>

<p>To start my personal retrospective ritual I have music. I have a special starting song and I have a special ending song. They are the same since I do retrospectives. This makes it both consciously and sub-consciously obvious when the retrospective starts and when the retrospective ends. The lyrics of the ending song have a very strong impact on me, as they support the execution of decisions I made in the retrospective. The starting song is just a non-vocal song I like.</p>

<p>This exercise is very helpful because I can apply it very easily even in the short weekly heartbeat retrospectives.</p>

<h4>A letter to myself</h4>

<p>At the end of a quarter or yearly personal retrospective I summarise my insights gained in the retrospective and my wishes for the next period in a letter to myself. This helps me to debrief and end the retrospective. Also, it is kind of a micro retrospective of how the retrospective itself went this time.</p>

<p>It helps me to create the ritual the next time, because the first thing I do the next time is reading this very letter. This creates a nice continuum from the last retrospective to this retrospective.</p>

<p>The exercise is stronger than the music exercise because writing a letter to myself is not happening as often as listening to music. I do it on longer term retrospectives, because for a heartbeat retrospective it would take too much time.</p>

<h3>Summary</h3>

<p>As you can see, there are a few things I do to create a ritual. They have developed themselves more or less unplanned over the time I practiced personal retrospectives. As you can see it is not rocket science.</p>

<p>What do you think? Would this work for you? Do you do other things to create a ritual for your personal retrospective?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Prime Directive of a Personal Retrospective]]></title>
    <link href="http://blog.jthoenes.net/2012/03/30/prime-directive-of-a-personal-retrospective/"/>
    <updated>2012-03-30T10:15:50+00:00</updated>
    <id>http://blog.jthoenes.net/2012/03/30/prime-directive-of-a-personal-retrospective</id>
    <content type="html"><![CDATA[<p><img src="http://blog.jthoenes.net/images/articles/IMG_0677-300x218.jpg" alt="article-image" /></p>

<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> - so read the other articles, if you want to learn more about personal retrospectives.</p>

<h3>Norman Kerth Prime Directive</h3>

<p>Norman Kerth - the author of &ldquo;Project Retrospectives: A Handbook for Team Reviews&rdquo; - 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>

<!-- more -->


<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>

<h3>An example</h3>

<p>So let me make an example. Let&rsquo;s say I failed an exam - how would I treat this in a personal retrospective?</p>

<ul>
<li>&ldquo;Why did I fail the exam?&rdquo;  - &ldquo;Because I did not learn enough.&rdquo;</li>
<li>&ldquo;Why didn&rsquo;t I learn enough?&rdquo; - &ldquo;Because I was lazy.&rdquo;</li>
<li>&ldquo;Why were I lazy?&rdquo; - &ldquo;Because I felt exhausted.&rdquo;</li>
<li>&ldquo;Why were you exhausted?&rdquo; - &ldquo;Because before I was doing  XYZ.&rdquo;</li>
<li>(And so on &hellip;.)</li>
</ul>


<p>The key here is to break the circle of blaming yourself. Especially when it comes to &ldquo;I am to lazy&rdquo; - which could be something other people might have said about you. Don&rsquo;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 - or to stop expecting to much from yourself.</p>

<h3>How to live Prime Directive</h3>

<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 &ldquo;the best you can&rdquo; 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 - even if they seem strage at  the time.</li>
</ul>


<h3>Were can you learn more?</h3>

<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>
]]></content>
  </entry>
  
</feed>
