<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>CHangeloS</title>
	<atom:link href="http://changelos.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://changelos.com</link>
	<description>Angelo&#039;s bright little corner</description>
	<lastBuildDate>Thu, 18 Apr 2013 11:32:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='changelos.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6a4354439c8639b455e91f8af17c00b0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>CHangeloS</title>
		<link>http://changelos.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://changelos.com/osd.xml" title="CHangeloS" />
	<atom:link rel='hub' href='http://changelos.com/?pushpress=hub'/>
		<item>
		<title>Using XPath to match a key/value paired XML message</title>
		<link>http://changelos.com/2013/03/15/using-xpath-to-match-a-keyvalue-paired-xml-message/</link>
		<comments>http://changelos.com/2013/03/15/using-xpath-to-match-a-keyvalue-paired-xml-message/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 20:05:29 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=367</guid>
		<description><![CDATA[In one of my current projects, we have an XML message that looks a little like this. &#60;envelope&#62; &#60;message&#62; &#60;message-id&#62;1&#60;/message-id&#62; &#60;keys&#62;first-name&#60;keys&#62; &#60;keys&#62;last-name&#60;keys&#62; .... &#60;values&#62;Angelo&#60;values&#62; &#60;values&#62;van der Sijpt&#60;values&#62; &#60;/message&#62; &#60;/envelope&#62; For testing purposes, I want to use XPath to get values from this, i.e. match first-name to Angelo. After some fiddling, I wound up with this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=367&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In one of my current projects, we have an XML message that looks a little like this.</p>
<pre>&lt;envelope&gt;
    &lt;message&gt;
    &lt;message-id&gt;1&lt;/message-id&gt;
    &lt;keys&gt;first-name&lt;keys&gt;
    &lt;keys&gt;last-name&lt;keys&gt;
    ....
    &lt;values&gt;Angelo&lt;values&gt;
    &lt;values&gt;van der Sijpt&lt;values&gt;
    &lt;/message&gt;
&lt;/envelope&gt;</pre>
<p>For testing purposes, I want to use XPath to get values from this, i.e. match <code>first-name</code> to <code>Angelo</code>.</p>
<p>After some fiddling, I wound up with this slightly ugly contraption. Might be useful for you one day, though I hope you can be spared&#8230;</p>
<pre>//message/values[count(//message/keys[.="field-name"]/preceding-sibling::keys)+1]</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=367&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2013/03/15/using-xpath-to-match-a-keyvalue-paired-xml-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>
	</item>
		<item>
		<title>Dealing with interruptions as a Scrum team member</title>
		<link>http://changelos.com/2013/01/19/dealing-with-interruptions-as-a-scrum-team-member/</link>
		<comments>http://changelos.com/2013/01/19/dealing-with-interruptions-as-a-scrum-team-member/#comments</comments>
		<pubDate>Sat, 19 Jan 2013 17:58:02 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[interruptions]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=360</guid>
		<description><![CDATA[For the last months, I have coached some engineering teams in a large software-intensive organization. Some are running fine, some need extra work. A topic that regularly pops up is &#8220;how do I handle all these interruptions during my day?&#8221; I define an interruption as anything that makes you context-switch away from the work you&#8217;re [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=360&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For the last months, I have coached some engineering teams in a large software-intensive organization. Some are running fine, some need extra work. A topic that regularly pops up is <em>&#8220;how do I handle all these interruptions during my day?&#8221;</em></p>
<p>I define an interruption as <em>anything that makes you context-switch away from the work you&#8217;re doing for the team.</em> So, questions from teammates are not interruptions. Neither is responding to email at the time of your choosing. Phone calls regarding different projects, or people showing up at your desk with unrelated questions are.</p>
<p>Scrum ask for a distraction-free environment, routing interruptions through the product owner. However, interruptions are a cultural phenomenon, not an organizational one. I will assume interruptions as a given of the current situation, channeling them in a productive manner, and slowly driving them out.</p>
<p>Company culture has its reasons for existence, and is hard to change. I believe there are three intertwined cultural components in interruptions,</p>
<ul>
<li>&#8220;it has always worked like this&#8221;,</li>
<li>there is no pushback,</li>
<li>costs are hidden.</li>
</ul>
<h1><em>&#8220;It has always worked like this&#8221;</em></h1>
<h2>What and why</h2>
<p>People have lost trust that goals and deadlines will be met. Especially with deadlines far into the future, there is a track record of slippage and work not getting done at all.</p>
<p>Managers have learned that anything not marked as <strong>urgent</strong> has a tendency to be left alone, and not get done. People get results by declaring emergency. And you know what? It works.</p>
<h2>How to handle</h2>
<p>This is ingrained into the organization, and hard to counter. Make commitments, and consistently meet them (&#8220;I&#8217;ll get back to you next Friday&#8221;). Make promises, and keep them, and people will learn to accept you deferring work. We will get back to this. I promise.</p>
<h1>There is no pushback</h1>
<h2>What and why</h2>
<p>As engineers, we are inherently nice. When faced with the choice to either shine in front of someone present, of diligently work on for someone that isn&#8217;t, we choose the former.</p>
<p>But, apart from an opportunity to please, is this work really that important?</p>
<h2>How to handle</h2>
<p>This is about personal choice and reputation: build up a track record of being dependable, and your pushback will be more gladly accepted.</p>
<p>Most interruptions are not that urgent at all, but our desire to please gets the better of us. To handle this well, we need to make a well-reasoned decision on the importance of the work before us.</p>
<p>Personal productivity methods provide some help in this. For instance, my personal favorite <a href="http://en.wikipedia.org/wiki/Getting_Things_Done">Getting Things Done</a> forces you to make a choice for interruption over two minutes: <a href="http://www.matthewcornell.org/blog/2006/3/22/how-to-process-stuff-a-comparison-of-traf-the-four-ds-and-gt.html">Do, Delegate, Defer, Drop</a>.</p>
<p>&#8216;Defer&#8217; can be part of your system, but is more effective as a team. If you decide to deal with your interruption demons, and to not be as available for the team as you could be, you&#8217;re hurting the sprint result.</p>
<p>There are many ways to handle this. For instance,</p>
<ul>
<li>One of the teams has picked Tuesday as the &#8216;interruptions day&#8217;. For every interruption, they ask &#8220;can this wait until next Tuesday?&#8221;</li>
<li>The notion of <a href="http://practicalagility.blogspot.nl/2010/06/core-hours.html">core hours</a> is written up best in chapter 10 of the <a href="http://www.amazon.com/Scrum-Field-Guide-Practical-Development/dp/0321554159">Scrum Field Guide</a>. In short, these are the hours every member is supposed to be available for the team. Outside of these hours your free to work the way you want, and any interruptions can be dealt with then.</li>
</ul>
<h2>About promises</h2>
<p>Making promises and keeping them it not external behavior, it is part of who you are. Be dependable to both your clients, and to yourself. </p>
<p>If you make a promise to yourself to get some work done, treat it just the same as making a promise to someone else. If you need to break it, <a href="http://www.dragosroua.com/gtd-one-liners-renegotiate-your-commitments-constantly/">renegotiate</a>. You can&#8217;t be dependable without being authentic.</p>
<h1>Costs are hidden</h1>
<h2>What and why</h2>
<p>We all know context switches are expensive, but just how expensive? How can you explain to the angry manager at your desk &#8220;ah, yes, well, you know, you bothering me will take roughly 22.6 minutes of productivity away. From another project.&#8221; Remember, as engineers we&#8217;re way too polite for that.</p>
<h2>How to handle</h2>
<p>Transparency. Don&#8217;t hide incoming work in some support process, taking away control from your product owner. Make it visible that incoming work hurts by keeping it on the same sprint board as the regular work, and show this pushes out planned work. Start counting interruptions, and show the correlation between interruptions and velocity.</p>
<p>I see interruptions as a part of the process, but we can make them exceptional. There are <a href="http://www.agileadvice.com/2012/01/08/scrumxplean/seven-options-for-handling-interruptions-in-scrum-and-other-agile-methods/">many ways to handle this</a>, but picking just a few,</p>
<ul>
<li>use short sprints, so this work can be planned in a regular fashion, or</li>
<li>spend time increasing product quality, so we end up with fewer emergencies.</li>
</ul>
<h1>So?</h1>
<p>Well, what does that mean for you? What can you, as an engineer, do? </p>
<p>Always wonder &#8220;what is the most valuable thing I can do at this moment in time&#8221; by consciously making the Do/Delegate/Defer/Drop decision.</p>
<p>Build up a track record of dependability: make promises, and keep them. Real emergencies are rare.</p>
<p>With your new aura of dependability, use it to manage interruptions even further. Ask people&#8217;s input to be less disruptive: don&#8217;t call, email. Don&#8217;t visit your desk, create a well-written bug report. Use IRC if you must. This leaves you free to handle the interruptions regularly, but when <em>you</em> choose to.</p>
<p>Every interruption is a chance to shine. Shine only at your own terms.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=360&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2013/01/19/dealing-with-interruptions-as-a-scrum-team-member/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>
	</item>
		<item>
		<title>Markdown in the browser, without additional tools</title>
		<link>http://changelos.com/2012/11/28/markdown-in-the-browser-without-additional-tools/</link>
		<comments>http://changelos.com/2012/11/28/markdown-in-the-browser-without-additional-tools/#comments</comments>
		<pubDate>Wed, 28 Nov 2012 22:16:22 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[own]]></category>
		<category><![CDATA[showdown]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=350</guid>
		<description><![CDATA[Today I ran into a typical documentation problem. Organization uses mainly Word, but I don&#8217;t use word. I want a solution that, while the documents are checked into subversion, is navigable in the browser. So, HTML is probably good, but I&#8217;m not going to write HTML by hand. I don&#8217;t want any server-side code, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=350&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today I ran into a typical documentation problem.</p>
<ul>
<li>Organization uses mainly Word, but I don&#8217;t use word.</li>
<li>I want a solution that, while the documents are checked into subversion, is navigable in the browser.</li>
<li>So, HTML is probably good, but I&#8217;m not going to write HTML by hand.</li>
<li>I don&#8217;t want any server-side code, and I also don&#8217;t want to check in &#8216;compiled&#8217; HTML.</li>
</ul>
<p>So, I wanted to write <a href="http://daringfireball.net/projects/markdown/" title="Markdown">Markdown</a>, and needed some way of processing it in the browser. Enter: <a href="https://github.com/coreyti/showdown" title="Showdown">Showdown</a>.</p>
<p>Showdown is a Markdown processor, written in Javascript. I ended up with documents that look roughly like this,</p>
<pre>
&lt;div id="content"&gt;
&lt;!-- This div contains all content in Markdown. --&gt;

Showdown is

- legend...
- ...wait for it...
- ...dary!

&lt;!-- End of div with markdown --&gt;
&lt;/div&gt;

 &lt;!-- This script translates markdown to readable HTML --&gt;
&lt;script src="https://raw.github.com/coreyti/showdown/master/compressed/showdown.js" &gt;&lt;/script&gt;
&lt;script&gt;
var converter = new Showdown.converter();
var content = document.getElementById('content');
console.log(content);
content.innerHTML = converter.makeHtml(content.innerHTML);
&lt;/script&gt;
</pre>
<p>which gives me a page that says the following,</p>
<p>Showdown is</p>
<ul>
<li>legend&#8230;</li>
<li>&#8230;wait for it&#8230;</li>
<li>&#8230;dary!</li>
</ul>
<p>Isn&#8217;t that an awesomely simple solution? Just type Markdown in the predefined <tt>div</tt>, save, commit, and enjoy.</p>
<h3>Oh yeah, subversion</h3>
<p>When using this solution in Subversion, remember to set the SVN mimetype to <tt>text/html</tt>, so the file can be viewed in the browser. You can do this using </p>
<p><code><br />
svn propedit svn:mime-type &lt;file&gt;<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/350/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=350&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2012/11/28/markdown-in-the-browser-without-additional-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>
	</item>
		<item>
		<title>Devnology community day 2012</title>
		<link>http://changelos.com/2012/02/11/devnology-community-day-2012/</link>
		<comments>http://changelos.com/2012/02/11/devnology-community-day-2012/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 17:43:19 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[community day]]></category>
		<category><![CDATA[devnology]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=329</guid>
		<description><![CDATA[First up: for those that don&#8217;t know Devnology, you probably should. Visit devnology.nl and sign up for one of the upcoming event! Devnology&#8217;s third Community Day took place at Vx Company in Baarn, in the best-furnished basement I ever visited. The community day is like a one-day conference with blocks of time carved out for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=329&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>First up: for those that don&#8217;t know Devnology, you probably should. Visit <a href="http://devnology.nl" title="devnology.nl">devnology.nl</a> and sign up for one of the upcoming event!</p>
<p>Devnology&#8217;s third Community Day took place at <a href="http://www.vxcompany.com/" title="Vx Company">Vx Company</a> in Baarn, in the best-furnished basement I ever visited. The community day is like a <a href="http://devnology.nl/nl/bijeenkomsten/details/43-community-day-2012" title="Schedule community day">one-day conference</a> with blocks of time carved out for different sessions and workshops; I&#8217;m only human and have not experienced them all, so I just picked the ones I was a part of.</p>
<h3>You shall not pass</h3>
<p><a href="http://changelos.files.wordpress.com/2012/02/untitled-26.jpg"><img src="http://changelos.files.wordpress.com/2012/02/untitled-26.jpg?w=300&#038;h=199" alt="" title="Geeks in Snow" width="300" height="199" class="alignnone size-medium wp-image-339" /></a></p>
<p>Not exactly an activity, but it is becoming a tradition for the Community Day: upon arrival, we find closed gates. After some 45 minutes, a security guard shows up, and once inside, things start heating up. Literally: it was roughly -15 C outside, with blue skies and some sunshine, making it not all that unpleasant. I have never skied, but I imagine this is what apres ski feels like.</p>
<h3>Cloud9, or, why do I install all of this stuff</h3>
<p><a href="https://twitter.com/mikedeboer" title="Mike de Boer">Mike de Boer</a> is a developer at Cloud9, and gave a very nice introductory talk into the way Cloud9 </p>
<blockquote><p>&#8220;is to Eclipse as Google Docs is to MSOffice&#8221;</p></blockquote>
<p>I liked the way he walked us through the various features and advantages of Cloud9, but I would have liked a more developer-oriented pitch. We were shown a quick demo of debugging and live changes, but nothing showed up that made me go &#8220;wow, time to ditch IntelliJ, Eclipse and TextMate at the same time!&#8221;</p>
<h3>To inifinity, and beyond!</h3>
<p><a href="http://changelos.files.wordpress.com/2012/02/untitled-29.jpg"><img src="http://changelos.files.wordpress.com/2012/02/untitled-29.jpg?w=300&#038;h=199" alt="" title="To infinity and beyond" width="300" height="199" class="alignnone size-medium wp-image-341" /></a></p>
<p>Never too shabby to take an engineer out of his comfort zone, into the land of mathematics, <a href="https://twitter.com/felienne" title="Felienne Hermans">Felienne Hermans</a> flipcharted her way from ancient Greece&#8217;s Zeno&#8217;s Paradox through the more modern notion of Hilbert&#8217;s Hotel. Felt a bit like infinity-related excerpts from <a href="http://www.amazon.com/Clockwork-Universe-Newton-Society-ebook/dp/B004GB1TTA" title="The Clockwork Universe">The Clockwork Universe</a>, all compressed into roughly an hour. Also, I&#8217;m very charmed by the let&#8217;s-have-a-flipchart-and-start-talking way of presenting.</p>
<p>On a slightly less related note, it was her birthday!</p>
<p><a href="http://changelos.files.wordpress.com/2012/02/untitled-28.jpg"><img src="http://changelos.files.wordpress.com/2012/02/untitled-28.jpg?w=300&#038;h=200" alt="" title="Birthday cake" width="300" height="200" class="alignnone size-medium wp-image-340" /></a></p>
<h3>Clojurescript</h3>
<p><a href="http://changelos.files.wordpress.com/2012/02/untitled-30.jpg"><img src="http://changelos.files.wordpress.com/2012/02/untitled-30.jpg?w=300&#038;h=199" alt="" title="Clojurescript" width="300" height="199" class="alignnone size-medium wp-image-342" /></a></p>
<p><a href="https://twitter.com/mamersfo" title="Martin van Amersfoort">Martin van Amersfoort</a> led a 150-minute workshop on Clojurescript. What I really liked is the way he built up the workshop, starting at the language level, getting the tools set up, and slowly moving up to the actual subject, running Clojure on top of JavaScript.</p>
<p>What I didn&#8217;t like so much is that there was too much material for the reserved timeslot; probably a day&#8217;s worth of material paraded by in some two hours, barely leaving time for hands-on Clojuring. I hope Martin finds the time reduce the amount of material (to, let&#8217;s say an afternoon), then I&#8217;ll be first in line again!</p>
<h3>A programming language is a language too, right?</h3>
<p><a href="http://changelos.files.wordpress.com/2012/02/untitled-31.jpg"><img src="http://changelos.files.wordpress.com/2012/02/untitled-31.jpg?w=198&#038;h=300" alt="" title="Philosophy of language" width="198" height="300" class="alignnone size-medium wp-image-344" /></a></p>
<p>My day ended with <a href="https://twitter.com/mrijn" title="Michel Rijnders">Michel Rijnders</a> doing some storytelling on how he started out as a philosopher by trade, and recently stumbled onto his books on the philosophy of language. There surely should be a link between human language and programming, right?</p>
<p>Well, no. As Michel expertly showed, even though human language is all about conveying meaning and alluding to another person&#8217;s mental model of the world, the link to programming is pretty slim. Since in science there is no such thing as a failed experiment, I enjoyed this deviation from our usual programming-the-world view.</p>
<p>It later dawned on me that there may perhaps be more of a link between programming and classic poetry: both force you to take your ideas, and fit them into a strict harness. Any thoughts on that, Michel?</p>
<p><small><em>About the photos</em>: you may know my photo gear is pretty retro, and I usually touch up the most annoying artifacts after scanning. This time, the weather (condensation along the bottom of the film strip) and the processing laboratory (numerous slanted, almost horizontal scratches) got the better of me.</small></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/329/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=329&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2012/02/11/devnology-community-day-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2012/02/untitled-26.jpg?w=300" medium="image">
			<media:title type="html">Geeks in Snow</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2012/02/untitled-29.jpg?w=300" medium="image">
			<media:title type="html">To infinity and beyond</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2012/02/untitled-28.jpg?w=300" medium="image">
			<media:title type="html">Birthday cake</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2012/02/untitled-30.jpg?w=300" medium="image">
			<media:title type="html">Clojurescript</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2012/02/untitled-31.jpg?w=198" medium="image">
			<media:title type="html">Philosophy of language</media:title>
		</media:content>
	</item>
		<item>
		<title>Roomba and Poang: they can live happily together</title>
		<link>http://changelos.com/2011/10/08/roomba-and-poang-they-can-live-happily-together/</link>
		<comments>http://changelos.com/2011/10/08/roomba-and-poang-they-can-live-happily-together/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 18:45:05 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firstworldproblems]]></category>
		<category><![CDATA[poang]]></category>
		<category><![CDATA[roomba]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=316</guid>
		<description><![CDATA[Oh yes, it&#8217;s such a first world problem. Yet, my Roomba has gotten stuck on my Ikea Poang chairs, about once every four or five runs. The solution I came to was elevating the chair a little bit. I bought some wooden wheels at Praxis (these are 60mm ones, intended to work as a wheel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=316&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Oh yes, it&#8217;s such a first world problem. Yet, my Roomba has gotten stuck on my Ikea Poang chairs, about once every four or five runs.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='460' height='289' src='http://www.youtube.com/embed/heA2G93-5a4?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>The solution I came to was elevating the chair a little bit. </p>
<p>I bought some wooden wheels at Praxis (these are 60mm ones, intended to work as a wheel for, for instance, a storage box, or as helper wheels for a chair).<br />
<a href="http://changelos.files.wordpress.com/2011/10/wheels-from-praxis.jpg"><img src="http://changelos.files.wordpress.com/2011/10/wheels-from-praxis.jpg?w=150&#038;h=112" alt="" title="Wheels from Praxis" width="150" height="112" class="alignnone size-thumbnail wp-image-324" /></a></p>
<p>They are intended to work as wheels, so they are built to have an axle in them. We want to screw them onto out chair, but without the screw sticking out; so, I made sure the screw would recess using a counter sink.<br />
<a href="http://changelos.files.wordpress.com/2011/10/prepare-with-a-counter-sink.jpg"><img src="http://changelos.files.wordpress.com/2011/10/prepare-with-a-counter-sink.jpg?w=150&#038;h=112" alt="" title="Prepare with a counter sink" width="150" height="112" class="alignnone size-thumbnail wp-image-321" /></a></p>
<p>Prepare the chair by pre-drilling some holes. I used a 3mm drill for this. Since the wheels&#8217; 60mm is just as wide as the chair&#8217;s legs, there is no need to measure anything, just use your hand as a guide.<br />
<a href="http://changelos.files.wordpress.com/2011/10/drill-the-hole-using-your-hand-as-a-guide.jpg"><img src="http://changelos.files.wordpress.com/2011/10/drill-the-hole-using-your-hand-as-a-guide.jpg?w=150&#038;h=112" alt="" title="Drill the hole, using your hand as a guide" width="150" height="112" class="alignnone size-thumbnail wp-image-319" /></a></p>
<p>Then, attach the wheels. I used 3.5x20mm screws.<br />
<a href="http://changelos.files.wordpress.com/2011/10/attach-the-wheels.jpg"><img src="http://changelos.files.wordpress.com/2011/10/attach-the-wheels.jpg?w=150&#038;h=112" alt="" title="Attach the wheels" width="150" height="112" class="alignnone size-thumbnail wp-image-318" /></a><a href="http://changelos.files.wordpress.com/2011/10/screws-3-5x20mm.jpg"><img src="http://changelos.files.wordpress.com/2011/10/screws-3-5x20mm.jpg?w=150&#038;h=112" alt="" title="Screws, 3.5x20mm" width="150" height="112" class="alignnone size-thumbnail wp-image-322" /></a></p>
<p>To top it all of, attach some felt protectors. I had some Ikea Praktisk protectors lying around.<br />
<a href="http://changelos.files.wordpress.com/2011/10/attach-some-felt-protectors.jpg"><img src="http://changelos.files.wordpress.com/2011/10/attach-some-felt-protectors.jpg?w=150&#038;h=112" alt="" title="Attach some felt protectors" width="150" height="112" class="alignnone size-thumbnail wp-image-317" /></a><a href="http://changelos.files.wordpress.com/2011/10/felt-protectors-i-used-ikea-praktisk.jpg"><img src="http://changelos.files.wordpress.com/2011/10/felt-protectors-i-used-ikea-praktisk.jpg?w=150&#038;h=112" alt="" title="Felt protectors, I used Ikea Praktisk" width="150" height="112" class="alignnone size-thumbnail wp-image-320" /></a></p>
<p>There you go! The chair is now just high enough so the Roomba&#8217;s bumper will hit the chair instead of bravely trying to climb over it. Mind you: this works fine on my hardwood floors, but you may need some additional height if you have carpet.<br />
<a href="http://changelos.files.wordpress.com/2011/10/there-you-go.jpg"><img src="http://changelos.files.wordpress.com/2011/10/there-you-go.jpg?w=150&#038;h=112" alt="" title="There you go, one happy Roomba" width="150" height="112" class="alignnone size-thumbnail wp-image-323" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=316&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2011/10/08/roomba-and-poang-they-can-live-happily-together/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/wheels-from-praxis.jpg?w=150" medium="image">
			<media:title type="html">Wheels from Praxis</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/prepare-with-a-counter-sink.jpg?w=150" medium="image">
			<media:title type="html">Prepare with a counter sink</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/drill-the-hole-using-your-hand-as-a-guide.jpg?w=150" medium="image">
			<media:title type="html">Drill the hole, using your hand as a guide</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/attach-the-wheels.jpg?w=150" medium="image">
			<media:title type="html">Attach the wheels</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/screws-3-5x20mm.jpg?w=150" medium="image">
			<media:title type="html">Screws, 3.5x20mm</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/attach-some-felt-protectors.jpg?w=150" medium="image">
			<media:title type="html">Attach some felt protectors</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/felt-protectors-i-used-ikea-praktisk.jpg?w=150" medium="image">
			<media:title type="html">Felt protectors, I used Ikea Praktisk</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2011/10/there-you-go.jpg?w=150" medium="image">
			<media:title type="html">There you go, one happy Roomba</media:title>
		</media:content>
	</item>
		<item>
		<title>Evolving systems and the link to service orientation</title>
		<link>http://changelos.com/2011/09/26/evolving-systems-and-the-link-to-service-orientation/</link>
		<comments>http://changelos.com/2011/09/26/evolving-systems-and-the-link-to-service-orientation/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 15:50:37 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=312</guid>
		<description><![CDATA[I gave a talk on ARL and the data evolution problem we find there at the Semantic Technology &#38; Business conference, 26 September 2011.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=312&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I gave a talk on ARL and the data evolution problem we find there at the Semantic Technology &amp; Business conference, 26 September 2011.</p>
<iframe src='http://www.slideshare.net/slideshow/embed_code/9428629' width='460' height='377'></iframe>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=312&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2011/09/26/evolving-systems-and-the-link-to-service-orientation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>
	</item>
		<item>
		<title>My git-svn workflow with Tower</title>
		<link>http://changelos.com/2011/07/11/my-git-svn-workflow-with-tower/</link>
		<comments>http://changelos.com/2011/07/11/my-git-svn-workflow-with-tower/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 10:25:50 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=298</guid>
		<description><![CDATA[Most of the codebases I work on are in Subversion, yet I like working with Git for the sheer joy of it. Below, you will find a short overview of my basic workflow. I do a lot from the command line, but not everything. For most operations Mac Git client Tower is the best solution [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=298&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Most of the codebases I work on are in Subversion, yet I like working with Git for the sheer joy of it. Below, you will find a short overview of my basic workflow.</p>
<p>I do a lot from the command line, but not <em>everything</em>. For most operations Mac Git client <a href="http://www.git-tower.com/">Tower</a> is the best solution you can find.</p>
<h2>In short</h2>
<p>For the impatient reader, my workflow looks a little like this.</p>
<ul>
<li>One time only: clone repository. <code>git svn clone <a href="http://host.com/repository" rel="nofollow">http://host.com/repository</a> -Ttrunk -bbranches -ttags mylocalcopy</code></li>
<li>Rebase: get all remote changes in. <code>git stash; git svn rebase; git stash pop</code></li>
<li>Create awesome features, committing frequently with Tower.</li>
<li>DCommit: push changes back to Subversion. <code>git stash; git svn dcommit; git stash pop</code></li>
</ul>
<h2>In a little more detail</h2>
<h3>Checking out</h3>
<p>Git works with a local history, which makes it quite distinct from Subversion. Also, Git assumes that you have a working trunk, with optional branches and tags; this means your repository should at least have a <tt>trunk</tt> directory.</p>
<p>Assuming your trunk is at <tt><a href="http://host.com/repository" rel="nofollow">http://host.com/repository</a></tt>, you can clone a remote Subversion repository to your system using<br />
<code>  git svn clone <a href="http://host.com/repository" rel="nofollow">http://host.com/repository</a> -Ttrunk -bbranches -ttags mylocalcopy</code></p>
<p>This will copy over all revisions of the repository to your own system, placing a Git repository in your <tt>mylocalcopy</tt> directory. Since it goes through all revisions, this can take a while for repositories with a lot of commits. If Git somehow stops, and your local copy is still empty, go into the local repository directory, and execute <tt>git svn fetch</tt>.</p>
<h3>Updating and committing</h3>
<p>With your local working copy, you can use Tower to create your commits.</p>
<p>If your want to merge your copy with the remote Subversion repository, it&#8217;s best to only do that after you have (locally) committed all changes. Then, use<br />
<code>  git svn rebase</code><br />
If you need to have some local uncommitted changes, use<br />
<code>  git stash; git svn rebase; git stash pop</code></p>
<p>Pushing your changes to the remote Subversion repository is roughly like rebasing. Again, it&#8217;s best to only do that with a &#8216;clean working copy&#8217;, that is, having committed all changes to your own Git repository.<br />
<code>  git svn dcommit</code><br />
Again, if you must, you can pad this command with <tt>git stash</tt> and <tt>git stash pop</tt>.</p>
<p>Remember that, when you commit, all your commits will get the timestamp of the <tt>dcommit</tt>.</p>
<h2>How do I use Git with Subversion?</h2>
<p>I have noticed that in Git, there are at least six ways to do anything you want. I have settled on a simplified way of doing things, and I know I am missing out on some awesomeness.</p>
<ul>
<li>I rarely use feature branches. I only use them when I am really working on two things at the same time, but not for every feature that comes along.</li>
<li>When I do use feature branches, I tend to <tt>dcommit</tt> from the feature branch, instead of merging to my trunk first.</li>
<li>Intellij&#8217;s Git integration is pretty good, and it works together nicely with external tools. In Eclipse, I don&#8217;t use any integration, but rely on command line tools and Tower only.</li>
<li>For Eclipse-based projects, I use Git to keep track of the full working directory, instead of tracking individual Eclipse projects. This usually means that I clone some repository at the level above the Eclipse projects, and import the projects into Eclipse using the &#8216;Import existing project&#8217; feature.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=298&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2011/07/11/my-git-svn-workflow-with-tower/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>
	</item>
		<item>
		<title>Mini conference on Semantic Technology</title>
		<link>http://changelos.com/2011/06/13/mini-conference-on-semantic-technology/</link>
		<comments>http://changelos.com/2011/06/13/mini-conference-on-semantic-technology/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 12:14:32 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=293</guid>
		<description><![CDATA[A few weeks back, I gave talk detailing the Leren op Maat product on a mini conference around semantic technology, organized by Luminis. My colleague Richard created a very nice impression of this session. If it all sounds like Dutch to you, that&#8217;s because it is.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=293&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A few weeks back, I gave talk detailing the Leren op Maat product on a mini conference around semantic technology, organized by <a href="http://www.luminis.nl">Luminis</a>. My colleague <a href="http://www.youtube.com/user/richardwouter">Richard</a> created a very nice impression of this session.</p>
<p>If it all sounds like Dutch to you, that&#8217;s because it is.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='460' height='289' src='http://www.youtube.com/embed/FlEHMlSQUeA?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/293/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=293&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2011/06/13/mini-conference-on-semantic-technology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>
	</item>
		<item>
		<title>Massive Device Deployment &#8211; Eclipsecon 2011</title>
		<link>http://changelos.com/2011/03/25/massive-device-deployment-eclipsecon-2011/</link>
		<comments>http://changelos.com/2011/03/25/massive-device-deployment-eclipsecon-2011/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 01:14:05 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=289</guid>
		<description><![CDATA[Earlier today, I gave a talk at Eclipsecon 2011. Attendance was pretty good with about 40 people.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=289&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Earlier today, I gave a talk at Eclipsecon 2011. Attendance was pretty good with about 40 people.</p>
<iframe src='http://www.slideshare.net/slideshow/embed_code/7379100' width='460' height='377'></iframe>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=289&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2011/03/25/massive-device-deployment-eclipsecon-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>
	</item>
		<item>
		<title>Using a ManagedServiceFactory</title>
		<link>http://changelos.com/2010/12/19/using-a-managedservicefactory/</link>
		<comments>http://changelos.com/2010/12/19/using-a-managedservicefactory/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 17:46:26 +0000</pubDate>
		<dc:creator>Angelo van der Sijpt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bndtools]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[managedservicefactory]]></category>
		<category><![CDATA[osgi]]></category>

		<guid isPermaLink="false">http://changelos.com/?p=261</guid>
		<description><![CDATA[One of the most elusive, yet very useful parts of the OSGi specification is the ManagedServiceFactory (part of the ConfigurationAdmin specification, chapter 104 in the 4.2 OSGi compendium specification). A long time ago, I gave an example on the Apache Felix users mailing list, but it&#8217;s hard to find. So, time for a nicer looking [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=261&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>One of the most elusive, yet very useful parts of the OSGi specification is the ManagedServiceFactory (part of the ConfigurationAdmin specification, chapter 104 in the 4.2 OSGi compendium specification). A long time ago, I gave an example on the <a href="http://www.mail-archive.com/users@felix.apache.org/msg01437.html">Apache Felix users mailing list</a>, but it&#8217;s hard to find. So, time for a nicer looking example.</p>
<p>In the four steps below, we will take a simple program, and make a ManagedServiceFactory out of it. I find it useful to follow the progression, but if you&#8217;re only interested in the ManagedServiceFactory part, skip to step 3. I assume you&#8217;re familiar with basics of OSGi, and have seen a ManagedService up close before.</p>
<h1>Running the examples</h1>
<p>I have put up an <a href="http://dl.dropbox.com/u/2438787/www/2010-12/managedservicefactoryproject.zip">example project</a>, which shows all the code covered below. When you import the project, you will get a warning about a missing &#8216;test&#8217; folder. Just create a new &#8216;test&#8217; source folder, this is due to Zip not being able to package empty directories.</p>
<p>The examples use Neil Bartlett&#8217;s excellent <a href="http://njbartlett.name/bndtools.html">Bndtools</a>, and next to the environment that ships with, we use</p>
<ul>
<li>the <a href="http://felix.apache.org/site/apache-felix-dependency-manager.html">Apache Felix Dependency Manager</a>. At time of writing, this is gearing up towards a 3.0 release, but we use a SNAPSHOT version here; I&#8217;ve put one up for <a href="http://dl.dropbox.com/u/2438787/www/2010-12/org.apache.felix.dependencymanager-3.0.0-SNAPSHOT.jar">download</a>. Once downloaded, you can drag it into the Bndtools repository.</li>
<li><a href="http://felix.apache.org/site/apache-felix-file-install.html">Apache Felix FileInstall,</a> which you can <a href="http://apache.cs.uu.nl/dist//felix/org.apache.felix.fileinstall-3.1.0.jar">download here</a>.</li>
</ul>
<h1>The case</h1>
<p>Step one, code in package <tt>net.luminis.websitewatcher.withmain</tt>.</p>
<p>Suppose we want to have some service that checks the availability of our favorite website. It&#8217;s pretty easy to devise a method that does this. Given that we have a method for this (full code in the example), we can call this repeatedly from a thread.</p>
<pre class="brush: java; title: ; notranslate">
new Thread(&quot;Watcher for &quot; + site.toExternalForm()) {
  public void run() {
    while (true) {
      if (isReachable(site)) {
        System.out.println(site.toExternalForm() + &quot; is reachable.&quot;);
      }
      else {
        System.out.println(site.toExternalForm() + &quot; is NOT reachable.&quot;);
      }
      try {
        Thread.sleep(5000);
      }
      catch (InterruptedException e) {
        return;
      }
    }
  }
}.start();
</pre>
<p>We can call this from a <tt>main</tt> method,</p>
<pre class="brush: java; title: ; notranslate">
public static void main(String[] args) throws MalformedURLException {
 new WebsiteWatcher(new URL(&quot;http://www.google.com&quot;));
}
</pre>
<p>Run this, and you will see whether or not Google is available from your machine, every five seconds.</p>
<h1>Wrap it in a bundle</h1>
<p>Step two, code in package <tt>net.luminis.websitewatcher.simplebundle</tt> and <tt>simplebundle.bnd</tt>.</p>
<p>We can take the code we had before, and wrap that in a bundle. We add an activator, which uses the Apache Felix Dependency Manager to ease or registration, and create a component for our watcher,</p>
<pre class="brush: java; title: ; notranslate">
manager.add(createComponent()
  .setImplementation(new WebsiteWatcher(new URL(&quot;http://google.com&quot;))));
</pre>
<p>In our <tt>WebsiteWatcher</tt>, we move the thread-code to an inner class, and add some plumbing code,</p>
<pre class="brush: java; title: ; notranslate">
public WebsiteWatcher(final URL site) {
  m_watcher = new WatcherThread(site);
}

public void start() {
  m_watcher.start();
}

public void stop() {
  m_watcher.interrupt();
}
</pre>
<p>The <tt>start()</tt> and <tt>stop()</tt> methods are called by the Dependency Manager when our component is, well, started or stopped.</p>
<p>You can see this working for yourself by running the <tt>bnd.bnd</tt> file in the project.</p>
<h1>A <tt>ManagedService</tt></h1>
<p>Step three, code in package <tt>net.luminis.websitewatcher.managedservice</tt> and <tt>managedservice.bnd</tt>.</p>
<p>Moving it up one notch, we create a <tt>ManagedService</tt> out of our component. To do so, we make the <tt>WebsiteWatcher</tt> implement <tt>ManagedService</tt>, and add some contants we will need later.</p>
<pre class="brush: java; title: ; notranslate">
public class WebsiteWatcher implements ManagedService {
  public static final String PID = &quot;net.luminis.websitewatcher.managedservice&quot;;
  public static final String URL = &quot;url&quot;;
</pre>
<p>A <tt>ManagedService</tt> must implement an <tt>updated(...)</tt> method,</p>
<pre class="brush: java; title: ; notranslate">
@Override
public void updated(@SuppressWarnings(&quot;rawtypes&quot;) Dictionary properties) throws ConfigurationException {
  if (properties != null) {
    if (properties.get(URL) == null) {
      throw new ConfigurationException(URL, &quot;url cannot be null&quot;);
    }
    try {
      m_site = new URL((String) properties.get(URL));
    }
    catch (MalformedURLException e) {
      throw new ConfigurationException(URL, properties.get(URL) + &quot; is not a valid URL&quot;, e);
    }
  }
}
</pre>
<p>This takes some explanation. Line 3 is a nullcheck on the configuration we receive: <tt>null</tt> is a valid configuration if our configuration is being removed. However, we will let the Dependency Manager take care of wether or not our configuration is available, so we can ignore the null-case. Line 4 checks the availability of our configuration property, and on line 8 we create a new URL to watch from the URL property in the configuration. If any of these checks go wrong, we create a <tt>ConfigurationException</tt> telling the world what happened (lines 5, 11).</p>
<p>Finally, we need to instruct the Dependency Manager of our newfound managed-service-ness.</p>
<pre class="brush: java; title: ; notranslate">
manager.add(createComponent()
  .setImplementation(WebsiteWatcher.class)
  .add(createConfigurationDependency()
    .setPid(WebsiteWatcher.PID)));
</pre>
<p>What happens when we do this?</p>
<p><a href="http://changelos.files.wordpress.com/2010/12/managedservice.jpg"><img class="alignnone size-full wp-image-277" title="ManagedService" src="http://changelos.files.wordpress.com/2010/12/managedservice.jpg?w=460&#038;h=306" alt="" width="460" height="306" /></a></p>
<p>The Configuration Admin spec tells us that a <tt>ManagedService</tt> should be registered as a service, with the PID as a service property. When a configuration becomes available, the Configuration Admin will call that <tt>ManagedService</tt> with the configuration properties. The Dependency Manager nicely wraps this as a &#8216;configuration dependency&#8217;, i.e., our component can only start if it has a configuration.</p>
<p>In the example project, we use the <a href="http://felix.apache.org/site/apache-felix-file-install.html">Apache Felix FileInstall</a> bundle to get configurations into the Configuration Admin. It watches the <tt>load</tt> directory for files with a name like <tt>&lt;pid&gt;.cfg</tt>. You can play around with the configuration in <tt>net.luminis.websitewatcher.managedservice.cfg</tt>, and see what happens!</p>
<h1>A ManagedServiceFactory</h1>
<p>Piece de resistance, code in package <tt>net.luminis.websitewatcher.managedservicefactory</tt> and <tt>managedservicefactory.bnd</tt>.</p>
<p>Having a configurable watcher for a single website is nice, but we really want to be able to watch more sites, without having to create PIDs for each of those, or instantiating multiple watchers &#8216;by hand&#8217;. This is where the <tt>ManagedServiceFactory</tt> comes in.</p>
<p><a href="http://changelos.files.wordpress.com/2010/12/managedservicefactory.jpg"><img class="alignnone size-full wp-image-280" title="ManagedServiceFactory" src="http://changelos.files.wordpress.com/2010/12/managedservicefactory.jpg?w=460&#038;h=226" alt="" width="460" height="226" /></a></p>
<p>The task of a <tt>ManagedServiceFactory</tt> is to create instances of whatever it manages, based on the configuration it gets.</p>
<p>We first create a <tt>ManagedServiceFactory</tt> implementation,</p>
<pre class="brush: java; title: ; notranslate">
public class WebsiteWatcherFactory implements ManagedServiceFactory {
  public static final String PID = &quot;net.luminis.websitewatcher.managedservicefactory&quot;;

  private volatile DependencyManager m_dependencyManager;

  private final Map&lt;String, Component&gt; m_components = new HashMap&lt;String, Component&gt;();

  @Override
  public String getName() {
  return &quot;website watcher factory&quot;;
  }

  @Override
  public void updated(String pid, @SuppressWarnings(&quot;rawtypes&quot;) Dictionary properties) throws ConfigurationException {
    if (m_components.containsKey(pid)) {
      return;
    }

    Component component = m_dependencyManager.createComponent()
      .setImplementation(WebsiteWatcher.class)
      .add(m_dependencyManager.createConfigurationDependency().setPid(pid));

    m_components.put(pid, component);
    m_dependencyManager.add(component);
  }

  @Override
  public void deleted(String pid) {
    m_dependencyManager.remove(m_components.remove(pid));
  }
}
</pre>
<p>Right, what happens here?</p>
<ul>
<li>For each FactoryConfiguration, the Config Admin will call the <tt>updated()</tt> method on line 14. In here, we
<ol>
<li>create a new Dependency Manager <tt>Component</tt> for our watcher (line 19),</li>
<li>make it depend on a configuration for its own PID (line 21), like we did before,</li>
<li>register its existence (line 23), and</li>
<li>add the component to the Dependency Manager (line 24)</li>
</ol>
</li>
<li>If a configuration is deleted, the <tt>deleted()</tt> method on line 28 will be called; we thus remove the related component from the Dependency Manager.</li>
</ul>
<p>Note the <tt>private volatile DependencyManager</tt> field: the Dependency Manager will inject an configured instance in each component that has a field of this type.</p>
<p>Now we have a factory, we need to register it in our activator.</p>
<pre class="brush: java; title: ; notranslate">
Properties props = new Properties();
props.put(Constants.SERVICE_PID, WebsiteWatcherFactory.PID);

manager.add(createComponent()
  .setInterface(ManagedServiceFactory.class.getName(), props)
  .setImplementation(WebsiteWatcherFactory.class));
</pre>
<p>And with that, we have a fully functional factory for creating numerous watchers of all you favorite websites. Apache Felix FileInstall will also handle factory configurations if you use filenames like <tt>&lt;factoryPid&gt;-&lt;instance&gt;.cfg</tt>, like <tt>net.luminis.websitewatcher.managedservicefactory-google.cfg</tt>.</p>
<p>When creating configurations, you might get a warning like<br />
<code><br />
*ERROR* Configuration for net.luminis.websitewatcher.managedservicefactory.560fe0c0-a691-475e-854a-b4caab68f6d4 has already been used for service [org.osgi.service.cm.ManagedServiceFactory, id=39, bundle=10] and will now also be given to [org.osgi.service.cm.ManagedService, id=41, bundle=10]<br />
</code><br />
which you can safely ignore. This has to do with the fact that the configuration is initially linked to our factory, but is used to configure the generated service later on.</p>
<p>By the way, you may have noticed that we wrote a new WebsiteWatcher for each step of the process, except for the last one: we just reused the one from step 3.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changelos.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changelos.wordpress.com/261/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changelos.com&#038;blog=10422416&#038;post=261&#038;subd=changelos&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changelos.com/2010/12/19/using-a-managedservicefactory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6aaf5fcde0e62f658a65965dd2703c44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">angelovds</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2010/12/managedservice.jpg" medium="image">
			<media:title type="html">ManagedService</media:title>
		</media:content>

		<media:content url="http://changelos.files.wordpress.com/2010/12/managedservicefactory.jpg" medium="image">
			<media:title type="html">ManagedServiceFactory</media:title>
		</media:content>
	</item>
	</channel>
</rss>
