<?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>Rob@Rojotek &#187; Development</title>
	<atom:link href="http://www.rojotek.com/blog/blog/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rojotek.com/blog</link>
	<description>Software Development in Brisbane</description>
	<lastBuildDate>Wed, 25 Jan 2012 10:34:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>A vocabulary for product licensing</title>
		<link>http://www.rojotek.com/blog/2011/04/14/a-vocabulary-for-product-licensing/</link>
		<comments>http://www.rojotek.com/blog/2011/04/14/a-vocabulary-for-product-licensing/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 04:26:21 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=1014</guid>
		<description><![CDATA[Getting a shared vocabulary for conversations is always useful. Here&#8217;s a pattern/vocabulary that I&#8217;ve recently been introduced to for thinking about software product licensing. Product Key License SKU Product Key A product key is the cryptographic software control used to control who/what can use the software License A license is the concept encapsulating that a [...]]]></description>
			<content:encoded><![CDATA[<p>Getting a shared vocabulary for conversations is always useful. Here&#8217;s a pattern/vocabulary that I&#8217;ve recently been introduced to for thinking about software product licensing.</p>
<ul>
<li>Product Key</li>
<li>License</li>
<li>SKU</li>
</ul>
<h2>Product Key</h2>
<p>A product key is the cryptographic software control used to control who/what can use the software</p>
<h2>License</h2>
<p>A license is the concept encapsulating that a customer is allowed to use the software.  A customer is licensed to use software.  This probably aligns with the legal contract that is used.</p>
<h2>SKU</h2>
<p>The SKU/stock keeping unit is how sales people can talk about the product.  They sell a SKU to a customer.</p>
<p>The customer licenses the SKU (product), and then they are issued a product key which enables them to use the software.</p>
<p>The precise definitions for product keys, licenses and SKUs is valuable when communicating between product, sales and marketing teams.  The list above seems to work pretty well.  Let me know in the comments if you&#8217;ve got better ideas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2011/04/14/a-vocabulary-for-product-licensing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Version Labelling Scheme for Software Product Development</title>
		<link>http://www.rojotek.com/blog/2011/03/31/a-version-labelling-scheme-for-software-product-development/</link>
		<comments>http://www.rojotek.com/blog/2011/03/31/a-version-labelling-scheme-for-software-product-development/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 07:13:16 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=1010</guid>
		<description><![CDATA[Computer software typically has a . separated version number. These numbers have value in helping to understand which version is being used. There is a shared understanding that things go from the most significant part of the version to the least. Having some precision around talking about a version labelling scheme is useful for setting [...]]]></description>
			<content:encoded><![CDATA[<p>Computer software typically has a . separated version number.  These numbers have value in helping to understand which version is being used.  There is a shared understanding that things go from the most significant part of the version to the least.   Having some precision around talking about a version labelling scheme is useful for setting up product lifecycles and communicating the details of a product.</p>
<p>I&#8217;ve heard numerous ways of thinking about the build numbers, normally involving terms like major and minor.  I&#8217;ve never quite been able to keep the terms and distinctions clear in my head, so was pretty excited to recently hear a different approach, which I&#8217;ll share below.</p>
<p>Version.Release.Modification.Build</p>
<p>In numbers this will look something like:<br />
3.4.5.1234</p>
<p>The idea is:</p>
<p>Version &#8212; a major product version.  Customers care and know about versions.  Versions are where potential breaking changes might happen.</p>
<p>Release &#8212; a major product release.  Customers will care about releases.  New functionality and bug fixes are introduced in releases.</p>
<p>Modification &#8212; a publicly available bugfix modification to the software.  Users should be able to safely move between modifications of a product without breaking things.  Modifications are focused around fixing problems in software.</p>
<p>Build &#8212; the internal build number for the software.  A build is useful for the unique identifier of the software by development.  The build number will be incremented automatically by the build system.  Typically an officially released modification will only have one build number.</p>
<p>Another factor to consider in the system above is that the first two numbers are typically controlled by the Sales and marketing arms of a company, and the last two should be controlled by engineering.  In fact if the last two numbers are being done correctly they should be automatically incremented, not being changed apart from automated systems and well defined rules.</p>
<p>For the first sets of numbers, engineering should be able to suggest that new functionality should be increasing at least the release, but it is a sales and marketing decision as to how much of an increase these might get.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2011/03/31/a-version-labelling-scheme-for-software-product-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Thought On Dynamic Languages</title>
		<link>http://www.rojotek.com/blog/2011/01/07/a-thought-on-dynamic-languages/</link>
		<comments>http://www.rojotek.com/blog/2011/01/07/a-thought-on-dynamic-languages/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 11:33:55 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=975</guid>
		<description><![CDATA[Reading http://www.codecommit.com/blog/ruby/monads-are-not-metaphors got me thinking on a tangent not related to the article. The examples start in ruby then move to Scala. Daniel points out the difference between some of the scala and ruby code which led me to the following thoughts. Duck type code encourages reading the source of methods to see the type [...]]]></description>
			<content:encoded><![CDATA[<p>Reading <a href="http://www.codecommit.com/blog/ruby/monads-are-not-metaphors">http://www.codecommit.com/blog/ruby/monads-are-not-metaphors</a> got me thinking on a tangent not related to the article. The examples start in ruby then move to Scala. Daniel points out the difference between some of the scala and ruby code which led me to the following thoughts.</p>
<p>Duck type code encourages reading the source of methods to see the type requirements of params. This is  a good thing.</p>
<p>For this to work well methods need to be short and well written, another good thing. While this doesn&#8217;t negate the value of STRONG types, it does make the case for dynamic languages better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2011/01/07/a-thought-on-dynamic-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 Tips from the Unix Greybeards</title>
		<link>http://www.rojotek.com/blog/2010/09/28/4-tips-from-the-unix-greybeards/</link>
		<comments>http://www.rojotek.com/blog/2010/09/28/4-tips-from-the-unix-greybeards/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 00:47:48 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=963</guid>
		<description><![CDATA[So I&#8217;ve been using Unix for a number of years, and think of myself as relatively competent in using Posix based operating systems. I&#8217;ve recently had the great pleasure of working with a few guys who&#8217;ve been using Unix for longer than I&#8217;ve been able to read, and I&#8217;ve been able to add a couple [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been using Unix for a number of years, and think of myself as relatively competent in using Posix based operating systems.  I&#8217;ve recently had the great pleasure of working with a few guys who&#8217;ve been using Unix for longer than I&#8217;ve been able to read, and I&#8217;ve been able to add a couple of more commands that are extremely useful.  It&#8217;s always great to watch a master using their tools, and to learn while working with them.</p>
<p>The commands below are a mix of ones that I&#8217;ve just learnt.  I probably should have known these already – but they are lovely, and you need to add them to your arsenal.</p>
<ol>
<li>!!</li>
<li>locate</li>
<li>look</li>
<li>xargs</li>
</ol>
<ul></ul>
<h3>1. !!</h3>
<p>re-execute the last command.</p>
<p>!! also has friends like !COMM where it will execute the last command in your history that starts with <span class="caps">COMM</span>.<br />
e.g.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">!find</div></td></tr></tbody></table></div>
<p>will re-execute your last find.</p>
<h3>2. locate</h3>
<p>With a locate database setup, locate is magic.  Think spotlight for the commandline.</p>
<h3>3. look</h3>
<p>The man page for look talks about it searching a file, then mentions about the default location being /usr/share/dict/words.  The default location is the key for the best usage.  It&#8217;s a great little dictionary for looking up how to speel words.</p>
<h3>4. xargs</h3>
<p>The most masterful developers that I work with have advanced beyond xargs to the next level, but for people continuing on their pathway to true unix mastery, xargs is a great tool to add in.</p>
<p>I commonly end up using variations of find and xargs together to search the contents of files, or to find out information about a project. If nothing else, the command:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">find . -name &quot;*.java&quot; |xargs wc -l | sort</div></td></tr></tbody></table></div>
<p>is your friend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2010/09/28/4-tips-from-the-unix-greybeards/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Eleven reasons to use the Play! Framework for Java Web Development</title>
		<link>http://www.rojotek.com/blog/2010/04/10/eleven-reasons-to-use-the-play-framework-for-java-web-development/</link>
		<comments>http://www.rojotek.com/blog/2010/04/10/eleven-reasons-to-use-the-play-framework-for-java-web-development/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 23:55:10 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Play! Framework]]></category>
		<category><![CDATA[play]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=929</guid>
		<description><![CDATA[The Play! Framework is a great tool for rapidly building Java web applications. Play! takes many of the ideas from the dynamic languages world (Rails and Django), and provides them to Java web development. Reasons to conside Play! for Java Development are: Rapid development via a local development server that automatically compiles your java code for you. [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.playframework.org/">Play!</a> Framework is a great tool for rapidly building Java web applications. Play! takes many of the ideas from the dynamic languages world (Rails and Django), and provides them to Java web development.  Reasons to conside Play! for Java Development are:</p>
<ol>
<li>Rapid development via a local development server that automatically compiles your java code for you.  It&#8217;s amazing how good it is to develop like this, and what a difference the rapid feedback loop makes.</li>
<li>A good clean MVC famework.</li>
<li>Nice testing support baked in.</li>
<li>A useful routing table to make clean urls easy to work with.</li>
<li>A focus around REST, but no slavish observence of it.</li>
<li>built-in simple JSON support.</li>
<li>A good module framework with useful <a href="http://www.playframework.org/modules">modules</a> including a &#8220;CRUD&#8221; module, and a <a href="http://www.playframework.org/documentation/1.1-trunk/scala">Scala module</a> currently under development</li>
<li>An interesting mix of Java class enhancement that makes it easy to work with code, and then have the enhancer provide some of the hard work for ensuring that multiple threads are handled well.</li>
<li>Deployment to a range of platforms, including <a href="http://java.sun.com/products/servlet/">JEE Servlets</a> (Play! 1.0.2 has been tested on containers such as tomcat, jetty, JBoss and IBM WebSphere Portal 6.1), and the <a href="http://code.google.com/appengine/docs/java/">GAE</a>.</li>
<li>Enhancements to the <a href="http://java.sun.com/developer/technicalArticles/J2EE/jpa/">JPA</a> which make it really easy to work with.</li>
<li>An active and supportive community.  There is the right balance between having strong opinions about the &#8220;Play!&#8221; way of doing things, and helping people to get things done.</li>
</ol>
<p>Play! makes Java web development fun and productive.  The feedback loop is really quick, and much of the boilerplate code is removed. It&#8217;s well worth considering for any application you want to write in Java.</p>
<p>Take a look at <a href="http://www.playframework.org/">the video</a>, and work through <a href="http://www.playframework.org/documentation/">the tutorial</a> to get a feel for what development with Play! is like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2010/04/10/eleven-reasons-to-use-the-play-framework-for-java-web-development/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Notes on Installing the Connections 2.5 Pilot</title>
		<link>http://www.rojotek.com/blog/2009/11/24/notes-on-installing-the-connections-25-pilot/</link>
		<comments>http://www.rojotek.com/blog/2009/11/24/notes-on-installing-the-connections-25-pilot/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 04:19:31 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=927</guid>
		<description><![CDATA[The installation of the Lotus Connections 2.5 pilot looks easy. Unfortunately the out of the box experience was not at all pleasurable for me. Here are some of the issues that I encountered while doing the install. I’m not sure how many of these were specific to my environment, but they did all hurt. 1) [...]]]></description>
			<content:encoded><![CDATA[<p>       The installation of the Lotus Connections 2.5 pilot looks easy. Unfortunately the out of the box experience was not at all pleasurable for me. Here are some of the issues that I encountered while doing the install. I’m not sure how many of these were specific to my environment, but they did all hurt.    </p>
<h3>       1) Don’t install from a directory with spaces.    </h3>
<p>       If you download the pilot to your desktop and try and install from here, things will crash and burn    </p>
<h3>       2) Don’t expect the VM to be easily moved around networks    </h3>
<p>       I started my second installation on my laptop at home, then brought it to work. This crashed and burned.    </p>
<h3>       3) Use fully qualified hostnames    </h3>
<p>       While the installer said that you could specify a short hostname or a fully qualified hostname, the short hostname did not work for me.    </p>
<h3>       4) Connections 2.5 is <span class="caps">RAM</span> hungry    </h3>
<p>       1.5 GBytes is not enough 2.5 GBytes is. Not sure of the exact threshold for it to work, but I can confirm that 2.5 GBytes is enough <span class="caps">RAM</span>.    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/11/24/notes-on-installing-the-connections-25-pilot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Making the Home and End Keys work in Eclipse 3.4 on Apple Mac OSX</title>
		<link>http://www.rojotek.com/blog/2009/06/12/making-the-home-and-end-keys-work-in-eclipse-34-on-apple-mac-osx/</link>
		<comments>http://www.rojotek.com/blog/2009/06/12/making-the-home-and-end-keys-work-in-eclipse-34-on-apple-mac-osx/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 01:22:29 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OS X Tools, Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=897</guid>
		<description><![CDATA[Hidden in the comments of the article of Starry Hope &#8211; Mac Home and End Keys are some instructions for how to make the home and end keys work well as begin and end line in eclipse. &#160;I&#39;ve done all the other tricks to make this work on my Mac, so was getting really frustrated [...]]]></description>
			<content:encoded><![CDATA[<p>       Hidden in the comments of the article of <a href="http://www.starryhope.com/tech/2006/mac-os-x-home-and-end-keys/#comment-294 ">Starry Hope &#8211; Mac Home and End Keys</a> are some instructions for how to make the home and end keys work well as begin and end line in eclipse. &#160;I&#39;ve done all the other tricks to make this work on my Mac, so was getting really frustrated with Eclipse. &#160;double home and double end are common key combinations for me in IntelliJ and Eclipse on Windows, so the current behaviour of going to the beginning or end of the file drives me crazy. &#160;The details of doing this differ slightly in Eclipse 3.4.1, so I&#39;ll list the steps I followed below.    </p>
<ol>
<li>        open the eclipse preferences pane      </li>
<li>        general-&#62;keys      </li>
<li>        in the filter type line start and note that there will be existing bindings when editing text.      </li>
<li>        select line start type home, and ensure that the &quot;when&quot; field stays with Editing Text      </li>
<li>        apply      </li>
<li>        follow this process for select line start, line end, and select line end.      </li>
</ol>
<p>       After doing this, expect your anger at eclipse on Mac to decrease to much more manageable levels.    </p>
<p>       &#160;    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/06/12/making-the-home-and-end-keys-work-in-eclipse-34-on-apple-mac-osx/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Port forwarding with iptables and debain</title>
		<link>http://www.rojotek.com/blog/2009/06/02/port-forwarding/</link>
		<comments>http://www.rojotek.com/blog/2009/06/02/port-forwarding/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 01:59:27 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[VMWare server]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=882</guid>
		<description><![CDATA[&#160; Subtitle:&#160; Avoid Remembering that VMWare Server Listens on Port 8333&#160; Alternate subtitle: Make Tomcat Listen on Port 80 It&#39;s increasingly common for applications to have web front ends. &#160;These all tend to run on their own port, which is nice in that it stops services from running into each other (and means that they [...]]]></description>
			<content:encoded><![CDATA[<p>       &#160;    </p>
<p http-equiv="Content-Type" name="generator" content="EditLive! 6.3.4.80">       Subtitle:&#160;    </p>
<h4>       Avoid Remembering that VMWare Server Listens on Port 8333&#160;    </h4>
<p>       Alternate subtitle:    </p>
<h4>       Make Tomcat Listen on Port 80    </h4>
<p>       It&#39;s increasingly common for applications to have web front ends. &#160;These all tend to run on their own port, which is nice in that it stops services from running into each other (and means that they can run as non-root), but is somewhat painful in that there are always a whole heap of different ports to remember. &#160;Exposing a service over port 80 makes it much easier to use (especially on ie which is dumb, and doesn&#39;t know to make requests to non standard ports default to port 80, generating much rsi, and many hours logged into the <a href="http://ie-waste.appspot.com">IE Waste Recorder</a>). &#160;Making services listen on port 80 on Debian is pretty straight forward. &#160;Follow the process below (which I pinched from someone somewhere in the blogosphere a while ago, put on a server as a part of some work with <a href="http://www.rojotek.com/blog/2008/09/09/ssh-tunnelling-is-your-friend/">SSH&#160;Tunnelling</a>, and only remembered recently when we were getting some VMWare servers setup). So here is the script. In your /etc/network/if-up.d add a script with the following:    </p>
<blockquote><p>         <strong><span style=" color: #1F497D;">#!/bin/sh</span></strong>      </p>
<p>         PATH=/sbin:/bin:/usr/sbin:/usr/bin      </p>
<p>         <em><span style=" color: #1F497D;"># Flush any existing firewall rules we might have</span></em><span style=" color: #1F497D;"><br />        </span> iptables -F<br />         iptables -t nat -F<br />         iptables -t mangle -F<br />         iptables -X      </p>
<p>         <em><span style=" color: #1F497D;"># Perform the rewriting magic.</span></em><br />         iptables -t nat -A PREROUTING -p tcp</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--</div></td></tr></tbody></table></div>
<p>dport 80 -j REDIRECT</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--</div></td></tr></tbody></table></div>
<p>to 8222<br />         iptables -t nat -A OUTPUT -o lo -p tcp</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--</div></td></tr></tbody></table></div>
<p>dport 80 -j REDIRECT</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--</div></td></tr></tbody></table></div>
<p>to-port 8222      </p>
</blockquote>
<p>       This forwards requests from port 80 to port 8222, and will work for local and remote requests. &#160;I keep this in a script called /etc/network/if-up.d/firewall, because <a href="http://www.netfilter.org/projects/iptables/index.html">iptables</a> is firewallish, and I believe this is the standard place for this to live. &#160;Remember to chmod +x the script. 8222 is the http port for vmware, and will redirect to 8333 using https.&#160;By putting the script in the /etc/network/if-up.d it will automatically be run when the networking layer of your debian installation is brought up.    </p>
<p>       As per the <a href="http://it.newinstance.it/2005/06/23/how-to-do-port-redirection-with-debian-and-doing-so-securing-tomcat/">NewInstance</a> post, this will work for Tomcat as well (Luigi put the iptables rules in a different spot, but that was in 2005, and /etc/network/if-up.d is the right place for this).    </p>
<p>       So with the above iptables rules, it will be easy to make any service available on port 80.    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/06/02/port-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating RubyGems in OSX 10.5.7</title>
		<link>http://www.rojotek.com/blog/2009/05/27/updating-rubygems-in-os-x/</link>
		<comments>http://www.rojotek.com/blog/2009/05/27/updating-rubygems-in-os-x/#comments</comments>
		<pubDate>Wed, 27 May 2009 05:15:54 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[RubyGems]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=871</guid>
		<description><![CDATA[.7When recently trying to install Sinatra via RubyGems, I got a message that RubyGems was out of date. I figured that gem would be smart enough to have an easy upgrade command, so there had to be a command to easily upgrade. Naturally there is: 1&#60;span style=&#34; background-color: #ffffcc;&#34;&#62;gem update --system&#60;/span&#62; I only found this [...]]]></description>
			<content:encoded><![CDATA[<p>       .7When recently trying to install <a href="http://www.sinatrarb.com">Sinatra</a> via RubyGems, I got a message that RubyGems was out of date. I figured that gem would be smart enough to have an easy upgrade command, so there had to be a command to easily upgrade. Naturally there is:    </p>
<p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;span style=&quot; background-color: #ffffcc;&quot;&gt;gem update --system&lt;/span&gt;</div></td></tr></tbody></table></div>
</p>
<p>       I only found this when looking through google, and I got a series of pages warning to be careful when using</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;span style=&quot; background-color: #ffffcc;&quot;&gt;gem update --system&lt;/span&gt;</div></td></tr></tbody></table></div>
<p>as it can kill existing gems (<a href="http://puctuatedproductivity.com/2007/11/01/unistalling-ruby-installed-by-source-on-os-x">http://puctuatedproductivity.com/2007/11/01/unistalling-ruby-installed-by-source-on-os-x</a>, <a href="http://thenoobonrails.blogspot.com/2008/06/doing-gem-update-system-might-lose-all.html">http://thenoobonrails.blogspot.com/2008/06/doing-gem-update-system-might-lose-all.html</a>) so I was a bit nervous. &#160;Since I have a periodic use of ruby and&#160;I&#39;m lazy enough to make Larry Wall proud, I figured I&#39;d take a punt on just using</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;span style=&quot; background-color: #ffffcc;&quot;&gt;gem update --system&lt;/span&gt;</div></td></tr></tbody></table></div>
<p>. &#160;Turns out it just works, and I&#39;ve kept all my old gems. &#160;Hooray. &#160;Given that the posts talking about issues are old, I&#39;m either assuming that they&#39;ve done things differently to me, or things have been fixed since then&#8230; so&#8230; if you need to update gems due to a message:    </p>
<blockquote><p>      ERROR: Error installing sinatra:<br />       fastthread requires RubyGems version &#62;= 1.2    </p></blockquote>
<p>       or similar, just use</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;span style=&quot; background-color: #ffffcc;&quot;&gt;gem update --system&lt;/span&gt;</div></td></tr></tbody></table></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/05/27/updating-rubygems-in-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Review of 5 Java JSON Libraries</title>
		<link>http://www.rojotek.com/blog/2009/05/07/a-review-of-5-java-json-libraries/</link>
		<comments>http://www.rojotek.com/blog/2009/05/07/a-review-of-5-java-json-libraries/#comments</comments>
		<pubDate>Thu, 07 May 2009 04:19:44 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Library]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=860</guid>
		<description><![CDATA[&#160; json.org lists 18 different Java libraries for working with JSON (Flexjson gets a double mention). These provide varying levels of functionality, from the simplest (the default org.json packages), to more comprehensive solutions like XStream and Jackson. Join me on a quick review of some of these, focusing on those which have friendly licenses, and [...]]]></description>
			<content:encoded><![CDATA[<p>       &#160;    </p>
<p http-equiv="Content-Type" name="generator" content="EditLive! 6.3.4.80">       <a href="http://www.json.org/">json.org</a> lists 18 different Java libraries for working with <span class="caps">JSON</span> (Flexjson gets a double mention). These provide varying levels of functionality, from the simplest (the default org.json packages), to more comprehensive solutions like XStream and Jackson. Join me on a quick review of some of these, focusing on those which have friendly licenses, and meet my requirements. &#160;If you are lazy, you can fast forward to my <a href="#Summary2">summary</a>    </p>
<p>       My Requirements    </p>
<ol>
<li>        Serialises and Deserialises <span class="caps">JSON</span>      </li>
<li>        Lightweight and Simple      </li>
<li>        runs on Java 1.4      </li>
<li>        Friendly license      </li>
</ol>
<p>       The contendors    </p>
<ol>
<li>        org.json      </li>
<li>        Jackson      </li>
<li>        XStream      </li>
<li>        JsonMarshaller      </li>
<li>        <span class="caps">JSON</span>.simple      </li>
</ol>
<h2>       Serialises and Deserialises <span class="caps">JSON</span>    </h2>
<p>       This might sound like an obvious requirement, but I’ve seen at least one library which was completely focused on spitting out <span class="caps">JSON</span>, without any support for reading <span class="caps">JSON</span>. I’m actually using this as a pre-requisite for inclusion in my comparison. If a library can’t read <span class="caps">AND</span> write <span class="caps">JSON</span>, I’m not going to consider it.    </p>
<h2>       Lightweight    </h2>
<p>       I’ll begin by stating that my actual usecase is to operate within a plugin for EditLive!. I don’t need a all singing all dancing <span class="caps">JSON</span> serialisation/deserialisation library. There are some very cool libraries out there that do awesome stuff, but all I need to do is read and write <span class="caps">JSON</span> data.    </p>
<p>       Coupled with this is that I’ll want to be able to keep the memory footprint pretty low, so want to work with Java Streams without needing to necessarily pull in the whole serialised object if I don’t need it.    </p>
<h2>       Runs on Java 1.4    </h2>
<p>       Yep it’s still out there. Thankfully <a hrer="http://java.sun.com/j2se/1.4.2/download.html">Java 1.4.2</a> has reached it’s <span class="caps">EOL</span>, but businesses can still request patches, and there are most definitely still Ephox clients running on this <span class="caps">JRE</span>, even though more recent <span class="caps">JRE</span>’s work so much better. (side note: If you have the option of upgrading your <span class="caps">JRE</span> to Java 6, please do it, the children in Africa will be much happier. Everytime someone runs up a 1.4 <span class="caps">JRE</span> a puppy dies). 1.4 is in it’s final death throws, but it is still kicking.    </p>
<h2>       Friendly License    </h2>
<p>       For Ephox to make money from the product/component that uses <span class="caps">JSON</span> (gotta think about the $$$ at the end of the day), I’ll need to make sure that the license is non-viral and Enterprise friendly. Apache license good. <span class="caps">GPL</span> bad. (sorry <span class="caps">FSF</span>)    </p>
<h2>       Assessment&#160;    </h2>
<p>       So having run through the requirements, we can now consider the options. For each library, I’ll provide a simple table.    </p>
<p>       The metrics I’m using to judge the libraries are included in the table. The most crude metric that I’ve got is the number of classes. I’m more than happy to admit that this is a very crude way to measure how lightweight the library is, but it does provide an ok rough heuristic, particularly given that there are order of magnitude differences.    </p>
<h2>       org.json    </h2>
<p>       The granddady of them all. This comes pretty close to being a reference implementation. It provides a nice simple <span class="caps">API</span> (7 classes), doesn’t try and do any magic, and just makes sense. I’ve used it before when working with small amounts of data. Unfortunately it doesn’t provide any streaming goodness.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://www.JSON.org/java/index.html">http://www.JSON.org/java/index.html</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          7        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          No        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       Jackson    </h2>
<p>       Jackson advertises itself as a fast powerful conformant <span class="caps">JSON</span> processor. It provides heaps of features, and looks to be a good tool for reading and writing <span class="caps">JSON</span> in a variety of ways (see the <a href="http://jackson.codehaus.org/Tutorial">Jackson tutorial</a> for more). The drawback of Jackson for my purposes is that it isn’t exactly svette at 250 classes.    </p>
<table>
<tr>
<th>          url        </th>
<td>          <a href="http://jackson.codehaus.org/">http://jackson.codehaus.org/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          ~250        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       XStream    </h2>
<p>       XStream gets a mention because it’s cool <img src='http://www.rojotek.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I haven’t really considered it because it provides more of a direct object serialisation format, which wasn&#39;t quite what I&#39;m looking for. Also, it’s heritage as an xml serialisation format shows, and it likes Java 5 much better. The ability to directly go between Javabeans and <span class="caps">JSON</span> java classes is cool, but I don&#39;t need this magic or the 200+ classes that come with it.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://xstream.codehaus.org/">http://xstream.codehaus.org/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          &#62;200        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       Json Marshaller    </h2>
<p>       Json Marshaller sells itself (it almost sounds like a bolierplate project description by now) as “Fast, Lightweight, Easy to Use and Type Safe <span class="caps">JSON</span> marshalling library for Java”. It’s been under consistent active development for a number of years, and looks to be headed in the right direction. Unfortunately the current version has 3 deal stopping flaws for my environment at the moment.    </p>
<ol>
<li>        It requires Java 5      </li>
<li>        It has a dependancy on <span class="caps">ASM</span> (the developers are looking to remove his dependancy)      </li>
<li>        While it hasn’t quite piled on the bulk of XStream or Jackson, it still has a couple to many classes for me to consider      </li>
</ol>
<p>       These constraints make it not quite fit for my purposes, but like all decisions, it depends on your own situation.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://code.google.com/p/jsonmarshaller/">http://code.google.com/p/jsonmarshaller/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          ~50        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          No        </td>
</tr>
</table>
<h2>       <span class="caps">JSON</span>.simple    </h2>
<p>       <span class="caps">JSON</span>.simple advertises itself as “a simple Java toolkit for <span class="caps">JSON</span>”. It provides reading and writing to <span class="caps">JSON</span> streams. It’s lightweight and focused on generating <span class="caps">JSON</span> from Java code. The critical feature it provides is support for Java IO readers and writers.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://code.google.com/p/json-simple/">http://code.google.com/p/json-simple/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          12        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       <a id="Summary2" name="Summary2">Summary&#160;</a>    </h2>
<p>       For the interested, here’s a table that summarises my findings.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          &#160;        </th>
<th>          <a href="http://www.JSON.org/java/index.html">org.json</a>         </th>
<th>          <a href="http://jackson.codehaus.org/">Jackson</a>         </th>
<th>          <a href="http://xstream.codehaus.org/">XStream</a>         </th>
<th>          <a href="http://code.google.com/p/jsonmarshaller/">Json Marshaller</a>         </th>
<th>          <a href="http://code.google.com/p/json-simple/">JSON.Simple</a>         </th>
</tr>
<tr>
<th>          classes        </th>
<td>          7        </td>
<td>          ~250        </td>
<td>          &#62;200        </td>
<td>          ~50        </td>
<td>          12        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          No        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
</tr>
<tr>
<th height="25">          Java 1.4        </th>
<td height="25">          Yes        </td>
<td height="25">          Yes        </td>
<td>          Yes        </td>
<td height="25">          No        </td>
<td height="25">          Yes        </td>
</tr>
</table>
<p>       &#160;    </p>
<h2>       Conclusion    </h2>
<p>       If you are looking for a simple lightweight Java library that reads and writes <span class="caps">JSON</span>, and supports Streams, <span class="caps">JSON</span>.simple is probably a good match. It does what it says on the box in 12 classes, and works on legacy (1.4) JREs.    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/05/07/a-review-of-5-java-json-libraries/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

