<?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; java</title>
	<atom:link href="http://stii.co.za/tag/java/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>The Google Go programming language</title>
		<link>http://stii.co.za/software-development/the-google-go-programming-language/</link>
		<comments>http://stii.co.za/software-development/the-google-go-programming-language/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 12:57:22 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google go]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[pascal]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=1059</guid>
		<description><![CDATA[Lately Google announced a wide array of new products and features. The Google Chrome browser, Google Wave, Android and Google Chrome OS are the ones immediately coming to mind. This morning I saw they released Go. Their own experimental programming language. Go is not a scripting (a.k.a. interpreted) language, but a compiled language like C [...]]]></description>
			<content:encoded><![CDATA[<p>Lately Google announced a wide array of new products and features. The Google Chrome browser, Google Wave, Android and Google Chrome OS are the ones immediately coming to mind. This morning I saw they released <a href="http://golang.org/">Go</a>. Their own experimental programming language. </p>
<p>Go is not a scripting (a.k.a. interpreted) language, but a compiled language like <strong>C or C++</strong>. It looks very, very simple compared to C/C++ and according to them it was born from their frustrations with said languages. This has potential to become popular should they drive it sufficiently. </p>
<p>The syntax of Go looks like a mix of Python, C, Java and Pascal. Have a look at this:</p>
<pre>
package main

import (
    "os";
    "flag";  // command line option parser
)

var omitNewline = flag.Bool("n", false, "don't print final newline")

const (
    Space = " ";
    Newline = "\n";
)

func main() {
    flag.Parse();   // Scans the arg list and sets up flags
    var s string = "";
    for i := 0; i < flag.NArg(); i++ {
        if i > 0 {
            s += Space
        }
        s += flag.Arg(i)
    }
    if !*omitNewline {
        s += Newline
    }
    os.Stdout.WriteString(s);
}
</pre>
<p>I can say this: It looks friendly! I like the sugar.</p>
<p>Some of the features makes a lot of sense and I hope this will evolve successfully. Just look at the names behind this little experimental project and you&#8217;re bound to get excited! <strong>I&#8217;d love to know what C and C++ stalwarts think</strong>.</p>
<p>PS: Love the origin of the name:</p>
<blockquote><p>“Ogle” would be a good name for a Go debugger.</p></blockquote>
<p>I concur.</p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/software-development/the-google-go-programming-language/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Developing Android apps using Netbeans</title>
		<link>http://stii.co.za/software-development/developing-android-apps-using-netbeans/</link>
		<comments>http://stii.co.za/software-development/developing-android-apps-using-netbeans/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 22:34:28 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=706</guid>
		<description><![CDATA[I prefer Netbeans to Eclipse. I know very little Java, but I&#8217;ve kind of grown used to Netbeans while exploring Groovy and Grails. Eclipse is the de facto standard for developing Android apps, although there are a Netbeans plugin. Here is how I got my Netbeans 6.5 instance to work with Android. First of all, [...]]]></description>
			<content:encoded><![CDATA[<p>I prefer <a href="http://netbeans.org">Netbeans</a> to <strong>Eclipse</strong>. I know very little Java, but I&#8217;ve kind of grown used to <strong>Netbeans</strong> while exploring <a href="http://stii.co.za/groovy-grails/quest-for-holy-grails/">Groovy and Grails</a>. Eclipse is the de facto standard for developing <a href="http://android.com">Android</a> apps, although there are a Netbeans plugin. Here is how I got my Netbeans 6.5 instance to work with <strong>Android</strong>.</p>
<p>First of all, you need to install the Netbeans Android plugin called <strong>nbandroid</strong>. In Netbeans, go to <strong>Tools > Plugins > Settings</strong> and click on the <strong>Add</strong> button and add the plugin update URL: <a href="http://kenai.com/projects/nbandroid/pages/Install">http://kenai.com/projects/nbandroid/pages/Install</a>. Install the Android plugin.</p>
<p>You need to download and extract the Android SDK. The latest version can be found on the <a href="http://developer.android.com/sdk/1.5_r2/index.html">Android Development site</a>. Extract the zip file.</p>
<p>The file structure for the new SDK has changed and Netbeans won&#8217;t work with the new SDK as is. You have to do the following:</p>
<pre>
~$ cd path/to/sdk
~/path/to/sdk$ cp -R platform/android-1.5/* ./
</pre>
<p>Start a new Android project in Netbeans and in the new project window, click the <strong>Manage Platforms</strong> button. </p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/06/picture-7-400x238.png" alt="netbeans manage platforms" title="netbeans manage platforms" width="400" height="238" class="aligncenter size-medium wp-image-707" /></p>
<p>Select the &#8220;Google Android Open Handheld Platform&#8221; option and click the Next button. </p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/06/picture-10-400x293.png" alt="netbeans select platform type" title="netbeans select platform type" width="400" height="293" class="aligncenter size-medium wp-image-708" /></p>
<p>Navigate to the path where your SDK is (the path to the prepared one as per the above mentioned steps). Click the <strong>finish</strong> button and it should be good to go.</p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/06/picture-11-400x340.png" alt="netbeans select android sdk" title="netbeans select android sdk" width="400" height="340" class="aligncenter size-medium wp-image-709" /></p>
<p>Before you start hammering away at your newly created Android project, you need to set up an emulator to test your application, else you would not be able to test anything.</p>
<p>You need the API target id in order to create an emulator. Do it as follows:</p>
<pre>
~/path/to/sdk$ android list targets
Available Android targets:
id: 1
     Name: Android 1.1
     Type: Platform
     API level: 2
     Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id: 2
     Name: Android 1.5
     Type: Platform
     API level: 3
     Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id: 3
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Description: Android + Google APIs
     Based on Android 1.5 (API level 3)
     Libraries:
      * com.google.android.maps (maps.jar)
          API for Google Maps
     Skins: HVGA (default), HVGA-L, QVGA-P, HVGA-P, QVGA-L
</pre>
<p>Say you want to test using the Android 1.5 API, you need to specify the target as 2 (see? id: 2) With this information in your arsenal, type the following:</p>
<pre>
~/path/to/sdk$ android create avd -n avd_1.5_1 -t 2
</pre>
<p>The -t 2 section of the command is the target id as per the previous command.</p>
<p>The last step is to add the following to your project&#8217;s build.xml file. </p>
<pre>
&lt;target name="-pre-init"&gt;
        &lt;property name="emulator.options" value="-avd avd_1.5_1"/&gt;
&lt;/target&gt;
</pre>
<p>I.e. your build.xml file should look something like this (without the &#8230; truncated &#8230; part): </p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project name="AndroidApplication2" default="default" basedir="."&gt;
    ... truncated ...
    &lt;target name="-pre-init"&gt;
        &lt;property name="emulator.options" value="-avd avd_1.5_1"/&gt;
    &lt;/target&gt;
&lt;/project&gt;
</pre>
<p>That&#8217;s it! Now make it do something simple and run your application. It should open an Emulator window and run your application. Nifty!</p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/06/picture-12-400x332.png" alt="android emulator" title="android emulator" width="400" height="332" class="aligncenter size-medium wp-image-711" /></p>
<p>Here are the sources that solved my problems:<br />
<a href="http://wiki.netbeans.org/IntroAndroidDevNetBeans">http://wiki.netbeans.org/IntroAndroidDevNetBeans</a><br />
<a href="http://kenai.com/projects/nbandroid/forums/forum/topics/657-Unable-to-add-the-android-platform-in-netbean-6-5">http://kenai.com/&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/software-development/developing-android-apps-using-netbeans/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Quest for holy Grails</title>
		<link>http://stii.co.za/groovy-grails/quest-for-holy-grails/</link>
		<comments>http://stii.co.za/groovy-grails/quest-for-holy-grails/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 15:04:17 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Groovy & Grails]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=701</guid>
		<description><![CDATA[This weekend I decided to take some me time and learn something new. I&#8217;ve been looking at Groovy a little and decided to play with Grails (A Ruby on Rails like MVC web development framework for Groovy) a couple of hours over the weekend. I downloaded the minibook &#8220;Getting started with Grails&#8221; (which you can [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://groovy.codehaus.org"><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" /></a>This weekend I decided to take some me time and learn something new. I&#8217;ve been looking at <a href="http://groovy.codehaus.org">Groovy</a> a little and decided to play with <a href="http://www.grails.org/">Grails</a> (A <strong>Ruby on Rails</strong> like <strong>MVC web development framework</strong> for <strong>Groovy</strong>) a couple of hours over the weekend. I downloaded the minibook &#8220;<a href="http://www.infoq.com/minibooks/grails">Getting started with Grails</a>&#8221; (which you can download for free upon registration at InfoQ) and started working through it.</p>
<p>I found it all surprisingly simple, even though it would be safe to say I have almost ZERO Java experience or knowledge. I found it all very intuitive and well explained, although I should add that I have not yet completed the entire exercise.</p>
<p>I&#8217;m using <a href="http://netbeans.org">Netbeans</a> as the IDE of choice and it is pretty impressive! At first I found the project structure a little confusing as it is different to the Grails file system. </p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/06/picture-3.png" alt="netbeans grails project" title="netbeans grails project" width="392" height="322" class="aligncenter size-full wp-image-702" /></p>
<p>Found that all I need to do to see the Grails file system is to click on the Files tab in the project window. </p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/06/picture-4.png" alt="netbeans grails file system" title="netbeans grails file system" width="390" height="322" class="aligncenter size-full wp-image-703" /></p>
<p>I pretty much followed the instructions in the book I downloaded. I&#8217;m sure it would get harder and more tricky, but so far so good. I&#8217;m loving it already! Now the trick would be finding more time for playing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/groovy-grails/quest-for-holy-grails/feed/</wfw:commentRss>
		<slash:comments>1</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>
	</channel>
</rss>

