<?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>Leandro Moreira</title>
	<atom:link href="http://leandromoreira.com.br/feed/" rel="self" type="application/rss+xml" />
	<link>http://leandromoreira.com.br</link>
	<description>Archsofty - Software development</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:39:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='leandromoreira.com.br' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Leandro Moreira</title>
		<link>http://leandromoreira.com.br</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://leandromoreira.com.br/osd.xml" title="Leandro Moreira" />
	<atom:link rel='hub' href='http://leandromoreira.com.br/?pushpress=hub'/>
		<item>
		<title>Will we only create and use dynamic languages in the future?</title>
		<link>http://leandromoreira.com.br/2012/01/07/dynamic-languages-the-future/</link>
		<comments>http://leandromoreira.com.br/2012/01/07/dynamic-languages-the-future/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 15:45:28 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[clojure]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[object-oriented programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=326</guid>
		<description><![CDATA[Since I&#8217;ve playing with some dynamic languages (Ruby and Clojure), I have been thinking about why would anybody create a new static typed language?! And I didn&#8217;t get the answer. I started programming in Visual Basic and I taste its roots, which are almost all full of procedure commands (bunch of do, goto and end), [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=326&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" title="dynamic vs static" src="http://www.220-electronics.com/Transformers/trans/dynamic_design_voltage_converter.jpg" alt="" width="262" height="196" />Since I&#8217;ve playing with some dynamic languages (<a title="ruby" href="http://leandromoreira.com.br/category/ruby/" target="_blank">Ruby</a> and <a title="clojure" href="http://leandromoreira.com.br/category/clojure/" target="_blank">Clojure</a>), I have been thinking about why would anybody create a new static typed language?! And I didn&#8217;t get the answer.</p>
<p style="text-align:justify;">I started programming in Visual Basic and I taste its roots, which are almost all full of procedure commands (bunch of <strong>do</strong>, <strong>goto</strong> and <strong>end</strong>), then I moved to C#, sharper it changes the <strong>end&#8217;s</strong> for <strong>}&#8217;s</strong> and give us a little more power based on some premises: we can<strong> treat two different things in the same way</strong>, <em>polymorphism</em>. The last static language, but not the least, I used (and I use it) Java, abusing of his new way of treating a set of things equality, the <a title="java interface" href="http://docs.oracle.com/javase/tutorial/java/concepts/interface.html" target="_blank">interfaces</a> and using its &#8220;powers&#8221; on <a title="Java reflect" href="http://docs.oracle.com/javase/tutorial/reflect/" target="_blank">reflections</a>.</p>
<p style="text-align:justify;">Although when I started to use Ruby I saw that I could treat a group of things equality without doing any extra work. I still need to code models and composed types, even though we can create or change them dynamically using &#8220;real power&#8221; of metaprogramming.</p>
<p style="text-align:justify;">When I start to study and apply the Clojure and its principles, my first reaction was the rejection, <strong>how can I go on without my formal objects</strong>, how can I design software without a model in the head and so on. I wasn&#8217;t thinking about how actually I do software, currently I use <strong>TDD to design</strong> software and I don&#8217;t think what models I need to have, I do think in terms of &#8220;what I want&#8221;. At minimum, Clojure make me think about, do we really need object to design software?! .  A three days ago I saw an amazing video about similar thoughts: <a title="thoughts on ruby after clojure" href="http://vimeo.com/34522837" target="_blank">Some thoughts on Ruby after 18 months of Clojure</a>.</p>
<p style="text-align:justify;">Summarising: With my <strong>limited knowledge of theses languages</strong>, let&#8217;s suppose we use a function (which we don&#8217;t have source code) and we want to do something before that function is executed (intercept) using: VB I&#8217;ll need to check every single piece of code which we call this function and call another one, in Java we can use a AOP framework, in Ruby we can use the spells of metaprogramming. It seems that some frameworks, patterns and extra work aren&#8217;t needed more because of this dynamic language evolution.</p>
<p>My conclusions using dynamic languages (Clojure/Ruby) for now it&#8217;s: I write less code and reuse them more easy, so I don&#8217;t see any reason to create/use a new static typed language, would you see any motivation to do that?</p>
<p style="text-align:justify;">PS: When I use C# (.Net Framework 1.3 &#8211; 2.0) it was not so super cool as today.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/326/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=326&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2012/01/07/dynamic-languages-the-future/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://www.220-electronics.com/Transformers/trans/dynamic_design_voltage_converter.jpg" medium="image">
			<media:title type="html">dynamic vs static</media:title>
		</media:content>
	</item>
		<item>
		<title>Clojure resources</title>
		<link>http://leandromoreira.com.br/2011/11/29/clojure-resources/</link>
		<comments>http://leandromoreira.com.br/2011/11/29/clojure-resources/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 01:50:59 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[clojure]]></category>
		<category><![CDATA[distributed systems]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[leiningen]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://archsofty.wordpress.com/?p=312</guid>
		<description><![CDATA[Always that I start to learn a new language, I promise to keep the best resources links I found, but it never works. This post suppose to be updated often. Any broken link or suggestion, just comment and I&#8217;ll try to fix, add or remove it. Links, tutorials, guides, documentations, screencasts and etc. Clojure official [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=312&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Always that I start to learn a new language, I promise to keep the best resources links I found, but it never works. This post suppose to be updated often. Any broken link or suggestion, just comment and I&#8217;ll try to fix, add or remove it.</p>
<p><strong>Links, tutorials, guides, documentations, screencasts and etc.</strong></p>
<ol>
<li><a title="Clojure" href="http://clojure.org/" target="_blank">Clojure official site</a></li>
<li><a title="Installing clojure and clojure-contrib" href="http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html" target="_blank">Installing Clojure, clojure-contrib and setup EMACS.</a></li>
<li><a href="http://writequit.org/blog/?p=386" target="_blank">VIM for Clojure</a></li>
<li><a title="Clojure Quick start with examples" href="http://en.wikibooks.org/wiki/Clojure_Programming/By_Example" target="_blank">Quick-start with examples</a></li>
<li><a title="Clojure introduction" href="http://www.youtube.com/watch?v=Aoeav_T1ARU" target="_blank">VIDEO &#8211; Great short introduction videos for Clojure!</a></li>
<li><a title="Introduction to logic programming with Clojure" href="http://blip.tv/clojure/ambrose-bonnaire-sergeant-introduction-to-logic-programming-with-clojure-5936196" target="_blank">VIDEO &#8211; Introduction to logic programming with Clojure</a></li>
<li><a title="Clojure for Java programmers" href="http://blip.tv/clojure/clojure-for-java-programmers-1-of-2-989128" target="_blank">VIDEO &#8211; Clojure for Java Programmers 1 of 2</a></li>
<li><a href="http://www.youtube.com/watch?v=zmYqShvVDh4" target="_blank">VIDEO &#8211; Functional programming by UCBerkeley </a></li>
<li><a title="Video tutorial clojure concurrency" href="http://www.pluralsight-training.net/microsoft/courses/TableOfContents?courseName=clojure-concurrency-tutorial" target="_blank">VIDEO &#8211; Great tutorial for Clojure focused on concurrency</a></li>
<li><a title="clojure online" href="http://tryclj.com/" target="_blank">Try code clojure online</a></li>
<li><a title="Tutorial for Leiningen" href="https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md" target="_blank">Leiningen tutorial for beginners</a></li>
<li><a title="Midje" href="https://github.com/marick/Midje" target="_blank">Midje &#8211; A test framework for Clojure</a></li>
<li><a title="Repository for clojure libraries" href="http://clojars.org/" target="_blank">Clojars &#8211; Community repository for open source clojure libraries</a></li>
</ol>
<p><strong>Books</strong></p>
<p style="text-align:center;"><a href="http://pragprog.com/book/shcloj2/programming-clojure"><img class="aligncenter" title="Programming clojure" src="http://ecx.images-amazon.com/images/I/41ZqifDCnIL._SL500_AA300_.jpg" alt="" width="216" height="216" /></a></p>
<p style="text-align:center;"><a href="http://www.amazon.com/Joy-Clojure-Thinking-Way/dp/1935182641/ref=sr_1_1?ie=UTF8&amp;qid=1322617222&amp;sr=8-1"><img class="aligncenter" title="The joy of Clojure" src="http://ecx.images-amazon.com/images/I/51LKOYzkfWL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg" alt="" width="232" height="232" /></a><a href="http://www.amazon.com/Clojure-Action-Amit-Rathore/dp/1935182595/ref=sr_1_1?ie=UTF8&amp;qid=1322760770&amp;sr=8-1"><img class="aligncenter" title="Clojure in Action" src="http://ecx.images-amazon.com/images/I/4105H6DAMML._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg" alt="" width="244" height="244" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=312&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/11/29/clojure-resources/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://ecx.images-amazon.com/images/I/41ZqifDCnIL._SL500_AA300_.jpg" medium="image">
			<media:title type="html">Programming clojure</media:title>
		</media:content>

		<media:content url="http://ecx.images-amazon.com/images/I/51LKOYzkfWL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg" medium="image">
			<media:title type="html">The joy of Clojure</media:title>
		</media:content>

		<media:content url="http://ecx.images-amazon.com/images/I/4105H6DAMML._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg" medium="image">
			<media:title type="html">Clojure in Action</media:title>
		</media:content>
	</item>
		<item>
		<title>Functional programming with Clojure</title>
		<link>http://leandromoreira.com.br/2011/11/27/functional-programming-clojure/</link>
		<comments>http://leandromoreira.com.br/2011/11/27/functional-programming-clojure/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 13:52:14 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[clojure]]></category>
		<category><![CDATA[distributed systems]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[high scalability]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=298</guid>
		<description><![CDATA[Clojure I&#8217;ve been studying the new language called Clojure (all the cool kids are talking about Clojure). It is a functional language created by Rich Hickey around 2007. This is a(nother) dialect of Lisp. It is a dynamic language as Ruby, JavaScript and others. As said before Clojure (pronounced as closure) it&#8217;s a impure functional [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=298&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><img class="alignleft" title="Clojure log" src="http://clojure.org/file/view/clojure-icon.gif" alt="" width="100" height="100" />Clojure</h2>
<p style="text-align:justify;">I&#8217;ve been studying the new language called <a title="Clojure official website" href="http://clojure.org/" target="_blank">Clojure</a> (all the cool kids are talking about Clojure). It is a functional language created by <a title="Rich Hickey" href="http://en.wikipedia.org/wiki/Rich_Hickey" target="_blank">Rich Hickey</a> around 2007. This is a(nother) <strong>dialect of <a title="Lisp wikipedia" href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29" target="_blank">Lisp</a></strong>. It is a <strong>dynamic language</strong> as Ruby, JavaScript and others. As said before Clojure (pronounced as closure) it&#8217;s a <strong>impure</strong> <strong>functional language</strong> in contrast with <a title="Haskell official site" href="http://haskell.org/haskellwiki/Haskell" target="_blank">Haskell</a>, a pure functional language. It runs over the <strong>JVM</strong>, so it&#8217;s fast, interoperable with Java among a lots of good stuffs that JVM give us. To put hands-on and try code something you can use the <a title="try clojure online" href="http://tryclj.com/" target="_blank">try Clojure online</a> or you can <a href="http://clojure.org/downloads" target="_blank">download the clojure.jar</a> file and run it. Surprisingly Clojure it&#8217;s easy to learn.</p>
<p><pre class="brush: bash;">

java -jar clojure-x.x.x.jar

</pre></p>
<h2>What it a functional language? (concepts)</h2>
<h2><img class="alignleft" title="math function" src="http://upload.wikimedia.org/wikipedia/en/math/3/0/0/30099d991418c43d72d29cc6bf15bd0a.png" alt="" width="188" height="29" /></h2>
<h2></h2>
<p><strong>first-order functions</strong> -&gt; functions are treated as values. You can store a function on a variable, you can pass one function to another or you can return a function from another function.</p>
<p><pre class="brush: jscript;">
var sum = function(a,b){
  return a + b;
};

var obj = function(sum){
  return {
    hello: &quot;hello&quot;,
    sum: sum
  };
}();

obj.sum(3,5);
</pre></p>
<p style="text-align:justify;"><strong>functions constructs</strong> -&gt; the language constructs are function instead of keyword. Constructions for conditions (if), for iterations (for, while), catch exceptions (try, catch) and others.</p>
<p><pre class="brush: clojure;">

(if condition do-it else-do-it)

</pre></p>
<p style="text-align:justify;"><strong>stateless</strong> -&gt; it&#8217;s functional in the sense of math, you have functions which defines values input and output and doesn&#8217;t rely on outside global state. In such pure function you won&#8217;t produce any <em>side-effect</em> (read, write outside resource). Obviously we will produce programs which causes side-effects, clojure helps you build &#8220;mutable&#8221; data . On other pure languages like Haskell side-effects are treated as expections so you have concepts like actors and monad.</p>
<p style="text-align:justify;"><strong>immutable data</strong> -&gt; collections and local variable, in clojure, are immutable. The immutability, helps us in parallelism, since the &#8220;values&#8221; are immutable you can shared then without worry about locks.</p>
<p style="text-align:justify;"><strong>currying</strong> -&gt; is the technique of transforming a function that takes multiple arguments (or an n-tuple of arguments) in such a way that it can be called as a chain of functions each with a single argument (partial application).</p>
<p style="text-align:justify;"><strong>memoization</strong> -&gt; is an optimization technique used primarily to <strong>speed up</strong> computer programs by having function calls avoid repeating the calculation of results for previously processed inputs.</p>
<h2 style="text-align:justify;">Resources</h2>
<ul>
<li style="text-align:justify;"><a href="http://clojure.org/" target="_blank">Official site</a></li>
<li style="text-align:justify;"><a href="http://en.wikibooks.org/wiki/Clojure_Programming" target="_blank">Great Wikibooks for Clojure</a></li>
<li style="text-align:justify;"><a title="clojure webcasts" href="http://blip.tv/clojure" target="_blank">Webcasts</a></li>
<li style="text-align:justify;"><a title="youtube clojure chanel" href="http://www.youtube.com/watch?v=D5kIq5dyb6o&amp;feature=autoplay&amp;list=PLAC43CFB134E85266&amp;lf=PlayList&amp;playnext=1" target="_blank">Youtube Clojure tutorials</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=298&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/11/27/functional-programming-clojure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://clojure.org/file/view/clojure-icon.gif" medium="image">
			<media:title type="html">Clojure log</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/en/math/3/0/0/30099d991418c43d72d29cc6bf15bd0a.png" medium="image">
			<media:title type="html">math function</media:title>
		</media:content>
	</item>
		<item>
		<title>Put the bricks together on gnu linux</title>
		<link>http://leandromoreira.com.br/2011/11/08/put-the-bricks-together-on-gnu-linux/</link>
		<comments>http://leandromoreira.com.br/2011/11/08/put-the-bricks-together-on-gnu-linux/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 17:01:04 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=283</guid>
		<description><![CDATA[Why Linux? It is easy, flexible, very secure, updated, &#8220;free&#8221;, open source&#8230; and the list goes on however what makes me more happy on this little world *unix it is its flexibility. The power Let start with a simple command, like ps, which can show you a list of current process and its details. Now, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=283&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3 style="text-align:justify;"><img class="alignleft" title="Lego image" src="http://images.businessweek.com/ss/06/11/1129_makingof_lego/image/intro.jpg" alt="" width="141" height="162" /><a title="Why linux" href="http://www.seul.org/docs/whylinux.html" target="_blank">Why Linux?</a></h3>
<p style="text-align:justify;">It is easy, <strong>flexible</strong>, very secure, updated, &#8220;free&#8221;, open source&#8230; and the list goes on however what makes me more happy on this little world *unix it is its flexibility.</p>
<h3 style="text-align:justify;">The power</h3>
<p style="text-align:justify;">Let start with a simple command, like <a title="unix ps command help" href="http://unixhelp.ed.ac.uk/CGI/man-cgi?ps" target="_blank">ps</a>, which can show you a list of current process and its details.</p>
<p><pre class="brush: bash;">
ps -aux
</pre></p>
<p style="text-align:justify;"><img class="aligncenter" title="unix command ps output" src="http://old.honeynet.org/scans/scan29/sol/aj/aj-scan29-02.gif" alt="" width="720" height="400" />Now, I would like to just shows the output lines which has <strong>usr</strong> on it. To do that I will use the output of <strong>ps -aux</strong> command as input to <a title="grep" href="unixhelp.ed.ac.uk/CGI/man-cgi?grep" target="_blank">grep</a> filter the data. On linux you can pass the output of a command to another by using a <a title="Linux Pipe" href="http://www.linuxjournal.com/article/2156" target="_blank">pipe</a>. So we can redirect the last output as input to another one.</p>
<p><pre class="brush: bash;">
ps -aux | grep usr
</pre></p>
<p style="text-align:justify;">Now we have the output from <strong>ps</strong> filtered by <strong>only lines which contains &#8216;usr&#8217;</strong>. But what if want <strong>only the process id&#8217;s</strong>. There is a program for that too, the <a title="unix help command cut" href="http://unixhelp.ed.ac.uk/CGI/man-cgi?cut" target="_blank">cut</a>.</p>
<p><pre class="brush: bash;">
ps -aux | grep usr | cut -d &quot; &quot; -f 8
</pre></p>
<p style="text-align:justify;">This program <strong>cut</strong> is simple creating <strong>fields</strong> (-f) <strong>delimited</strong> (-d) by a space (&#8221; &#8220;) and I ask the program to pick the field <strong>8</strong>, which is the process ids. But if you notice there is some lines without number. The next step is <strong>remove this lines without values</strong>. We can do it by using <a title="unix sed program" href="http://unixhelp.ed.ac.uk/CGI/man-cgi?sed" target="_blank">sed</a> program.</p>
<p><pre class="brush: bash;">
ps -aux | grep usr | cut -d &quot; &quot; -f 8 | sed '/^$/d'
</pre></p>
<p style="text-align:justify;">Now our output has only lines with numbers, sed program receives a simple <a title="regular expression" href="http://www.regular-expressions.info/" target="_blank">regex</a> and says <strong>d</strong>elete this pattern. Nice but I just need those numbers ending with 2. We can <strong>grep</strong> again.</p>
<p><pre class="brush: bash;">
ps -aux | grep usr | cut -d &quot; &quot; -f 8 | sed '/^$/d' | grep $2
</pre></p>
<p>I also want to sum all this numbers and show on the screen the result. To achieve that we are gonna use <a title="gnu linux awk" href="unixhelp.ed.ac.uk/CGI/man-cgi?awk" target="_blank">awk</a> program.</p>
<p><pre class="brush: bash;">
ps -aux | grep usr | cut -d &quot; &quot; -f 8 | sed '/^$/d' | grep $2 | awk '{ sum += $1; print &quot;+&quot; $1} END {print &quot;_____&quot; ; print sum}'
</pre></p>
<p>The first code (surrounded by brackets) will create a variable called sum and it also prints plus and each first argument passed to it. This first block will be called for every line we pass (processed by all the programs we did it) and it follows by END that will print a line and finally prints the sum of all this stuffs.</p>
<p><pre class="brush: bash;">
+1692
+1712
+1732
+1752
+1762
+1962
+2062
_____
12674
</pre></p>
<p style="text-align:justify;">You can use programs connect them produce output that only one program can not do. PS: I know I could too all this with less programs/commands but the intend here was not teach linux/GNU programs it was show you how powerful can be linux.</p>
<h3 style="text-align:justify;">Bonus round</h3>
<p style="text-align:justify;">You can put this output to a file just using the <a title="linux io redirection" href="http://www.tuxfiles.org/linuxhelp/iodirection.html" target="_blank">redirect to a file</a>. ( &gt; or &gt;&gt; to append)</p>
<p><pre class="brush: bash;">
ps -aux | grep usr | cut -d &quot; &quot; -f 8 | sed '/^$/d' | grep $2 | awk '{ sum += $1; print &quot;+&quot; $1} END {print &quot;_____&quot; ; print sum}' &gt; file.txt
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/283/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=283&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/11/08/put-the-bricks-together-on-gnu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://images.businessweek.com/ss/06/11/1129_makingof_lego/image/intro.jpg" medium="image">
			<media:title type="html">Lego image</media:title>
		</media:content>

		<media:content url="http://old.honeynet.org/scans/scan29/sol/aj/aj-scan29-02.gif" medium="image">
			<media:title type="html">unix command ps output</media:title>
		</media:content>
	</item>
		<item>
		<title>UX &#8211; Teach your users how to use properly your webthing</title>
		<link>http://leandromoreira.com.br/2011/11/05/ux-teach-your-users-how-to-use-properly-your-webthing/</link>
		<comments>http://leandromoreira.com.br/2011/11/05/ux-teach-your-users-how-to-use-properly-your-webthing/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 02:43:14 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=277</guid>
		<description><![CDATA[Very inspired by Modelo mental and this amazing video here. How Google taught me use it properly! I always use Google.com as a tool for an uncountable things! And I always use the advanced search, mainly for search only over the last week. This feature (I mean Advanced Search) used to be at the home [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=277&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Very inspired by <a title="Modelo mental" href="http://www.modelomental.com.br/" target="_blank">Modelo mental</a> and this amazing video here.</p>
<p style="text-align:justify;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='450' height='284' src='http://www.youtube.com/embed/8FpigqfcvlM?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<h2 style="text-align:justify;">How Google taught me use it properly!</h2>
<p style="text-align:center;">I always use Google.com as a tool for an uncountable things! And I always use the advanced search, mainly for search only over the last week. This feature (I mean <strong>Advanced Search</strong>) used to be at the home page.<br />
<img class="aligncenter" style="border-style:solid;border-width:1px;" title="google advanced search home page" src="http://michaelzimmer.org/images/Google%20search%20home.png" alt="" width="390" height="221" /></p>
<p style="text-align:center;">However right now, there is <strong>no such link on google home</strong> page. (or at least in my browser for the last weeks). But the google guys also <strong>used to put this feature link on the top&#8217;s search page</strong>, as the bellow image.<br />
<img class="aligncenter" style="border-style:solid;border-width:1px;" title="google advanced search on second page" src="http://mt-hacks.com/images/twitter-google-apple-event.png" alt="" width="417" height="280" /></p>
<p style="text-align:justify;">And now <strong>there is no this link there too</strong>, this feature link was moved to the lower part of result list page. That&#8217;s okay, at the first sigh I thought they could facing performance issues with more and more users using this kind of search. But man they are the Google.com they face and win perforamance challenges.</p>
<p style="text-align:justify;">What was really interesting about this place changing feature links, was I &#8220;discovery&#8221; that google already provide a side bar links to search only on last X age. I learn that looking for the advanced search. This is what I call the <strong>masterpiece of UX</strong>, I learn a new feature just by using it naturally.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=277&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/11/05/ux-teach-your-users-how-to-use-properly-your-webthing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://michaelzimmer.org/images/Google%20search%20home.png" medium="image">
			<media:title type="html">google advanced search home page</media:title>
		</media:content>

		<media:content url="http://mt-hacks.com/images/twitter-google-apple-event.png" medium="image">
			<media:title type="html">google advanced search on second page</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing JavaScript with Jasmine and Jessie and node.js</title>
		<link>http://leandromoreira.com.br/2011/08/22/testing-javascript-with-jasmine-and-jessie-and-node-js/</link>
		<comments>http://leandromoreira.com.br/2011/08/22/testing-javascript-with-jasmine-and-jessie-and-node-js/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 18:17:16 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[object-oriented programming]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=266</guid>
		<description><![CDATA[Javascript JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions. It is also considered a functional programming language like Scheme and OCaml because it has closures and supports higher-order functions. Cool language isn&#8217;t? A new feeling inside me tells me that everything (related to I.T.) I would like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=266&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 150px"><img class="  " title="Testing" src="http://www.tecnocem.com/image/battery-tester/digital-tester-55155.jpg" alt="Testing" width="140" height="140" /><p class="wp-caption-text">Testing JS, can you imagine?</p></div>
<h3>Javascript</h3>
<p style="text-align:justify;"><strong><a title="ECMAScript implementation" href="http://www.ecmascript.org/" target="_blank">JavaScript</a> is a prototype-based</strong>, object-oriented scripting language that is <strong>dynamic</strong>, weakly typed and has first-class functions. It is also considered a <strong>functional programming</strong> language like Scheme and OCaml because it <strong>has closures</strong> and supports higher-order functions. Cool language isn&#8217;t? A new feeling inside me tells me that everything (related to I.T.) I would like to learn I should start writing a tests. However I thought that JavaScript test was stucked on Alert windows and then I found out Jasmine framework.</p>
<h3>How could we write tests to JavaScript?</h3>
<p style="text-align:justify;">Using <a title="jasmine" href="http://pivotal.github.com/jasmine/" target="_blank">Jasmine</a> in a BDD style.</p>
<p><pre class="brush: jscript;">
describe(&quot;Jasmine&quot;, function() {
  it(&quot;makes testing JavaScript awesome!&quot;, function() {
    expect(yourCode).toBeLotsBetter();
  });
});
</pre></p>
<p style="text-align:justify;">To run it and get feedback you have some options whose I take two: <strong>seeing the html</strong> file on browser and <strong>seeing the terminal result</strong> as rspec way. We will do the second way. For that we will use: <a title="node.js" href="http://nodejs.org/" target="_blank">node.js</a>, <a title="NPM" href="http://npmjs.org/" target="_blank">npm</a> and <a title="jessie" href="https://github.com/futuresimple/jessie" target="_blank">jessie</a>.</p>
<p style="text-align:justify;"><span style="color:#333399;"><strong>node.js</strong></span> &#8211; <a title="Event driven model paper" href="http://www.scs.stanford.edu/~dm/home/papers/dabek:event.pdf" target="_blank">evented i/o</a> server (and also you can use it as an interpreter) for javascript vm (specifically v8)<br />
Installing node.js</p>
<p><pre class="brush: bash;">
git clone --depth 1 git://github.com/joyent/node.git
cd node
git checkout v0.4.11 #opt, note that master is unstable.
export JOBS=2 #opt, sets number of parallel commands.
mkdir ~/local
./configure --prefix=$HOME/local/node
make
make install
echo 'export PATH=$HOME/local/node/bin:$PATH' &gt;&gt; ~/.profile
echo 'export NODE_PATH=$HOME/local/node:$HOME/local/node/lib/node_modules' &gt;&gt; ~/.profile
source ~/.profile
</pre></p>
<p><span class="Apple-style-span" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;white-space:normal;"><span style="color:#333399;"><strong>npm</strong></span> &#8211; node package manager, as its own name suggest. You can use it to install and publish your node programs. It manages dependencies and does other cool stuff.<br />
Installing npm.</span></p>
<p><pre class="brush: bash;">
curl http://npmjs.org/install.sh | sh
</pre></p>
<p><span style="color:#333399;"><strong>jessie</strong></span> - Jessie is a Node runner for Jasmine. It was created to provide better reporting on failures, more modular design, easier creation of formatters and optional syntactic sugar.<br />
Installing jessie.</p>
<p><pre class="brush: bash;">
npm install jessie
</pre></p>
<p style="text-align:justify;">With all these binaries on your path you can just run your tests from terminal typing:</p>
<p><pre class="brush: bash;">
jessie folder_with_specs/ -f nested
</pre></p>
<p>In fact I&#8217;ve been using the gitub and jessie to <a title="javascript learning good parts source code" href="https://github.com/leandromoreira/js_learning" target="_blank">learn and apply javascript</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=266&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/08/22/testing-javascript-with-jasmine-and-jessie-and-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://www.tecnocem.com/image/battery-tester/digital-tester-55155.jpg" medium="image">
			<media:title type="html">Testing</media:title>
		</media:content>
	</item>
		<item>
		<title>RSpec and Watir to test web applications</title>
		<link>http://leandromoreira.com.br/2011/08/19/rspec-and-watir-to-test-web-applications/</link>
		<comments>http://leandromoreira.com.br/2011/08/19/rspec-and-watir-to-test-web-applications/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 15:52:09 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[tests]]></category>
		<category><![CDATA[watir]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=230</guid>
		<description><![CDATA[Software testing Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=230&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 172px"><img title="Testing" src="http://www.hawaiiflowerfarm.com/images/crash-test-dummy.jpg" alt="" width="162" height="173" /><p class="wp-caption-text">Testing is cool</p></div>
<h3 style="text-align:justify;">Software testing</h3>
<p style="text-align:justify;">Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs (errors or other defects) &#8211; <strong>Wikipedia</strong></p>
<p style="text-align:justify;">The main intend of this post is, introduce you to <a title="UI Tests" href="http://en.wikipedia.org/wiki/Graphical_user_interface_testing" target="_blank">UI tests</a> over some ruby toys. In fact you could create an entire project (new) in ruby just to test your legacy web project. It&#8217;s cool, you can learn new language and work for the improvement of your legacy product. If you are totally new for ruby maybe a <a title="Ruby Overview" href="http://leandromoreira.com.br/2011/07/11/ruby-overview/" target="_blank">ruby overview</a> can help you. (or might confuse you more)</p>
<h3 style="text-align:justify;">Installing ruby, watir and rspec</h3>
<p style="text-align:justify;">Instead of installing the ruby directly, we are going to <strong>install the </strong><a title="RVM" href="http://beginrescueend.com/" target="_blank"><strong>RVM</strong> (Ruby Version Manager)</a> to then install any ruby we need. The steps described here were made on <a title="ubuntu" href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> 11.04. On your terminal do the magic to install RVM.</p>
<p><span style="color:#666699;"><strong>bash</strong> &lt; &lt;(curl -s https://rvm.beginrescueend.com/install/rvm)</span><br />
<span style="color:#666699;"><strong> echo</strong> &#8216;[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . &#8220;$HOME/.rvm/scripts/rvm&#8221; # Load RVM function&#8217; &gt;&gt; ~/.bash_profile</span><br />
<span style="color:#666699;"><strong> source</strong> .bash_profile</span></p>
<p style="text-align:justify;">And from now on, your life will be better on ruby interpreters versions. Let&#8217;s <strong>install the <a title="Ruby" href="http://www.ruby-lang.org/en/" target="_blank">ruby</a> 1.9.2</strong>. (terminal again)</p>
<p><pre class="brush: bash;">
rvm install 1.9.2
</pre></p>
<p style="text-align:justify;">And if we want to see the rubies installed on our machine?</p>
<p><pre class="brush: bash;">
rvm list
</pre></p>
<p style="text-align:justify;">And now, how can we chose one ruby to work on the terminal session?</p>
<p><pre class="brush: bash;">
rvm use 1.9.2
</pre></p>
<p style="text-align:justify;">For the test purpose we will use <strong><a title="Watir" href="http://watir.com/" target="_blank">Watir</a> and <a title="RSpec" href="http://relishapp.com/rspec/rspec-core" target="_blank">RSpec</a></strong>, great tools for testing, make fun with <a title="BDD" href="http://dannorth.net/introducing-bdd/" target="_blank">BDD</a> and the best thing is <strong>install</strong> them it&#8217;s very easy.</p>
<p><pre class="brush: bash;">
gem install watir-webdriver
gem install rspec
</pre></p>
<h3 style="text-align:justify;">Hands-on</h3>
<p style="text-align:justify;">Since we have all things installed, we can move for the example. The feature I want to test is the search system of  <a title="Amazon" href="http://www.amazon.com/" target="_blank">Amazon</a>. Being more precise, I want to search for &#8216;<strong><span style="color:#800080;">Brazil&#8217;</span></strong> and see if the <span style="text-decoration:underline;">&#8216;Brazil on the Rise&#8217;</span> is within the results as I want to be sure when I search for &#8216;<strong><span style="color:#800080;">semnocao</span></strong>&#8216; the Amazon doesn&#8217;t provide any result. Now, we can write the spec.</p>
<p><pre class="brush: ruby;">
require 'amazon_page'

describe AmazonPage do
 before(:each) do
   @page = AmazonPage.new
 end
 after(:each) do
   @page.close
 end
 it &quot;should show 'Brazil on the Rise' when I query for [Brazil]&quot; do
  @page.query 'Brazil'
  @page.has_text('Brazil on the Rise').should == true
 end
 it &quot;should bring no result when I search for [semnocao]&quot; do
  @page.query 'semnocao'
  @page.results_count.should == 0
 end
end
</pre></p>
<p>The specification is very simple, it will create a page <strong>before each</strong> test calling and close the page <strong>after each</strong> test calling. There is only two tests: test when you <em>search for Brazil</em>  and  when you <em>search for semnocao</em>. We will design the tests using <a title="Page Object Pattern" href="http://code.google.com/p/selenium/wiki/PageObjects" target="_blank">page object pattern</a>. The class bellow is the page which represents the Amazon page and all testable behaviors should be inside of it.</p>
<p><pre class="brush: ruby;">
require 'watir-webdriver'

class AmazonPage
 def initialize
  @page = Watir::Browser::new :firefox
  @page.goto 'http://www.amazon.com'
 end
 def close
  @page.quit
 end
 def query(parameter)
  @page.text_field(:id=&gt;'twotabsearchtextbox').set parameter
  @page.send_keys :enter
 end
 def has_text(text)
  @page.text.include? text
 end
 def results_count
    if @page.text.include? 'did not match'
     0
    else
     @page.div(:id=&gt;'resultCount').text.split(' ')[5].gsub(',','').to_i
    end
 end
end
</pre></p>
<p style="text-align:justify;"><strong>To run</strong> this you just need to <strong>type on your terminal</strong>.</p>
<p><pre class="brush: bash;">
rspec spec/
</pre></p>
<p>The final code can be downloaded or viewed at <a title="Legacy testing automation" href="https://github.com/leandromoreira/test_legacy" target="_blank">github</a>.</p>
<h3 style="text-align:justify;">Additions</h3>
<ul>
<li>We could improve our story readibility  with <a title="Cucumber" href="http://cukes.info/" target="_blank">Cucumber</a>.</li>
<li>We could send the browser execution to an Xvfb server. (A.K.A. <strong><a title="Running watir headless" href="http://stackoverflow.com/questions/3861871/can-i-use-watir-to-scrape-data-from-a-website-on-a-linux-server-without-monitor/3863321#3863321" target="_blank">running headless</a></strong>) The browser pops up really bothers me.</li>
<li>We could <a title="Maven CI" href="http://www.diegocarrion.com/2009/01/17/cool-tests-in-the-java-maven-platform-now-possible-with-rspec-maven-plugin/" target="_blank">integrate it with our CI</a>.</li>
<li>We could design a base Page class for provide common operations as mixin or something</li>
</ul>
<p style="text-align:justify;">ps: the post was very inspired by <a title="KK gettting started with testing automation" href="http://testingandagile.blogspot.com/2011/08/getting-started-with-automation.html" target="_blank">KK post</a> and <a title="Saush Blog" href="http://blog.saush.com/2008/05/18/using-rspec-and-watir-for-functional-testing-in-web-applications/" target="_blank">Saush</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=230&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/08/19/rspec-and-watir-to-test-web-applications/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://www.hawaiiflowerfarm.com/images/crash-test-dummy.jpg" medium="image">
			<media:title type="html">Testing</media:title>
		</media:content>
	</item>
		<item>
		<title>Tips for performance in your web sites</title>
		<link>http://leandromoreira.com.br/2011/07/17/tips-for-performance-in-your-web-sites/</link>
		<comments>http://leandromoreira.com.br/2011/07/17/tips-for-performance-in-your-web-sites/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 03:28:39 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[high scalability]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=183</guid>
		<description><![CDATA[HTTP HTTP is a networking protocol for distributed, collaborative, hypermedia information systems and it is also the foundation of data communication for the World Wide Web. How it works? You send (using a browser, for example) a request for the server: -Hey Internet, give me the Ruby overview web site. &#160; GET /2011/07/11/ruby-overview.html HTTP/1.1 Host: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=183&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><img class="alignleft" title="High Performance Web Site" src="http://covers.oreilly.com/images/9780596529307/cat.gif" alt="" width="180" height="236" />HTTP</h2>
<p style="text-align:justify;">HTTP is a networking protocol for distributed, collaborative, hypermedia information systems and it is also the foundation of data communication for the World Wide Web.</p>
<h2>How it works?</h2>
<p style="text-align:justify;">You send (using a browser, for example) a request for the server: <span style="color:#003366;">-Hey Internet, give me the <a title="Ruby overview" href="http://leandromoreira.com.br/2011/07/11/ruby-overview/" target="_blank"><span style="color:#003366;">Ruby overview</span></a> web site.</span></p>
<blockquote><p>&nbsp;</p>
<p>GET /2011/07/11/ruby-overview.html<br />
HTTP/1.1<br />
Host: leandromoreira.com.br<br />
User-Agent: Mozilla/5.0 (s.o.) Gecko/20100101 Firefox/5.0</p></blockquote>
<p style="text-align:justify;">And server can answer you: <span style="color:#003366;">- Okay!</span></p>
<blockquote><p>HTTP/1.1 200 OK<br />
Content-Type: plaintext/html<br />
Last-Modified: Fri, 15 Jul 2011 00:23:15 GMT<br />
Content-Lenght: 896<br />
blah blah content blah blah ruby blah blah</p></blockquote>
<p style="text-align:justify;">As you can see HTTP is a protocol where you can request resources for the sever, using <a title="HTTP header fields" href="http://en.wikipedia.org/wiki/List_of_HTTP_header_fields" target="_blank">some fields</a>. This conversation between you and the server can results in further requests. Using some of HTTP fields, you can request <a title="HTTP compression" href="http://en.wikipedia.org/wiki/HTTP_compression" target="_blank"><strong>compressed data</strong></a> from server (then use less network load), server can inform you how long you <a title="Experies field http" href="http://freesoft.org/CIE/RFC/2068/182.htm" target="_blank"><strong>can keep components at cache</strong></a>.</p>
<h2>The 14 golden rules</h2>
<p style="text-align:justify;"><a title="Steve Souders" href="http://stevesouders.com/" target="_blank">Steve Souders</a> wrote the amazing book (based on his researches on Yahoo!) <a href="http://www.google.com/search?q=High+Perforamance+Web+Sites" target="_blank">High Performance Web Sites</a> to help us made more scalable and fast web sites. This book shows fourteen rules at practice to follow and achieve the fast web site, it also presents real web sites examples. I certainly recommended you this book. (Thank <a title="Guilherme Motta Github" href="https://github.com/gmotta" target="_blank">Guilherme Motta</a> for this recommendation.)</p>
<h3 style="text-align:justify;">Rule #01 &#8211; Make fewer HTTP requests</h3>
<p style="text-align:justify;">Yeah, this rule might be obvious but not so obvious is the possible solutions for that:</p>
<ul>
<li>Use image map and <a title="CSS Sprites" href="http://css-tricks.com/158-css-sprites/" target="_blank">css sprites</a> instead of use multiply images.</li>
<li><strong>Hard core</strong> -&gt; Sometimes you can use inline images. (it doesn&#8217;t work with <a href="http://www.networkworld.com/Micronet%20images/Bug.png" target="_blank">IE</a>)</li>
<li style="text-align:justify;">Combine &amp; Minify your files: three js scripts to only one (with removed spaces and etc.) and nine stylesheets to one. In fact this thing of combine everything into one, broke our so beloved coupling OO rule. I think this combine and minify process should be made on deployment and delivery, this let&#8217;s free to create cohese and uncoupled scripts and stylesheets.</li>
</ul>
<h3>Rule #02 &#8211; Use Content Delivery Networks</h3>
<p style="text-align:justify;">I&#8217;ve worked in a company where we have some stylesheets and js shared between the projects. Our approach for that was, each project injects the files in its workspace. This take us to the hell of outdate files.</p>
<p style="text-align:justify;">Thinking in terms of caching, if we had this files into a single known server, all the requests for our several web sites would take advantage of cache.</p>
<p style="text-align:justify;">Taking this for a big picture, I mean dream that we are handling a huge web site, we could also take the advantage of customer&#8217;s proximity. If our components are next to our clients so the download time would be decreased.</p>
<h3>Rule #03 &#8211; Add an Expires Header</h3>
<p style="text-align:justify;">In HTTP conversation, the server can tell to a client that certain component could be used at his local cache for a certain time using the HTTP field: <strong>Expires</strong>. You request a component for server and it answers with that component and give you a valid time for that component. The setup for this is made on server-side. (See also: <strong>Max-age</strong> and <strong>Cache-Control</strong> &#8211; overcome the limitation of Expires, when you need to specify the exact date, causing clock synchronizing issues. Using Cache-Control you can set time in seconds!)</p>
<p style="text-align:justify;">People, usually, don&#8217;t put this because they fear the change. For example: I create a component (company&#8217;s logo) and put the expires date to ten days, but if I would change it before that time?! Well, you could starting writing your components with rev. number on its name. The company_logo_1.0.png is cached but your newer version company_logo.1.1.png isn&#8217;t.</p>
<h3>Rule #04 &#8211; Gzip &#8216;em all</h3>
<p>Once again, you can inform to server that you understand and accept compressed files (<strong>Accept-Encoding: gzip</strong>) and maybe server answer you with compressed data. (<strong>Content-Enconding: gzip</strong>) Using compressing, saves the average of 66% in your network flow, it&#8217;s huge and worth to do.</p>
<h3>Rule #05 &#8211; Stylesheets at top</h3>
<p style="text-align:justify;">The history is long (progressive rendering, browser way to render, blank screen when css at bottom) so just follow (and read the book to understand the beginning of this long history) the rule! BTW, by testing, it was proved that use LINK way of include css instead @import is better.</p>
<h3>Rule #06 &#8211; Scripts at bottom</h3>
<p style="text-align:justify;">Again, long history (browser way to understand it, EVEN BLOCK parallel downloads because of scripts and middle of your html) just follow the rule!</p>
<h3>Rule #07 &#8211; Don&#8217;t use CSS expression (okay, avoid)</h3>
<p style="text-align:justify;">This rule brings a new concept to me. I didn&#8217;t know that we could write css and javascritp into css rules (in this way). For example:</p>
<p><pre class="brush: css;">
width: expression( document.body.clientWith &lt; 600 ? &quot;600px&quot; : &quot;auto&quot; );
</pre></p>
<h3>Rule #08 &#8211; Make JS &amp; CSS external</h3>
<p style="text-align:justify;">Inline vs External -&gt; In raw terms inline is faster. But don&#8217;t forget about others rules : compressing, CDN and caching. In general, for real world projects external files always win for performance. (Mainly for users with primed cache, components cached because they&#8217;re visited site before)</p>
<h3>Rule #09 &#8211; Reduce DNS lookups</h3>
<p style="text-align:justify;">The roundtrip that one request does to find the it can be a huge time-consuming, so DNS caching would improve a lot your user first visit.</p>
<h3>Rule #10 &#8211; Minify Javascript</h3>
<p style="text-align:justify;">I already cite this but it&#8217;s a valid rule, imagine the space you can save and bytes you can save by minifying your js.</p>
<p><pre class="brush: jscript;">

myFunction(parameter0, paramenter1){

window.title = parameter0 + parameter1;

}

</pre></p>
<p>Works equality as:</p>
<p><pre class="brush: jscript;">

myFunction(_0,_1){window.title=_0+_1;}

</pre></p>
<p style="text-align:justify;">There is a bunch of minifyers on Internet. And even obsfucators but I don&#8217;t think it&#8217;s necessary and most of them can introduce bugs. There is also CSS minifyers too: write 10 instead of 10px, #606 instead of #660066.</p>
<h3 style="text-align:justify;">Rule #14 &#8211; Make ajax cacheable</h3>
<p style="text-align:justify;">This is, maybe, the most hard rule to explain and apply! Then it&#8217;s better <a href="http://my.safaribooksonline.com/book/web-development/9780596529307/rule-14-make-ajax-cacheable/100" target="_blank">read it here</a>.</p>
<p style="text-align:justify;">PS: I skipped the rules 11 (avoid redirects), 12(remove duplicate scripts) and 13 (configure etags) just because they are most known for general people, except ETags but usually the tip is : avoid ETag, so it is.</p>
<p style="text-align:justify;">Oh yes, you can see more <a title="Rules for high performance web sites" href="http://developer.yahoo.com/performance/rules.html" target="_blank">rules of high performance at Yahoo!</a> and at <a title="Google web sites performance" href="http://code.google.com/speed/articles/" target="_blank">Google.com too</a>.</p>
<h2 style="text-align:justify;">Useful tools to help mensure your site</h2>
<p style="text-align:justify;">Today, we fortunately have tools to help us identify and fix performance issues on our web sites. You can simply grab one of that bellow or both and run it on your site. They give you a complete report about the pain points and thing you can do to increase performance. YSlow uses the fourteen rules as basis and Speed Trace is Google tool, it doesn&#8217;t need to say anything.</p>
<h2 style="text-align:justify;"><img class="alignleft" title="YSlow logo" src="http://cloud.ohloh.net/attachments/2391/yslow-logo_32x32_med.png" alt="" width="14" height="14" />YSlow</h2>
<p style="text-align:justify;"><a title="YSlow" href="http://developer.yahoo.com/yslow/" target="_blank">YSlow</a> analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. It can be installed as browser plugin.</p>
<h2 style="text-align:justify;"><img class="alignleft" title="Speed tracer logo" src="http://code.google.com/webtoolkit/images/speedtracer-large.png" alt="" width="17" height="17" />Speed Trace</h2>
<p style="text-align:justify;"><a title="Speed Tracer" href="http://code.google.com/webtoolkit/speedtracer/" target="_blank">Speed Tracer</a> is a tool to help you identify and fix performance problems in your web applications. It visualizes metrics that are taken from low-level instrumentation points inside of the browser and analyzes them as your application runs. Speed Tracer is available as a Chrome extension and works on all platforms where extensions are currently supported (Windows and Linux).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=183&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/07/17/tips-for-performance-in-your-web-sites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://covers.oreilly.com/images/9780596529307/cat.gif" medium="image">
			<media:title type="html">High Performance Web Site</media:title>
		</media:content>

		<media:content url="http://cloud.ohloh.net/attachments/2391/yslow-logo_32x32_med.png" medium="image">
			<media:title type="html">YSlow logo</media:title>
		</media:content>

		<media:content url="http://code.google.com/webtoolkit/images/speedtracer-large.png" medium="image">
			<media:title type="html">Speed tracer logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby overview</title>
		<link>http://leandromoreira.com.br/2011/07/11/ruby-overview/</link>
		<comments>http://leandromoreira.com.br/2011/07/11/ruby-overview/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 17:53:27 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[object-oriented programming]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=154</guid>
		<description><![CDATA[Introduction Take a look at this, there is two classes: a person and a teacher. The person (originally) just know how to speak English and then teacher teach him speak other language, it can show you how powerful and beautiful ruby is. The intent here is just show a quick overview of ruby from a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=154&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1><img class="aligncenter" title="Ruby Logo" src="http://fabiokung.files.wordpress.com/2008/08/ruby-logo-r.png?w=174&#038;h=213" alt="" width="174" height="213" /></h1>
<h1>Introduction</h1>
<p style="text-align:justify;">Take a look at this, there is two classes: a person and a teacher. The person (originally) just know how to speak English and then teacher teach him speak other language, it can show you how powerful and beautiful <a title="Ruby" href="http://www.ruby-lang.org/" target="_blank">ruby</a> is.</p>
<p><pre class="brush: ruby;">
class Person
 attr_accessor :name
 def speak_english
  puts &quot;Hi people!&quot;
 end
end

class BrPortugueseTeacher
 def teach(person)
  def person.speak_portuguese
   puts &quot;Ola pessoal!&quot;
  end
 end
end

bill_gates = Person.new
bill_gates.nome = &quot;Bill Gates&quot;
pasquale = Teacher.new
pasquale.teach bill_gates
#now bill gates knows portuguese
bill_gates.speak_portuguese
</pre></p>
<p>The intent here is just show a <a title="Ruby quick overview" href="http://leandromoreira.com.br/2011/07/11/ruby-overview/">quick overview of ruby</a> from a <a title="Leandro Moreira" href="http://www.leandromoreira.com.br/" target="_blank">newbie</a>.</p>
<h3>Code&#8217;s comment</h3>
<p><pre class="brush: ruby;">
#one line comment
=begin
Multiply lines comment.
Given that ...
=end
</pre></p>
<h3>String</h3>
<p style="text-align:justify;">String in ruby is mutable (but when you use the <del>operator</del> method + it creates another string, so to concatenate strings you should use the operator &lt;&lt;) and just a little tip avoid the concatenation by using + instead prefer use <strong>interpolation</strong>, a way to handle string very similar to <a title="expression language java" href="http://download.oracle.com/javaee/5/tutorial/doc/bnahq.html" target="_blank">expression language</a>, and it&#8217;s faster than normal concatenation.</p>
<p><pre class="brush: ruby;">
ran = 34434
who = &quot;Leandro Moreira&quot;
puts &quot;#{who} generates this #{ran} number&quot;
</pre></p>
<h3>Conventions</h3>
<p>Yet on mutability, when you write a method that can affect the internal state, you should use the <strong>bang operator</strong> (!) on method&#8217;s name.</p>
<p><pre class="brush: ruby;">
old_source_name = &quot;angeline&quot;
puts old_source_name.capitalize
puts old_source_name.capitalize!
</pre></p>
<p>Another <del>cool</del> convention to Boolean methods is end them with ?</p>
<p><pre class="brush: ruby;">
if account.cancelled?
 puts &quot;Run Forest, run!&quot;
end
</pre></p>
<h3>Range object</h3>
<p>In ruby you can use a type <a title="Range ruby type" href="http://www.ruby-doc.org/core-1.8.7/classes/Range.html" target="_blank">Range</a> to describe ranges and its use is very easy.</p>
<p><pre class="brush: ruby;">
zero_to_ten = (0..10) #inclusive
one_to_seven = (0...8) #exclusive
alphabetic = ('a'..'z') #you also can omit the (
</pre></p>
<h3>It&#8217;s all object and quick tips</h3>
<p>- Hey, language prints <span style="text-decoration:underline;">I win</span> three times.</p>
<p><pre class="brush: ruby;">
puts &quot;I win &quot; * 3
</pre></p>
<p>You can use anything on <strong>if statement</strong> and it can ben true or false (and nil which is false too).</p>
<p>A weird thing is one way of handle the <strong>regular expressions</strong>.</p>
<p><pre class="brush: ruby;">
/myexp/ =~ &quot;sentence&quot;
#&quot;sentence&quot; matches myexp?
</pre></p>
<p>Another weird operator is <strong>or equals</strong>.</p>
<p><pre class="brush: ruby;">
list ||= flights
#the list will just receive the flights if list is nil.
</pre></p>
<h3>The classes are really open</h3>
<p>One of the main features of ruby is <strong>Open Class</strong>, this is cool, you just can grab a class and write a new feature for it.</p>
<p><pre class="brush: ruby;">
class String
 def do_nothing
  puts &quot;doing nothig&quot;
 end
end
</pre></p>
<p>And then you just call it.</p>
<p><pre class="brush: ruby;">
&quot;number&quot;.do_nothing
</pre></p>
<p>Let&#8217;s trick the addition operations on number.</p>
<p><pre class="brush: ruby;">
class Fixnum
 def +(other)
  self - other
 end
end
puts 2+1
#and it will prints 1. (~:
</pre></p>
<h3>Variable arguments</h3>
<p>Sometimes you need to use this kind of flexibility.</p>
<p><pre class="brush: ruby;">
user.buy computer
user.buy computer, mouse, monitor
</pre></p>
<p>To achieve this you just use the syntax. The <strong>splat operator</strong> how it is known.</p>
<p><pre class="brush: ruby;">
def buy(*products)
 #buy logic
end
</pre></p>
<h3>Hash enhancements</h3>
<p>There is a lot of people which claims to use hash as parameter.</p>
<p><pre class="brush: ruby;">
e_account.transfer :to_account =&gt; my, :value =&gt; 4800

def transfer (parameters)
 dest_account = parameters[:to_account]
 #...
end
</pre></p>
<h3>Declarations</h3>
<p><pre class="brush: ruby;">
class Anything
 @field #object field
 @@field #class field
end
</pre></p>
<h3>Singleton in Ruby</h3>
<p style="text-align:justify;"><a title="Singleton" href="http://en.wikipedia.org/wiki/Singleton_pattern" target="_blank">Singleton pattern</a> is a design pattern used to implement the mathematical concept of a singleton, by restricting the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects (say, five). Some consider it an <strong>anti-pattern</strong>, judging that it is overused, introduces unnecessary limitations in situations where a sole instance of a class is not actually required, and introduces global state into an application.  (From wikipedia)</p>
<p><pre class="brush: ruby;">
class HyperDao
@@instance = HyperDao.new
def self.instance
return @@instance
end
private_class_method :new
end
</pre></p>
<p>But we&#8217;re talking about ruby, don&#8217;t we?</p>
<p><pre class="brush: ruby;">
require 'singleton'
class God
include Singleton
end
</pre></p>
<p>It&#8217;s done! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<h3>Equals</h3>
<p>If you want or need to rewrite the equals&#8230;</p>
<p><pre class="brush: ruby;">
def ==(other)
 self.id = other.id
end
</pre></p>
<h3>Duck typing &#8211; good-bye interface</h3>
<p style="text-align:justify;">Duck typing is a style of dynamic typing in which an object&#8217;s current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see History below), which may be phrased as follows:&#8221;When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.&#8221; (From Wikipedia)</p>
<p><pre class="brush: ruby;">
class PremiumAccount
 def saldo
   #
 end
end

class CommonAccount
 def saldo
  #
 end
end
</pre></p>
<p>The bank manager will accept that.</p>
<p><pre class="brush: ruby;">
class BankManager
 def total_debt(accounts)
  for account in accounts do
   debt += account.saldo
  end
 end
end
</pre></p>
<h3>Mixin</h3>
<p style="text-align:justify;">Mixin is a class that provides a certain functionality to be inherited or just reused by a subclass, while not meant for instantiation (the generation of objects of that class). Inheriting from a mixin is not a form of specialization but is rather a means of collecting functionality. A class may inherit most or all of its functionality from one or more mixins through multiple inheritance. (Again, from Wikipedia)</p>
<p><pre class="brush: ruby;">
module Logging
 def log(message)
  puts message
 end
end

class Anything
 include Logging
  #...
end

any = Anything.new
any.log &quot;It started now!&quot;
</pre></p>
<h3>Metaprogramming</h3>
<p style="text-align:justify;">Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually, or it gives programs greater flexibility to efficiently handle new situations without recompilation.</p>
<p><pre class="brush: ruby;">
class Person
 attr_accessor :name
 def speak_english
  puts &quot;Hi people!&quot;
 end
end

class BrPortugueseTeacher
 def teach(person)
  def person.speak_portuguese
   puts &quot;Ola pessoal!&quot;
  end
 end
end

bill_gates = Person.new
bill_gates.nome = &quot;Bill Gates&quot;
pasquale = Teacher.new
pasquale.teach bill_gates
#now bill gates knows portuguese
bill_gates.speak_portuguese
</pre></p>
<p style="text-align:center;"><em>Highly influenced by <a title="Ruby on Rails Caelum" href="http://www.caelum.com.br/download/caelum-ruby-on-rails-rr71.pdf" target="_blank">ruby on rails from Caelum</a>.</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=154&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/07/11/ruby-overview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://fabiokung.files.wordpress.com/2008/08/ruby-logo-r.png" medium="image">
			<media:title type="html">Ruby Logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Acceptance testing on Fitnesse using slim test system</title>
		<link>http://leandromoreira.com.br/2011/06/27/acceptance-testing-fitnesse-slim/</link>
		<comments>http://leandromoreira.com.br/2011/06/27/acceptance-testing-fitnesse-slim/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 12:00:48 +0000</pubDate>
		<dc:creator>Leandro</dc:creator>
				<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://leandromoreira.com.br/?p=103</guid>
		<description><![CDATA[What is Fitnesse? It&#8217;s a software development collaboration tool. It&#8217;s a software testing tool. It&#8217;s a wiki. It&#8217;s a web server. This tool provides a way for the BA&#8217;s and/or customers write their acceptance testing on wikis and better than this, they can run theirs tests and see if it fails or pass right on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=103&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3><img class="alignleft" title="Fitnesse logo" src="http://fitnesse.org/files/images/FitNesseLogoMedium.jpg" alt="" width="121" height="121" />What is <a title="Fitnesse" href="http://fitnesse.org/" target="_blank">Fitnesse</a>?</h3>
<ul>
<li>It&#8217;s a software development collaboration tool.</li>
<li>It&#8217;s a software testing tool.</li>
<li>It&#8217;s a wiki.</li>
<li>It&#8217;s a web server.</li>
</ul>
<p style="text-align:justify;">This <em>tool</em> provides a way for the <a title="business analyst" href="http://en.wikipedia.org/wiki/Business_analyst" target="_blank">BA&#8217;s</a> and/or customers write their <a title="Acceptance testing" href="http://en.wikipedia.org/wiki/Acceptance_testing">acceptance testing</a> on wikis and better than this, they can run theirs tests and see if it fails or pass right on the page. <a title="Download and Install Fitnesse" href="http://fitnesse.org/FitNesse.UserGuide.DownloadingAndInstallingFitNesse" target="_blank">Install Fitnesse</a> it&#8217;s very simple, you just download and execute. <a title="Fitnesse architecture" href="http://fitnesse.org/files/images/fitnesse_architecture.jpg" target="_blank">The fitnesse architecture</a> provides two types of <em>test system</em>: <a title="SYSTEM_TEST slim" href="http://localhost/FitNesse.UserGuide.SliM" target="_blank">slim</a> and the well-known <a title="Framework for Integrated Testing" href="http://localhost/FitNesse.UserGuide.FitFramework" target="_blank">fit</a>. For this tutorial I&#8217;ll use the slim.</p>
<h3>The hands-on</h3>
<p style="text-align:justify;"><strong>Scenario:</strong> <span style="color:#808080;">Given</span> that I have the <strong>input1</strong> and <strong>input2</strong> <span style="color:#808080;">Then</span> the <strong>output</strong> <span style="color:#808080;">Should Be</span> <strong>input1 plus space input2</strong>. So let&#8217;s express the acceptance testing of this feature (or behavior if you want). In Fitnesse we can express this using the <a title="decision table" href="http://fitnesse.org//FitNesse.UserGuide.SliM.DecisionTable" target="_blank">decision table</a>, others examples of places to write tests are query table, script table, library table and etc.</p>
<blockquote><p>|it should print guaqmire|<br />
|input1|input2|output?|<br />
|you|are|you are|<br />
|family|guy|family guy|<br />
|tests|enough|tests enough|</p></blockquote>
<p style="text-align:justify;">Explaining the table, the first line is the name of the fixture, the second line contains the inputs and outputs names and from the third line on it&#8217;s filled with testing data. The output table should look like this:<br />
<img class="aligncenter" title="decision table fitnesse slim" src="http://i52.tinypic.com/2z8ap0i.png" alt="" width="225" height="159" />Let&#8217;s setup the wiki-page to it became runnable, edit the page and put these parameters on the page.</p>
<blockquote><p>!define TEST_SYSTEM {slim}<br />
!define TEST_RUNNER {C:\fit\slim\rubyslim\lib\run_ruby_slim.rb}<br />
!define PATH_SEPARATOR { -I }<br />
!define COMMAND_PATTERN {ruby -I %p %m}<br />
!path C:\fit\slim\rubyslim\lib\<br />
!path C:\fit\ruby\prj\</p></blockquote>
<p style="text-align:justify;">The first line is setting <strong>TEST_SYSTEM</strong> to configure fitnesse to use the <a title="fitnesse slim" href="http://fitnesse.org/FitNesse.UserGuide.SliM.SlimProtocol" target="_blank">slim protocol</a> instead of default fit. As we will use slim and ruby, we&#8217;ll use the <a title="rubyslim" href="https://github.com/unclebob/rubyslim" target="_blank">rubyslim</a> library. The second line is setting the <strong>TEST_RUNNER</strong> to use the ruby slim. Third line defines the <strong>PATH_SEPARATOR</strong>, used by the COMMAND_PATTERN to <a title="Nah" href="http://4.bp.blogspot.com/_2GftjDNXV7A/SxNTSXBl1lI/AAAAAAAAA-4/k2rxIqB2N_s/s1600/ema+-+2.jpg" target="_blank">separate paths</a>. The fourth line is configuring the <strong>COMMAND_PATTERN</strong> that will execute the test itself, the two parameters %p (receives all the paths from the page and its ancestors) and %m (the fixture itself) are used to correctly perform the test. The lines with <em>path</em> just informs to fitnesse where it can found the libraries and the runtime files.</p>
<p style="text-align:justify;">And now you can run, is it fails? Good, now let&#8217;s programming it in <a title="ruby language" href="http://www.ruby-lang.org/" target="_blank">ruby</a>, if you are a newbie ruby as me, your code might be something like this.</p>
<p><pre class="brush: ruby;">
module Fixtures
  class ItShouldPrintGuaqmire
   def set_input1 input1
    @input1 = input1
   end
   def set_input2 input2
    @input2 = input2
   end
   def output
    &quot;#{@input1} #{@input2}&quot;
   end
  end
end
</pre></p>
<p style="text-align:justify;">Ohh it continues to fail, shame on me. As you can see at the code, I put the fixture inside a module called Fixture, so we need to inform the fitness what module/package is my fixture and we can do that by a table.</p>
<blockquote><p>|Import|<br />
|Fixtures|</p></blockquote>
<p>This special table only  configures where is the fixtures. Now let&#8217;s see the entire code for fitnesse wiki.</p>
<blockquote><p>!define TEST_SYSTEM {slim}<br />
!define TEST_RUNNER {C:\fit\slim\rubyslim\lib\run_ruby_slim.rb}<br />
!define PATH_SEPARATOR { -I }<br />
!define COMMAND_PATTERN {ruby -I %p %m}<br />
!path C:\fit\slim\rubyslim\lib\<br />
!path C:\fit\ruby\prj\</p>
<p>|Import|<br />
|Fixtures|</p>
<p>|it should print guaqmire|<br />
|input1|input2|output?|<br />
|you|are|you are|<br />
|family|guy|family guy|<br />
|tests|enough|tests enough|</p></blockquote>
<h3>Running the tests should show</h3>
<p><img class="aligncenter" title="Fitnesse slimruby results" src="http://i51.tinypic.com/2qcmqfd.png" alt="" width="341" height="445" /></p>
<h3>Bonus round &#8211; Fitnesse using slim protocol in Java</h3>
<p style="text-align:justify;">In fact to make it runnable in Java it&#8217;s easier, you don&#8217;t need any TEST_RUNNER or COMMAND_PATTERN in your <strong>wiki page, </strong>since Java it&#8217;s default for fitnesse and your final wiki should look like this:</p>
<blockquote><p>!define TEST_SYSTEM {slim}<br />
!path C:\fit\java\prj\fit-slim-java.jar</p>
<p>|Import|<br />
|br.com.leandromoreira.fixtures|</p>
<p>|it should print guaqmire|<br />
|input1|input2|output?|<br />
|you|are|you are|<br />
|family|guy|family guy|<br />
|tests|enough|tests enough|</p></blockquote>
<p>And your <strong>Java code</strong> can be something like this:</p>
<p><pre class="brush: java;">
package br.com.leandromoreira.fixtures;

public class ItShouldPrintGuaqmire{
  private String input1;
  private String input2;
  public void setInput1(final String i1){
   input1 = i1;
  }
  public void setInput2(final String i2){
   input2 = i2;
  }
  public String output(){
   return input1 + &quot; &quot; + input2;
  }
}
</pre></p>
<h3>Real world</h3>
<p style="text-align:justify;">Usually the real world projects requires a lots of libraries on <a title="path variable fitnesse" href="http://localhost/FitNesse.UserGuide.ClassPath" target="_blank">path</a>, setup pages and more than just decision table to write tests. For instance, you can see that use fitnesse with slim seems more portable , less coupled with runtime and easier to implement too. In the real world you also create wiki for the project and suite test page for stories and organize all your imports and configs on project level, when you are composing a wiki on fitnesse you can take advantage of the fact that all the pages extend the configs from theirs ancestors, so you can have a better project wiki and managable test suite pages.</p>
<h3 style="text-align:justify;">Update &#8211; Issues with Ruby 1.9.x</h3>
<p style="text-align:justify;">If you are trying to use the ruby 1.9.x you will have some issues the first one is: <strong><a title="rubyslim require jcode issue" href="https://github.com/unclebob/rubyslim/issues/5" target="_blank">require &#8216;jcode&#8217;</a> issue</strong>, I tried to solve it but then it started to show another error <em>&#8216;<a title="list deserializer rubyslim" href="https://github.com/unclebob/rubyslim/blob/master/lib/list_deserializer.rb" target="_blank"><strong>list_deserializer.rb</strong></a>:1:in `&lt;&#8217;: comparison of String with Float failed (ArgumentError)&#8217;</em>.  Since I&#8217;m not (still) a ruby guy I don&#8217;t know how to fix it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/archsofty.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/archsofty.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/archsofty.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/archsofty.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/archsofty.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/archsofty.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/archsofty.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/archsofty.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/archsofty.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/archsofty.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/archsofty.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/archsofty.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/archsofty.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/archsofty.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leandromoreira.com.br&amp;blog=22243831&amp;post=103&amp;subd=archsofty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leandromoreira.com.br/2011/06/27/acceptance-testing-fitnesse-slim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1ac1bdc800919b45b1002b05254d3a68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dreampeppers99</media:title>
		</media:content>

		<media:content url="http://fitnesse.org/files/images/FitNesseLogoMedium.jpg" medium="image">
			<media:title type="html">Fitnesse logo</media:title>
		</media:content>

		<media:content url="http://i52.tinypic.com/2z8ap0i.png" medium="image">
			<media:title type="html">decision table fitnesse slim</media:title>
		</media:content>

		<media:content url="http://i51.tinypic.com/2qcmqfd.png" medium="image">
			<media:title type="html">Fitnesse slimruby results</media:title>
		</media:content>
	</item>
	</channel>
</rss>
