<?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>Straw Dogs &#187; Category List @ Straw Dogs</title>
	<atom:link href="http://www.straw-dogs.co.uk/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.straw-dogs.co.uk</link>
	<description>The Tao of Ruby, Python, and....Straw Dogs?</description>
	<lastBuildDate>Tue, 15 Nov 2011 06:47:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Epic Self Documenting Code</title>
		<link>http://www.straw-dogs.co.uk/10/09/epic-self-documenting-code/</link>
		<comments>http://www.straw-dogs.co.uk/10/09/epic-self-documenting-code/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 09:59:16 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[silliness]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=545</guid>
		<description><![CDATA[This is the best: switch (mIntegrationDirection) { case InventoryIntegrationDirection.DoTheSameChangeInShop: DoTheSameChangeInShop(GetChangedDataFromInventory(mLastSynchDate)); break; case InventoryIntegrationDirection.DoTheSameChangeInInventory: DoTheSameChangeInInventory(GetChangedDataFromShop(mLastSynchDate)); break; case InventoryIntegrationDirection.DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory: DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory( GetChangedDataFromInventory(mLastSynchDate), GetChangedDataFromShop(mLastSynchDate)); break; case InventoryIntegrationDirection.DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData: DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData( GetChangedDataFromShop(mLastSynchDate), GetChangedDataFromInventory(mLastSynchDate)); break; default: break; } Read how this travesty occurred at DailyWTF]]></description>
			<content:encoded><![CDATA[<p>This is the best:</p>
<pre name="code" class="java">
switch (mIntegrationDirection)
{
   case InventoryIntegrationDirection.DoTheSameChangeInShop:
      DoTheSameChangeInShop(GetChangedDataFromInventory(mLastSynchDate));
      break;

   case InventoryIntegrationDirection.DoTheSameChangeInInventory:
      DoTheSameChangeInInventory(GetChangedDataFromShop(mLastSynchDate));
      break;

   case InventoryIntegrationDirection.DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory:
      DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory(
	   GetChangedDataFromInventory(mLastSynchDate),
	   GetChangedDataFromShop(mLastSynchDate));
      break;

   case InventoryIntegrationDirection.DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData:
      DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData(
	   GetChangedDataFromShop(mLastSynchDate),
	   GetChangedDataFromInventory(mLastSynchDate));
      break;

   default:
      break;
}
</pre>
<p>Read how this travesty occurred at <a href="http://thedailywtf.com/Articles/CodeThatDocumentsItselfSoWellItDoesNotNeedComments.aspx">DailyWTF</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/10/09/epic-self-documenting-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASE Makes Android Development Pleasant</title>
		<link>http://www.straw-dogs.co.uk/07/12/ase-makes-android-development-pleasant/</link>
		<comments>http://www.straw-dogs.co.uk/07/12/ase-makes-android-development-pleasant/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 10:08:03 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[lua]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=459</guid>
		<description><![CDATA[Having got myself a G1 phone a few weeks back I&#8217;ve been tinkering a lot. Mainly with the Android Scripting Environment that I plan on writing about soon but I thought I&#8217;d give a quick summary of what I&#8217;ve found so far on this platform &#8211; and why I don&#8217;t like it (kind of)! It [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2009/07/android-logo.jpg" border="0" alt="android-logo.jpg" width="239" height="264" align="right" />Having got myself a G1 phone a few weeks back I&#8217;ve been tinkering a lot. Mainly with the Android Scripting Environment that I plan on writing about soon but I thought I&#8217;d give a quick summary of what I&#8217;ve found so far on this platform &#8211; and why I don&#8217;t like it (kind of)!</p>
<p>It uses Java &#8211; of a sort. More specifically it uses the <a href="http://en.wikipedia.org/wiki/Dalvik_virtual_machine">Dalvik VM</a> which is a register based as opposed to stack based VM and has many of its core classes based on Apache Harmony.</p>
<p><em>(Did I sound like I knew what that meant? Because I didn&#8217;t. I was paraphrasing Wikipedia &#8211; I love Wikipedia&#8217;s ability to make you sound like an expert at anything)</em></p>
<p>That&#8217;s why I hate it &#8211; the Java part. I hate Java. I&#8217;ve not developed in Java since university and have conducted a mental cleansing of all my painful memories of the language. As such I am a desperate &#8216;newbie&#8217; on this platform. Scrabbling round like some lost raccoon on the <a href="http://www.northyorkmoors.org.uk/">North York Moors</a> (there are no raccons in England so it would be VERY lost).</p>
<p><a href="http://code.google.com/p/android-scripting/">ASE comes to rescue the day</a> but first&#8230;.</p>
<h3>Why ASE? Android programs are &#8216;easy&#8221; enough to write.</h3>
<p>This is in the wiki docs of ASE. This question gets asked &#8211; apparently quite <strong>frenquently</strong>.</p>
<p><strong>All I can say is:</strong> <em>&#8220;Holy mother of jesus-bloody-ballsing-christ&#8221;.</em></p>
<p>What I find even more shocking is the answer&#8230;</p>
<blockquote><p>That&#8217;s very true. Android&#8217;s development environment does make life pretty easy.</p></blockquote>
<p>PRETTY EASY?!?!</p>
<p>WHAT?!?!</p>
<p>Are you a masochist??</p>
<p>It took an hour just to get it all up &amp; running. Getting Eclipse working how its meant to with the right plugins, setting up emulator images, downloading tutorials and the multitude of other faffing tasks.</p>
<p>If you&#8217;ve gotten used to scripting languages like Python, Ruby or PHP then programming Java is akin to stabbing your eyeballs repeatedly with a rusty fork. Its rammed full of verbose bullshit, silly configs, insane amounts of setup, strict typing, misery, self abuse, pain, kitten torture, puppy genocide, etc, etc.</p>
<p>For example try taking a look at the Android Dev tutorial. Part 1 will consume 6hrs of your life. After which you will have created a useless &#8216;notepad app&#8217; that doesn&#8217;t allow you to edit or delete notes. Only create a new one with hard coded contents and a name. 6 hours and I could have built Athens Online &#8211; an online city of dreams and Greek pornography. What? Everything online is porn.</p>
<p>Anyway&#8230;</p>
<h3>Java Can Come Later</h3>
<p><img class="alignleft size-full wp-image-464" title="I hate Java" src="http://www.straw-dogs.co.uk/wp-content/uploads/2009/07/no-java.png" alt="I hate Java" width="104" height="104" />The Android Scripting Environment is a breath of fresh air though. This was released in May/June and allows development of quick, funky scripts in Python, Lua or BeanShell (*hiss*, *spit*). Ruby and Javascript are to follow soon.</p>
<p>If you fancy developing the scripts on your PC and running them on the phone you&#8217;ll need a tool available in the Android SDK called <a href="http://developer.android.com/guide/developing/tools/adb.html">ADB</a> (Android Debug Bridge). Though if you&#8217;re <a href="http://code.google.com/p/android-scripting/wiki/UserGuide">following the ASE docs</a> don&#8217;t forget you need to turn on USB Debugging on the phone to enable it.</p>
<h3>What It Can&#8217;t Do &#8211; Yet</h3>
<p>I love ASE and I love the German gent who made it even more &#8211; even though I know only his name. I&#8217;m sure that he&#8217;s a great man for only a great man would create ASE.</p>
<p>Okay &#8211; I&#8217;ll stop now.</p>
<p>ASE can&#8217;t do the following at the moment:</p>
<ul>
<li>Compile in to APK/packages for selling or distributing on Market or elsewhere.</li>
<li>Its restricted to a subset of the Android API made available by an RPC interface.</li>
<li>It can&#8217;t cure cancer.</li>
</ul>
<p>I&#8217;ve got high hopes for ASE and its making my life more fun. If you&#8217;re a Python/Lua/scripting sort then you&#8217;ll love it too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/07/12/ase-makes-android-development-pleasant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Python GUI Programming? Painful</title>
		<link>http://www.straw-dogs.co.uk/09/03/python-gui-programming-painful/</link>
		<comments>http://www.straw-dogs.co.uk/09/03/python-gui-programming-painful/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 13:26:51 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/09/03/python-gui-programming-painful/</guid>
		<description><![CDATA[If you&#8217;re wanting to develop a Python GUI anytime soon can I strongly suggest you re/learn Java. I recently wanted to produce a simple yet functional desktop app and decided to give Python a go. I&#8217;d later py2exe my creation to create an executable Win32 app. My thinking was that Python is much faster to [...]]]></description>
			<content:encoded><![CDATA[<p><img style="max-width: 800px; float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.straw-dogs.co.uk/wp-content/uploads/python-logo.gif" />If you&#8217;re wanting to develop a Python GUI anytime soon can I strongly suggest you re/learn Java.  I recently wanted to produce a simple yet functional desktop app and decided to give Python a go.  I&#8217;d later py2exe my creation to create an executable Win32 app.  My thinking was that Python is much faster to develop with and so doing a simple GUI app using it must be simple too.<br /><i><b><br />Oh how wrong I was.</b></i></p>
<h3>Coding the GUI</h3>
<p>First off I tried the oldschool method of developing the GUI by hand using Tkinter as it seemed to have the greatest level of documentation and it was the library used in the Programming Python book.  Alas this brought back painful memories of oldschool Java GUI programming with extremely restrictive rules on placement and positioning.  After 3 hours of trying to get exactly what I wanted I ended up with GUI cat-sick on my screen &#8211; not good.</p>
<p>I tinkered with a couple of ther other libraries wxPython, PyGtk and even EasyGUI (too basic) only to hit the same problem &#8211; lack of flexibility.</p>
<p>I decided to try a different approach and find a GUI capable of handling the graphical side of things for me &#8211; maybe its a cheaters way out but personally I wanted an app not an education.</p>
<h3>PythonCard</h3>
<p>Oh dear god in heaven above.  This app has been getting developed in a cave by the most hardcore, life-starved, miserable geekjects on the planet.  It&#8217;s based on an age-old Apple Mac application for developing quick dirty GUI apps.  Which is great except its method of working is completely different to any other IDEs out there.  It does follow a convention &#8211; its just the convention died years ago.  That doesn&#8217;t deter the developers though and they still have arguments to this day about wether to make tab ordering an easier to access feature or just leave as is (NB: Tab ordering is determined by the ordering of the elements in the frame and so you use &#8220;send to back&#8221;, &#8220;bring forward&#8221; commands &#8211; very intuitive).</p>
<h3>Boa Constructor</h3>
<p>You need a book to operate this and also colour blindness helps because the interface is&#8230;well&#8230;.vile!  It&#8217;s a painful mess to use and I didn&#8217;t even bother trying &#8211; I closed it down in disgust.  End of story.</p>
<h3>IronPython Studio</h3>
<p>You need a full version of Visual Studio &#8211; no go.</p>
<h3>PythonWorks</h3>
<p>Project now dead.</p>
<h3>PAGE (Python Automatic GUI Generator)</h3>
<p>This is one hell of a piece of wonder.  Its amazing the sub-sorry I can&#8217;t be sarcastic any longer.  It&#8217;s rubbish, it performs a role and thats it.  It simply generates your GUI code rather than being a full GUI IDE.</p>
<p>I eventually got onto Glade and there&#8217;s a number of options here that Python can exploit however, I&#8217;d wasted far too much of my valuable time by this point so I decided to do the only sensible thing:</p>
<h3>Remember My Java</h3>
<p>I left Java many moons ago but from when I&#8217;d last used Netbeans I remember the GUI building facilities were absolutely stellar.  I wasn&#8217;t disappointed this time round either.  I can&#8217;t believe how far along its now come and developing a GUI app in Netbeans using the Swing and SwingX components is an absolute joy.  Its making me want to make more and more &#8211; I&#8217;ve restarted learning Java and not looking back.</p>
<p>So if you want to create a GUI desktop app &#8211; don&#8217;t use Python (or Ruby).</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/09/03/python-gui-programming-painful/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Practice Makes Perfect</title>
		<link>http://www.straw-dogs.co.uk/01/26/practice-makes-perfect/</link>
		<comments>http://www.straw-dogs.co.uk/01/26/practice-makes-perfect/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 01:33:52 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/01/26/practice-makes-perfect/</guid>
		<description><![CDATA[Its always good to hone your programming skills outside of your usual day-to-day job with a selection of different challenges.  That&#8217;s why I&#8217;ve compiled a list of games, quizes and challenge sites for programmers which are useful for any language. 1. Code Kata Created by Dave Thomas of the Pragmatic Programmers this is a regular [...]]]></description>
			<content:encoded><![CDATA[<p>Its always good to hone your programming skills outside of your usual day-to-day job with a selection of different challenges.  That&#8217;s why I&#8217;ve compiled a list of <a href="http://www.marapets.com/arcade.php">games</a>, quizes and challenge sites for programmers which are useful for any language.</p>
<p><a href="http://codekata.pragprog.com/"><strong>1. Code Kata</strong></a></p>
<p>Created by Dave Thomas of the Pragmatic Programmers this is a regular blog posting of challenges with a variety of skill levels and challenging various areas.  Well worth a look.</p>
<p><a href="http://codegolf.com/" title="Code Golf"><strong>2.  Code Golf</strong></a></p>
<p>Relatively new but already one of the best open challenge sites on the net.  With a good selection and growing rapidly it promises to be great for beginners and advanced coders alike.</p>
<p><strong><a href="http://www.rubyquiz.com/" title="Ruby Quiz">3.  Ruby Quiz</a></strong></p>
<p>Based on the Perl quizzes of old the Ruby Quiz has been going a while now and relies on quiz submissions by members of the mailing list which are then compiled and sent out with a time limit on solving it and responding with the answer.  All the past challenges are available on the site.</p>
<p><strong><a href="http://www.pythonchallenge.com/">4. The Python Challenge</a></strong></p>
<p>Not quite as nicely organised and well documented as the Ruby Quiz as this provides challenges for Python programmers in a series of ever-increasing difficulty.</p>
<p><strong><a href="http://www.topcoder.com">5. Top Coder</a></strong></p>
<p>One of the oldest and best especially for oldschool challenges and core algorithm programming using lower level languages like C, C++, Java, etc.</p>
<p>If anyone knows of any others then please leave a comment and I&#8217;ll add it to the list.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/01/26/practice-makes-perfect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sun’s Gosling on Ruby and PHP</title>
		<link>http://www.straw-dogs.co.uk/03/15/suns-gosling-on-ruby-and-php/</link>
		<comments>http://www.straw-dogs.co.uk/03/15/suns-gosling-on-ruby-and-php/#comments</comments>
		<pubDate>Wed, 15 Mar 2006 20:14:56 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/03/15/sun%e2%80%99s-gosling-on-ruby-and-php/</guid>
		<description><![CDATA[I spotted a recent article while on the Riding Ruby blog in which James Gosling of Sun &#8211; aka: “Father of Java” made extensive comment regarding Java’s placing with Ruby, PHP and other platforms. “PHP and Ruby are perfectly fine systems, but they are scripting languages and get their power through specialization: they just generate [...]]]></description>
			<content:encoded><![CDATA[<p>I spotted a <a href="http://java.sys-con.com/read/193146.htm">recent article</a> while on the Riding Ruby blog in which James Gosling of Sun &#8211; aka: “Father of Java” made extensive comment regarding Java’s placing with Ruby, PHP and other platforms.</p>
<blockquote><p> “PHP and Ruby are perfectly fine systems, but they are <em><strong>scripting languages</strong></em> and get their power through specialization: they just generate web pages. But none of them attempt any serious breadth in the application domain and they <strong>both have really serious scaling and performance problems</strong>.”</p></blockquote>
<p><strong>Scaling and performance problems</strong> have been shown to be null and void when <a href="http://troutgirl.com/blog/index.php?/archives/22_Friendster_goes_PHP.html">Friendster switched</a> from a Java platform to a PHP platform and had a noticeable speed improvement &#8211; <a href="http://www.friendster.com/">Friendster</a> is no shrinking violet, once boasting the largest social network on the web.</p>
<ul>
<li><a href="http://www.sitepoint.com/blogs/2004/07/02/why-php-scales/">Why PHP Scales</a></li>
<li><a href="http://raibledesigns.com/page/rd?anchor=scaling_with_rails">Rails scaling</a></li>
<li><a href="http://www.loudthinking.com/arc/000479.html">Davids take on Rails scaling</a></li>
</ul>
<p><strong>Scripting Languages?</strong><br />
That comment jars a little as its a far out dated term normally reserved for cheap pot-shots. I’ve had numerous discussions with Java advocates in which Ruby, Python and any other dynamically typed language has been dismissed as a <em>meer scripting language</em>.  It doesn’t look like I’m the only one either as <a href="http://lesscode.org/2006/03/12/someone-tell-gosling/">Ryan Tomayko at Lesscode.org</a> seems to have paid comment to Goslings post in quite some depth and I recommend a read!</p>
<p><em>UPDATE:</em> <a href="http://www.artima.com/forums/flat.jsp?forum=270&amp;thread=151886">The Artima Developer</a> forums have a thread sicussing this topic available <a href="http://www.artima.com/forums/flat.jsp?forum=270&amp;thread=151886">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/03/15/suns-gosling-on-ruby-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java reaching the end of the road?</title>
		<link>http://www.straw-dogs.co.uk/12/01/java-reaching-the-end-of-the-road/</link>
		<comments>http://www.straw-dogs.co.uk/12/01/java-reaching-the-end-of-the-road/#comments</comments>
		<pubDate>Thu, 01 Dec 2005 14:42:35 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/12/01/java-reaching-the-end-of-the-road/</guid>
		<description><![CDATA[An article over at the Register offers up a number of interesting points on the future of Java. Yes, I know its been said many times that Java’s days are numbered, but with the increasing availability and popularity of languages like Python &#38; Ruby. What the report also points out is and Java’s increasingly complex [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.theregister.co.uk/2005/11/30/beyond_java/">An article over at the Register</a> offers up a number of interesting points on the future of Java. Yes, I know its been said many times that Java’s days are numbered, but with the increasing availability and popularity of languages like Python &amp; Ruby. What the report also points out is and Java’s increasingly complex and bloated base making the system unwieldly and difficult to use for anything but enterprise projects.</p>
<blockquote><p> The Java platform is becoming increasingly complex, the JVM has an obesity problem, the addition of generics has added complexity to the previously clean syntax, the layers of XML configuration required to plumb a full J2EE stack are weighing developers down. Tate puts a lot of this down to the fact that the big players (starting with Sun and IBM) are focused on large-scale enterprise development projects.</p></blockquote>
<p>Is this the beginning of the end for Java or is it merely moving onto new pastures? When it leaves though it’ll most certainly be replaced by the <em>new</em> contenders Python, Ruby and their frameworks; <a href="http://www.djangoproject.com/">Django</a>, <a href="http://www.rubyonrails.org/">Rails</a>, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/12/01/java-reaching-the-end-of-the-road/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

