<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>small acts</title> <link>http://caikesouza.com/blog</link> <description>make great revolutions</description> <pubDate>Fri, 16 Jul 2010 15:42:24 +0000</pubDate> <generator>http://wordpress.org/?v=2.7.1</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/smallacts" /><feedburner:info uri="smallacts" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Comunidades Dinamicamente Tipadas (slides)</title><link>http://feedproxy.google.com/~r/smallacts/~3/1xrGyTKo5CE/</link> <comments>http://caikesouza.com/blog/2010/07/comunidades-dinamicamente-tipadas-slides/#comments</comments> <pubDate>Fri, 16 Jul 2010 15:40:40 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[agile]]></category><category><![CDATA[opensource]]></category><category><![CDATA[pt]]></category><guid isPermaLink="false">http://caikesouza.com/blog/?p=932</guid> <description><![CDATA[Nesta quarta-feira aconteceu mais uma reunião do grupo TaSafo, em Belém do Pará. Foi um prazer poder re-encontrar antigos amigos e conhecer pessoalmente os responsáveis por movimentar a comunidade Paraense de desenvolvimento.
O encontro foi composto por duas apresentações, seguidas da &#8216;Hora do Desapego&#8217;.
Meu amigo Mateus Linhares falou sobre sua experiência implantando práticas e métodos ágeis [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify; ">Nesta quarta-feira aconteceu mais uma reunião do grupo <a
title="Tecnologias Abertas com Software Ágil, Fácíl e Organizado." href="http://tasafo.wordpress.com/" target="_blank">TaSafo</a>, em Belém do Pará. Foi um prazer poder re-encontrar antigos amigos e conhecer pessoalmente os responsáveis por movimentar a comunidade Paraense de desenvolvimento.</p><p
style="text-align: justify; ">O encontro foi composto por duas apresentações, seguidas da <a
href="http://yfrog.com/0h6pcbj" target="_blank">&#8216;Hora do Desapego&#8217;</a>.</p><p
style="text-align: justify; ">Meu amigo <a
href="http://twitter.com/mateuslinhares" target="_blank">Mateus Linhares</a> falou sobre sua experiência implantando práticas e métodos ágeis no Ikwa.</p><p
style="text-align: justify; ">Eu falei sobre &#8216;Comunidades Dinamicamente Tipadas&#8217;.</p><div
style="width:425px" id="__ss_4754155"><strong
style="display:block;margin:12px 0 4px"><a
href="http://www.slideshare.net/caikesouza/comunidades-dinamicamente-tipadas" title="Comunidades Dinamicamente Tipadas">Comunidades Dinamicamente Tipadas</a></strong><object
id="__sse4754155" width="425" height="355"><param
name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=comunidadesdinamicamentetipadas-100714120946-phpapp01&#038;stripped_title=comunidades-dinamicamente-tipadas" /><param
name="allowFullScreen" value="true"/><param
name="allowScriptAccess" value="always"/><embed
name="__sse4754155" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=comunidadesdinamicamentetipadas-100714120946-phpapp01&#038;stripped_title=comunidades-dinamicamente-tipadas" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div
style="padding:5px 0 12px">View more <a
href="http://www.slideshare.net/">presentations</a> from <a
href="http://www.slideshare.net/caikesouza">Caike Souza</a>.</div></div> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=1xrGyTKo5CE:MmQBzUakgY0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=1xrGyTKo5CE:MmQBzUakgY0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=1xrGyTKo5CE:MmQBzUakgY0:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/1xrGyTKo5CE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2010/07/comunidades-dinamicamente-tipadas-slides/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2010/07/comunidades-dinamicamente-tipadas-slides/</feedburner:origLink></item> <item><title>Coding Dojo learning process - Velocity</title><link>http://feedproxy.google.com/~r/smallacts/~3/aobrNvwlEH8/</link> <comments>http://caikesouza.com/blog/2010/06/coding-dojo-learning-process-velocity/#comments</comments> <pubDate>Tue, 29 Jun 2010 16:32:28 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[agile]]></category><category><![CDATA[en]]></category><category><![CDATA[software craftsmanship]]></category><guid isPermaLink="false">http://caikesouza.com/blog/?p=874</guid> <description><![CDATA[In our most recent Coding Dojo session here in Orlando I realized something really interesting about our team&#8217;s velocity. I feel like other people doing Coding Dojos may have realized this as well, so I&#8217;ll try and put it into words properly.
Briefly, below is how we run our sessions:
Planning
The Coding Dojo session starts with an initial planning [...]]]></description> <content:encoded><![CDATA[<p>In our most recent <a
href="http://orlandodojo.org">Coding Dojo</a> session here in Orlando I realized something really interesting about our team&#8217;s <strong>velocity</strong>. I feel like other people doing <a
href="http://codingdojo.org">Coding Dojos</a> may have realized this as well, so I&#8217;ll try and put it into words properly.</p><p>Briefly, below is how we run our sessions:</p><h2>Planning</h2><p
style="text-align: justify;">The <a
href="http://codingdojo.org">Coding Dojo</a> session starts with an initial planning involving the problem we picked. Stand up style, focused on early results and the-simplest-thing-that-could-possibly-work kinda features. We usually take about 10 minutes and write down some things on the board.</p><p
style="text-align: justify;">Our goal at the planning is to set up expectations. Everyone involved in the planning gets to make suggestions (add/remove/renegotiate goals). We also decide on an initial design (classes, methods, test cases, etc.).</p><h2>Coding</h2><p
style="text-align: center;"><img
class="aligncenter size-full wp-image-904" style="border: 1px solid black; margin: 1px;" src="http://caikesouza.com/blog/wp-content/uploads/coding_colab_1.jpg" alt="Coding @ Colab" width="554" height="312" /></p><p
style="text-align: justify;">We start coding, 7 minutes a pair, and try not to have too many interruptions. Everyone gets a shot and this usually takes us from 40 to 50 minutes, depending on the number of people attending.</p><p
style="text-align: justify;"><h2>Half-time</h2><p
style="text-align: justify;">Coding stops and we talk about what we have done so far.</p><p
style="text-align: justify;">A little retrospective about the code and how close/far we are from our initial expectations. If we think we can add things, we usually do. Maybe we think we should replace things, or even remove some.</p><p
style="text-align: justify;"><h2>More coding</h2><p
style="text-align: justify;">Another round of test-driven development with a 7 minute pairing cycle.</p><p
style="text-align: justify;"><h2>Done coding</h2><p
style="text-align: justify;">Once everyone gets a shot,<strong> that&#8217;s it. </strong></p><p
style="text-align: justify;"><strong></strong>We avoid making further changes once the last 7 minutes has been over with.</p><p
style="text-align: justify;"><h2>Retrospective</h2><p
style="text-align: center; "><a
href="http://www.flickr.com/photos/caike/4557850560"><img
class="aligncenter size-full wp-image-912" style="margin-top: 1px; margin-bottom: 1px; border: 1px solid black;" src="http://caikesouza.com/blog/wp-content/uploads/marcela_and_dave.jpg" alt="Retrospective" width="500" height="332" /></a></p><p
style="text-align: justify;">The way we do this is as a both technical and social retrospective. Usually ends up being pretty much social. We talk about things that worked well and things that need improvement.</p><p
style="text-align: justify;"><h2>Velocity</h2><p
style="text-align: justify;">On a real life project, back on the planning meeting, setting up expectations usually involves making estimates.</p><p
style="text-align: justify;">Most agile teams agree on <a
href="http://www.agilegamedevelopment.com/2006/03/hours-vs-story-points.html">estimating using story points rather than hours</a>. I see this as a valid approach, mostly because you get to let each member of the team make their own point &lt;-&gt; time association.</p><p
style="text-align: justify;">Velocity does <strong>not</strong> mean productivity, thus, greater velocity does <strong>not</strong> mean greater productivity. The focus here is consistency.</p><p
style="text-align: justify;">Consistency is knowing that every [<em>S</em>, a time-scope ] you have potentially shippable software, with additional business value to the product.</p><p
style="text-align: justify;">The question during planning should be something along the lines of:</p><p
style="text-align: justify;">&#8220;Out of all of these things that the team agreed on being delivered by the end of the iteration, how much of each should we be able to have ?&#8221;</p><p
style="text-align: justify;">Then, try and settle on the simplest thing that could resemble what the client has in mind. You still have room to impress him with something really cool - and by cool I mean <a
href="http://www.extremeprogramming.org/values.html">simple</a>.</p><p
style="text-align: justify;">By the end of the iteration, when the team should be about done with the things they estimated, the client should be seeing and <strong>using</strong> the software.</p><p
style="text-align: justify;">Even when I write code for fun, I like to set clear goals based on my velocity. For things that are still unclear, or if I&#8217;m not familiar with some technology involved, I reduce my scope and try to extract the first thing that would made me simply go &#8220;oh, that&#8217;s cool.&#8221;</p><p
style="text-align: justify;">The client, on the other hand, should be worried about the first thing that goes &#8220;$&#8221; (is there a sound for money?).</p><p
style="text-align: justify;">By reducing the scope with a client, we&#8217;re also reducing the time the client spends thinking about features he will probably never need.</p><p
style="text-align: justify;">We could tell him &#8220;<a
href="http://en.wikipedia.org/wiki/YAGNI">YAGNI</a> !!&#8221;.</p><p
style="text-align: justify;">That would sound totally extra-terrestrial, but totally awesome.</p><p
style="text-align: justify; "><h2>Learning your velocity</h2><p
style="text-align: center; "><a
href="http://www.flickr.com/photos/seandreilinger/1058631764/"><img
class="aligncenter size-full wp-image-914" style="margin-top: 1px; margin-bottom: 1px; border: 1px solid black;" src="http://caikesouza.com/blog/wp-content/uploads/baby_walking.jpg" alt="Learning your velocity" width="500" height="333" /></a></p><p
style="text-align: justify;">Since the people attending the Orlando Coding Dojo have been pretty much the same lately, with a few variations, we&#8217;ve been able to meet our expectations and always end the session with tests passing and working software.</p><p
style="text-align: justify;">It wasn&#8217;t always like this, though.</p><p
style="text-align: justify;">In the first few sessions we had no idea of how much work we were able to accomplish as a team. We would end our sessions kinda frustrated, because we weren&#8217;t able to meet our expectations.</p><p
style="text-align: justify;">The same thing happens with other Coding Dojo groups who are just getting started and also with agile teams in the first few iterations on real life projects.</p><p
style="text-align: justify;">Even without writing down estimates (in points or hours), but because we are constantly planning and running retrospectives to improve our process, we are becoming more familiar with our actual velocity.</p><p
style="text-align: justify;">This means we are able to have about 6-9 people, who don&#8217;t even work professionally on the same technology, agreeing on something and getting it done in about 2 hours. I find this fantastic!</p><p
style="text-align: justify;">Software development is a continuous learning process. Learning your team&#8217;s velocity (and your own velocity when you go solo), enables you to deliver early, deliver often and deliver always.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=aobrNvwlEH8:SgBrHQp1bWY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=aobrNvwlEH8:SgBrHQp1bWY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=aobrNvwlEH8:SgBrHQp1bWY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/aobrNvwlEH8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2010/06/coding-dojo-learning-process-velocity/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2010/06/coding-dojo-learning-process-velocity/</feedburner:origLink></item> <item><title>Meet the Orlando Coding Dojo</title><link>http://feedproxy.google.com/~r/smallacts/~3/Y4CqjKvsZL4/</link> <comments>http://caikesouza.com/blog/2010/05/meet-the-orlando-coding-dojo/#comments</comments> <pubDate>Mon, 10 May 2010 16:40:26 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://caikesouza.com/blog/?p=863</guid> <description><![CDATA[Here&#8217;s a short video from our last session.
Make sure you check out our official web site and join our mailing list.
]]></description> <content:encoded><![CDATA[<p>Here&#8217;s a short video from our last session.</p><p>Make sure you check out our <a
href="http://orlandodojo.org">official web site</a> and join our <a
href="http://groups.google.com/group/orlando-dojo">mailing list</a>.</p> <object
width='500' height='360'><param
name='allowfullscreen' value='true' /><param
name='allowscriptaccess' value='always' /><param
name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=11596450&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed
src='http://vimeo.com/moogaloop.swf?clip_id=11596450&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='500' height='360'></embed></object><br
/><a
href='http://vimeo.com/11596450'>View on Vimeo</a>.
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=Y4CqjKvsZL4:inxaTdl1v5s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=Y4CqjKvsZL4:inxaTdl1v5s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=Y4CqjKvsZL4:inxaTdl1v5s:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/Y4CqjKvsZL4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2010/05/meet-the-orlando-coding-dojo/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2010/05/meet-the-orlando-coding-dojo/</feedburner:origLink></item> <item><title>ftp upload in one command</title><link>http://feedproxy.google.com/~r/smallacts/~3/yVaZ8vHZwbc/</link> <comments>http://caikesouza.com/blog/2010/03/ftp-upload-in-one-command/#comments</comments> <pubDate>Thu, 04 Mar 2010 22:23:35 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[en]]></category><category><![CDATA[linux]]></category><category><![CDATA[opensource]]></category><guid isPermaLink="false">http://www.caikesouza.com/blog/?p=736</guid> <description><![CDATA[As part of a backup routine, I had to upload a file to an ftp server. It actually took me some time to figure out how to do this with one command, so I thought I&#8217;d post it here:
curl -sS -T ${FILE_PATH}/${FILE_NAME} --ftp-pasv \
ftp://${FTP_USER}:${FTP_PWD}@${FTP_URL}/${FILE_NAME}
This example is uploading the file to the ftp server using silent [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">As part of a backup routine, I had to upload a file to an ftp server. It actually took me some time to figure out how to do this with one command, so I thought I&#8217;d post it here:</p><pre><code>curl -sS -T ${FILE_PATH}/${FILE_NAME} --ftp-pasv \
ftp://${FTP_USER}:${FTP_PWD}@${FTP_URL}/${FILE_NAME}</code></pre><p
style="text-align: justify;">This example is uploading the file to the ftp server using silent mode (-s) and showing errors when they occur (-S), while connecting to the server in passive mode (&#8211;ftp-pasv).</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=yVaZ8vHZwbc:RxElKzyhTv0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=yVaZ8vHZwbc:RxElKzyhTv0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=yVaZ8vHZwbc:RxElKzyhTv0:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/yVaZ8vHZwbc" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2010/03/ftp-upload-in-one-command/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2010/03/ftp-upload-in-one-command/</feedburner:origLink></item> <item><title>Refactoring at ORUG</title><link>http://feedproxy.google.com/~r/smallacts/~3/Az-C52PBT_k/</link> <comments>http://caikesouza.com/blog/2010/01/refactoring-at-orug/#comments</comments> <pubDate>Tue, 19 Jan 2010 04:39:44 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[agile]]></category><category><![CDATA[en]]></category><category><![CDATA[opensource]]></category><category><![CDATA[ruby]]></category><category><![CDATA[software craftsmanship]]></category><guid isPermaLink="false">http://www.caikesouza.com/blog/?p=702</guid> <description><![CDATA[Here is the slides for the Refactoring talk I did last Thursday at the Orlando Ruby User Group meeting. In case you want to hear me speaking along with the slides, I&#8217;ve put it up on vcasmo also.
Refactoring
View more documents from Caike Souza.]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">Here is the slides for the Refactoring talk I did last Thursday at the <a
href="http://orug.org/articles/2010/01/07/meeting-january-14th">Orlando Ruby User Group</a> meeting. In case you want to hear me speaking along with the slides, I&#8217;ve <a
href="http://www.vcasmo.com/video/caike/7205">put it up on vcasmo</a> also.</p><div
style="width:425px;text-align:left" id="__ss_2927365"><a
style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/caikesouza/refactoring-2927365" title="Refactoring">Refactoring</a><object
style="margin:0px" width="425" height="355"><param
name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=refactoringruby-100115230806-phpapp01&#038;rel=0&#038;stripped_title=refactoring-2927365" /><param
name="allowFullScreen" value="true"/><param
name="allowScriptAccess" value="always"/><embed
src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=refactoringruby-100115230806-phpapp01&#038;rel=0&#038;stripped_title=refactoring-2927365" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div
style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a
style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a
style="text-decoration:underline;" href="http://www.slideshare.net/caikesouza">Caike Souza</a>.</div></div> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=Az-C52PBT_k:fsoFPfCJegk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=Az-C52PBT_k:fsoFPfCJegk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=Az-C52PBT_k:fsoFPfCJegk:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/Az-C52PBT_k" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2010/01/refactoring-at-orug/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2010/01/refactoring-at-orug/</feedburner:origLink></item> <item><title>Autotesting PHP applications (and others)</title><link>http://feedproxy.google.com/~r/smallacts/~3/5ODUIGNQkpM/</link> <comments>http://caikesouza.com/blog/2010/01/autotesting-php-applications-and-others/#comments</comments> <pubDate>Tue, 12 Jan 2010 20:24:14 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[agile]]></category><category><![CDATA[en]]></category><category><![CDATA[opensource]]></category><category><![CDATA[php]]></category><guid isPermaLink="false">http://www.caikesouza.com/blog/?p=637</guid> <description><![CDATA[So you&#8217;ve probably heard of ZenTest/Autotest, right?
In case you haven&#8217;t, it is a Ruby gem that (among other things) automatically runs your tests whenever it notices that a file in you project has changed. It&#8217;s a great productivity boost, because it saves you from having to run your tests each time you make a change [...]]]></description> <content:encoded><![CDATA[<p>So you&#8217;ve probably heard of <a
href="http://www.zenspider.com/ZSS/Products/ZenTest">ZenTest/Autotest</a>, right?</p><p
style="text-align: justify;">In case you haven&#8217;t, it is a Ruby gem that (among other things) automatically runs your tests whenever it notices that a file in you project has changed. It&#8217;s a great productivity boost, because it saves you from having to run your tests each time you make a change to your program. The perfect tool if you are doing TDD.</p><p
style="text-align: justify;">So I wanted to get this autotest functionality going for projects in other languages - like PHP, for example - but apparently ZenTest/Autotest only works within Ruby projects.</p><p
style="text-align: justify;">Talking to the <a
href="http://envylabs.com/">EnvyLabs&#8217;</a> guys I was told about <a
href="http://github.com/mynyml/watchr">Watchr</a>, a Ruby gem that monitors files <a
href="http://github.com/caike/watchr_running_php/blob/master/watchr.conf">matched by a regular expression</a> and triggers a user defined command whenever a file changes. That&#8217;s enough to get you started in an autotest-like tool for PHP - or just about any other language.</p><p
style="text-align: justify;">I&#8217;ve setup an example PHP project of Watchr playing an autotest role in a PHP project:</p><p
style="text-align: justify;"><p
style="text-align: justify;"><object
width='500' height='290'><param
name='allowfullscreen' value='true' /><param
name='allowscriptaccess' value='always' /><param
name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=8700084&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed
src='http://vimeo.com/moogaloop.swf?clip_id=8700084&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='500' height='290'></embed></object><br
/><a
href='http://vimeo.com/8700084'>View on Vimeo</a>.</p><p
style="text-align: justify;">The source code from this example can be seen at <a
href="http://github.com/caike/watchr_running_php">http://github.com/caike/watchr_running_php</a></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=5ODUIGNQkpM:9xHEnYdLfRI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=5ODUIGNQkpM:9xHEnYdLfRI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=5ODUIGNQkpM:9xHEnYdLfRI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/5ODUIGNQkpM" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2010/01/autotesting-php-applications-and-others/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2010/01/autotesting-php-applications-and-others/</feedburner:origLink></item> <item><title>AppleScript for my Rails terminal tabs</title><link>http://feedproxy.google.com/~r/smallacts/~3/q37xT91O19g/</link> <comments>http://caikesouza.com/blog/2009/12/applescript-for-rails-terminal-tabs/#comments</comments> <pubDate>Thu, 10 Dec 2009 19:24:22 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[en]]></category><category><![CDATA[mac]]></category><category><![CDATA[rails]]></category><guid isPermaLink="false">http://www.caikesouza.com/blog/?p=613</guid> <description><![CDATA[While working on a Rails project I always have at least 4 different Terminal tabs that I use forspork server
autospec
./script/server
command line stuff (generators and general shell commands)Setting up the tabs all the time is kind of a boring and repetitive task. This truly deserved some automation and it was the perfect excuse for writing my [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">While working on a Rails project I always have at least 4 different Terminal tabs that I use for</p><ol
style="text-align: justify;"><li><a
href="http://github.com/timcharper/spork">spork</a> server</li><li>autospec</li><li>./script/server</li><li>command line stuff (generators and general shell commands)</li></ol><p
style="text-align: justify;">Setting up the tabs all the time is kind of a boring and repetitive task. This truly deserved some automation and it was the perfect excuse for writing my first AppleScript.</p><p
style="text-align: justify;">After some googling around I came up with this bash/AppleScript to do these tasks for me (and also open up TextMate):</p><pre><code>#!/bin/bash

if [ $# -ne 1 ]; then
    PATHDIR=`pwd`
else
    PATHDIR=$1
fi

/usr/bin/osascript &lt;&lt;EOF
on new_terminal_tab()
	tell application "System Events" to tell process "Terminal" \
        to keystroke "t" using command down
end new_terminal_tab

set actions to {"spork rspec", "autospec", "./script/server"}

tell application "Terminal"
	do script with command "cd $PATHDIR &amp;&amp; mate . &amp;&amp; clear" \
	in selected tab of the front window
	repeat with action in actions
		my new_terminal_tab()
		do script with command "cd $PATHDIR &amp;&amp; " &amp; action \
		in selected tab of the front window
		if action contains "spork" then
			delay 7
		end if
	end repeat
end tell
EOF
</code></pre><p>If only I had used the <a
href="http://www.google.com/search?q=rails+terminal+launcher">right search words</a> I would have found <a
href="http://blog.ardes.com/2009/1/22/rails-multi-terminal-launcher">Nick Rutherfor</a> had been through the same situation.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=q37xT91O19g:BPUD4frh8X0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=q37xT91O19g:BPUD4frh8X0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=q37xT91O19g:BPUD4frh8X0:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/q37xT91O19g" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2009/12/applescript-for-rails-terminal-tabs/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2009/12/applescript-for-rails-terminal-tabs/</feedburner:origLink></item> <item><title>Using Authlogic for general email validation</title><link>http://feedproxy.google.com/~r/smallacts/~3/dRRFUab1cdY/</link> <comments>http://caikesouza.com/blog/2009/11/using-authlogic-for-email-validation/#comments</comments> <pubDate>Thu, 05 Nov 2009 15:55:39 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[en]]></category><category><![CDATA[rails]]></category><category><![CDATA[ruby]]></category><category><![CDATA[web]]></category><category><![CDATA[authlogic]]></category><category><![CDATA[email]]></category><category><![CDATA[regexp]]></category><category><![CDATA[validation]]></category><guid isPermaLink="false">http://www.caikesouza.com/blog/?p=604</guid> <description><![CDATA[In case you are using Authlogic for authentication in your Rails apps, then you are probably using its email format validation in the user registration step. You get this validation for free just by specifying your model to acts_as_authentic:
class User &#60; ActiveRecord::Baseacts_as_authenticend
That&#8217;s it for the user model and its registration field validations (login, email [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">In case you are using <a
href="http://github.com/binarylogic/authlogic">Authlogic</a> for authentication in your Rails apps, then you are probably using its email format validation in the user registration step. You get this validation for free just by specifying your model to <strong>acts_as_authentic:</strong></p><pre><code>class User &lt; ActiveRecord::Base

  acts_as_authentic

end</code></pre><p
style="text-align: justify;">That&#8217;s it for the user model and its registration field validations (login, email and password).</p><p
style="text-align: justify;">But what if you have some other model in your application with an email field that you also want to validate ? You could just get your favorite email format regexp and use it with the <a
href="http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#M002168">validates_format_of</a> method:</p><pre><code>class Band &lt; ActiveRecord::Base

  validates_presence_of :manager, :description
  validates_format_of :email, :with =&gt; /SomeRegexpYouGotFromGoogle/

end</code></pre><p
style="text-align: justify;">But that would be decentralizing the email validation concern - totally anti-DRY and error-prone.</p><p
style="text-align: justify;">A better solution would be to use the email regexp that&#8217;s in <a
href="http://github.com/binarylogic/authlogic">Authlogic</a>, which is the same that&#8217;s already validating your user model email field.</p><pre><code>class Band &lt; ActiveRecord::Base

  validates_presence_of :manager, :description
  validates_format_of :email, :with =&gt; Authlogic::Regex.email

end</code></pre><p>That&#8217;s it. Hope it helps someone keep their code clean.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=dRRFUab1cdY:sQTYSnqJdKw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=dRRFUab1cdY:sQTYSnqJdKw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=dRRFUab1cdY:sQTYSnqJdKw:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/dRRFUab1cdY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2009/11/using-authlogic-for-email-validation/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2009/11/using-authlogic-for-email-validation/</feedburner:origLink></item> <item><title>Writing expressive code</title><link>http://feedproxy.google.com/~r/smallacts/~3/XrUl_UJKpEU/</link> <comments>http://caikesouza.com/blog/2009/10/writing-expressive-code/#comments</comments> <pubDate>Wed, 07 Oct 2009 20:37:23 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[agile]]></category><category><![CDATA[en]]></category><category><![CDATA[ruby]]></category><category><![CDATA[software craftsmanship]]></category><guid isPermaLink="false">http://www.caikesouza.com/blog/?p=570</guid> <description><![CDATA[Software developers read a lot more code than they actually write. An application source code is nothing but a story written using a specific language. It has state and describes behaviour.
Code written once, will be read millions of times. For the most part, it will be read by a compiler who doesn&#8217;t really look for anything [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify; ">Software developers read a lot more code than they actually write. An application source code is nothing but a story written using a specific language. It has state and describes behaviour.</p><p
style="text-align: justify; ">Code written <strong>once</strong>, will be read millions of times. For the most part, it will be read by a compiler who doesn&#8217;t really look for anything but correct syntax. Compilers are not into reading stories. They are too busy for that. Just like assembly-line workers, they follow a plan and do exactly what they were told. As soon as they pass things over to the runtime, they are done. On the other hand, we developers are not like that, are we ? <strong>No, we are not!</strong></p><p
style="text-align: justify; ">We are <a
href="http://en.wikipedia.org/wiki/Software_Craftsmanship">software craftsmen</a>. We like to read stories and even get paid to write some every once in a while.</p><div
id="attachment_589" class="wp-caption aligncenter" style="width: 510px"><a
href="http://www.flickr.com/photos/dhammza/91435718/"><img
class="size-full wp-image-589" src="http://www.caikesouza.com/blog/wp-content/uploads/man_reading_book.jpg" alt="man_reading_book" width="500" height="440" /></a><p
class="wp-caption-text">http://www.flickr.com/photos/dhammza/91435718/</p></div><p
style="text-align: center;"><p
style="text-align: justify; ">Think about it the next time you hack that magic one-liner in an application. Do you think you will be able to read that <a
href="http://codegolf.com/">code-golf</a> champion piece of code the next time you look at it ? What if it is not you, but someone else reading it ?</p><blockquote><p
style="text-align: justify;">&#8220;Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live (&#8230;) Alternatively, always code and comment in such a way that if someone a few notches junior picks up the code, they will take pleasure in reading and learning from it.&#8221; - Ward Cunningham, <a
href="http://c2.com/cgi/wiki?CodeForTheMaintainer">CodeForTheMaintainer</a></p></blockquote><p
style="text-align: justify;">An example I like to use for expressive code is method parameters in Ruby. Let&#8217;s say you want to stay fit and write a method to calculate a body fat percentage. You write the following:</p><pre><code>def body_fat_percentage(name, age, height, weight, metric_system)
end</code></pre><p>Apparently it looks nice. Let&#8217;s see how it could be invoked:</p><pre><code># fred's height in meters and weight in kilograms
body_fat_percentage("fred", 30, 1.82, 90, 1)

# barney's height in feet and weight in pounds
body_fat_percentage("barney", 32, 5, 300, 2)</code></pre><p
style="text-align: justify;">In order to write those two calls you would probably have to check the right order for the parameters in the method&#8217;s signature. Even worse, every time you read that line you would have to check back its signature just to make sure that the last argument determines the metric system or that the third argument is actually the height and not the weight.</p><p>That sounds like a pretty boring story to read!</p><p>Let&#8217;s make this piece of code more expressive:</p><pre><code># fred's height in meters and weight in kilograms
body_fat_percentage("fred", :age =&gt; 30, :height =&gt; 1.82,
  :weight =&gt; 90, :metric_system =&gt; MetricSystem::METERS_KG)

# barney's height in feet and weight in pounds
body_fat_percentage("barney", :age =&gt; 32, :height =&gt; 5,
:weight =&gt; 300, :metric_system =&gt; MetricSystem::FEET_LB)</code></pre><p>All we need to do to the method signature is to replace the standalone arguments for a hash.</p><pre><code>def body_fat_percentage(name, params={})
end</code></pre><p
style="text-align: justify;">From the method body, the values can be accessed using the keys, like params[:age], params[:height], etc.</p><p
style="text-align: justify;">In a real life situation, this expressiveness would be achieved from writing our expectations as unit tests. We would first write our failing tests as how we wanted our code to look and act like. From that, we would head towards making the tests pass. When all is green, the tests would turn out to be the reference for how to call the method (running and never-obsolete documentation) so there&#8217;s no need to go back to the implementation of the method itself to learn how to to use it.</p><p
style="text-align: justify;">Writing expressive code often means writing more code, but it also means writing better code. It&#8217;s not about making things work, it&#8217;s about <a
href="http://manifesto.softwarecraftsmanship.org/">making things right</a>.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=XrUl_UJKpEU:TFEIVeHSGlU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=XrUl_UJKpEU:TFEIVeHSGlU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=XrUl_UJKpEU:TFEIVeHSGlU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/XrUl_UJKpEU" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2009/10/writing-expressive-code/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2009/10/writing-expressive-code/</feedburner:origLink></item> <item><title>O conto do lenhador</title><link>http://feedproxy.google.com/~r/smallacts/~3/TLC3oEM0BuU/</link> <comments>http://caikesouza.com/blog/2009/09/o-conto-do-lenhador/#comments</comments> <pubDate>Tue, 01 Sep 2009 19:54:15 +0000</pubDate> <dc:creator>caike</dc:creator> <category><![CDATA[agile]]></category><category><![CDATA[pt]]></category><category><![CDATA[software craftsmanship]]></category><guid isPermaLink="false">http://www.caikesouza.com/blog/?p=550</guid> <description><![CDATA[Não lembro ao certo quando escutei este conto pela primeira vez.
&#8220;Certo dia, um rapaz que caminhava pelo bosque avistou um lenhador tentando derrubar uma árvore. Observou-o por alguns instantes e notou que, mesmo investindo cada vez mais força em suas machadadas, não estava obtendo muito sucesso em derrubar a árvore.
Então o rapaz sugeriu ao lenhador:
- [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">Não lembro ao certo quando escutei este conto pela primeira vez.</p><p
style="text-align: justify;">&#8220;Certo dia, um rapaz que caminhava pelo bosque avistou um lenhador tentando derrubar uma árvore. Observou-o por alguns instantes e notou que, mesmo investindo cada vez mais força em suas machadadas, não estava obtendo muito sucesso em derrubar a árvore.</p><p
style="text-align: justify;">Então o rapaz sugeriu ao lenhador:</p><p
style="text-align: justify;">- &#8216;Por que você não descansa um pouco e, enquanto isso, aproveita para amolar o seu machado ?&#8217;</p><p
style="text-align: justify;">O lenhador respondeu:</p><p
style="text-align: justify;">- &#8216;Não posso perder tempo! Tenho que derrubar logo esta árvore!&#8217;&#8221;</p><p
style="text-align: justify;"><p
style="text-align: justify;">Desenvolvimento de software é um <a
href="http://www.se-radio.net/podcast/2009-06/episode-138-learning-part-development-allan-kelly">processo contínuo de aprendizagem</a>. Diariamente nos deparamos com árvores a serem derrubadas. No caso das mais difíceis, pense em parar e refletir sobre o que está fazendo enquanto amola seu machado ao invés de ficar repetindo incessantemente a mesma coisa, esperando resultados diferentes (a definição de estupidez, segundo Einstein).</p><div
id="attachment_553" class="wp-caption aligncenter" style="width: 510px"><a
href="http://www.flickr.com/photos/shedboy/3610432084/"><img
class="size-full wp-image-553 " src="http://www.caikesouza.com/blog/wp-content/uploads/ax1.jpg" alt="Machado" width="500" height="281" /></a><p
class="wp-caption-text">http://www.flickr.com/photos/shedboy/3610432084/</p></div><p
style="text-align: justify;">Você reserva algum momento de sua semana para a leitura de blogs de referência da sua comunidade ?</p><p>Participa de alguma comunidade ?</p><p>Participa de pelo menos uma grande conferência por ano ?</p><p>Está lendo algum livro técnico ?</p><p
style="text-align: justify;">Estar atualizado é <a
href="http://blog.jayfields.com/2009/08/staying-current-software-developers.html">responsabilidade</a> de qualquer profissional de tecnologia.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/smallacts?a=TLC3oEM0BuU:tO_Z-z6w_0s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/smallacts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/smallacts?a=TLC3oEM0BuU:tO_Z-z6w_0s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/smallacts?i=TLC3oEM0BuU:tO_Z-z6w_0s:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/smallacts/~4/TLC3oEM0BuU" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://caikesouza.com/blog/2009/09/o-conto-do-lenhador/feed/</wfw:commentRss> <feedburner:origLink>http://caikesouza.com/blog/2009/09/o-conto-do-lenhador/</feedburner:origLink></item> </channel> </rss><!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk
Database Caching using disk

Served from: apache2-noxim.asuncion.dreamhost.com @ 2010-07-16 09:42:59 -->
