<?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>Quality Software Development with Ease</title>
	<atom:link href="http://qualityswdev.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://qualityswdev.com</link>
	<description>Thoughts on better ways to develop high quality software by Manuel Küblböck. Agile and Lean methodologies, XP practices and other software development goodness.</description>
	<lastBuildDate>Mon, 16 Apr 2012 19:01:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='qualityswdev.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/616a91f395956dcbbef17b7fa1e2d403?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Quality Software Development with Ease</title>
		<link>http://qualityswdev.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://qualityswdev.com/osd.xml" title="Quality Software Development with Ease" />
	<atom:link rel='hub' href='http://qualityswdev.com/?pushpress=hub'/>
		<item>
		<title>The it-agile Startup March: Lessons learned</title>
		<link>http://qualityswdev.com/2012/04/02/the-it-agile-startup-march-lessons-learned/</link>
		<comments>http://qualityswdev.com/2012/04/02/the-it-agile-startup-march-lessons-learned/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 06:16:08 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Process]]></category>
		<category><![CDATA[it-agile-blog-planet]]></category>
		<category><![CDATA[Lean Startup]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=594</guid>
		<description><![CDATA[This last month six colleagues and I carried out a little experiment: the &#8216;Startup March&#8216;. We decided that instead of doing development, training, and consulting for our customers, we would dedicate all of our time to work on an idea for a startup. We wanted to put the &#8216;Lean Startup&#8217;  method, as made popular by Eric Ries&#8217; <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=594&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://qualityswdev.files.wordpress.com/2012/03/bart_simpson_chalkboard.jpg"><img class="alignleft size-thumbnail wp-image-595" style="margin:0 5px 5px 0;" title="bart_simpson_chalkboard" src="http://qualityswdev.files.wordpress.com/2012/03/bart_simpson_chalkboard.jpg?w=150&#038;h=112" alt="bart_simpson_chalkboard" width="150" height="112" /></a>This last month six colleagues and I carried out a little experiment: the &#8216;<strong>Startup March</strong>&#8216;. We decided that instead of doing development, training, and consulting for our customers, we would <strong>dedicate all of our time to work on an idea for a startup</strong>. We wanted to put the &#8216;Lean Startup&#8217;  method, as made popular by <a href="http://www.amazon.com/The-Lean-Startup-Entrepreneurs-Continuous/dp/0307887898/ref=sr_1_1?ie=UTF8&amp;qid=1333268260&amp;sr=8-1" target="_blank">Eric Ries&#8217; book</a>, to the test. Here&#8217;s a list of learnings we came up with and my personal interpretation of them:</p>
<ul>
<li><strong>Co-location:</strong> Communication gets orders of magnitude more difficult when a team is distributed. In the early days of a startup there is plenty to talk and to argue about. Not being in the same room will inevitably slow you down. We also found it helpful to be somewhere else than our normal offices, away from all the distractions that would pull us back to the day-to-day duties for our customers.</li>
<li><strong>In the beginning focus on individual users:</strong> We tried to make informed decisions about our product, depending on statistics, from day one. This is hard, when all of your data is statistically irrelevant. So, we decided to interview people and focus on our early adopters and their needs first.</li>
<li><strong>Know your metrics tool(s):</strong> Your metrics about your fancy experiments will be useless, if you don&#8217;t know what they mean. What is a unique visitor? Someone coming back during the same session? Someone on the same device? Are you counting yourself? If you don&#8217;t know this, don&#8217;t bother measuring it.</li>
<li><strong>Don&#8217;t neglect growth:</strong> It&#8217;s usually more fun to spend time on working on features that create more, but you also need to constantly think about how to get more people to use your tool. In order to do this, you should understand as precisely as possible who your customers are and which problem you are solving for them.</li>
<li><strong>A moderator can be helpful:</strong> We made all the decisions along the way in the team without having an authority like a Product Owner. In the end we concluded, however, that a moderator like the Scrum Master role would have been helpful during some discussions. This doesn&#8217;t have to be the same person all the time, but it might be helpful to have this dedicated role to keep discussions from dragging on longer than they have to.</li>
<li><strong>Sync often:</strong> Most of the work was done in groups or pairs. To get everyone up to date, we did brief stand-up meetings throughout the day. Usually between two and four of them. With most of the system changing all the time it is important to keep everyone pulling in the same direction.</li>
<li><strong>Release more often and know when to clean up:</strong> In a startup environment you are optimizing for customer feedback. This is very different to a project that has been going for a couple of years. Clean code is important in the later, not so much in the former. I am not telling you to intentionally write bad code, but to make a conscious decision about the time you invest in cleaning it up. The half life of code in a startup is very short. There is no point in writing the cleanest code you can for an experiment you are going to throw away tomorrow. When some functionality has stuck around long enough and is actually valuable to your users, and you keep breaking it unintentionally, it&#8217;s probably time to write some tests and start refactoring it.</li>
<li><strong>Explain your features to your users:</strong> It may seem obvious to you why and how to use your tool, but it&#8217;s not obvious to your users. So, explain features and what value they will provide.</li>
<li><strong>Present to an independent audience about your idea early on:</strong> We presented our idea and our first findings about Lean Startup after three weeks to an independent audience at an evening event. This forced us to review our results thus far and we received valuable feedback by the participants.</li>
<li><strong>Don&#8217;t force a process on yourself:</strong> If you&#8217;ve got a team of experienced people, don&#8217;t force yourself to use a specific process. Scrum by the book is intended as a starting point for teams that are stuck. A team that has understood agile values will figure out it&#8217;s own process.</li>
<li><strong>Decide on the general topic and the techno stack and get to know them ahead of time:</strong> If you are planning on doing a similar experiment, where you spend a limited amount of time with some colleagues to work on a startup idea, do yourself a favor and get to know the problem domain and the technology ahead of time. This way you can jump right in on day one. Otherwise, chores like setting up your dev machine and working through a tutorial, will eat up your precious time. BTW, we went with Rails, which was great to get off the ground quickly.</li>
<li><strong>Get a designer on the team:</strong> Most developers know how to make a piece of software work, very few of them also know how to make it look good. No-one will use your tool if it looks like it was developed in the &#8217;90s.</li>
<li><strong>Have a team event early on:</strong> It will help your team gel quicker. The work will be more effective and more fun.</li>
<li><strong>Team size:</strong> There was no agreement on this amongst the team, but I have an assumption that a smaller team would have been more effective. I base this assumption on another assumption that a smaller team would have needed less time for communication, both synchronizing and debating. Others argue that, if we took the four team members with the most oposite opinions it would have taken us just as long to debate and if we took the four team members with the most aligned ideas we would have had less inovation. I still think in the early days of a startup, as long as you got all the necessary skills on the team, a smaller team will outperform a bigger team, because of the frictional losses for synchronizing about all the moving parts.</li>
</ul>
<p>All in all, for me the <strong>focus on experiments to prove one&#8217;s assumptions</strong> is the most important contribution of Lean Startup to my personal tool box.</p>
<p>Further reading:</p>
<ul>
<li><a href="http://stefanroock.wordpress.com/2012/03/30/startupmarchit-agile-2012/" target="_blank">A list of all resources regarding it-agile&#8217;s Startup March on Stefan&#8217;s blog</a></li>
<li>Our startup idea: <a href="https://www.discuss2decide.com/" target="_blank">discuss2decide.com</a></li>
</ul>
<br /> Tagged: <a href='http://qualityswdev.com/tag/it-agile-blog-planet/'>it-agile-blog-planet</a>, <a href='http://qualityswdev.com/tag/lean-startup/'>Lean Startup</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/594/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=594&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2012/04/02/the-it-agile-startup-march-lessons-learned/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://qualityswdev.files.wordpress.com/2012/03/bart_simpson_chalkboard.jpg?w=150" medium="image">
			<media:title type="html">bart_simpson_chalkboard</media:title>
		</media:content>
	</item>
		<item>
		<title>Lean startup language design</title>
		<link>http://qualityswdev.com/2011/10/22/lean-startup-language-design/</link>
		<comments>http://qualityswdev.com/2011/10/22/lean-startup-language-design/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 12:29:43 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Language]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Dart]]></category>
		<category><![CDATA[it-agile-blog-planet]]></category>
		<category><![CDATA[Lean Startup]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=584</guid>
		<description><![CDATA[At a recent hackathon I was noodling around with Dart. I thought, it was great that Google made it particularly easy to start playing with their new language by putting an interactive shell &#8211; the Dartboard &#8211; on its home page. No download, no installation, instant coding. Very nice. On the other hand they made <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=584&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin:5px;" title="Dart" src="http://upload.wikimedia.org/wikipedia/commons/7/79/Plastic-Dart.jpg" alt="Dart" width="140" height="93" /></p>
<p>At a recent hackathon I was noodling around with <a href="http://www.dartlang.org/" target="_blank">Dart</a>. I thought, it was great that Google made it particularly easy to start playing with their new language by putting an interactive shell &#8211; the Dartboard &#8211; on its home page. <strong>No download, no installation, instant coding. Very nice.</strong> On the other hand they made it unnecessarily hard to find any information about the language on the internet by calling it <em>Dart</em>. Particularly when you search about <em>throwing</em> exceptions…</p>
<p>Trying to implement a small project in this new language I haven&#8217;t seen before made me wonder: <strong>How effective do language designers use feedback?</strong> On Dart&#8217;s website they ask for feedback, which is mostly organized in groups. What they should really do is to bring in some developers and monitor them as they try to solve simple tasks with the language under development. After all, creating a language is just another software project with end users. Or better still, at this stage they should  <strong>log and analyse compiler errors</strong> from the shell on the website. If people keep producing the same compiler error over and over it is probably an indicator that this particular construct of your hip new language just might not be very intuitive.</p>
<p>Let&#8217;s assume Google logged and analysed what happened in our session from this week&#8217;s hackathon &#8211; and they most likely did, they would come to the conclusion that having two different notations for creating a function was confusing for us. Especially, because only one of them caters for certain scenarios. Either that, or that there were two idiots in front of the computer who needed 20 minutes to figure it out. You can judge for yourself:</p>
<p><pre class="brush: java; wrap-lines: false;">
main() {
  (function() =&gt; print('Hello again'))();
}
</pre></p>
<p>This works just fine. It creates a function that prints &#8216;Hello again&#8217; and executes it.</p>
<p><pre class="brush: java; wrap-lines: false;">
main() {
  (function() =&gt; throw new Exception())();
}
</pre></p>
<p>This on the other hand gives you a (not very useful) compile time error that the token &#8216;throw&#8217; and &#8216;new&#8217; are not expected. While this is entirely true, it sent us in the wrong direction to check how to throw exceptions. While the actual mistake was that you can only use expressions with the =&gt; notation. If you want to use statements, like throwing an exception, you need to omit the arrow and use a block with curly braces instead.</p>
<p><pre class="brush: java; wrap-lines: false;">
main() {
  (function() {throw new Exception();})();
}
</pre></p>
<p>I hope other language designers will follow Google&#8217;s example and <strong>show off their language as early as possible to get feedback</strong> on their decisions. Maybe even without the developers being aware of it. I don&#8217;t see any reason why lean startup ideas shouldn&#8217;t be applied to the creation of a new language. Can you?</p>
<br /> Tagged: <a href='http://qualityswdev.com/tag/dart/'>Dart</a>, <a href='http://qualityswdev.com/tag/it-agile-blog-planet/'>it-agile-blog-planet</a>, <a href='http://qualityswdev.com/tag/lean-startup/'>Lean Startup</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/584/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=584&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/10/22/lean-startup-language-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/7/79/Plastic-Dart.jpg" medium="image">
			<media:title type="html">Dart</media:title>
		</media:content>
	</item>
		<item>
		<title>Kotlin and Ceylon to open their doors by the end of the year</title>
		<link>http://qualityswdev.com/2011/09/21/kotlin-and-ceylon-to-open-their-doors-by-the-end-of-the-year/</link>
		<comments>http://qualityswdev.com/2011/09/21/kotlin-and-ceylon-to-open-their-doors-by-the-end-of-the-year/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 16:29:28 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Ceylon]]></category>
		<category><![CDATA[it-agile-blog-planet]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JVM]]></category>
		<category><![CDATA[Kotlin]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=566</guid>
		<description><![CDATA[The residents of Java are waiting. Waiting for the day when another city will rise to supremacy in JVMland. These days they are looking north towards the functional territories and watch with interest as the new cities Kotlin and Ceylon are being built. Many Java inhabitants are tired of the city they live in. Not just since <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=566&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://qualityswdev.files.wordpress.com/2011/09/simcitystart.png"><img class="alignleft size-thumbnail wp-image-571" style="margin:5px;" title="simcityStart" src="http://qualityswdev.files.wordpress.com/2011/09/simcitystart.png?w=135&#038;h=90" alt="sim city start" width="135" height="90" /></a></p>
<p>The residents of <a href="http://java.com/en/" target="_blank">Java</a> are waiting. Waiting for the day when another city will rise to supremacy in <a href="http://en.wikipedia.org/wiki/Java_Virtual_Machine" target="_blank">JVMland</a>. These days they are looking north towards the <a href="http://c2.com/cgi/wiki?FunctionalProgramming" target="_blank">functional territories</a> and watch with interest as the new cities <a href="http://confluence.jetbrains.net/display/Kotlin/Welcome" target="_blank">Kotlin</a> and <a href="http://in.relation.to/Tutorials/IntroductionToCeylon" target="_blank">Ceylon</a> are being built. Many Java inhabitants are <a href="http://raganwald.posterous.com/javas-comb-over" target="_blank">tired of the city they live in</a>. Not just since their home town is ruled by <a href="http://en.wikipedia.org/wiki/Amun" target="_blank">Amun</a>, who is said to have just swallowed his predecessor <a href="http://en.wikipedia.org/wiki/Ra" target="_blank">Ra</a>. For years they have been <a href="http://mail.openjdk.java.net/pipermail/lambda-dev/2011-August/003877.html" target="_blank">waiting for new facilities</a> to be constructed. Facilities they have seen on weekend trips to other cities like the very hip <a href="http://www.ruby-lang.org/en/" target="_blank">Ruby</a> or which they got to <a href="http://en.wikibooks.org/wiki/Haskell/Pattern_matching" target="_blank">know</a> and <a href="http://en.wikibooks.org/wiki/Haskell/List_processing" target="_blank">love</a> while going to school in towns like <a href="http://www.haskell.org/haskellwiki/Haskell" target="_blank">Haskell</a>. The people of Java are restless. While they are very familiar with their home town which provides all the basic features to get by, they are craving for some place new and exciting.</p>
<p>While it is not impossible the move to another city the adventurous have to bear some risks. New cities are <a href="http://langpop.com/" target="_blank">having a hard time attracting companies</a> to create jobs for willing new citizens. Often only companies in niche industries are willing to venture outside the secure boundaries of the Java megalopolis. Not few explorers who sought their luck in other cities eventually came <a href="http://alarmingdevelopment.org/?p=562" target="_blank">back to Java</a> because in the end it turned out to be more convenient. Big companies and with them their employees won&#8217;t even consider moving, before a new city has a proven success record. <a href="http://radar.oreilly.com/2011/07/jvm-languages.html" target="_blank">Many cities tried.</a> Non succeeded so far.</p>
<p>The <a href="http://www.jetbrains.com/" target="_blank">creators</a> of Kotlin, still citizens of Java themselves, claim to have studied and learned from these failed attempts. They are promising all the best features from what is probably their biggest contender &#8211; <a href="http://www.scala-lang.org/" target="_blank">Scala town</a> &#8211; while having <a href="http://confluence.jetbrains.net/display/Kotlin/Comparison+to+Scala" target="_blank">way easier infrastructure</a>. They are also advertising stellar public transportation (aka <a href="http://en.wikipedia.org/wiki/Integrated_development_environment" target="_blank"><strong>I</strong>nter <strong>D</strong>omicile <strong>E</strong>xpress</a>), which should help new citizens tremendously with getting to feel at home in the new environment. Like Scala they also aim for <a href="http://confluence.jetbrains.net/display/Kotlin/Java+interoperability" target="_blank">seamless communication with all districts in Java</a>.</p>
<p>On first glance <a href="http://in.relation.to/Bloggers/IntroductionToCeylonPart1" target="_blank">Ceylon&#8217;s layout</a> looks very similar to Kotlin&#8217;s and some even suggest they should <a href="http://youtrack.jetbrains.net/issue/KT-230" target="_blank">join forces</a> to enhance their chances to succeed. But since the foundations of both cities are already done and dusted this seems very unlikely.</p>
<p>Kotlin and Ceylon are planning to open their doors by the end of the year and the weary inhabitants of Java are sitting on their packed bags &#8211; waiting.</p>
<br /> Tagged: <a href='http://qualityswdev.com/tag/ceylon/'>Ceylon</a>, <a href='http://qualityswdev.com/tag/it-agile-blog-planet/'>it-agile-blog-planet</a>, <a href='http://qualityswdev.com/tag/java/'>Java</a>, <a href='http://qualityswdev.com/tag/jvm/'>JVM</a>, <a href='http://qualityswdev.com/tag/kotlin/'>Kotlin</a>, <a href='http://qualityswdev.com/tag/scala/'>Scala</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/566/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=566&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/09/21/kotlin-and-ceylon-to-open-their-doors-by-the-end-of-the-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://qualityswdev.files.wordpress.com/2011/09/simcitystart.png?w=150" medium="image">
			<media:title type="html">simcityStart</media:title>
		</media:content>
	</item>
		<item>
		<title>The functional breakthrough &#8230; the back door</title>
		<link>http://qualityswdev.com/2011/08/16/the-functional-breakthrough-the-back-door/</link>
		<comments>http://qualityswdev.com/2011/08/16/the-functional-breakthrough-the-back-door/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 19:59:00 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[it-agile-blog-planet]]></category>
		<category><![CDATA[Object-functional Programming]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=552</guid>
		<description><![CDATA[Ever since my first encounter with Haskell in my very first week at university I have been waiting for functional programming to become more widely spread and to find acceptance in the industry. Still&#8230; waiting&#8230; Playing around with Scala these days, I have come as close as ever to use functional programming for something non-academic. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=552&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin:5px;" title="Back Door" src="http://farm1.static.flickr.com/97/281236817_6e23be7309.jpg" alt="Back Door" width="180" height="115" />Ever since my first encounter with Haskell in my very first week at university I have been waiting for functional programming to become more widely spread and to find acceptance in the industry. Still&#8230; waiting&#8230;</p>
<p>Playing around with Scala these days, I have come as close as ever to use functional programming for something non-academic. Is Scala a functional programming language? You bet. But isn&#8217;t it also an object-oriented language? Certainly. Arguably more so than other object-oriented languages like Java (link). This might be the foot in the door for functional programming. Because object orientation is so dominant and functional programming requires such a different way of thinking, it is basically impossible for functional programming to compete with the market leader. And what do you do if you can&#8217;t beat them? That&#8217;s right. You join them.</p>
<p>Object-functional languages like Scala provide the perfect ground for programmers, who know their object-oriented languages inside out, to get to know the benefits of functional languages. You can get your code working by programming in the object-oriented way you live and breath, then you refactor it and add some functional touch to it. Or rather, you <a href="http://qualityswdev.com/2011/03/10/how-to-make-your-scala-code-less-imperative-and-more-functional/" target="_blank">remove some of the wordy cumbersome cruft replacing it by more elegant code</a>. And once you get to know and love the expressiveness that is functional code you will start writing it in the first place. And with that become a better developer.</p>
<p>By now, I have stopped waiting for a breakthrough of a pure functional language. But with that I am also sure that things like higher-order functions and pattern matching will find their way into the mainstream. One way or another.</p>
<h6>Image by: <a href="http://www.flickr.com/photos/bucher/281236817/" target="_blank">So gesehen</a></h6>
<br /> Tagged: <a href='http://qualityswdev.com/tag/functional-programming/'>Functional Programming</a>, <a href='http://qualityswdev.com/tag/it-agile-blog-planet/'>it-agile-blog-planet</a>, <a href='http://qualityswdev.com/tag/object-functional-programming/'>Object-functional Programming</a>, <a href='http://qualityswdev.com/tag/scala/'>Scala</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/552/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=552&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/08/16/the-functional-breakthrough-the-back-door/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://farm1.static.flickr.com/97/281236817_6e23be7309.jpg" medium="image">
			<media:title type="html">Back Door</media:title>
		</media:content>
	</item>
		<item>
		<title>Conway&#8217;s Game of Life in Scala</title>
		<link>http://qualityswdev.com/2011/07/31/conways-game-of-life-in-scala/</link>
		<comments>http://qualityswdev.com/2011/07/31/conways-game-of-life-in-scala/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 20:41:02 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Code Retreat]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=539</guid>
		<description><![CDATA[I attended a Code Retreat yesterday in Hamburg. As usual we used Conway&#8217;s Game of Life to practice our coding skills. I planned to do at least one session using Scala, but my Scala IDE wasn&#8217;t working any more, probably due to an incompatible upgrade of some description. So, today I took the time to get my IDE up <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=539&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I attended a <a href="http://coderetreat.ning.com/" target="_blank">Code Retreat</a> yesterday in <a href="https://www.xing.com/events/code-retreat-hamburg-781562" target="_blank">Hamburg</a>. As usual we used <a href="http://en.wikipedia.org/wiki/Conway's_Game_of_Life" target="_blank">Conway&#8217;s Game of Life</a> to practice our coding skills. I planned to do at least one session using Scala, but my <a href="http://www.scala-ide.org/" target="_blank">Scala IDE</a> wasn&#8217;t working any more, probably due to an incompatible upgrade of some description.</p>
<p>So, today I took the time to get my IDE up to scratch and implemented the game of life in Scala. It just had to be done. And since no-one forced me to delete my code after 45 minutes (as it&#8217;s common at code retreats) I actually got to finish it. Including console output. Bonus.</p>
<p><pre class="brush: scala; wrap-lines: false;">
object GameOfLife extends App {
  var civilization = new Civilization(List((3, 1), (3, 2), (3, 3), (2, 3), (1, 2)), 10)

  civilization.printGrid
  for (period &lt;- 1 to 100) {
    aGenerationPasses
    civilization = civilization.tick
    civilization.printGrid
  }

  def aGenerationPasses = synchronized {
    wait(100)
  }
}

class Civilization(seed: List[(Int, Int)], size: Int) {
  private val STAY_ALIVE = 2
  private val BE_BORN = 3
  private val grid = new Array[Array[Boolean]](size, size)
  seed foreach (cell =&gt; containsCellAt(cell._1, cell._2))

  def tick = {
    val nextGeneration = new Civilization(Nil, size)
    for (row &lt;- 0 until size; col &lt;- 0 until size)
      if (isCellAt((row, col)) &amp;&amp; numberOfNeighboursFor(row, col) == STAY_ALIVE
          || numberOfNeighboursFor(row, col) == BE_BORN)
        nextGeneration.containsCellAt(row, col)
    nextGeneration
  }

  private def numberOfNeighboursFor(row: Int, col: Int): Int =
    areaAround(row, col) map wrap filter isCellAt length

  private def areaAround(row: Int, col: Int): List[(Int, Int)] =
    List((row-1, col-1), (row,col-1), (row+1,col-1), (row-1,col), (row+1,col), (row-1,col+1), (row,col+1), (row+1,col+1))

  private def wrap(cell: (Int, Int)): (Int, Int) =
    (((cell._1 + size) % size), ((cell._2 + size) % size))

  private def isCellAt(cell: (Int, Int)): Boolean =
    grid(cell._1)(cell._2)

  private def containsCellAt(row: Int, col: Int) =
    grid(row)(col) = true

  def printGrid = {
    println
    grid foreach {
      row =&gt; row foreach {
        cell =&gt; if (cell) print(&quot;*&quot;) else print(&quot;.&quot;)
      }
      println
    }
  }
}
</pre></p>
<p>The GameOfLife object runs the game by creating an initial civilization and then looping through a fixed number of generations, printing each of them along the way.</p>
<p>The civilization creates its next generation upon call of the tick method. This happens by applying (a simplified version of) the four rules of the game to each spot on the grid. Since I initialize the next generation with no cells, I only care about rules 2 and 4 that deal with alive cells.</p>
<p><a href="http://qualityswdev.files.wordpress.com/2011/07/gameofliferules1.jpg"><img class="aligncenter size-medium wp-image-542" title="gameOfLifeRules" src="http://qualityswdev.files.wordpress.com/2011/07/gameofliferules1.jpg?w=224&#038;h=300" alt="Conway's Game of Life Rules" width="224" height="300" /></a></p>
<p>I decided to wrap the grid at the edges. So objects leaving the grid on the right don&#8217;t disappear, but re-enter on the left instead. This happens in the wrap method.</p>
<p>The numberOfNeighboursFor method is a bit magical. There is 6 method calls in a one-liner. Surely, people who are used to functional language list comprehensions can appreciate this. Read: In the area around the given cell coordinates (1) for each spot apply (2) the wrapping (3) then filter (4) by spots that contain a cell (5) and finally give me the length of the resulting list (6). Voilà.</p>
<p>I am not entirely happy about the use of a nested Array for the grid and the for loop in the tick method, but I couldn&#8217;t come up with a better solution. Suggestions welcome.</p>
<br /> Tagged: <a href='http://qualityswdev.com/tag/code-retreat/'>Code Retreat</a>, <a href='http://qualityswdev.com/tag/scala/'>Scala</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/539/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=539&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/07/31/conways-game-of-life-in-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://qualityswdev.files.wordpress.com/2011/07/gameofliferules1.jpg?w=224" medium="image">
			<media:title type="html">gameOfLifeRules</media:title>
		</media:content>
	</item>
		<item>
		<title>CI Gossip: Is Hudson asking Jenkins out again?</title>
		<link>http://qualityswdev.com/2011/05/05/ci-gossip-is-hudson-asking-jenkins-out-again/</link>
		<comments>http://qualityswdev.com/2011/05/05/ci-gossip-is-hudson-asking-jenkins-out-again/#comments</comments>
		<pubDate>Thu, 05 May 2011 21:50:22 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Jenkins]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=528</guid>
		<description><![CDATA[After the recent divorce of Hudson and Jenkins following the tragical death of Hudson&#8217;s mother Sun and a long battle over trademark rights, Hudson seems to have come to senses and is planning to hand over the code to Eclipse. I&#8217;ve seen Jenkins&#8217; father Kohsuke in Hamburg earlier this week where he presented some stats <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=528&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://qualityswdev.files.wordpress.com/2011/05/divorce.jpg"><img class="alignleft size-thumbnail wp-image-532" title="divorce" src="http://qualityswdev.files.wordpress.com/2011/05/divorce.jpg?w=105&#038;h=102" alt="divorce" width="105" height="102" /></a>After the recent divorce of Hudson and Jenkins following the tragical <a href="http://www.infoq.com/news/2009/04/oraclebuyssun" target="_blank">death</a> of Hudson&#8217;s mother Sun and a <a href="http://jenkins-ci.org/content/hudsons-future" target="_blank">long battle</a> over trademark rights, Hudson seems to have come to senses and is <a href="http://www.oracle.com/us/corporate/press/393483" target="_blank">planning to hand over the code to Eclipse</a>.</p>
<p>I&#8217;ve seen Jenkins&#8217; father Kohsuke in <a href="http://jenkins-ci.org/content/hamburg-hackathon-great-success" target="_blank">Hamburg</a> earlier this week where he presented <a href="http://www.slideshare.net/kohsuke/current-state-of-jenkins" target="_blank">some stats on the project activities</a>. I don&#8217;t remember the exact numbers, but he drove home the point that Jenkins is where the action is. It seems like Jenkins moved out and took the kids (the open source community) with her. Apparently lawyers don&#8217;t code. Who knew?</p>
<p>It appears that Hudson&#8217;s new foster parents Sonatype are driving the recent activities trying to reunite the once happy couple in the hope to revive the lethargic Hudson. It <a href="http://kohsuke.org/2011/05/04/oracle-proposes-to-move-hudson-to-eclipse/" target="_blank">remains to be seen</a> if Jenkins can forgive Hudson for what he put her through. After all the hard work to build up a life of her own, Hudson&#8217;s request for forgiveness seems almost too much to ask for.</p>
<br /> Tagged: <a href='http://qualityswdev.com/tag/continuous-integration/'>Continuous Integration</a>, <a href='http://qualityswdev.com/tag/hudson/'>Hudson</a>, <a href='http://qualityswdev.com/tag/jenkins/'>Jenkins</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/528/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=528&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/05/05/ci-gossip-is-hudson-asking-jenkins-out-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://qualityswdev.files.wordpress.com/2011/05/divorce.jpg?w=150" medium="image">
			<media:title type="html">divorce</media:title>
		</media:content>
	</item>
		<item>
		<title>The Bowling Game Kata in Scala</title>
		<link>http://qualityswdev.com/2011/03/14/the-bowling-game-kata-in-scala/</link>
		<comments>http://qualityswdev.com/2011/03/14/the-bowling-game-kata-in-scala/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 20:06:42 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Kata]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=501</guid>
		<description><![CDATA[Here is the end result of my implementation of the Bowling Game Kata in Scala. You can see all steps including the tests on CodersDojo.org. Comparing this piece of code with the Java implementation from Uncle Bob (who, no doubt, knows how to write clean Java code) I would conclude that it is more expressive <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=501&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is the end result of my implementation of the <a href="http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata" target="_blank">Bowling Game Kata</a> in Scala. You can see all steps including the tests on <a href="http://codersdojo.org/statistics/38495f8ae5cf0048e3f2897423b64d91198e2648" target="_blank">CodersDojo.org</a>.</p>
<p><pre class="brush: scala; wrap-lines: false;">
class BowlingGame {

  var rolls: List[Int] = List()

  def roll(pins: Int): Unit = {
    rolls = rolls :+ pins
  }

  def score: Int = {
    scoreRecursive(0, 1, rolls)
  }

  def scoreRecursive(currentScore: Int, frame: Int, rolls: List[Int]): Int = {
    frame match {
      case 11 =&gt; currentScore
      case f =&gt; rolls match {
        case 10 :: rollsTail // strike
          =&gt; scoreRecursive(currentScore + (rolls take (3) sum), f + 1, rollsTail)
        case first :: second :: rollsTail if (first + second == 10) // spare
          =&gt; scoreRecursive(currentScore + (rolls take (3) sum), f + 1, rollsTail)
        case first :: second :: rollsTail // normal
          =&gt; scoreRecursive(currentScore + (rolls take (2) sum), f + 1, rollsTail)
        case _ // incomplete game
          =&gt; throw new Exception(&quot;Only complete games can be scored.&quot;)
      }
    }
  }
}
</pre></p>
<p>Comparing this piece of code with the <a href="http://butunclebob.com/files/downloads/Bowling%20Game%20Kata.ppt" target="_blank">Java implementation from Uncle Bob</a> (who, no doubt, knows how to write clean Java code) I would conclude that it is more expressive and concise. The pattern matching is a) shorter and b) makes the algorighm stand out more clearly. I do, however, appreciate that this might have to do with personal taste. But, what this implemenation with pattern matching does make trivial is to also score partial games. It just requires two more lines of code that seem almost obvious.</p>
<p><pre class="brush: scala; highlight: [23,24,25,26]; wrap-lines: false;">
class BowlingGame {

  var rolls: List[Int] = List()

  def roll(pins: Int): Unit = {
    rolls = rolls :+ pins
  }

  def score: Int = {
    scoreRecursive(0, 1, rolls)
  }

  def scoreRecursive(currentScore: Int, frame: Int, rolls: List[Int]): Int = {
    frame match {
      case 11 =&gt; currentScore
      case f =&gt; rolls match {
        case 10 :: rollsTail // strike
          =&gt; scoreRecursive(currentScore + (rolls take (3) sum), f + 1, rollsTail)
        case first :: second :: rollsTail if (first + second == 10) // spare
          =&gt; scoreRecursive(currentScore + (rolls take (3) sum), f + 1, rollsTail)
        case first :: second :: rollsTail // normal
          =&gt; scoreRecursive(currentScore + (rolls take (2) sum), f + 1, rollsTail)
        case last :: rollsTail // partial frame
          =&gt; currentScore + last
        case nil // partial game
          =&gt; currentScore
      }
    }
  }
}
</pre></p>
<p>As I described in my previous post (link), the variable <em>rolls</em> might indicate that the above code could be made more functional by replacing it with some other construct like list comprehension or recursion. However, thinking about it, it sort of makes sense since the rolls are indeed what changes as a game progresses. I couldn&#8217;t come up with a more functional implementation that is not less expressive. Can you?</p>
<br /> Tagged: <a href='http://qualityswdev.com/tag/functional-programming/'>Functional Programming</a>, <a href='http://qualityswdev.com/tag/java/'>Java</a>, <a href='http://qualityswdev.com/tag/kata/'>Kata</a>, <a href='http://qualityswdev.com/tag/scala/'>Scala</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/501/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=501&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/03/14/the-bowling-game-kata-in-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>
	</item>
		<item>
		<title>How to make your Scala code less imperative and more functional</title>
		<link>http://qualityswdev.com/2011/03/10/how-to-make-your-scala-code-less-imperative-and-more-functional/</link>
		<comments>http://qualityswdev.com/2011/03/10/how-to-make-your-scala-code-less-imperative-and-more-functional/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 17:54:03 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=496</guid>
		<description><![CDATA[When first starting out with Scala after programming in Java for many years chances are you are still writing Java code just in Scala syntax. Meaning you are not leveraging all the functional goodness that is Scala. Functional code is usually more concise and can be more expressive than imperative code, because functional language constructs <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=496&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://qualityswdev.files.wordpress.com/2011/03/atlantis_start_dw_w_274223p.jpg"><img class="alignleft size-full wp-image-497" style="margin:5px;" title="atlantis_start" src="http://qualityswdev.files.wordpress.com/2011/03/atlantis_start_dw_w_274223p.jpg?w=510" alt="Atlantis Start"   /></a>When first starting out with Scala after programming in Java for many years chances are you are still writing Java code just in Scala syntax. Meaning you are not leveraging all the functional goodness that is Scala. Functional code is usually more concise and <strong>can be</strong> more expressive than imperative code, because functional language constructs operate on a higher level of abstraction than your ordinary execution path loop and fork. It is <strong>more </strong>about saying <strong>what </strong>you want and <strong>less </strong>about <strong>how </strong>you want it done.</p>
<p>I found the following actions helpful in my quest to make my Scala code less imperative and more functional:</p>
<ul>
<li><strong>Try to eliminate variables and loops by replacing them with list comprehensions and recursion.</strong></li>
<li><strong>Try to eliminate if statements by replacing them with pattern matching.</strong></li>
</ul>
<p>Basically, I look for the key words &#8216;var&#8217;, &#8216;for&#8217;, &#8216;while&#8217; and &#8216;if&#8217; in my code and try to think up a way to replace them with something more functional. The result is usually not obvious (for non-(not yet)-functional programmers that is anyway), but I tend to like it more than what I had before.</p>
<br /> Tagged: <a href='http://qualityswdev.com/tag/functional-programming/'>Functional Programming</a>, <a href='http://qualityswdev.com/tag/java/'>Java</a>, <a href='http://qualityswdev.com/tag/scala/'>Scala</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/496/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=496&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/03/10/how-to-make-your-scala-code-less-imperative-and-more-functional/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://qualityswdev.files.wordpress.com/2011/03/atlantis_start_dw_w_274223p.jpg" medium="image">
			<media:title type="html">atlantis_start</media:title>
		</media:content>
	</item>
		<item>
		<title>Question everything you do</title>
		<link>http://qualityswdev.com/2011/03/09/question-everything-you-do/</link>
		<comments>http://qualityswdev.com/2011/03/09/question-everything-you-do/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 16:38:44 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Process]]></category>
		<category><![CDATA[Problem Solving]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=445</guid>
		<description><![CDATA[I realized that I follow a certain plan of attack when confronted with a task. I ask myself the following questions: Why am I doing this? The first thing I do is to ask myself why I am carrying out the given task. This is mostly about trying to understand the task and the problem <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=445&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin:5px;" title="Question everything" src="http://www.mousemusings.com/weblogs/uploaded_images/02_question-711716.jpg" alt="Question everything" width="144" height="98" />I realized that I follow a certain plan of attack when confronted with a task. I ask myself the following questions:</p>
<ol>
<li><strong>Why am I doing this?</strong><br />
The first thing I do is to ask myself why I am carrying out the given task. This is mostly about trying to understand the task and the problem it tries to solve.</li>
<li><strong>Am I solving the right problem?</strong><br />
Once I understand the task and the problem at hand, I think about if the problem is the real issue that needs to be solved or if it&#8217;s just a symptom of an underlying issue.</li>
<li><strong>Can I do this a better way?</strong><br />
When I am convinced that I am working on the right problem I try to come up with a better way of solving it. To answer this question I need to use my (and/or my collegues&#8217;) experience from having solved similar problems before.</li>
<li><strong>Can I automate this?</strong><br />
After solving the problem with the chosen solution and given this is a reoccuring task, I think about how to automate the task as much as reasonable. Determining if (or to what extent) the automation is reasonable includes meassuring up the time it takes to automate the task against&nbsp;</p>
<ul>
<li>the (total and manual labor) time savings by (partially) automating the task</li>
<li>the number of times and the frequency the task needs to be carried out</li>
<li>the error-proneness of the task</li>
<li>the impact of mistakes when carrying out the task</li>
</ul>
<p>The higher the values for these items the more likely I am to automate.</li>
</ol>
<p>Extracting a mantra out of the above steps, my suggestion to you would be: <strong>Question everything you do.</strong> Never just mindlessly agree, especially if it has always been done &#8216;this way&#8217;. In my experience this is more often an indication that it is done wrong rather than proofing that it is the right way to do something. Never stop challenging the status quo.</p>
<h4>But why?</h4>
<p>Why, you ask? Good that&#8217;s what I am talking about. Questioning what you are doing and how you are doing it is the only way to <strong>improve</strong>. This is what agile and lean practices like <a href="http://en.wikipedia.org/wiki/Retrospective" target="_blank">retrospectives</a>, <a href="http://en.wikipedia.org/wiki/5_Whys" target="_blank">5 Whys</a> and <a href="http://en.wikipedia.org/wiki/Root_cause_analysis" target="_blank">root cause analysis</a> are based on.</p>
<h6>Image by <a href="http://mousemusings.com/weblogs/2006_02_01_archives.html" target="_blank">Cyndy</a></h6>
<br /> Tagged: <a href='http://qualityswdev.com/tag/problem-solving/'>Problem Solving</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/445/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=445&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/03/09/question-everything-you-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://www.mousemusings.com/weblogs/uploaded_images/02_question-711716.jpg" medium="image">
			<media:title type="html">Question everything</media:title>
		</media:content>
	</item>
		<item>
		<title>How to make changes to rotten legacy code</title>
		<link>http://qualityswdev.com/2011/02/09/how-to-make-changes-to-rotten-legacy-code/</link>
		<comments>http://qualityswdev.com/2011/02/09/how-to-make-changes-to-rotten-legacy-code/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 17:15:49 +0000</pubDate>
		<dc:creator>Manuel Küblböck</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Legacy Code]]></category>
		<category><![CDATA[Refactor]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://qualityswdev.com/?p=463</guid>
		<description><![CDATA[Wouldn&#8217;t it be great to start a project from scratch? Use all the latest technologies, design and write the software TDD-style, as the creator intended? Well&#8230; yes, but this isn&#8217;t your dream world, this is reality. And here we have to deal with existing software (aka legacy software) most of the time. Unfortunately, this software <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=463&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin:5px;" title="Rotten apple" src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Rotten_apple.jpg/675px-Rotten_apple.jpg" alt="Rotten apple" width="117" height="103" />Wouldn&#8217;t it be great to start a project from scratch? Use all the latest technologies, design and write the software TDD-style, as the creator intended? Well&#8230; yes, but this isn&#8217;t your dream world, this is reality. And here we have to deal with existing software (aka legacy software) most of the time. Unfortunately, this software usually doesn&#8217;t have an extensive test suite that allows it to be refactored with every change. More often than not programmers take great care not to touch any existing code when adding new functionality or fixing a bug in order not to risk breaking any functionality. This, of course, is to the disadvantage of design and maintainability. And so software rots, a little bit with every change. The more rotten it is, the harder it is to bring it back on track and clean it up again.</p>
<h4>What to do?</h4>
<p>So, what are you supposed to do? Cleaning it all up is a way too daunting task and would probably take longer than writing the whole thing from scratch again. Management will never agree (for good reason). So, don&#8217;t even think about it, it&#8217;s not an option (in general, there are of course exceptions). The way to go is to follow the <strong>boy scout rule</strong>: &#8220;Leave the place cleaner than you found it.&#8221; If you follow this rule consistently you will clean up the code bit by bit, change by change. And more than that, you will clean up the most important parts first &#8211; the parts that change most often. In other words: If it took you x hours to understand the bloody mess, don&#8217;t make it x+1 hours for the next poor soul that comes down this track.</p>
<h4>How do you do this exactly?</h4>
<p>Here&#8217;s how I usually attempt making a change to legacy code.</p>
<ol>
<li>Find the area (class(es), method(s)) you need to change.</li>
<li>While you are trying to understand the code rename variables to more expressive names than &#8216;m&#8217; and &#8216;m2&#8242; (resist to change any behaviour just yet).</li>
<li>Once you understand the input and output of the area you need to change, write (unit) tests that cover the existing behaviour. This might be hard since code developed non-TDD-style tends to be not easily testable. Try anyway.</li>
<li>Once you got sufficient code coverage, refactor the hell out of the code to transform it into a better design and make it more understandable (e.g. every comment is an invitation to extract a method with a name conveying the message of the comment.) It is of course debatable what sufficient code coverage is. For me it means that I am comfortable with making changes to the code without worrying about breaking existing functionality.</li>
<li>Write a failing (unit) test that uncovers the bug you are fixing (<a href="http://www.agileweboperations.com/bugfixes-without-tests-are-anti-fixes" target="_blank">bugfixes without tests are anti-fixes</a>) or the missing functionality you are adding.</li>
<li>Fix the bug/add the new functionality.</li>
<li>Feel good about yourself.</li>
<li>Make sure everybody on the team agrees upon making an effort to not letting code rot and that their is a common standard of code quality. This is probably the harder part. I am still working this one out myself.</li>
<li>Life happily ever after</li>
</ol>
<h6>Image <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Rotten_apple.jpg/675px-Rotten_apple.jpg" target="_blank">Wikipedia</a></h6>
<br /> Tagged: <a href='http://qualityswdev.com/tag/legacy-code/'>Legacy Code</a>, <a href='http://qualityswdev.com/tag/refactor/'>Refactor</a>, <a href='http://qualityswdev.com/tag/tdd/'>TDD</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qualityswdev.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qualityswdev.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qualityswdev.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qualityswdev.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qualityswdev.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qualityswdev.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qualityswdev.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qualityswdev.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qualityswdev.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qualityswdev.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qualityswdev.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qualityswdev.wordpress.com/463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qualityswdev.wordpress.com/463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qualityswdev.wordpress.com/463/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qualityswdev.com&amp;blog=10101488&amp;post=463&amp;subd=qualityswdev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://qualityswdev.com/2011/02/09/how-to-make-changes-to-rotten-legacy-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e8234609df154fdd93a08a885103a16?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">kueblboe</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Rotten_apple.jpg/675px-Rotten_apple.jpg" medium="image">
			<media:title type="html">Rotten apple</media:title>
		</media:content>
	</item>
	</channel>
</rss>
