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

<channel>
	<title>The Ways of an Agile Poodle</title>
	<atom:link href="http://www.jussimononen.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jussimononen.info</link>
	<description>Ideas and insights into the life of an agile developer</description>
	<lastBuildDate>Wed, 02 Nov 2011 18:45:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Demanding transparency?</title>
		<link>http://www.jussimononen.info/2011/11/02/demanding-transparency/</link>
		<comments>http://www.jussimononen.info/2011/11/02/demanding-transparency/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 18:45:55 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[People]]></category>
		<category><![CDATA[Intent]]></category>
		<category><![CDATA[micro management]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=484</guid>
		<description><![CDATA[What if someone demands transparency from you? What do you do? What does transparency mean? It can mean that we should keep things in the open, no secrets or that our doings are audited and we can back-trace them every time we need or want to. In other words, saying that there is not enough [...]]]></description>
			<content:encoded><![CDATA[<p>What if someone demands transparency from you? What do you do? What does transparency mean?</p>
<p>It can mean that we should keep things in the open, no secrets or that our doings are audited and we can back-trace them every time we need or want to. In other words, saying that there is not enough transparency means that there is not enough trust. Sometimes the word transparency is used masking the desire to know what is going on.<a href="http://www.jussimononen.info/wp-content/uploads/2011/11/transparency.jpg"><img class="alignright size-thumbnail wp-image-487" title="transparency" src="http://www.jussimononen.info/wp-content/uploads/2011/11/transparency-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>Demanding more transparency smells a lot like green-washed management. Instead of saying &#8220;Keep me posted on whatever you do!&#8221;, require transparency. I say it is just a management intent in a disguise!</p>
<p>Thus transparency is attached with a bad echo. Especially if the people involved are not co-located or there are no clear backlogs for work. The person demanding transparency wants to gain assurance that everything is going as planned. This leads to micromanagement and reporting.</p>
<p>In other words, there is not enough trust.</p>
<p>Sometimes the word &#8216;transparency&#8217; is used to replace the word visibility though. Using it this way is in my opinion harmful because it is very easy to confuse with the previously mentioned management-loaded term. Avoid it.</p>
<p>There are at least two ways out of these situations. One is to increase the visibility, especially if people are co-located, to increase communication. The other way is to build up the trust. Trust that the other party is doing her best.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/11/02/demanding-transparency/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>I will be speaking at Tampere Goes Agile 2011!</title>
		<link>http://www.jussimononen.info/2011/06/29/i-will-be-speaking-at-tampere-goes-agile-2011/</link>
		<comments>http://www.jussimononen.info/2011/06/29/i-will-be-speaking-at-tampere-goes-agile-2011/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 08:45:10 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=479</guid>
		<description><![CDATA[Wow! :) I&#8217;d like give huge thanks to the organising posse for trusting me with a slot! This will be the first time for me to speak in a conference. It&#8217;s quite funny since I have participated in exactly one conference, the one that I was organizing. My presentation is still very much in its [...]]]></description>
			<content:encoded><![CDATA[<p>Wow! :)<a href="http://www.jussimononen.info/wp-content/uploads/2011/06/fluffy_flower.jpg"><img class="alignright size-thumbnail wp-image-480" title="fluffy flowers..." src="http://www.jussimononen.info/wp-content/uploads/2011/06/fluffy_flower-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>I&#8217;d like give huge thanks to the <a href="http://tamperegoesagile.fi/about/organizers/">organising</a> posse for trusting me with a slot! This will be the first time for me to speak in a conference. It&#8217;s quite funny since I have participated in exactly one conference, <a href="http://www.scan-agile.org/">the one that I was organizing</a>.</p>
<p>My presentation is still very much in its infancy, but the topic is quite clear. I will be speaking about software craftsmanship. It&#8217;s very important topic for me and I want to share my ideas what it means in practice and what are its consequences. It will be a 45 minute presentation so I will have or should have enough time to consider the topic from multiple angles.</p>
<p>The conference main site is <a href="http://tamperegoesagile.fi/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/06/29/i-will-be-speaking-at-tampere-goes-agile-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying to see the big picture with Kanban</title>
		<link>http://www.jussimononen.info/2011/05/24/trying-to-see-the-big-picture-with-kanban/</link>
		<comments>http://www.jussimononen.info/2011/05/24/trying-to-see-the-big-picture-with-kanban/#comments</comments>
		<pubDate>Tue, 24 May 2011 19:19:26 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[kanban]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[estimation]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[wip]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=454</guid>
		<description><![CDATA[Awesome start at work! I&#8217;m in a team of four very experienced and smart people, we have a product owner who is tech-savvy, knows what he wants and sits in our team room! On top of that we have an excellent room where single every wall is covered with material that you can pin stuff [...]]]></description>
			<content:encoded><![CDATA[<p>Awesome start at work!</p>
<p>I&#8217;m in a team of four very experienced and smart people, we have a product owner who is tech-savvy, knows what he wants and sits <strong>in</strong> our team room! On top of that we have an excellent room where single every wall is covered with material that you can pin stuff into. We have been given control over our tools and we are given a lot of trust (which is as it should be ;) ). We agreed to start with kanban as our development process and that made me extremely glad since I haven&#8217;t been able participate in a real kanban project yet!</p>
<p><a href="http://www.jussimononen.info/wp-content/uploads/2011/05/swimlanes.jpg"><img class="alignright size-thumbnail wp-image-459" title="swimlanes" src="http://www.jussimononen.info/wp-content/uploads/2011/05/swimlanes-150x150.jpg" alt="" width="150" height="150" /></a>We are now roughly two weeks into our green-field project. We started out with a simple three swim lane kanban-board where one swim lane is for product backlog stories, one lane for team stuff (environment, tooling, etc.) and one lane for the PO. Almost all work flow states have a WIP limit of 2, one has a limit of 4. At any time only two user stories can be under work. your basic kanban stuff.</p>
<p>We have the categorised the product backlog stories and pinned them on the wall. They form a vague big cloud, a chunk of things, that we are supposed to make. And this chunk is annoying since it does not provide a <em>coherent vision</em>, <em>idea</em> or <em>goal</em> for the team. Well, of course the goal is make the <em>whole product</em>, but that doesn&#8217;t really help in daily work. The team needs a short-term goal and a vision to support its work. The vision could be described as an <em>epic</em>, a <em>collection</em> of stories. Simply put, we need to know where to aim at on a shorter time interval. Our initial kanban board didn&#8217;t give this vision but our PO had already defined it and written it down on one of our whiteboards. So it was there for us but it wasn&#8217;t part of our kanban board. How could we incorporate it with our board?</p>
<p>I devised a kind of a funnel, a new stage if you will. Epics are pulled from the Big Cloud and placed into a funnel. It will be the teams goal and provide a clear path for us to work with. The contents of an epic are coherent and we can easily see, for example,  interdependencies between stories. It is also extremely useful when we manage to get some data about our lead time to help us estimate when a certain product increment is ready. This can then be conveyed to the stakeholders and business people. We can estimate and tell them when to expect a set of features instead of the whole product or just a single story.</p>
<p>To put it short, we now have three stages in our kanban wall. From the backlog cloud the PO can envision an epic for the team that will guide us to the next composition of increments. From the epic stage we pull stories to the kanban board for the teams daily work.</p>
<p>To some of you this may feel like we are aspiring for things that Scrum gives you out of the box. Well, we are but rather than restricting us with Scrum we are doing things that we feel benefit us and our stakeholders. We have retrospectives, we are going to show (or demo) what we have achieved and we are going to estimate the big chunk of stories. But we do an activity only if it will bring value. For example, if there is no value in estimating the backlog, we won&#8217;t do it. But we are going to try things that are deemed valuable either by the team or the stakeholders. And remember that the epic <strong>can be withdrawn</strong> at any time as it is not taken under work, we still do work only on story level!</p>
<p>I am eagerly waiting how the process will evolve and what is the direction it will evolve?</p>
<p><span style="color: #c0c0c0;">(picture by </span><a href="http://www.flickr.com/photos/cantoni/"><span style="color: #c0c0c0;">cantoni</span></a><span style="color: #c0c0c0;">)</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/05/24/trying-to-see-the-big-picture-with-kanban/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My new job &#8211; first two days</title>
		<link>http://www.jussimononen.info/2011/05/03/my-new-job-first-two-days/</link>
		<comments>http://www.jussimononen.info/2011/05/03/my-new-job-first-two-days/#comments</comments>
		<pubDate>Tue, 03 May 2011 20:31:24 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[Career]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Colleagues]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Lenovo w510]]></category>
		<category><![CDATA[nitor creations]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=446</guid>
		<description><![CDATA[Lovin&#8217; it already. And today was my second day at Nitor Creations. I got a new laptop (Lenovo W510/12GB mem, i7 quad-core!) with win7. Well, I have very little knowledge  how to work effectively with windows so the inevitable happened and Kubuntu 11.04 &#160; &#160; &#160; stole the boot sector. Some issues with stability though, [...]]]></description>
			<content:encoded><![CDATA[<p>Lovin&#8217; it already. And today was my second day at <a title="Nitor Creations" href="http://nitorcreations.com/" target="_blank">Nitor Creations</a>. I got a new laptop (Lenovo W510/12GB mem, i7 quad-core!) with win7. Well, I have very little knowledge  how to work effectively with windows so the inevitable happened and <a href="http://www.kubuntu.org/" target="_blank">Kubuntu 11.04</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://www.jussimononen.info/wp-content/uploads/2011/05/kubuntu-logo-lucid.png"><img class="size-full wp-image-450 aligncenter" title="kubuntu-logo-lucid" src="http://www.jussimononen.info/wp-content/uploads/2011/05/kubuntu-logo-lucid.png" alt="" width="400" height="78" /></a></p>
<p>&nbsp;</p>
<p>stole the boot sector. Some issues with stability though, most likely due to NVidia drivers, which were at least partly solved by installing nvidia-current and running nvidia-xconfig and nvidia-settings as root. So far this has been the best work setup I&#8217;ve ever had, plenty of memory and CPU power, the OS I want and no prohibiting policies or idiotic restrictions. Just the way it should be. Anyway, had to make some loops to get <a href="http://www.omgubuntu.co.uk/2010/01/how-to-install-adobe-air-on-ubuntu-64bit-2/">Adobe AIR installed</a> so that I could install Tweetdeck (sigh.). Skype was fortunately a painless installation.</p>
<p>Albeit slightly annoying, the tech issues are become fun in the end and after some struggles it was a joy to join again the Nitor irc-channels. So many like-minded geeks there (I was at the office, others were at the customer sites). And immediately there was a  debate about mocks and unit test quality, just the way I like it. Smart people with different views, ideas and wide experience provides very fertile ground for tough discussions and a good place to test ones ideas. And a very supportive group it is. Everyone willing to help the new guy.</p>
<p>I think I&#8217;m gonna like this place a lot!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/05/03/my-new-job-first-two-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A New Job</title>
		<link>http://www.jussimononen.info/2011/04/06/a-new-job/</link>
		<comments>http://www.jussimononen.info/2011/04/06/a-new-job/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 19:18:41 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[nitor creations]]></category>
		<category><![CDATA[opportunity]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=435</guid>
		<description><![CDATA[Spring (duh! the season, not that friggin&#8217; ugly framework) has brought change. I got an irresistible offer, resigned and will be joining the ranks of Nitor Creations starting on the 2nd of May! Oh the joy! I will continue my language journey as soon as possible, but there are some administrative things to be taken [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nitorcreations.com"><img class="alignright size-full wp-image-439" title="Nitor Creations" src="http://www.jussimononen.info/wp-content/uploads/2011/04/nitor.png" alt="" width="155" height="100" /></a>Spring (duh! the <em>season</em>, not that friggin&#8217; ugly framework) has brought change. I got an irresistible offer, resigned and will be joining the ranks of Nitor Creations starting on the 2nd of May! <em>Oh the joy!</em> I will continue my language journey as soon as possible, but there are some administrative things to be taken care of, like getting a new laptop etc. Thus, my language journey will be delayed a little.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/04/06/a-new-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 languages &#8211; is now 7 languaes and one framework</title>
		<link>http://www.jussimononen.info/2011/03/27/7-languages-is-now-7-languaes-and-one-framework/</link>
		<comments>http://www.jussimononen.info/2011/03/27/7-languages-is-now-7-languaes-and-one-framework/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 08:32:10 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[7 languages]]></category>
		<category><![CDATA[Software Craftsmanship]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netty]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=431</guid>
		<description><![CDATA[Ok, I&#8217;m done with Ruby for a while. That little webapp I had in mind turned into an app that would require quite much javascript (jQuery, jQueryUI) with very small amount of Ruby code. I may have to come up with an idea for a command line tool written in Ruby to explore Ruby and [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I&#8217;m done with Ruby for a while. That little webapp I had in mind turned into an app that would require quite much javascript (<a href="http://jquery.com/">jQuery</a>, <a href="http://jqueryui.com/">jQueryUI</a>) with very small amount of Ruby code. I may have to come up with an idea for a command line tool written in Ruby to explore Ruby and exercise my skills properly by removing all the cruft that comes with web apps.</p>
<p>Anyway, suddenly I found myself browsing the <a href="http://www.jboss.org/netty">Netty</a> documentation. I&#8217;ve always had a secret crush with IO so with a little free time in my hands it was a perfect opportunity to explore Netty. Thus, my journey to 7 languages was turned into 7 languages and one framework as I wrote a very crude chat command line application using Netty.</p>
<p>Netty provides very good documentation and the chat app was up and running in very short time. The biggest obstacle was actually generating an executable jar file with dependencies using maven. And even that was solved in less than 10 minutes. So, Netty seems to be an excellent asynchronous, event-driven network application framework. I hope that I could use it for some serious coding @ work!</p>
<p>Now that I&#8217;m derailing once again form my original plans, I may have to come up with more strict wip limits for my journey so that I can actually move forward into the direction I want to instead of jumping around everything that seems even remotely interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/03/27/7-languages-is-now-7-languaes-and-one-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 languages &#8211; Derailing with Ruby on Rails 3</title>
		<link>http://www.jussimononen.info/2011/03/13/7-languages-derailing-with-ror-3/</link>
		<comments>http://www.jussimononen.info/2011/03/13/7-languages-derailing-with-ror-3/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 23:20:13 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[7 languages]]></category>
		<category><![CDATA[Software Craftsmanship]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails 3]]></category>
		<category><![CDATA[WebApp]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=420</guid>
		<description><![CDATA[I was supposed to continue my 7 languages journey, but I didn&#8217;t get Io installed as fast as I had been hoping for. I&#8217;ve seen too many C compiler errors in my life that I felt slightly annoyed that the tool chain for Io compilation requires some effort and new tools have to be installed [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="RoR3" src="http://rubyonrails.org/images/rails.png" alt="" width="87" height="111" />I was supposed to continue my 7 languages journey, but I didn&#8217;t get <a href="http://www.iolanguage.com/">Io</a> installed as fast as I had been hoping for. I&#8217;ve seen too many C compiler errors in my life that I felt slightly annoyed that the tool chain for Io compilation requires some effort and new tools have to be installed to my dear Kubuntu. So, in a moment of flux, I actually installed <a href="http://rubyonrails.org/">Ruby on Rails 3</a>.</p>
<p>There was something about Ruby that intrigues me so I convinced myself that I must do something with it. And the easiest and maybe obvious choice was Ruby on Rails and a web application. I&#8217;ve heard that it does amazing things to developer productivity so I might as well give it a shot. Now, I&#8217;ve had an idea for sometime about a very simple browser based utility which I actually might try to implement now with RoR.</p>
<p>Of course I will enhance my <a href="http://code.google.com/p/robotframework/">Robot Framework</a> skills by trying do this web app in true ATDD style. Starting with one user story, writing a Robot test for it, running the Robot test and seeing it fail and only then starting to think how on earth am I going to implement this thing with Ruby and more specifically how do implement it doing TDD with Ruby (or should I try <a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development">BDD</a> with <a href="http://rspec.info/">RSpec</a>)?</p>
<p>I will get back on track with Io as soon as I find the strength in me to spoonfeed the compiler and to satisfy the linker&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/03/13/7-languages-derailing-with-ror-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 Languages &#8211; Ruby pt.3</title>
		<link>http://www.jussimononen.info/2011/03/02/7-languages-ruby-pt-3/</link>
		<comments>http://www.jussimononen.info/2011/03/02/7-languages-ruby-pt-3/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 11:46:43 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[7 languages]]></category>
		<category><![CDATA[Software Craftsmanship]]></category>
		<category><![CDATA[Dispatch tables]]></category>
		<category><![CDATA[Mixin]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=413</guid>
		<description><![CDATA[I have now waded through the Ruby chapters and exercises of the 7lang7weeks -book. A sparkle has been lit I must say. Ruby does seem to be a very productive programming language, ideal for quick development, prototypes and for situations where time-to-market is essential. Just like Perl. Although I would not compare these two languages [...]]]></description>
			<content:encoded><![CDATA[<p>I have now waded through the Ruby chapters and exercises of the <a href="http://pragprog.com/titles/btlang/seven-languages-in-seven-weeks">7lang7weeks</a> -book. A sparkle has been lit I must say. Ruby does seem to be a very productive programming language, ideal for quick development, prototypes and for situations where time-to-market is essential. Just like Perl. Although I would not compare these two languages as they belong to somewhat different problem domains. They are similar in many good ways.</p>
<p>I found <code><a href="http://stdlib.rubyonrails.org/libdoc/pp/rdoc/index.html">pp</a></code>, a pretty printer for Ruby data structures, lot in vein of Perl&#8217;s <a href="http://search.cpan.org/~smueller/Data-Dumper-2.128/Dumper.pm">Data::Dumper</a>. It is not as good at first glance but my experience with is still in its infancy.</p>
<p>The idea of open classes is marvelous although it requires some discipline from the developer since dynamic typing allows the usage of methods and functionality that might be defined somewhere else. The compiler really can&#8217;t know it yet. Improper usage will result in run-time errors. This is one of the major drawbacks of ducktyping. It gives you freedom but with that freedom comes responsibility. Don&#8217;t ignore it.</p>
<p>I fiddled a little with modules, mixing functionality into other classes. This is one of the experiments</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">module</span> Tweetify
  <span style="color:#9966CC; font-weight:bold;">def</span> tweet<span style="color:#006600; font-weight:bold;">&#40;</span>str<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;[Tweet!] &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> str
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> Speaker
  <span style="color:#9966CC; font-weight:bold;">include</span> Tweetify
  attr_accessor <span style="color:#ff3333; font-weight:bold;">:voice</span>, <span style="color:#ff3333; font-weight:bold;">:s</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> initialize<span style="color:#006600; font-weight:bold;">&#40;</span>voice<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@voice</span> = voice
    <span style="color:#0066ff; font-weight:bold;">@s</span> = <span style="color:#006600; font-weight:bold;">&#123;</span>
      <span style="color:#996600;">'loud'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>str<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">puts</span> str.<span style="color:#9900CC;">upcase</span>! <span style="color:#006600; font-weight:bold;">&#125;</span>,
      <span style="color:#996600;">'low'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>str<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;[shhh!] &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> str.<span style="color:#9900CC;">downcase</span>! <span style="color:#006600; font-weight:bold;">&#125;</span>,
      <span style="color:#996600;">'default'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>str<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">puts</span> str <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#006600; font-weight:bold;">&#125;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> speak<span style="color:#006600; font-weight:bold;">&#40;</span>what<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@s</span><span style="color:#006600; font-weight:bold;">&#91;</span>@voice<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">call</span><span style="color:#006600; font-weight:bold;">&#40;</span>what<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
s = Speaker.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;loud&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
s.<span style="color:#9900CC;">tweet</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;twit twit&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
s.<span style="color:#9900CC;">speak</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;am I yelling?&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
s.<span style="color:#9900CC;">voice</span> = <span style="color:#996600;">&quot;low&quot;</span>
s.<span style="color:#9900CC;">speak</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;I SHOULD BE WHISPERING NOW&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>I learned through a struggle that instance variables must be initialized within a method, otherwise their content is lost. Or I just don&#8217;t know the intricacies of  Ruby well enough. Overall the books Ruby exercises are good. Exercises touch the parts that Ruby is good at. Something more difficult could be useful and something to be done from the scratch instead of extending the books code snippets.</p>
<p>Now it is time to move forward to the next language (<a href="http://www.iolanguage.com/">io</a>!) but I would love to stay with Ruby a little longer. I just may have to find something for my own pleasure. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/03/02/7-languages-ruby-pt-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 Languages &#8211; Ruby pt. 2</title>
		<link>http://www.jussimononen.info/2011/03/01/7-languages-ruby-pt-2/</link>
		<comments>http://www.jussimononen.info/2011/03/01/7-languages-ruby-pt-2/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 22:58:30 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[7 languages]]></category>
		<category><![CDATA[Software Craftsmanship]]></category>
		<category><![CDATA[lambda]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=391</guid>
		<description><![CDATA[Ruby gives you lots of leeway. I&#8217;m almost tempted to say that there is more than one way to do it, but I would rather assume that it is a property of dynamically typed languages which have very flexible hash and array structures and multitude of built-in functionality to deal with them. Code blocks, that [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby gives you lots of leeway. I&#8217;m almost tempted to say that <a href="http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it">there is more than one way to do it</a>, but I would rather assume that it is a property of dynamically typed languages which have very flexible hash and array structures and multitude of built-in functionality to deal with them.</p>
<p>Code blocks, that is <a href="http://fi.wikipedia.org/wiki/Lambda">lambda</a>&#8216;s, are something that every language should have. It enables composition of functionalities and reduces code bloat. Let&#8217;s see a simple example of &#8216;grep&#8217; command line utility.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> ARGV.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#006666;">2</span> <span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;usage: grep &lt;expression&gt; &lt;files&gt;&quot;</span>
  <span style="color:#CC0066; font-weight:bold;">exit</span> <span style="color:#006666;">1</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
regex = <span style="color:#CC00FF; font-weight:bold;">Regexp</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>ARGV.<span style="color:#9900CC;">shift</span><span style="color:#006600; font-weight:bold;">&#41;</span>
ARGV.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>inFile<span style="color:#006600; font-weight:bold;">|</span>
  f = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>inFile<span style="color:#006600; font-weight:bold;">&#41;</span>
  f.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>line<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#9966CC; font-weight:bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> line =~ regex <span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;[#{inFile}:#{f.lineno}] #{line}&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>It is not the prettiest piece of Ruby but it works. In this &#8216;grep&#8217; utility code blocks are used to perform functionality upon iterable elements. Lambda&#8217;s enable some cool features like dispatch tables (bye-bye if-else clauses). Simply choose what you want to do:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">m = <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#ff3333; font-weight:bold;">:write</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>input<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Wrote: #{input}&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>,
  <span style="color:#ff3333; font-weight:bold;">:times_two</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>i<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Doubled: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#006600; font-weight:bold;">&#40;</span>i<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">to_s</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
m<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:write</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">call</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;foo&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
m<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:times_two</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">call</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>This is in my opinion pretty cool, although there is some syntactical cruft. The same in Perl would be (with magical characters too)</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #339933;">%</span><span style="color: #000066;">m</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>
  <span style="color: #000066;">write</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;wrote: @_<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  times_two <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Doubled: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">2</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$m</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">write</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;foo&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$m</span><span style="color: #009900;">&#123;</span>times_two<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Well, too many magical characters for real readability (there are ways around them, albeit a bit more verbose), but the programmer performance is awesome.</p>
<p>Then the &#8216;<em>duck typing</em>&#8216;, ultimate source of funky defects. Compiler warnings are most of the time good, but for a beginner overcoming the syntactical issues is sometimes just trial-and-error. Fortunately the internet is full of good Ruby-sites and the community altogether seems very vibrant and alive.</p>
<p>Consider this piece of code</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'pp'</span>
&nbsp;
h_of_a = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">'parent_key'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>
    <span style="color:#996600;">'key_level_2'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>
      <span style="color:#996600;">'key_level_3'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#006600; font-weight:bold;">&#125;</span>,
    <span style="color:#996600;">'key_level_2_2'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>
      <span style="color:#996600;">'key_level_3_2'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#006600; font-weight:bold;">&#125;</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#pp h_of_a</span>
&nbsp;
h_of_a.<span style="color:#9900CC;">keys</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span> key <span style="color:#006600; font-weight:bold;">|</span>
  h_of_a<span style="color:#006600; font-weight:bold;">&#91;</span>key<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span> i <span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;h_of_a.keys.each key type: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> i.<span style="color:#9966CC; font-weight:bold;">class</span>.<span style="color:#9900CC;">to_s</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
h_of_a.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>key, value<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;h_of_a.each value type: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> value.<span style="color:#9966CC; font-weight:bold;">class</span>.<span style="color:#9900CC;">to_s</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
h_of_a.<span style="color:#9900CC;">each_value</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>value<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;val #{value}&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>This prints out the following:</p>
<pre>h_of_a.keys.each key type: Array
h_of_a.keys.each key type: Array
h_of_a.each value type: Hash
val key_level_2key_level_3key_level_2_2key_level_3_2</pre>
<p>Just forget the second argument (value) for the lambda or iterate over it a little bit differently and you can find yourself bitten by duck typing as the variable type is not what you expect it to be. Can be confusing but seems to be something to learn. The amount of methods available is a bit overwhelming.</p>
<p>Ruby has managed to arouse my interest and I&#8217;m waiting eagerly to get my hands real dirty with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/03/01/7-languages-ruby-pt-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 Languages &#8211; Ruby</title>
		<link>http://www.jussimononen.info/2011/02/25/7-languages-ruby/</link>
		<comments>http://www.jussimononen.info/2011/02/25/7-languages-ruby/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 20:30:01 +0000</pubDate>
		<dc:creator>Jussi Mononen</dc:creator>
				<category><![CDATA[7 languages]]></category>
		<category><![CDATA[Software Craftsmanship]]></category>
		<category><![CDATA[Improvement]]></category>
		<category><![CDATA[JAPH]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.jussimononen.info/?p=382</guid>
		<description><![CDATA[Not long ago I bought Seven Languages in Seven Weeks from the Pragmatic Bookshelf (electronic, of course ;-) with the sole aim of learning new languages I can then exploit to produce code in myriad forms and shapes. I asked in Twitter for recommendations of books that a geeky developer like me should read and [...]]]></description>
			<content:encoded><![CDATA[<p>Not long ago I bought <a href="http://pragprog.com/titles/btlang/seven-languages-in-seven-weeks">Seven Languages in Seven Weeks</a> from the <a href="http://pragprog.com/">Pragmatic Bookshelf</a> (electronic, of course ;-) with the sole aim of learning new languages I can then exploit to produce code in myriad forms and shapes. I asked in Twitter for recommendations of books that a geeky developer like me should read and this book was on top pf the list. So, it was time to use my credit card and receive my purchase immediately, the benefit of ebooks.</p>
<p>I was convinced at the first glance that this book can give me insight into different languages and provide me with the crucial information what are the strengths of a certain language, what is the language strong at. I discussed this book with my colleagues and generated more income to Pragmatic as they went and bought the book. Wonderful to see people getting enthusiastic.</p>
<p>Anyway, the book starts with <a href="http://www.ruby-lang.org/en/">Ruby</a> which is why I am writing this. I am planning to write a series of blog posts depicting my journey through this book and its languages.</p>
<p>As a <a href="http://en.wikipedia.org/wiki/Just_another_Perl_hacker">JAPH</a> I loved the concise way you program with Ruby. The syntactic sugars, the arrays and hashes. Mixin&#8217;s are an absolutely fabulous concept and the fact the Ruby is purely OO language just adds to the positive side. Duck typing can cause some very nasty defects when it goes awry but with <a href="http://rspec.info/">RSpecs</a> and/or TDD approach these pitfalls are easily avoidable.</p>
<p>The first contact with Ruby was very pleasant, I felt immediately at home. The friendship has just begun but I am sure that I will not forget Ruby soon. It has so many bright sides to look at.</p>
<p><em>Stay tuned. I will continue this series. These blog posts will cover my journey through the land of learning.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jussimononen.info/2011/02/25/7-languages-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

