<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Once and Only Once </title>
    <link>http://www.tarbard.co.uk/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Darren Tarbard's ramblings</description>
    <item>
      <title>I released an android game!</title>
      <description>Thought i'd have a stab so here's my initial offering

https://market.android.com/details?id=uk.co.tarbard.thrills</description>
      <pubDate>Fri, 06 Jan 2012 23:41:44 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:5f10d9e4-6921-4a62-a121-d8af4731af38</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2012/01/06/i-released-an-android-game</link>
      <category>Games</category>
      <category>software</category>
      <category>Software dev</category>
    </item>
    <item>
      <title>Art</title>
      <description>My &lt;a href="http://news.bbc.co.uk/local/lancashire/hi/tv_and_radio/newsid_8161000/8161030.stm"&gt;Sister in Law&lt;/a&gt; is a budding artist, she's selling a couple of pieces of art she has produced. Both come professionally framed in new distressed effect white wooden frames.&lt;/p&gt;They both look much nicer in real life then the pictures I quickly took on my phone attached here and are textured, particularly the olive coloured one which has a raised paper construction that you can't really appreciate from a picture. &lt;p/&gt; 

&lt;a href="http://www.tarbard.co.uk/files/IMG_20100831_203737.jpg"&gt;&lt;img src="http://www.tarbard.co.uk/files/IMG_20100831_203737.jpg" width="450px"&gt;&lt;/a&gt;
&lt;p/&gt;
&lt;a href="http://www.tarbard.co.uk/files/IMG_20100831_203902.jpg"&gt;&lt;img src="http://www.tarbard.co.uk/files/IMG_20100831_203902.jpg" width="600px"&gt;&lt;/a&gt;&lt;p/&gt;

They are 24" by 18" (60cm x 45cm) and cost £200 each.</description>
      <pubDate>Tue, 31 Aug 2010 21:28:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:6dd0d4e5-13bf-4760-b193-e7a600463eff</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2010/08/31/art</link>
    </item>
    <item>
      <title>Annoying UK spam</title>
      <description>Getting lots of spam for UK companies through a dodgy spammer hosting millions of domains on redstation.com &lt;p/&gt;

I notice it because it actually gets through my spam filters regularly. On the plus side they are getting themselves added to spam databases by spamming me.&lt;p/&gt;</description>
      <pubDate>Thu, 20 May 2010 21:48:45 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:733f81f8-a3f3-45e9-8e83-c30df8c1f02c</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2010/05/20/annoying-uk-spam</link>
    </item>
    <item>
      <title>Annoying UK spam</title>
      <description>Getting lots of spam for UK companies through a dodgy spammer hosting millions of domains on redstation.com &lt;p/&gt;

I notice it because it actually gets through my spam filters regularly. On the plus side they are getting themselves added to spam databases by spamming me.&lt;p/&gt;</description>
      <pubDate>Thu, 20 May 2010 21:48:45 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:83bb4ff2-93c2-4178-9383-3f170fb7601a</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2010/05/20/annoying-uk-spam</link>
    </item>
    <item>
      <title>Veggie lunch in Glasgow</title>
      <description>I'm on the lookout for somewhere good to pick up a sandwich for lunch, being vegetarian I don't get that much choice in your normal outlets and so I get bored  of "cheese and ..." &lt;p/&gt;
Grassroots in Glasgow had a good range despite it being a fair walk from my office but they seem to have cut back on variety and no longer sell tempeh (fake bacon) sandwiches amongst others, I did ask why they stopped but just got a snappy and nonsensical "we can't sell the same thing forever" from the sales assistant.   The same question to their online feedback form elicited no reply, which is a shame.  &lt;p/&gt;So, can anyone recommend somewhere good to pick up sandwiches from (as opposed to eat in)? I did like some of Grassroot's old selection (despite them obviously using the same knife to cut garlic as make sandwiches!) but can't face the uphill walk only to find no decent options.&lt;p/&gt;  </description>
      <pubDate>Wed, 10 Feb 2010 17:19:56 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:aed480e5-b9ad-483a-bf94-7f8a5baf143c</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2010/02/10/veggie-lunch-in-glasgow</link>
    </item>
    <item>
      <title>The Phantom Menace</title>
      <description>Just how bad was the phantom menace? This bad:&lt;p/&gt;
http://www.youtube.com/watch?v=FxKtZmQgxrI&lt;p/&gt; These videos are more entertaining than the film was.</description>
      <pubDate>Tue, 22 Dec 2009 10:03:21 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:06119575-4140-4a81-a8f0-e6b1fd0402c4</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/12/22/the-phantom-menace</link>
    </item>
    <item>
      <title>Eureka moment</title>
      <description>It seems difficult to align what you want to do for a living with what you can practically. I've realised what I've always wanted to do is write computer games, that's in fact the reason I got into software development in the first place. &lt;p /&gt;The rise of  digital distribution makes it more achievable to start very small as a sideline with relatively little overhead or risk. I love it when a plan comes together.</description>
      <pubDate>Thu, 29 Oct 2009 00:50:51 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:27ca5541-fc12-473e-8164-ad886e07fe39</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/10/29/eureka-moment</link>
      <category>Games</category>
      <category>software</category>
      <category>Software dev</category>
    </item>
    <item>
      <title>Accessing constants in JSF</title>
      <description>

&lt;pre&gt;

marker interface:

package uk.co.tarbard.wfd;

public interface BackingPage {

}

custom property resolver:

package uk.co.tarbard.wfd;

import java.lang.reflect.Field;

import javax.faces.el.EvaluationException;
import javax.faces.el.PropertyNotFoundException;
import javax.faces.el.PropertyResolver;

public class ConstantPropertyResolver extends PropertyResolver {

	private PropertyResolver original;

	public ConstantPropertyResolver(PropertyResolver original) {
		this.original = original;
	}

	@Override
	public Class getType(Object arg0, int arg1) throws EvaluationException,
			PropertyNotFoundException {

		return original.getType(arg0, arg1);
	}

	@Override
	public Class getType(Object arg0, Object arg1) throws EvaluationException,
			PropertyNotFoundException {

		return original.getType(arg0, arg1);
	}

	@Override
	public Object getValue(Object arg0, int arg1) throws EvaluationException,
			PropertyNotFoundException {
		return original.getValue(arg0, arg1);
	}

	@Override
	public Object getValue(Object base, Object property)
			throws EvaluationException, PropertyNotFoundException {
		Object value = null;
		try {
			value = original.getValue(base, property);

		} catch (PropertyNotFoundException e) {

		}

		if (null != value) {
			return value;
		}
		if (null == base) {
			return null;
		}
		if (base instanceof BackingPage) {
			Field[] declaredFields = base.getClass().getDeclaredFields();
			for (int i = 0; i &lt; declaredFields.length; i++) {
				Field x = declaredFields[i];
				Object constantValue = null;
				if (property.equals(x.getName())){
					try {
						constantValue =  x.get(x);
					} catch (IllegalArgumentException e) {
						throw new PropertyNotFoundException("unable to access property " + property) ;
					} catch (IllegalAccessException e) {
						throw new PropertyNotFoundException("unable to access property " + property + " check that it is public") ;
					}
					return constantValue;
				}
				
			}
			throw new PropertyNotFoundException("unable to locate constant with name " + property + " perhaps you made a typo.");
		}

		return null;

	}

	@Override
	public boolean isReadOnly(Object arg0, int arg1)
			throws EvaluationException, PropertyNotFoundException {
		return original.isReadOnly(arg0, arg1);
	}

	@Override
	public boolean isReadOnly(Object arg0, Object arg1)
			throws EvaluationException, PropertyNotFoundException {
		return original.isReadOnly(arg0, arg1);
	}

	@Override
	public void setValue(Object arg0, int arg1, Object arg2)
			throws EvaluationException, PropertyNotFoundException {
		original.setValue(arg0, arg1, arg2);
	}

	@Override
	public void setValue(Object arg0, Object arg1, Object arg2)
			throws EvaluationException, PropertyNotFoundException {
		original.setValue(arg0, arg1, arg2);
	}

}

&lt;/pre&gt;
</description>
      <pubDate>Fri, 28 Aug 2009 00:11:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:150d3b00-7086-4b3f-9022-3bd281b8448c</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/08/28/accessing-constants-in-jsf</link>
      <category>software</category>
      <category>Software dev</category>
    </item>
    <item>
      <title>Feeling constrained.</title>
      <description>Despite Android being much more open than iPhone there is still a lot of "Sorry, you can't do this. " and "it is not possible" on the android developer group.</description>
      <pubDate>Fri, 07 Aug 2009 21:02:02 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:a5605279-f5f4-44f7-928c-18bc69e32213</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/08/07/feeling-constrained</link>
      <category>software</category>
      <category>Software dev</category>
    </item>
    <item>
      <title>Amarok 2</title>
      <description>I really liked Amarok, an upgrade to ubuntu brought in Amarok 2. I couldn't get it to play anything and it was quite unpleasant to use. Luckily I managed to find a fix and my playlist was populating within seconds and music was playing - the fix is called Rhythmbox</description>
      <pubDate>Wed, 29 Jul 2009 06:42:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:1df1708f-82c5-44ab-b111-2dfcc5b8ed2a</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/07/29/amarok-2</link>
      <category>software</category>
    </item>
  </channel>
</rss>

