<?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>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:32 +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>
    <item>
      <title>The garden is a riot of colour at the moment</title>
      <description>&lt;a href="http://www.tarbard.co.uk/flowers2009/index.html"&gt;and here is a selection from it&lt;/a&gt;. The purple bush inthe first picture makes a constant buzzing noise due to the bees that love it's trillions of tiny flowers.</description>
      <pubDate>Tue, 30 Jun 2009 22:15:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:616e6088-fa0a-4318-9c03-c57b3fcdffef</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/06/30/the-garden-is-a-riot-of-colour-at-the-moment</link>
    </item>
    <item>
      <title>I know its old by now but</title>
      <description>&lt;a href="http://www.vgcats.com/comics/extras/stillalive.php"&gt;Ahhhh&lt;/a&gt;</description>
      <pubDate>Mon, 22 Jun 2009 00:20:15 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:844a07a0-74f1-47b5-99e9-347edb2b6893</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/06/22/i-know-its-old-by-now-but</link>
      <category>Games</category>
    </item>
    <item>
      <title>Mylyn Xplanner connector, now with context</title>
      <description>I've installed &lt;a href="http://www.xplanner.org/"&gt;XPlanner &lt;/a&gt; again at work recently and even started using it for my own projects. It's a nice structured way of keeping track of work but it's even nicer combined with &lt;a href="http://www.eclipse.org/mylyn/"&gt;Mylyn&lt;/a&gt; thanks to the people who developed the XPlanner connector for it.  One of the useful features of Mylyn wasn't there though &lt;a href=https://bugs.eclipse.org/bugs/show_bug.cgi?id=243645&gt;until now &lt;/a&gt;
- the ability to &lt;a href="http://www.podtech.net/home/3514/europa-mylyn-demo-task-management-and-context-filtering-for-teams"&gt;share contexts&lt;/a&gt; with  others (or your future self).</description>
      <pubDate>Tue, 16 Jun 2009 20:29:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:1ab3e8cb-59b7-4848-aefc-7c7bb8f28cb4</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/06/16/mylyn-xplanner-connector-now-with-context</link>
      <category>software</category>
      <category>Software dev</category>
    </item>
    <item>
      <title>view subversion commits on a timeline</title>
      <description>Here's something I wrote a while ago and never got round to finding hosting for.   
&lt;a href="http://code.google.com/p/svnreporter/"&gt;view subversion commits on a javascript timeline.&lt;/a&gt;&lt;p/&gt;</description>
      <pubDate>Sun, 05 Apr 2009 11:53:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:bcb170a6-75a0-4432-91a9-ebdc481e234f</guid>
      <author>Daz</author>
      <link>http://www.tarbard.co.uk/articles/2009/04/05/view-subversion-commits-on-a-timeline</link>
      <category>software</category>
      <category>Software dev</category>
    </item>
  </channel>
</rss>
