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

<channel>
	<title>Es Tea Double Eye &#187; ruby</title>
	<atom:link href="http://stii.co.za/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://stii.co.za</link>
	<description>You&#039;re never too old for a happy childhood</description>
	<lastBuildDate>Fri, 19 Aug 2011 02:20:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<atom:link rel='hub' href='http://stii.co.za/?pushpress=hub'/>
		<item>
		<title>DZone Refcardz for software developers</title>
		<link>http://stii.co.za/software-development/dzone-refcardz-for-software-developers/</link>
		<comments>http://stii.co.za/software-development/dzone-refcardz-for-software-developers/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 13:50:46 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[dzone]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[refcardz]]></category>
		<category><![CDATA[references]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=738</guid>
		<description><![CDATA[DZone is a social bookmarking service specifically focused on technology and software development. It is a fantastic resource. Recently they released a fantastic new service called Refcardz which is like shortcut reference documents for various programming languages or technologies. Best of all, it is FREE! From languages like PHP, Ruby, Groovy and Java all the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dzone.com">DZone</a> is a social bookmarking service specifically focused on technology and software development. It is a fantastic resource. Recently they released a fantastic new service called <a href="http://refcardz.dzone.com/">Refcardz</a> which is like shortcut reference documents for various programming languages or technologies. Best of all, it is <strong><em>FREE</em></strong>!</p>
<p><a href="http://refcardz.dzone.com/"><img src="http://stii.co.za/wp-content/uploads/2009/06/Picture-17.png" alt="DZone Refcardz" title="DZone Refcardz" width="341" height="81" class="aligncenter size-full wp-image-739" /></a></p>
<p>From languages like <strong>PHP, Ruby, Groovy and Java</strong> all the way through to <strong>Apache and High Scalability</strong> explained. All that is required is that you must be a registered DZone member and you can download the documents for free. There is over 50 reference documents, so it is well worth the effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/software-development/dzone-refcardz-for-software-developers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Java is Groovy and Groovy is Java</title>
		<link>http://stii.co.za/software-development/java-is-groovy-and-groovy-is-java/</link>
		<comments>http://stii.co.za/software-development/java-is-groovy-and-groovy-is-java/#comments</comments>
		<pubDate>Thu, 21 May 2009 20:02:14 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=667</guid>
		<description><![CDATA[groovy &#124;ˈgroōvē&#124; adjective ( groovier , grooviest ) informal dated or humorous fashionable and exciting : sporting a groovy new haircut. • enjoyable and excellent : he played all the remarkably groovy guitar parts himself. That is as defined in my beloved and trusted Mac Dictionary. I have to do a little Java project soon. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://stii.co.za/wp-content/uploads/2009/05/groovy_transparent.png" alt="groovy_transparent" title="groovy_transparent" width="215" height="107" class="alignright size-full wp-image-668" /><strong>groovy</strong> |ˈgroōvē|<br />
adjective ( groovier , grooviest ) informal dated or humorous<br />
<em>fashionable and exciting</em> : sporting a groovy new haircut.<br />
    • <em>enjoyable and excellent</em> : he played all the remarkably groovy guitar parts himself.</p>
<p>That is as defined in my beloved and trusted Mac Dictionary. I have to do a little <strong>Java</strong> project soon. Not because I want to, because I <em>HAVE</em> to for <a href="http://afrigator.com">Afrigator</a>. Don&#8217;t get me wrong, I think Java is great and powerful. I have a healthy dose of respect for it. Problem is, I&#8217;ve never done anything remotely formal in Java. The only experience I have with it was when I checked it out about 6 years ago. Safe to say, I&#8217;m a <a href="http://stii.co.za/inspiration/the-perpetual-n00b/">n00b</a>.</p>
<p>The problem is that I&#8217;m quite busy these days. Time and energy is not much for attempting learning a mammoth like Java. </p>
<p>Hello, <a href="http://groovy.codehaus.org">Groovy</a>! <strong>Groovy</strong> is a dynamic language specifically for the Java platform. Groovy is built for the JVM, making it easy for Java to integrate with Groovy vice versa. In Netbeans, they went a far as not even having an option to create a Groovy project. You create a normal Java project and then add Groovy classes to it. That is how tightly it seems integrated, which is good news for a n00b like me :)</p>
<p>The syntax itself seems very close to that of <a href="http://stii.co.za/tag/ruby/">Ruby</a>. Lets look at these examples (from the excellent article by Gerald Bauer &#8211; <a href="http://viva.sourceforge.net/talk/jug-mar-2004/slides.html">Groooooovy Babe: Jazzing Up Plain Old Java</a>)</p>
<p>Here is some Java code</p>
<pre>
import java.util.*;

public class HelloWorld
{
  public static void main( String args[] )
  {
     List country = new ArrayList();
     country.add( "Canada" );
     country.add( "Austria" );
     country.add( "Brazil" );

     Collections.sort( country );

     for( Iterator it = country.iterator(); it.hasNext() )
        System.out.println( "Hello " + it.next() );
  }
}
</pre>
<p>The same in Groovy ( note the code reduction compared to Java :) )</p>
<pre>
country = [ 'Canada', 'Austria', 'Brazil' ]
country.sort
country.each { println "Hello ${it}" }
</pre>
<p>And in Ruby</p>
<pre>
country = [ 'Canada', 'Austria', 'Brazil' ]
country.sort
country.each { |country| puts "Hello #{country}" }
</pre>
<p>To top it all off, they even have their own Rails-like web framework called Grails (Groovy on Rails). I&#8217;ll check that out in due time. </p>
<p>All in all, Groovy feels much more comfortable and familiar to me. I&#8217;m looking forward to this little challenge and will probably write about it as I go along. <a href="http://aslamkhan.net/">Aslam Khan</a> assured me that it is solid and he even have some Groovy code out there in the wild in production which is comforting! That and knowing someone who is an expert to ask for advice when the going gets rough, since I&#8217;m fairly sure it will get rough due to n00bn3ss!</p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/software-development/java-is-groovy-and-groovy-is-java/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Fabric, Capistrano in Python</title>
		<link>http://stii.co.za/general/fabric-capistrano-python/</link>
		<comments>http://stii.co.za/general/fabric-capistrano-python/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 14:27:33 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[fabric]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=38</guid>
		<description><![CDATA[If you still use FTP or SCP or sFTP to deploy projects, you&#8217;re missing out big time on the ease of either Ruby&#8217;s Capistrano or Python&#8217;s Fabric. Capistrano is almost synonymous with Ruby on Rails, though it is simple to setup with any project. We at Afrigator uses Capistrano to deploy changes to the staging [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.nongnu.org/fab/fabric-logo.png" alt="Fabric" style="float:right; margin: 5px;" />If you still use FTP or SCP or sFTP to deploy projects, you&#8217;re missing out big time on the ease of either <a href="http://www.capify.org/">Ruby&#8217;s Capistrano</a> or <a href="http://www.nongnu.org/fab/index.html">Python&#8217;s Fabric</a>. Capistrano is almost synonymous with <a href="http://rubyonrails.org">Ruby on Rails</a>, though it is simple to setup with any project. We at <a href="http://stii.co.za/afrigator/whats-in-a-afrigator-ranking/">Afrigator</a> uses Capistrano to deploy changes to the staging server and to the live servers. It is specially handy if you have to deploy to a cluster of servers. In short, it allows you to execute commands on a remote server(s). For example, you can set it up so that it backs up your files before the deployment or do something and simple and trivial as a directory listing. </p>
<p><img src="http://farm4.static.flickr.com/3248/3055462065_313f684d07_m.jpg" alt="Capistrano" style="display: block; margin: auto;" /></p>
<p>Today I came across <strong>Fabric</strong>, which is a Python version of Capistrano. Now, for the record, my use of Capistrano has been limited. I use it for what I need it. Nothing more. What I&#8217;m trying to say is I didn&#8217;t go into a very advanced setup of Capistrano, so I&#8217;m not really qualified to say which is better. On the Fabric page it says:</p>
<blockquote><p>It is a bit like a dumbed down Capistrano, except it&#8217;s in Python</p></blockquote>
<p>I like it. Its simple and it is easier than Capistrano IMHO. In the end, it comes down to which tool suits you best! Capistrano does support commits and rollbacks which, by the looks of it, Fabric don&#8217;t. </p>
<p>Setting up Capistrano was painless. All I had to do was </p>
<pre>
sudo gem install capistrano
</pre>
<p>Fabric had a few dependency issues, which I had to meet first before I could</p>
<pre>
sudo easy_install Fabric
</pre>
<p>It was looking for <a href="http://www.amk.ca/python/code/crypto">pycrypto</a> which I had to install before I could setup Fabric.</p>
<p>Once installed, using it is as straight forward as Capistrano. All you need to do is to create a <strong>fabfile</strong> which is a simple python file which holds all the config options and commands to execute remotely. The syntax is plain and simple and clean. Here is a simple example executing a directory listing on a remote server:</p>
<pre>
def listing():
    "Outputs a directory listing on the remote server."
    set(fab_user = 'stii')
    set(fab_hosts = ['stii.co.za'])
    run('ls -l /usr/bin')
</pre>
<p>Simple. Apart from the <strong>run</strong> command to execute remote queries, there are also a <strong>sudo</strong> (execute remote commands as a privileged user), <strong>local</strong> (execute commands on your local machine) and <strong>put</strong> (upload files to the remote servers) which is very handy. </p>
<p>I&#8217;m going to use it a bit more and would give you more feedback in a while. If you want, you can check it out!</p>
<p><strong><em>Update</em>:</strong> Here is an example of how to <a href="http://stii.co.za/python/upgrade-wordpress-using-python-fabric/">upgrade WordPress using Python Fabric</a></p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/general/fabric-capistrano-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

