<?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>javamuse.co.uk</title>
	<atom:link href="http://javamuse.co.uk/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://javamuse.co.uk</link>
	<description>thoughts, code snippets and other output</description>
	<lastBuildDate>Tue, 03 Apr 2012 20:27:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Serialization to be removed from Java</title>
		<link>http://javamuse.co.uk/?p=49</link>
		<comments>http://javamuse.co.uk/?p=49#comments</comments>
		<pubDate>Tue, 03 Apr 2012 20:27:39 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=49</guid>
		<description><![CDATA[I very nearly fell for this one! JEP 154: Remove Serialization]]></description>
			<content:encoded><![CDATA[<p>I very nearly fell for this one!</p>
<p><a href="http://openjdk.java.net/jeps/154">JEP 154: Remove Serialization</a></p>
]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A couple of AS7 migration tweaks</title>
		<link>http://javamuse.co.uk/?p=34</link>
		<comments>http://javamuse.co.uk/?p=34#comments</comments>
		<pubDate>Sun, 24 Jul 2011 00:00:29 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=34</guid>
		<description><![CDATA[Enabling SSL for your web app, in standalone mode: &#38;lt;connector name=&#34;https&#34; protocol=&#34;HTTP/1.1&#34; socket-binding=&#34;https&#34; scheme=&#34;https&#34; secure=&#34;true&#34;&#38;gt; &#38;lt;ssl name=&#34;https&#34; password=&#34;password&#34; certificate-key-file=&#34;standalone/configuration/server.keystore&#34;/&#38;gt; &#38;lt;/connector&#38;gt; Also worth noting that checking of security roles in your web.xml is more strict under AS7, so you may find &#8230; <a href="http://javamuse.co.uk/?p=34">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Enabling SSL for your web app, in standalone mode:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #ddbb00;">&amp;lt;</span>connector name=&quot;https&quot; protocol=&quot;HTTP/1.1&quot; socket-binding=&quot;https&quot; scheme=&quot;https&quot; secure=&quot;true&quot;<span style="color: #ddbb00;">&amp;gt;</span>
    <span style="color: #ddbb00;">&amp;lt;</span>ssl name=&quot;https&quot; password=&quot;password&quot; certificate-key-file=&quot;standalone/configuration/server.keystore&quot;/<span style="color: #ddbb00;">&amp;gt;</span>
<span style="color: #ddbb00;">&amp;lt;</span>/connector<span style="color: #ddbb00;">&amp;gt;</span></pre></div></div>

<p>Also worth noting that checking of security roles in your web.xml is more strict under AS7, so you may find you need to define them explicitly:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #ddbb00;">&amp;lt;</span>security-role<span style="color: #ddbb00;">&amp;gt;</span>
   <span style="color: #ddbb00;">&amp;lt;</span>role-name<span style="color: #ddbb00;">&amp;gt;</span>admin<span style="color: #ddbb00;">&amp;lt;</span>/role-name<span style="color: #ddbb00;">&amp;gt;</span>
<span style="color: #ddbb00;">&amp;lt;</span>/security-role<span style="color: #ddbb00;">&amp;gt;</span>
<span style="color: #ddbb00;">&amp;lt;</span>security-role<span style="color: #ddbb00;">&amp;gt;</span>
  <span style="color: #ddbb00;">&amp;lt;</span>role-name<span style="color: #ddbb00;">&amp;gt;</span>normal<span style="color: #ddbb00;">&amp;lt;</span>/role-name<span style="color: #ddbb00;">&amp;gt;</span>
<span style="color: #ddbb00;">&amp;lt;</span>/security-role<span style="color: #ddbb00;">&amp;gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DatabaseServerLoginModule in JBoss AS7</title>
		<link>http://javamuse.co.uk/?p=31</link>
		<comments>http://javamuse.co.uk/?p=31#comments</comments>
		<pubDate>Wed, 22 Jun 2011 00:00:25 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=31</guid>
		<description><![CDATA[The arrival of the next version of JBoss is imminent and so I&#8217;ve begun to port an application I&#8217;m developing to it. Naturally there are slight differences along the way as the entire stack seems to have been rebuilt from &#8230; <a href="http://javamuse.co.uk/?p=31">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div style="float: right;"><script type="text/javascript">// <![CDATA[
google_ad_client = "ca-pub-5805282642343133"; /* Embed ad square */google_ad_slot = "3609676041"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
<p>The arrival of the next version of JBoss is imminent and so I&#8217;ve begun to port an application I&#8217;m developing to it. Naturally there are slight differences along the way as the entire stack seems to have been rebuilt from the ground up in a modular fashion, loading only what&#8217;s needed. This has resulted in a serious improvement in boot time &#8211; an order of magnitude even.</p>
<p>Anyway, the purpose of this post is simply to outline the custom security domain I&#8217;ve added to the standalone.xml configuration for my server to allow me to use the DatabaseServerLoginModule:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #ddbb00;">&amp;lt;</span>security-domain name=&quot;my-domain&quot; cache-type=&quot;default&quot;<span style="color: #ddbb00;">&amp;gt;</span>
    <span style="color: #ddbb00;">&amp;lt;</span>authentication<span style="color: #ddbb00;">&amp;gt;</span>
        <span style="color: #ddbb00;">&amp;lt;</span>login-module code=&quot;Database&quot; flag=&quot;required&quot;<span style="color: #ddbb00;">&amp;gt;</span>
            <span style="color: #ddbb00;">&amp;lt;</span>module-option name=&quot;dsJndiName&quot; value=&quot;MyAppDS&quot;/<span style="color: #ddbb00;">&amp;gt;</span>
            <span style="color: #ddbb00;">&amp;lt;</span>module-option name=&quot;principalsQuery&quot; value=&quot;SELECT password FROM users WHERE username=?&quot;/<span style="color: #ddbb00;">&amp;gt;</span>
            <span style="color: #ddbb00;">&amp;lt;</span>module-option name=&quot;rolesQuery&quot; value=&quot;SELECT role, 'Roles' FROM role WHERE username=?&quot;/<span style="color: #ddbb00;">&amp;gt;</span>
        <span style="color: #ddbb00;">&amp;lt;</span>/login-module<span style="color: #ddbb00;">&amp;gt;</span>
    <span style="color: #ddbb00;">&amp;lt;</span>/authentication<span style="color: #ddbb00;">&amp;gt;</span>
<span style="color: #ddbb00;">&amp;lt;</span>/security-domain<span style="color: #ddbb00;">&amp;gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=31</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syntactic sugar without waiting for Java 7 or 8</title>
		<link>http://javamuse.co.uk/?p=28</link>
		<comments>http://javamuse.co.uk/?p=28#comments</comments>
		<pubDate>Sun, 15 May 2011 00:00:36 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=28</guid>
		<description><![CDATA[Project Lombok is a small project which makes use of annotations to save you from some boiler plate code which in most normal scenarios is largely redundant. I originally found Lombok when I was tired of adding getters and setters &#8230; <a href="http://javamuse.co.uk/?p=28">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://projectlombok.org">Project Lombok</a> is a small project which makes use of annotations to save you from some boiler plate code which in most normal scenarios is largely redundant.</p>
<p>I originally found Lombok when I was tired of adding getters and setters to my POJOs that in the most common case were a very verbose way of just saying I wanted to be able to get and set a list of variables. Lombok adds Getter and Setter annotations which you can apply to a field <em>and it will add a getter and setter method to the class file for you</em>. They&#8217;ve taken this a step further though and added a class level @Data annotation so instead of annotating each method twice you can annotate your class once to say that getters and setters should be created:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Data
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">Long</span> id<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This not only removes a lot of otherwise redundant code, but it means that when you do choose to define a getter which does something a little out of the ordinary then these differences are now clear to see, instead of being lost in a sea of standard getters and setters.</p>
<p>Take a look at the @Log annotation too as a cleaner way of setting up a logging library. Not all the annotations are worth singing the praises of though, so do be careful and there is one other caveat to this library. Because it makes compile time changes to the code IDEs will have to be made aware that at runtime these additional methods and fields will exist. Download the Lombok jar, double click it and tell it where your IDE installation directory is and it will go and install itself into it. Your Eclipse will now list the getters and setters which you haven&#8217;t written!</p>
]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=28</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auditing of Entities</title>
		<link>http://javamuse.co.uk/?p=26</link>
		<comments>http://javamuse.co.uk/?p=26#comments</comments>
		<pubDate>Mon, 25 Apr 2011 00:00:36 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=26</guid>
		<description><![CDATA[Hardly a project goes by these days without some sort of requirement for auditing records for legal purposes or storing revisions of entities for purely historical reasons. I only recently discovered the Hibernate Envers project. It&#8217;s an addon module for &#8230; <a href="http://javamuse.co.uk/?p=26">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hardly a project goes by these days without some sort of requirement for auditing records for legal purposes or storing revisions of entities for purely historical reasons. I only recently discovered the <a href="http://www.jboss.org/envers">Hibernate Envers</a> project.</p>
<div style="float: right;"><script type="text/javascript">// <![CDATA[
google_ad_client = "ca-pub-5805282642343133"; /* Embed ad square */google_ad_slot = "3609676041"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
<p>It&#8217;s an addon module for Hibernate that allows you to annotate your Entity beans as @Audited and add a few listeners to your persistence.xml and it will then create audit tables storing previous revisions of annotated Entities. It&#8217;s beautifully simple and from Hibernate4 you&#8217;ll no longer even have to add the listeners.</p>
<p>In the meantime, if you do want to use Envers, you&#8217;ll need to add some or all of <a href="http://docs.jboss.org/envers/docs/index.html#quickstart">these</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=26</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Ubuntu 11.04 over SSH</title>
		<link>http://javamuse.co.uk/?p=23</link>
		<comments>http://javamuse.co.uk/?p=23#comments</comments>
		<pubDate>Sat, 16 Apr 2011 00:00:28 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=23</guid>
		<description><![CDATA[These days I spent most of my time connected via a Macbook Air, one I haven&#8217;t yet installed Linux on. I decided to update the Mac Mini which sits under my TV running Boxee though SSH and my normal: $ &#8230; <a href="http://javamuse.co.uk/?p=23">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>These days I spent most of my time connected via a Macbook Air, one I haven&#8217;t yet installed Linux on. I decided to update the Mac Mini which sits under my TV running Boxee though SSH and my normal:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ update-manager <span style="color: #660033;">-d</span></pre></div></div>

<p>refused to do it over SSH for Health &amp; Safety reasons! These days though there&#8217;s a nice text based alternative:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ do-release-upgrade <span style="color: #660033;">-d</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two new APIs from JBoss</title>
		<link>http://javamuse.co.uk/?p=20</link>
		<comments>http://javamuse.co.uk/?p=20#comments</comments>
		<pubDate>Sun, 20 Mar 2011 00:00:03 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=20</guid>
		<description><![CDATA[JBoss Application Server 7 has now moved into beta. It&#8217;s brought with it two new APIs which are approaching their first 1.0 releases; ShrinkWrap and Arquillian. The ShrinkWrap API is designed to allow you to build Java archives (JARs, WARs, &#8230; <a href="http://javamuse.co.uk/?p=20">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>JBoss Application Server 7 has now moved into beta. It&#8217;s brought with it two new APIs which are approaching their first 1.0 releases; <a href="http://www.jboss.org/shrinkwrap">ShrinkWrap</a> and <a href="http://www.jboss.org/arquillian">Arquillian</a>.</p>
<p>The ShrinkWrap API is designed to allow you to build Java archives (JARs, WARs, etc.) using Java itself. And it&#8217;s painlessly simple:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">JavaArchive archive <span style="color: #339933;">=</span> ShrinkWrap.<span style="color: #006633;">create</span><span style="color: #009900;">&#40;</span>
    JavaArchive.<span style="color: #000000; font-weight: bold;">class</span>,<span style="color: #0000ff;">&quot;archive.jar&quot;</span><span style="color: #009900;">&#41;</span>
    .<span style="color: #006633;">addClasses</span><span style="color: #009900;">&#40;</span>MyClass.<span style="color: #000000; font-weight: bold;">class</span>, MyOtherClass.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span>
    .<span style="color: #006633;">addResource</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mystuff.properties&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Arquillian builds upon ShrinkWrap to give you an API which abstracts away all the container lifecycle and deployment configuration from integration tests, simplifying the testing of applications which require a JEE container. Again, another simple, clean API:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">static</span> org.<span style="color: #006633;">junit</span>.<span style="color: #000000; font-weight: bold;">Assert</span>.<span style="color: #006633;">assertEquals</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.ejb.EJB</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jboss.arquillian.api.Deployment</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jboss.arquillian.junit.Arquillian</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jboss.shrinkwrap.api.ShrinkWrap</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jboss.shrinkwrap.api.spec.JavaArchive</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.junit.Test</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.junit.runner.RunWith</span><span style="color: #339933;">;</span>
&nbsp;
@RunWith<span style="color: #009900;">&#40;</span>Arquillian.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> GreetingManagerTest <span style="color: #009900;">&#123;</span>
   @Deployment 
   <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> JavaArchive createDeployment<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">return</span> ShrinkWrap.<span style="color: #006633;">create</span><span style="color: #009900;">&#40;</span>JavaArchive.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #0000ff;">&quot;test.jar&quot;</span><span style="color: #009900;">&#41;</span>
         .<span style="color: #006633;">addClasses</span><span style="color: #009900;">&#40;</span>GreetingManager.<span style="color: #000000; font-weight: bold;">class</span>,
            GreetingManagerBean.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   @EJB 
   <span style="color: #000000; font-weight: bold;">private</span> GreetingManager greetingManager<span style="color: #339933;">;</span>
&nbsp;
   @Test
   <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> shouldGreetUser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003399;">String</span> name <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Earthlings&quot;</span><span style="color: #339933;">;</span>
      assertEquals<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello, &quot;</span> <span style="color: #339933;">+</span> name, greetingManager.<span style="color: #006633;">greet</span><span style="color: #009900;">&#40;</span>name<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://javamuse.co.uk/?p=18</link>
		<comments>http://javamuse.co.uk/?p=18#comments</comments>
		<pubDate>Sat, 19 Mar 2011 00:00:55 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=18</guid>
		<description><![CDATA[Add the following to your ~/.bashrc to have your bash prompt display your working git branch and whether or not you have made any modifications, additions or deletions. Note the dependency on the git-completion bash script witihin your git install. &#8230; <a href="http://javamuse.co.uk/?p=18">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Add the following to your ~/.bashrc to have your bash prompt display your working git branch and whether or not you have made any modifications, additions or deletions. Note the dependency on the git-completion bash script witihin your git install.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Funky git PS1 status.</span>
<span style="color: #007800;">GIT_COMPLETION_PATH</span>=<span style="color: #ff0000;">&quot;/usr/local/git/contrib/completion/git-completion.bash&quot;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$GIT_COMPLETION_PATH</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
   <span style="color: #007800;">GIT_PS1_SHOWDIRTYSTATE</span>=<span style="color: #c20cb9; font-weight: bold;">true</span>
   . <span style="color: #ff0000;">&quot;<span style="color: #007800;">$GIT_COMPLETION_PATH</span>&quot;</span>
   <span style="color: #007800;">ADD_PS1</span>=<span style="color: #ff0000;">'$(__git_ps1)'</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">&quot;\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[33m\]<span style="color: #007800;">$ADD_PS1</span>\[\033[34m\] <span style="color: #000099; font-weight: bold;">\$</span>\[\033[00m\] &quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=18</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>20% time for software engineers</title>
		<link>http://javamuse.co.uk/?p=13</link>
		<comments>http://javamuse.co.uk/?p=13#comments</comments>
		<pubDate>Sun, 09 Jan 2011 00:00:47 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=13</guid>
		<description><![CDATA[There are a collection of difficulties which affect many modern software-focused companies; how to innovate new products and ideas, how to improve and automate processes, how to schedule time for working on such improvements which cannot be directly sold to &#8230; <a href="http://javamuse.co.uk/?p=13">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are a collection of difficulties which affect many modern software-focused companies; how to innovate new products and ideas, how to improve and automate processes, how to schedule time for working on such improvements which cannot be directly sold to an existing customer.</p>
<div style="float: right;"><script type="text/javascript">// <![CDATA[
google_ad_client = "ca-pub-5805282642343133"; /* Embed ad square */google_ad_slot = "3609676041"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
<p>There are companies out there though which have found a solution that works and for the likes of Google, Atlassian and others this is what they call 20% time. 20% time is where software engineers spend 20% of their time at work on projects of their own choosing, regardless of how or if it relates to their core projects.</p>
<p>Implementing this has a few difficulties, but the biggest hurdle has to be simply persuading a company to make that leap of faith and just try it.</p>
<p><a href="http://blogs.atlassian.com/developer/2009/03/20_percent_continuing.html">http://blogs.atlassian.com/developer/2009/03/20_percent_continuing.html</a><br />
<a href="http://www.youtube.com/watch?v=u6XAPnuFjJc">http://www.youtube.com/watch?v=u6XAPnuFjJc</a></p>
]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looping 1 to 1000 in Java without using conditionals</title>
		<link>http://javamuse.co.uk/?p=10</link>
		<comments>http://javamuse.co.uk/?p=10#comments</comments>
		<pubDate>Sat, 08 Jan 2011 00:00:17 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javamuse.co.uk/?p=10</guid>
		<description><![CDATA[A colleague suggested a Java puzzler today; can you write a program to print the numbers 1 to 1000 without using conditionals? No loops, no checking for equality. I would never want to use this code, but this was my &#8230; <a href="http://javamuse.co.uk/?p=10">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A colleague suggested a Java puzzler today; <em>can you write a program to print the numbers 1 to 1000 without using conditionals?</em> No loops, no checking for equality. I would never want to use this code, but this was my suggestion:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Test <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> array <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    incrementAndPrint<span style="color: #009900;">&#40;</span>i, array<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> incrementAndPrint<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i, <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> array<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">int</span> x <span style="color: #339933;">=</span> array<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">ArrayIndexOutOfBoundsException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    incrementAndPrint<span style="color: #009900;">&#40;</span>i, array<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I wonder if there is a way to do it without exceptions. I suppose there must be&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://javamuse.co.uk/?feed=rss2&#038;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

