<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<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/"
	>

<channel>
	<title>Can I get down now dad?</title>
	<link>http://www.spuggy.co.uk</link>
	<description>Tramps like us, baby we were born to code</description>
	<pubDate>Sat, 10 May 2008 09:02:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Well I was dancing in a lesbian bar</title>
		<link>http://www.spuggy.co.uk/2008/05/10/well-i-was-dancing-in-a-lesbian-bar/</link>
		<comments>http://www.spuggy.co.uk/2008/05/10/well-i-was-dancing-in-a-lesbian-bar/#comments</comments>
		<pubDate>Sat, 10 May 2008 09:02:12 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Mobile</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/05/10/well-i-was-dancing-in-a-lesbian-bar/</guid>
		<description><![CDATA[
.flickr-photo { border: solid 2px #000000; }
.flickr-yourcomment { }
.flickr-frame { text-align: left; padding: 3px; }
.flickr-caption { font-size: 0.8em; margin-top: 0px; }


	

	Well I was dancing in a lesbian bar, originally uploaded by Spuggy.


]]></description>
			<content:encoded><![CDATA[<p><style type="text/css"><br />
.flickr-photo { border: solid 2px #000000; }<br />
.flickr-yourcomment { }<br />
.flickr-frame { text-align: left; padding: 3px; }<br />
.flickr-caption { font-size: 0.8em; margin-top: 0px; }<br />
</style></p>
<div class="flickr-frame">
	<a href="http://www.flickr.com/photos/spuggy/2478426591/" title="photo sharing"><img src="http://farm4.static.flickr.com/3219/2478426591_496a03c2e5.jpg" class="flickr-photo" alt="" /></a><br />
<br />
	<span class="flickr-caption"><a href="http://www.flickr.com/photos/spuggy/2478426591/">Well I was dancing in a lesbian bar</a>, originally uploaded by <a href="http://www.flickr.com/people/spuggy/">Spuggy</a>.</span>
</div>
<p class="flickr-yourcomment">
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/05/10/well-i-was-dancing-in-a-lesbian-bar/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>links for 2008-05-09</title>
		<link>http://www.spuggy.co.uk/2008/05/09/links-for-2008-05-09/</link>
		<comments>http://www.spuggy.co.uk/2008/05/09/links-for-2008-05-09/#comments</comments>
		<pubDate>Fri, 09 May 2008 05:35:42 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Links</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/05/09/links-for-2008-05-09/</guid>
		<description><![CDATA[

Sun Jave Me UI Toolkit
At last the great white hope. &#8230;.. we&#8217;ll see.
(tags: j2me)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="https://lwuit.dev.java.net/">Sun Jave Me UI Toolkit</a></div>
<div class="delicious-extended">At last the great white hope. &#8230;.. we&#8217;ll see.</div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/bluetrail/j2me">j2me</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/05/09/links-for-2008-05-09/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Fabness #678 - The Small Faces</title>
		<link>http://www.spuggy.co.uk/2008/05/05/fabness-678-the-small-faces/</link>
		<comments>http://www.spuggy.co.uk/2008/05/05/fabness-678-the-small-faces/#comments</comments>
		<pubDate>Mon, 05 May 2008 10:41:26 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Mobile</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/05/05/fabness-678-the-small-faces/</guid>
		<description><![CDATA[



]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="355"><br />
<param name="movie" value="http://www.youtube.com/v/wcKZoFRpZCI&#038;hl=en"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/wcKZoFRpZCI&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/05/05/fabness-678-the-small-faces/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Beer Porn #78</title>
		<link>http://www.spuggy.co.uk/2008/05/03/beer-porn-78/</link>
		<comments>http://www.spuggy.co.uk/2008/05/03/beer-porn-78/#comments</comments>
		<pubDate>Sat, 03 May 2008 19:41:09 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Mobile</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/05/03/beer-porn-78/</guid>
		<description><![CDATA[
Stroud Budding, Champion Beer of Gloucestershire 2006.

]]></description>
			<content:encoded><![CDATA[<p><img id="image136" src="http://www.spuggy.co.uk/blog/wp-content/uploads/2008/05/beerporn.JPG" alt="beerporn.JPG" /></p>
<p>Stroud Budding, Champion Beer of Gloucestershire 2006.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/05/03/beer-porn-78/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>links for 2008-05-01</title>
		<link>http://www.spuggy.co.uk/2008/05/01/links-for-2008-05-01/</link>
		<comments>http://www.spuggy.co.uk/2008/05/01/links-for-2008-05-01/#comments</comments>
		<pubDate>Thu, 01 May 2008 05:37:32 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Links</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/05/01/links-for-2008-05-01/</guid>
		<description><![CDATA[

Opera Mini - Do you own connection settings!!!
Very handy connection setup for your mobile phone.  Hoorah
(tags: mobile setup)


Mobile Analytics
Admob provide mobile stats service like google sort of
(tags: mobil)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.operamini.com/help/connect/">Opera Mini - Do you own connection settings!!!</a></div>
<div class="delicious-extended">Very handy connection setup for your mobile phone.  Hoorah</div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/bluetrail/mobile">mobile</a> <a href="http://del.icio.us/bluetrail/setup">setup</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://wapreview.com/blog/?p=544">Mobile Analytics</a></div>
<div class="delicious-extended">Admob provide mobile stats service like google sort of</div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/bluetrail/mobil">mobil</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/05/01/links-for-2008-05-01/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>links for 2008-04-26</title>
		<link>http://www.spuggy.co.uk/2008/04/26/links-for-2008-04-26/</link>
		<comments>http://www.spuggy.co.uk/2008/04/26/links-for-2008-04-26/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 05:37:40 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Links</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/04/26/links-for-2008-04-26/</guid>
		<description><![CDATA[

Very nice gwt components &#8230;..
Digging that crazy GWT thing.
(tags: gwt, ajax)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://extjs.com/">Very nice gwt components &#8230;..</a></div>
<div class="delicious-extended">Digging that crazy GWT thing.</div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/bluetrail/gwt,">gwt,</a> <a href="http://del.icio.us/bluetrail/ajax">ajax</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/04/26/links-for-2008-04-26/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Is it wrong?</title>
		<link>http://www.spuggy.co.uk/2008/04/24/is-it-wrong/</link>
		<comments>http://www.spuggy.co.uk/2008/04/24/is-it-wrong/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 12:07:14 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Mobile</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/04/24/is-it-wrong/</guid>
		<description><![CDATA[
.flickr-photo { border: solid 2px #000000; }
.flickr-yourcomment { }
.flickr-frame { text-align: left; padding: 3px; }
.flickr-caption { font-size: 0.8em; margin-top: 0px; }


	

	DSC00281.JPG, originally uploaded by Spuggy.


	For a grown man to have a Jiminy Cricket badge thing on his shoes?

]]></description>
			<content:encoded><![CDATA[<p><style type="text/css"><br />
.flickr-photo { border: solid 2px #000000; }<br />
.flickr-yourcomment { }<br />
.flickr-frame { text-align: left; padding: 3px; }<br />
.flickr-caption { font-size: 0.8em; margin-top: 0px; }<br />
</style></p>
<div class="flickr-frame">
	<a href="http://www.flickr.com/photos/spuggy/2437845327/" title="photo sharing"><img src="http://farm3.static.flickr.com/2292/2437845327_263acfe6d3.jpg" class="flickr-photo" alt="" /></a><br />
<br />
	<span class="flickr-caption"><a href="http://www.flickr.com/photos/spuggy/2437845327/">DSC00281.JPG</a>, originally uploaded by <a href="http://www.flickr.com/people/spuggy/">Spuggy</a>.</span>
</div>
<p class="flickr-yourcomment">
	For a grown man to have a Jiminy Cricket badge thing on his shoes?
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/04/24/is-it-wrong/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Groovy, SQL and accessing Java libraries</title>
		<link>http://www.spuggy.co.uk/2008/04/22/groovy-sql-and-accessing-java-libraries/</link>
		<comments>http://www.spuggy.co.uk/2008/04/22/groovy-sql-and-accessing-java-libraries/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 15:07:09 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Mobile</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/04/22/groovy-sql-and-accessing-java-libraries/</guid>
		<description><![CDATA[The beauty of Groovy is that it combines the lovely scripty-ness with the java integration.  Here is an example form this morning, I needed to encode some passwords in a database table and wanted a quick script to do the job.
What this script demonstrates is that Groovy can get at databases out of the [...]]]></description>
			<content:encoded><![CDATA[<p>The beauty of Groovy is that it combines the lovely scripty-ness with the java integration.  Here is an example form this morning, I needed to encode some passwords in a database table and wanted a quick script to do the job.</p>
<p>What this script demonstrates is that Groovy can get at databases out of the box and talk to regular Java.  Note the postgres driver below - this ran straight away and is the same driver we use in regular java dev.  Also note the function &#8220;encodePassword&#8221;.  This calls a load of regular Java stuff from the import java.security.MessageDigest packge.  </p>
<p>Yet I can whack all this together and still do the crazy forEach closure thing.</p>
<p>Apologies for shonky code but hey:</p>
<p><code><br />
import groovy.sql.*<br />
import java.security.MessageDigest<br />
/*<br />
 * function to encode a string/password<br />
 */<br />
 public String encodePassword(String password, String algorithm) {</p>
<p> byte[] unencodedPassword = password.getBytes();<br />
    MessageDigest md = null;</p>
<p>    try {<br />
        // first create an instance, given the provider<br />
        md = MessageDigest.getInstance(algorithm);<br />
    } catch (Exception e) {<br />
        print ("Exception: " + e);</p>
<p>        return password;<br />
    }</p>
<p>    md.reset();</p>
<p>    // call the update method one or more times<br />
    // (useful when you don't know the size of your data, eg. stream)<br />
    md.update(unencodedPassword);</p>
<p>    // now calculate the hash<br />
    byte[] encodedPassword = md.digest();</p>
<p>    StringBuffer buf = new StringBuffer();</p>
<p>    for (int i = 0; i < encodedPassword.length; i++) {<br />
        if ((encodedPassword[i] &#038; 0xff) < 0x10) {<br />
            buf.append("0");<br />
        }</p>
<p>        buf.append(Long.toString(encodedPassword[i] &#038; 0xff, 16));<br />
    }</p>
<p>    return buf.toString();<br />
}</p>
<p>/*<br />
 * Main bit of groovy starts here<br />
 */<br />
def DB='jdbc:postgresql://localhost/callbriefdb?useUnicode=true&amp;characterEncoding=utf-8'<br />
def USER='chutney'<br />
def PASSWORD='pants'<br />
def DRIVER='org.postgresql.Driver' </p>
<p>def  sql = Sql.newInstance(DB,USER,PASSWORD,DRIVER)</p>
<p>//not really sure how to process a result set so just hacked it <img src='http://www.spuggy.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
sql.eachRow('select * from app_user where id <>  0&#8242;) { n -> newPw =encodePassword(n.pinNumber,&#8221;SHA&#8221;) ; sql.execute(&#8221;update app_user set password = ${newPw} where id = ${n.id}&#8221; )}</p>
<p>	 </code>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/04/22/groovy-sql-and-accessing-java-libraries/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Naked Winky Man</title>
		<link>http://www.spuggy.co.uk/2008/04/06/naked-winky-man/</link>
		<comments>http://www.spuggy.co.uk/2008/04/06/naked-winky-man/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 15:00:27 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Mobile</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/04/06/naked-winky-man/</guid>
		<description><![CDATA[
During a pause in conversation my son, the Baron Von Pud, demonstrates his &#8220;Naked Winky Man&#8221; - genius.

]]></description>
			<content:encoded><![CDATA[<p><img id="image130" src="http://www.spuggy.co.uk/blog/wp-content/uploads/2008/04/nakedwinkyman.JPG" alt="nakedwinkyman.JPG" /></p>
<p>During a pause in conversation my son, the Baron Von Pud, demonstrates his &#8220;Naked Winky Man&#8221; - genius.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/04/06/naked-winky-man/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>links for 2008-04-06</title>
		<link>http://www.spuggy.co.uk/2008/04/06/links-for-2008-04-06/</link>
		<comments>http://www.spuggy.co.uk/2008/04/06/links-for-2008-04-06/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 05:31:59 +0000</pubDate>
		<dc:creator>rspence</dc:creator>
		
	<category>Links</category>
		<guid isPermaLink="false">http://www.spuggy.co.uk/2008/04/06/links-for-2008-04-06/</guid>
		<description><![CDATA[

AHAH
Ajax but simpler, very elegant and simple.  nice
(tags: ajax ahah)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://microformats.org/wiki/rest/ahah">AHAH</a></div>
<div class="delicious-extended">Ajax but simpler, very elegant and simple.  nice</div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/bluetrail/ajax">ajax</a> <a href="http://del.icio.us/bluetrail/ahah">ahah</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRSS>http://www.spuggy.co.uk/2008/04/06/links-for-2008-04-06/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
