<?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>James Titcumb</title>
	<atom:link href="http://www.asgrim.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.asgrim.com</link>
	<description>My blog, with PHP and babies and cooking and stuff...</description>
	<lastBuildDate>Wed, 08 Sep 2010 21:23:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Open letter to all website creators</title>
		<link>http://www.asgrim.com/2010/09/08/open-letter-to-all-website-creators/</link>
		<comments>http://www.asgrim.com/2010/09/08/open-letter-to-all-website-creators/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 21:23:51 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[plus]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[validate]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1780</guid>
		<description><![CDATA[Dear everyone who makes websites, Please change your e-mail validation to allow me to use the &#8220;+&#8221; (plus) sign in my e-mail address. Why? So I know who I&#8217;ve given my e-mail address to and if I find a spam e-mail address to an e-mail address I gave to you, I will contact you and [...]]]></description>
			<content:encoded><![CDATA[<p>Dear everyone who makes websites,</p>
<p>Please change your e-mail validation to allow me to use the &#8220;+&#8221; (plus) sign in my e-mail address.</p>
<p>Why? So I know who I&#8217;ve given my e-mail address to and if I find a spam e-mail address to an e-mail address I gave to you, I will contact you and rant and rave at you and shout at you.</p>
<p>Kind regards</p>
<p>James</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/09/08/open-letter-to-all-website-creators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recipe: Chicken Myers</title>
		<link>http://www.asgrim.com/2010/09/02/recipe-chicken-myers/</link>
		<comments>http://www.asgrim.com/2010/09/02/recipe-chicken-myers/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 20:51:49 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Dinner Recipies]]></category>
		<category><![CDATA[broccoli]]></category>
		<category><![CDATA[cheese]]></category>
		<category><![CDATA[chicken]]></category>
		<category><![CDATA[cream]]></category>
		<category><![CDATA[curry]]></category>
		<category><![CDATA[mayo]]></category>
		<category><![CDATA[mayonnaise]]></category>
		<category><![CDATA[myers]]></category>
		<category><![CDATA[powder]]></category>
		<category><![CDATA[soup]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1739</guid>
		<description><![CDATA[I don&#8217;t know where this recipe is from so I&#8217;m not sure who to credit for it. It&#8217;s one my mum (and in turn her mum) gave to me from an old-looking magazine cutting, and I don&#8217;t know anything more than &#8220;it&#8217;s yummy!&#8221; and it&#8217;s such a simple dish to do! Ingredients (serves 4) 4 [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know where this recipe is from so I&#8217;m not sure who to credit for it. It&#8217;s one my mum (and in turn her mum) gave to me from an old-looking magazine cutting, and I don&#8217;t know anything more than &#8220;it&#8217;s yummy!&#8221; and it&#8217;s such a simple dish to do!</p>
<p><strong>Ingredients (serves 4)</strong><br />
4 tablespoons double cream<br />
4-6 chicken pieces<br />
225g frozen broccoli, thawed<br />
298g can condensed cream of chicken soup<br />
4 rounded tablespoons real mayonnaise<br />
Half level teaspoon curry powder<br />
50g English cheddar, grated</p>
<p><strong>Instructions</strong><br />
1. Preheat a moderately hot oven (Gas 5, 375 deg. F, 190 deg. C)<br />
2. Arrange the chicken and broccoli in a shallow baking dish.<br />
3. Combine the undiluted chicken soup with the mayonnaise, cream and curry powder. Spoon this over the chicken and broccoli then sprinkle with the grated cheese.<br />
4. Bake in the preheated oven for about 30 minutes until the chicken is cooked through and the cheese is turning golden brown.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/09/02/recipe-chicken-myers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Basics &#8211; Part I: Hello Classy World</title>
		<link>http://www.asgrim.com/2010/08/30/php-basics-part-i-hello-classy-world/</link>
		<comments>http://www.asgrim.com/2010/08/30/php-basics-part-i-hello-classy-world/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 16:34:36 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1640</guid>
		<description><![CDATA[PHP is my favourite programming language of all time. It&#8217;s simple when you need it to be, and advanced when you need that extra power. I&#8217;m what many people would call an evangelist of PHP. Since starting work at Netbasic, I&#8217;ve really gone all out in using object-orientated programming (OOP) with PHP, and nearly everything [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.php.net/">PHP</a> is my favourite programming language of all time. It&#8217;s simple when you need it to be, and advanced when you need that extra power. I&#8217;m what many people would call an evangelist of PHP. Since starting work at <a href="http://www.netbasic.com/">Netbasic</a>, I&#8217;ve really gone all out in using object-orientated programming (OOP) with PHP, and nearly everything I do is object-orientated now.</p>
<p>Let&#8217;s step back a moment to the title of this article, &#8220;PHP Basics&#8221;. Isn&#8217;t that an indication that this is a guide for beginners? You&#8217;d be right in thinking that, and I&#8217;m going to go from nearly the beginning. For the purposes of the tutorial, I will assume you know how to set up your own LAMP or WAMP server (and if you don&#8217;t there are countless great tutorials on that), and that you know how the internet works and some basic HTML/CSS. I will also assume that you have little-to-no experience of object orientated programming (although understanding OOP in C++ or Java for example would be a bonus!), little-to-no experience of general programming, and no experience of PHP.</p>
<p>The next question you&#8217;re probably asking is why am I writing a &#8220;PHP introduction&#8221; tutorial when there are countless already out there? The answer to that is that I&#8217;m trying a different approach that I&#8217;ve not seen before. I&#8217;m going to start at the object orientated level so that procedural PHP scripting doesn&#8217;t even factor into the equation. I&#8217;ve done quite a long preamble now with not much in the way of teaching PHP, so we&#8217;re going to start now.<br />
<span id="more-1640"></span></p>
<h3>Hello Classy World</h3>
<p>When starting almost <em>any</em> programming language, you will always start with something called a &#8220;Hello World&#8221; app. All this app does is write, print, echo or display somehow a string saying &#8220;Hello World&#8221;. It&#8217;s often also used to test an installation works to ensure PHP is performing as expected. So, fire up your favourite editor and create a new helloworld.php file in your web root, and fill it with this basic OOP code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> MyClass
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">function</span> HelloWorld<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hello, world!&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$obj</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MyClass<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">HelloWorld</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Okay, let&#8217;s run through what is happening here. We&#8217;re creating an object (a class) that is called &#8220;MyClass&#8221;. Within the scope of the class (indicated by curly braces { and } ) we have something called a &#8220;function&#8221; that is called &#8220;HelloWorld&#8221;. Within this &#8220;function&#8221;, is echo &#8220;Hello, world!&#8221;. What we have done here is define a class (or object &#8211; they&#8217;re interchangeable terms in OOP) with a function that echos the string &#8220;Hello, world!&#8221;.</p>
<h3>Back up a sec, what&#8217;s a function? And an echo? And scope&#8230;</h3>
<p>If you&#8217;re a beginner reading this, you might be confused already, so I&#8217;ll go through a couple of things&#8230;</p>
<h4>Echo</h4>
<p><a href="http://uk.php.net/manual/en/function.echo.php">Echo</a> is a &#8220;language construct&#8221; (which means it&#8217;s an integral part of PHP) that outputs whatever follows it to the browser. If this were a procedural script, doing something like this might result in the browser seeing the words &#8220;Hello, world!&#8221; in plain text on a plain background.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hello, world!&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Echo is fundamental to PHP and you&#8217;ll use it a lot.</p>
<h4>Variables</h4>
<p><a href="http://www.php.net/manual/en/language.variables.basics.php">Variables</a> are like the memory function on your calculator, but a bit more complex. A variable is a value that is stored in the computer memory for use in your script. Variables in PHP have names, which are defined by the dollar symbol ($). For example, here are a couple of variables:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;James&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$favourite_hobby</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;PHP&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$number_of_toes</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span></pre></div></div>

<p>Variables are case-sensitive (meaning $apple is not the same as $Apple), and can only contain letters, numbers and underscores, and can&#8217;t start with a number. Using our very limited knowledge so far, we can store a value in a variable, and echo it to the browser:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hello, world!&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span></pre></div></div>

<p>What we have done is store the string (a collection of characters &#8211; or letters) in the $text variable. You can use variables in many places to replace using actual values (think algebra!), and are extremely important to programming.</p>
<h4>Functions</h4>
<p>A &#8220;<a href="http://www.php.net/manual/en/functions.user-defined.php">function</a>&#8221; (in programming) is a group of lines of code that can be executed in your script. An example of a function is something that adds two numbers together &#8211; it performs a specific function, and sometimes gives a result back. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> AddNumbers<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$b</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$c</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The notation for &#8220;defining&#8221; a function is as above &#8211; the word &#8220;function&#8221; followed by the name of the function (in this example, &#8220;AddNumbers&#8221; followed by an open parenthesis symbol, some &#8220;arguments&#8221;. The lines of code contained within the curly braces are what will happen when the function is called. Let us use the function above and combine with our knowledge of variables and echoing values.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$apples</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$oranges</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">25</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fruit</span> <span style="color: #339933;">=</span> AddNumbers<span style="color: #009900;">&#40;</span><span style="color: #000088;">$apples</span><span style="color: #339933;">,</span> <span style="color: #000088;">$oranges</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;There are <span style="color: #006699; font-weight: bold;">{$fruit}</span> pieces of fruit.&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This snippet has two declared variables &#8211; $apples and $oranges &#8211; and uses the function AddNumbers to add them together, and output a string with a variable inside (contained within curly braces!) to the browser. There are many more complexities when dealing with functions, especially with some newer PHP 5.3 features, which I will leave out to avoid too much confusion!</p>
<p>You can actually simplify this code already (and more experienced programmers will have noticed this). Spot where I have simplified this a little:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> AddNumbers<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$a</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$b</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$apples</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$oranges</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">25</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;There are &quot;</span> <span style="color: #339933;">.</span> AddNumbers<span style="color: #009900;">&#40;</span><span style="color: #000088;">$apples</span><span style="color: #339933;">,</span> <span style="color: #000088;">$oranges</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; pieces of fruit.&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In PHP it is possible to evaluate code in place of creating new variables &#8211; we have replaced declaring two variables &#8211; $c in the function, and $fruit outside the function. The performance benefit for doing this is arguable, and negligible if at all &#8211; not to mention completely out of the scope of this article.</p>
<h3>Understanding Objects</h3>
<p>Now that we have a basic grasp on a few fundamental principles, we can look at object orientation. You have to look at everything you do in a different way &#8211; a way where every object is it&#8217;s own entity and serves it&#8217;s own purpose. Not only that, but objects can be types of other objects, and there can be many multiples of objects, sometimes containing many other objects.</p>
<p>First ask yourself what is an object in the real world. An commonly used example for understanding objects is Apples and Oranges. An Apple is an object, and the type of object is a fruit. Further classification could say that fruit is a type of food. Let&#8217;s represent this in PHP objects using empty classes, and the keyword &#8220;extends&#8221;.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Fruit
<span style="color: #009900;">&#123;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Apple <span style="color: #000000; font-weight: bold;">extends</span> Fruit
<span style="color: #009900;">&#123;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Orange <span style="color: #000000; font-weight: bold;">extends</span> Fruit
<span style="color: #009900;">&#123;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The &#8220;extends&#8221; keyword basically means class X inherits class Y &#8211; it inherits typical characteristics of the &#8220;parent&#8221; class as it is known. This parent/child relationship is common across all object-orientation, and is an important concept to master. Lets put in some functions into our classes to demonstrate what I mean.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
abstract <span style="color: #000000; font-weight: bold;">class</span> Fruit
<span style="color: #009900;">&#123;</span>
  abstract <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Prepare<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;You have created an &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">get_class</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Serve<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;You have served the &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">get_class</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; on a plate.&lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Apple <span style="color: #000000; font-weight: bold;">extends</span> Fruit
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Prepare<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Slice</span><span style="color: #009900;">&#40;</span><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;">function</span> Slice<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Apple has been sliced.&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Orange <span style="color: #000000; font-weight: bold;">extends</span> Fruit
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Prepare<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Peel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SeparateChunks</span><span style="color: #009900;">&#40;</span><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;">function</span> Peel<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GrateZest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Orange has been peeled.&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> GrateZest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// grate that zest so we can use it to cook!</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;The zest of the orange has been saved for cooking.&lt;br /&gt;&quot;</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;">function</span> SeparateChunks<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// separate the orange chunks into bitesize pieces</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;The orange has been separated into chunks.&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$my_apple</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Apple<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_apple</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Prepare</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_apple</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Serve</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$my_orange</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Orange<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_orange</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Prepare</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_orange</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Serve</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Woah, this bit of code just got a whole lot bigger! I&#8217;ve introduced a few more concepts here, which I&#8217;ll go into a little bit more detail about. Firstly though, this code will output something like:</p>
<blockquote><p>You have created an Apple<br />
Apple has been sliced.<br />
You have served the Apple on a plate.</p>
<p>You have created an Orange<br />
The zest of the orange has been saved for cooking.<br />
Orange has been peeled.<br />
The orange has been separated into chunks.<br />
You have served the Orange on a plate.</p></blockquote>
<p>Okay &#8211; lets have a look at some new key concepts to help understand the above code and how we got to the output.</p>
<h4>Instances</h4>
<p>When you write a class, you are defining the structure. The &#8220;class MyClass&#8221; and optionally &#8220;extends AnotherClass&#8221; tell the PHP interpreter that you are creating the class structure itself &#8211; the skeleton if you will. By doing this, you are saying these are the blueprints of how it all works. When you want to actually use a class, you do something called instantiate the class &#8211; or create an &#8220;instance&#8221; of it. Think of this as the physical existence of the object. You can, of course, have many instances. Each of the variables defined below is what is called an instance of a particular class. We use the &#8220;new&#8221; keyword to identify this by create a new instance of whatever class name follows. You can interact with these instances as regular variables which are all separate.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$apple1</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Apple<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$apple2</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Apple<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$apple3</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Apple<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Abstract Classes</h4>
<p>An abstract class is an incomplete definition of something. In our example above, you will see that the &#8220;Fruit&#8221; class has the keyword &#8220;abstract&#8221; prepends the class definition. This means that you cannot create an instance of that particular class, and the only way to use it is by extending it.</p>
<p>The first line will result in an error because Fruit is abstract, but the second is OK because Orange is a full class:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$some_fruit</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Fruit<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Errors</span>
<span style="color: #000088;">$some_orange</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Orange<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// OK!</span></pre></div></div>

<h4>Reserved variable name $this</h4>
<p>Something you will use frequently in OOP is the self-referential pseudo-variable &#8220;$this&#8221;. $this points to it&#8217;s own instance in context, and you can use it to call member variables or functions. In our Orange class example above, we can see that the Prepare function calls to of it&#8217;s own methods &#8211; Peel() and SeparateChunks(). If these were public functions (you&#8217;ll find out what these are in a moment!), you would be able to call these separately in the same way as you call Prepare().</p>
<h4>Basic Visibility &#8211; public, private</h4>
<p>Visibility of methods and variables is also another important OOP principle. Before the function or variable name you are declaring (only in a class), you can define it&#8217;s visibility. Default visibility for a function is public, but I find it good practice to always explicitly declare visibility for clarity. In our Orange example, the only publically visible methods (i.e. outside the structure or definition of the class) are Prepare() and Serve(); Serve() is inherited from the parent class Fruit remember. Orange&#8217;s private methods (i.e. you cannot access these outside the class) are Peel(), GrateZest() and SeparateChunks().</p>
<p>The second line will result in an error because Peel is a private method, but the third is OK because Prepare() is a public method:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$orange</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Orange<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$orange</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Peel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Error - Peel is not publically available</span>
<span style="color: #000088;">$orange</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Prepare</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// OK - Prepare is publically available</span></pre></div></div>

<p>There are a few more visibility operators, but these are the two basic ones you need to know about.</p>
<h4>The Function (or Call) Stack</h4>
<p>When calling functions, PHP maintains an internal list (or <a href="http://en.wikipedia.org/wiki/Stack_%28data_structure%29">stack</a>) of what is going on. You may have heard this term used in other programming languages, and most likely the term &#8220;Stack Dump&#8221;. I&#8217;ll briefly introduce the concept because I think it is useful to know how the engine works underneath.</p>
<p>Basically, at any one point in the execution of your script, you can do a &#8220;Stack Dump&#8221; which essentially is saying &#8220;output the call stack&#8221;. The call stack itself is a list of functions that have been called, and also indicates what the current function is.  To view the stack dump, you can use the <a href="http://uk.php.net/manual/en/function.debug-backtrace.php">debug_backtrace</a> function, but I won&#8217;t go into detail about that for now.</p>
<p>In the Orange class, at the point of the line that echos &#8220;The zest of the orange has been saved for cooking&#8221;, the call stack will look something like this (and I&#8217;m excluding system call stack for simplicity!):</p>
<ul>
<li>Prepare()</li>
<li>Peel()</li>
<li>GrateZest()</li>
</ul>
<p>Basically, this means the Prepare function has been called, and inside that, the Peel() function has been called, and inside that the GrateZest() function has been called. When the GrateZest() has finished executing, the execute &#8220;returns&#8221; to the Peel() function and the call stack becomes:</p>
<ul>
<li>Prepare()</li>
<li>Peel()</li>
</ul>
<p>This concept of the stack is known has <a href="http://en.wikipedia.org/wiki/LIFO_%28computing%29">LIFO</a> &#8211; or Last In, First Out &#8211; because the last item added to the stack is the first to be removed.</p>
<h4>Constructors</h4>
<p>A constructor is a PHP &#8220;magic&#8221; method. Magic methods are normally identified by the double underscore (_) before the function name. The constructor magic method is executed at the creation time of the class instance. This is how we make &#8220;You have created an Apple&#8221; appear. When the code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$my_apple</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Apple<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>is run, PHP magically executes the code within the __construct() function. You can provide extra arguments to the construct function, for example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> SomeClass
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$_value</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_value <span style="color: #339933;">=</span> <span style="color: #000088;">$a</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$b</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetValue<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_value<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$instance</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SomeClass<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;The result is: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$instance</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Output would be:</span>
<span style="color: #666666; font-style: italic;">//   The result is: 15</span></pre></div></div>

<h3>Closing Words</h3>
<p>There you have it &#8211; some basic OOP knowledge. If you&#8217;ve followed me to this point, then you&#8217;re doing really well. Jumping straight into OOP PHP isn&#8217;t the easiest way to start by any means, and means you have to learn some concepts of OOP as well as learning syntax, so it&#8217;s a bit of a head full to begin with. The aim of these tutorials is to start you thinking OOP at the very first instance, instead of thinking &#8220;I do it this way in a procedural script, how can I translate this into OOP?&#8221;, which may not be the most efficient way of doing things.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/08/30/php-basics-part-i-hello-classy-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop Using the PHP Error Suppressor &#8220;@&#8221; and &#8220;or die&#8221;</title>
		<link>http://www.asgrim.com/2010/08/28/stop-using-the-php-error-suppressor-and-or-die/</link>
		<comments>http://www.asgrim.com/2010/08/28/stop-using-the-php-error-suppressor-and-or-die/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 15:57:55 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[at]]></category>
		<category><![CDATA[catch]]></category>
		<category><![CDATA[die]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[handling]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[or]]></category>
		<category><![CDATA[PDO]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[suppressor]]></category>
		<category><![CDATA[symbol]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1603</guid>
		<description><![CDATA[It annoys me when I see tutorials for learning PHP with code like this: $fd = @file&#40;&#34;doesnotexist&#34;&#41;; and this: $md = mysql_connect&#40;&#34;localhost&#34;, &#34;user&#34;, &#34;pass&#34;&#41; or die&#40;&#34;Could not connect!&#34;&#41;; It&#8217;s bad practice in the real programming world and shouldn&#8217;t happen. The at symbol (@) is used to silence any errors caused by calling a function as [...]]]></description>
			<content:encoded><![CDATA[<p>It annoys me when I see tutorials for learning PHP with code like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$fd</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;doesnotexist&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>and this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$md</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;user&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pass&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Could not connect!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>It&#8217;s bad practice in the real programming world and shouldn&#8217;t happen. The at symbol (@) is used to silence any errors caused by calling a function as shown above, when proper error handling should be implemented. Similarly, the practice of using &#8220;or die&#8221; to error check needs to stop being taught.</p>
<p>Using this language in PHP really needs to stop because there are much better ways to handle errors, such as using exceptions, or any sort of error handling except this really. My personal favourite is using an exception and catching it further down the stack. There&#8217;s loads of tutorials on error handling so I won&#8217;t go into it, but I just wanted to vent my hatred for this poor excuse for shoddy coding.</p>
<p>And while I&#8217;m at it, stop using mysql_* functions and start using PDO! <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/08/28/stop-using-the-php-error-suppressor-and-or-die/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Recipe: Salmon Korma on Naan</title>
		<link>http://www.asgrim.com/2010/08/26/recipe-salmon-korma-on-naan/</link>
		<comments>http://www.asgrim.com/2010/08/26/recipe-salmon-korma-on-naan/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 19:48:01 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Dinner Recipies]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[korma]]></category>
		<category><![CDATA[naan]]></category>
		<category><![CDATA[salmon]]></category>
		<category><![CDATA[tandoori]]></category>
		<category><![CDATA[tikkia]]></category>
		<category><![CDATA[yoghurt]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1741</guid>
		<description><![CDATA[Yeah OK so this isn&#8217;t an original recipe, it&#8217;s shamelessly lifted from my Jamie Oliver&#8217;s Ministry of Food book that my sister gave me a couple of years ago. I love this recipe and make it at least once a month though, and you can vary it by swapping out the korma paste with any [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah OK so this isn&#8217;t an original recipe, it&#8217;s shamelessly lifted from my <a href="http://www.amazon.co.uk/gp/product/0718148622?ie=UTF8&amp;tag=mypre-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0718148622">Jamie Oliver&#8217;s Ministry of Food</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=mypre-21&amp;l=as2&amp;o=2&amp;a=0718148622" border="0" alt="" width="1" height="1" /><br />
book that my sister gave me a couple of years ago. I love this recipe and make it at least once a month though, and you can vary it by swapping out the korma paste with any sort of paste &#8211; tandoori, tikka massala etc.</p>
<p><strong>Ingredients</strong></p>
<ul>
<li>Half a Cucumber</li>
<li>Lemon juice</li>
<li>Red chilli</li>
<li>Yoghurt</li>
<li>Coriander</li>
<li>2x Naan bread</li>
<li>2x Salmon fillets</li>
<li>Salt &amp; Pepper</li>
<li>Korma paste (e.g. Patak&#8217;s)</li>
<li>Olive oil</li>
</ul>
<p><strong>Instructions</strong></p>
<p>Chop the cucumber into small chunks and put in a pyrex bowl, saving a few pieces for garnish. De-seed and finely chop the red chilli and coriander (save a little of each as well) and add to bowl. Add a couple of splashes of lemon juice and the yoghurt. Season with salt &amp; pepper, mix up well and leave on side.</p>
<p>Warm your naan bread in the oven. Slice the salmon into chunks about half an inch thick. Heat some olive oil in a frying pan and add the salmon chunks, followed by 2 tablespoons of korma paste (more or less to taste). Mix up well as it cooks.</p>
<p>As soon as the salmon is cooked, place your naan bread on your serving plate, and spread out the cucumber/yoghurt mix around the large end of the naan. Add half the salmon on top, serve with the remaining cucumber, chilli and coriander on top. Yum.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/08/26/recipe-salmon-korma-on-naan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recipe: My Ratatouille</title>
		<link>http://www.asgrim.com/2010/07/11/recipe-my-ratatouille/</link>
		<comments>http://www.asgrim.com/2010/07/11/recipe-my-ratatouille/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 10:22:02 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Dinner Recipies]]></category>
		<category><![CDATA[baby corn]]></category>
		<category><![CDATA[broccoli]]></category>
		<category><![CDATA[carrots]]></category>
		<category><![CDATA[cherry]]></category>
		<category><![CDATA[courgette]]></category>
		<category><![CDATA[garlic]]></category>
		<category><![CDATA[onion]]></category>
		<category><![CDATA[peppers]]></category>
		<category><![CDATA[ratatouille]]></category>
		<category><![CDATA[tomato]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1743</guid>
		<description><![CDATA[Ratatouille is a great dish and full of vegetables which makes it cheap to do. I do Ratatouille slightly differently to many though as I exclude the common ingredients aubergine and bell peppers. My take on Ratatouille still keeps the tomato base in though, and I think it&#8217;s still just as yummy. Truth be told [...]]]></description>
			<content:encoded><![CDATA[<p>Ratatouille is a great dish and full of vegetables which makes it cheap to do. I do Ratatouille slightly differently to many though as I exclude the common ingredients aubergine and bell peppers. My take on Ratatouille still keeps the tomato base in though, and I think it&#8217;s still just as yummy. Truth be told I vary the veg I put in each time, but I&#8217;ll write the recipe for the latest dish I made.</p>
<p><strong>Ingredients (serves 4)<br />
</strong></p>
<ul>
<li>3/4 garlic cloves, crushed</li>
<li>3 small courgettes, chopped</li>
<li>1 onion, chopped</li>
<li>2 carrots, sliced into batons</li>
<li>Tin of chopped tomatoes</li>
<li>12-16 on-the-vine cherry tomatoes</li>
<li>5/6 broccoli florets</li>
<li>8 baby corns</li>
<li>Your choice of herbs, e.g. Basil+Marjoram, Bay Leaf+Thyme or Provençal herbs mix</li>
<li>Optional &#8211; Lea &amp; Perrins</li>
<li>Optional &#8211; 300g long grain rice</li>
</ul>
<p><strong>Instructions</strong></p>
<p>Prepare all the vegetables. In a large saucepan, heat some olive oil and add garlic and onions. After a couple of minutes, add in the rest of the vegetables except the broccoli. Add the tin of tomatoes on top and add the herbs you have chosen. Optionally add some Lea &amp; Perrins Worcester sauce. Give everything a good stir. After a couple of minutes add all the cherry tomatoes and broccoli and give a quick stir and cover.</p>
<p>If you want rice, in another saucepan immediately after adding the broccoli and cherry tomatoes, boil some water for the rice. After 5 minutes, add the rice and cook everything for a further 15 minutes. If you are not doing rice, just cook the ratatouille for 20 minutes with the lid on. Everything should be ready all at once &#8211; which is something I never get quite right, but thankfully this is such a simple dish so it makes it possible!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/07/11/recipe-my-ratatouille/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recipe: Chicken &amp; Mushroom Pie</title>
		<link>http://www.asgrim.com/2010/07/09/recipe-chicken-mushroom-pie/</link>
		<comments>http://www.asgrim.com/2010/07/09/recipe-chicken-mushroom-pie/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 20:19:47 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Dinner Recipies]]></category>
		<category><![CDATA[chicken]]></category>
		<category><![CDATA[cream]]></category>
		<category><![CDATA[creamy]]></category>
		<category><![CDATA[mushroom]]></category>
		<category><![CDATA[pie]]></category>
		<category><![CDATA[veg]]></category>
		<category><![CDATA[vegetables]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1747</guid>
		<description><![CDATA[I love pies, and they&#8217;re so easy to make, especially with pre-rolled pastry. My favourite is this Chicken &#38; Mushroom pie recipe I honed on my own from various sources. Ingredients &#8211; serves 2 Pre-rolled puff pastry 2 chicken breasts, diced 4-6 sliced mushrooms 150ml Double cream 1/2 pint vegetable stock Tablespoon of cornflour 1 [...]]]></description>
			<content:encoded><![CDATA[<p>I love pies, and they&#8217;re so easy to make, especially with pre-rolled pastry. My favourite is this Chicken &amp; Mushroom pie recipe I honed on my own from various sources.</p>
<p><strong>Ingredients &#8211; serves 2<br />
</strong></p>
<ul>
<li>Pre-rolled puff pastry</li>
<li>2 chicken breasts, diced</li>
<li>4-6 sliced mushrooms</li>
<li>150ml Double cream</li>
<li>1/2 pint vegetable stock</li>
<li>Tablespoon of cornflour</li>
<li>1 diced carrot</li>
<li>1/2 chopped broccoli heads</li>
<li>1 chopped onion</li>
<li>Plain flour</li>
<li>Olive oil</li>
<li>2/3 crushed garlic cloves</li>
<li>Splash of white wine <em>(optional)</em></li>
<li>1 egg<em><br />
</em></li>
</ul>
<p><strong>Instructions</strong></p>
<p>There is normally enough puff pastry in the pre-rolled packets for both the lid and outside. I normally slice the pastry in half with a sharp knife and roll one half big enough for a lid, and the other half big enough for the dish (make it slightly bigger for the sides of course!). Make sure you use plenty of flour to roll, and sprinkle a little flour into the dish before you put the pastry in. Leave the lid aside for now.</p>
<p>The pie filling is made by frying some onion and garlic in olive oil on high in a large frying pan. Add the diced chicken breasts until starting to go golden brown. Add the mushrooms, vegetable stock, optionally white wine, carrots, and simmer  on low/medium for 15 minutes. Add in the broccoli a few minutes before that is done. Add in cream and cornflour and stir continuously for another 5 minutes on medium heat until nice and thick. Let this cool completely on the side. Once it is cool, put into your prepared pastry in your pie dish and cover with a lid. Gently press down around the edges with a fork or your fingers, and decorate if you wish.</p>
<p>Beat an egg and brush the top of the pie with it. Pop the pie in the oven on 200 degrees for about 20/25 minutes until golden brown.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/07/09/recipe-chicken-mushroom-pie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternative to array_merge merging many arrays</title>
		<link>http://www.asgrim.com/2010/07/08/alternative-to-array_merge-merging-many-arrays/</link>
		<comments>http://www.asgrim.com/2010/07/08/alternative-to-array_merge-merging-many-arrays/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 10:17:27 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[array_merge]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[large]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1756</guid>
		<description><![CDATA[I have a case at work where I needed to go through a big list of arrays, and add them to a new master array. It turns out this is incredibly slow when adding many large arrays to a larger array. The alternative to this if you don&#8217;t care about keys or duplication of values [...]]]></description>
			<content:encoded><![CDATA[<p>I have a case at work where I needed to go through a big list of arrays, and add them to a new master array. It turns out this is incredibly slow when adding many large arrays to a larger array. The alternative to this if you don&#8217;t care about keys or duplication of values is to just add it into the array. So normally where one might do something like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$big_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_of_objs</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSomeData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// returns an array of data</span>
  <span style="color: #000088;">$big_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$big_array</span><span style="color: #339933;">,</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
processData<span style="color: #009900;">&#40;</span><span style="color: #000088;">$big_array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I believe that array_merge creates a new array every time which is what was slowing it down. The solution was simple enough, it just took me a while to think of! <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$big_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_of_objs</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSomeData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// returns an array of data</span>
  <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$big_array</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$r</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
processData<span style="color: #009900;">&#40;</span><span style="color: #000088;">$big_array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This was vastly faster, again possibly because it doesn&#8217;t create a new array every time. There are limitations to this method, and it doesn&#8217;t do exactly the same thing as array_merge, but it does do what I needed it do, so if anyone has a similar situation, I hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/07/08/alternative-to-array_merge-merging-many-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Extra Security &#8211; Encrypting Passwords For Multiple Users</title>
		<link>http://www.asgrim.com/2010/06/26/adding-extra-security-encrypting-passwords-for-multiple-users/</link>
		<comments>http://www.asgrim.com/2010/06/26/adding-extra-security-encrypting-passwords-for-multiple-users/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 11:30:23 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[decryption]]></category>
		<category><![CDATA[encrypting]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[private passwords]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1705</guid>
		<description><![CDATA[As many of you probably know, I&#8217;ve been working for quite some time on a project called Private Passwords. It is an online password management tool which stores your passwords for any site and allows you to retrieve them from anywhere in the world. One of the things that has niggled me for a while [...]]]></description>
			<content:encoded><![CDATA[<p>As many of you probably know, I&#8217;ve been working for quite some time on a project called <a href="http://www.privatepasswords.co.uk/">Private Passwords</a>. It is an online password management tool which stores your passwords for any site and allows you to retrieve them from anywhere in the world. One of the things that has niggled me for a while was the fact that the encrypted passwords were all encrypted using an <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES encryption key</a>, but had no real barrier if someone somehow managed to get hold of the AES key. The AES key itself could not  be based on the user&#8217;s password as Private Passwords allows businesses to set up accounts for everyone in their company to store/retrieve passwords &#8211; that means the key must be shared amongst all the users otherwise if one user encrypts a password, another would not be able to see it unless they had exactly the same password.</p>
<p>However, Kelvin at work suggested adding a second &#8220;password&#8221; which would be used for each account (account being either a single user&#8217;s account, or a multiple-user business account). I have been busy implementing this solution into Private Passwords. What this means is there would be a community-wide* secondary passwords, which I have called a &#8220;3D Code&#8221; (3-dimensional security &#8211; username, password and 3D code). For example, &#8220;My Company&#8221; would have a 3D Code of &#8220;herebedragons&#8221;, which would be known to everyone in the company. and user Joe Bloggs who works for My Company would enter his e-mail address, password and also the 3D Code for the company when he logs in. The 3D Code forms part of the encryption key, so when they log in, the 3D code is checked against a hash to ensure the decryption routine would work. If it doesn&#8217;t, authentication fails and the user cannot log in.</p>
<p>The important point here is that the 3D Code is never stored anywhere on Private Passwords, so even if the database was compromised somehow there would be absolutely no way of decrypting any of the passwords in the system without knowing that 3D Code which would be different for each home user, and each business account. I think this is a great solution, and although it means having to remember your own password as well as the secondary 3D Code, I think this will provide users of Private Passwords peace of mind when storing passwords in Private Passwords, so thanks Kelvin for that brilliant idea!</p>
<p><small>* In Private Passwords, a community is a group of users. For a home account, there is one community per user, but for business accounts there is one community for everyone in the business.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/06/26/adding-extra-security-encrypting-passwords-for-multiple-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recipe: Scallop Salad</title>
		<link>http://www.asgrim.com/2010/06/23/recipe-scallop-salad/</link>
		<comments>http://www.asgrim.com/2010/06/23/recipe-scallop-salad/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 20:20:09 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Dinner Recipies]]></category>
		<category><![CDATA[dish]]></category>
		<category><![CDATA[dressing]]></category>
		<category><![CDATA[lettuce]]></category>
		<category><![CDATA[salad]]></category>
		<category><![CDATA[scallop]]></category>
		<category><![CDATA[seafood]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1745</guid>
		<description><![CDATA[I got this recipe off the UKTV website (and modified it slightly) and it is absolutely delicious on it&#8217;s own as a starter, or as a side to a nice lemon-marinated salmon fillet. It&#8217;s such a simple dish too, and the flavours are exhilarating. Ingredients Finely diced bread 50g butter Iceberg lettuce Scallops Chopped chives [...]]]></description>
			<content:encoded><![CDATA[<p>I got this recipe off <a href="http://uktv.co.uk/food/recipe/aid/512013">the UKTV website</a> (and modified it slightly) and it is absolutely delicious on it&#8217;s own as a starter, or as a side to a nice lemon-marinated salmon fillet. It&#8217;s such a simple dish too, and the flavours are exhilarating.</p>
<p><strong>Ingredients</strong></p>
<ul>
<li>Finely diced bread</li>
<li>50g butter</li>
<li>Iceberg lettuce</li>
<li>Scallops</li>
<li>Chopped chives</li>
</ul>
<p><strong>For the dressing:</strong></p>
<ul>
<li> 2tbsp Ground nut oil</li>
<li> 175ml sunflower oil</li>
<li> 1 clove garlic</li>
<li> 1 shallot</li>
<li> 1tsp English mustard</li>
<li> Salt &amp; Pepper</li>
<li> 2tbsp white wine vinegar</li>
</ul>
<p><strong>Instructions</strong></p>
<ol>
<li>Heat white wine vinegar, nut oil, sunflower oil, garlic, shallot and mustard, cook for 5 minutes. Season salt &amp; pepper.</li>
<li>Whilst that is doing, 25g butter in frying pan. Add finely diced bread and fry until crispy. Drain on plate with kitchen paper.</li>
<li>25g butter in frying pan. Fry for 1-2 minutes on each side until cooked.</li>
<li>Serve lettuce on plate, put scallops on top and sprinkle with croutons. Top with the dressing. Sprinkle with chives.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/06/23/recipe-scallop-salad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recipe: Confit de Canard</title>
		<link>http://www.asgrim.com/2010/06/17/recipe-confit-de-canard/</link>
		<comments>http://www.asgrim.com/2010/06/17/recipe-confit-de-canard/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 12:59:11 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Dinner Recipies]]></category>
		<category><![CDATA[canard]]></category>
		<category><![CDATA[confit]]></category>
		<category><![CDATA[confit de canard]]></category>
		<category><![CDATA[duck]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1727</guid>
		<description><![CDATA[Image sourced from: roboppy on flickr under CC-by-nc-nd 2.0 license. A good confit de canard (duck confit) is hard to get hold of in England, but luckily as my parents live in the Dordogne region they sometimes bring over a tin. A confit de canard is duck legs that are kept in tins, covered in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/06/confitdecanard.jpg"><img class="alignleft size-medium wp-image-1728" title="confitdecanard" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/06/confitdecanard-300x199.jpg" alt="" width="300" height="199" /></a>Image sourced from: <a href="http://www.flickr.com/photos/roboppy/271647289/">roboppy on flickr</a> under <a href="http://creativecommons.org/licenses/by-nc-nd/2.0/deed.en_GB">CC-by-nc-nd 2.0</a> license.</p>
<p>A good confit de canard (duck confit) is hard to get hold of in England, but luckily as my parents live in the Dordogne region they sometimes bring over a tin. A confit de canard is duck legs that are kept in tins, covered in it&#8217;s own fat. This fat is great and should be kept after cooking for doing roast potatoes and so on. It&#8217;s really easy to cook the duck as well. All you have to do is put in oven for 35-45 minutes (for a good fan assisted, I&#8217;d stick to 35-40) at 180 degrees. I simply took the duck legs out of the tin, put them on a grill rack skin side up above a roasting tin to catch the precious duck fat. I poured more of the duck fat over to make sure there was plenty on them, and simply season with salt and pepper. Cook as above, until the skin is nice and crispy. It&#8217;ll make a bit of a mess of your oven, but it&#8217;s well worth it. After cooking, whilst the fat is still hot and pourable, pour into a container with the remaining fat in the tin and let it cool. Keep this fat in the fridge, and it&#8217;ll keep for a few months I believe, and you can use it for roasting potatoes etc. or anywhere where duck fat might be a tasty ingredient. I served ours with mashed potato, carrots and courgette, but traditionally duck might be served with some lettuce and sautéed potatoes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/06/17/recipe-confit-de-canard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alton Towers Review 2010</title>
		<link>http://www.asgrim.com/2010/06/14/alton-towers-review-2010/</link>
		<comments>http://www.asgrim.com/2010/06/14/alton-towers-review-2010/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 21:01:24 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Alton]]></category>
		<category><![CDATA[park]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[rides]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[towers]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1711</guid>
		<description><![CDATA[I&#8217;m doing absolutely everything I can to avoid the World Cup football. In doing so we ended up at Alton Towers (handily a 30 minute drive from Hannah&#8217;s mum&#8217;s) on Monday. We had a BOGOF voucher to get us in too which made getting the Fast Track tickets (which I think are totally necessary) a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/06/wallpaper01-1024x768.jpg"><img class="alignleft size-medium wp-image-1712" title="wallpaper01-1024x768" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/06/wallpaper01-1024x768-300x225.jpg" alt="" width="300" height="225" /></a>I&#8217;m doing absolutely everything I can to avoid the World Cup football. In doing so we ended up at Alton Towers (handily a 30 minute drive from Hannah&#8217;s mum&#8217;s) on Monday. We had a BOGOF voucher to get us in too which made getting the Fast Track tickets (which I think are totally necessary) a little more affordable. Turns out we were hoping it would be dead quiet, but it was packed, and I figured it&#8217;s because many students have finished uni now. Last year we went and the then-unnamed ride Thirteen was still under construction so I was looking forward to checking it out this time. We started with Squirrel Nutkin of course, which Freyja loved, she grinned the whole way around which was adorable.</p>
<p>Me and Han proceeded to Oblivion after, which I rate and was much busier than last time we went; we practically walked straight on last time no queueing &#8211; twice! We also checked out Submission and Enterprise for once &#8211; we normally skip over those as Hannah doesn&#8217;t like them for one reason or another, but I swayed her and it wasn&#8217;t too bad (and there wasn&#8217;t really a queue so didn&#8217;t waste much time), apart from on Enterprise, she sat in front of me and squished something that shouldn&#8217;t be squished!!</p>
<p>We headed off to the Charlie and Chocolate factory ride after that, which was an &#8220;It&#8217;s a Small World&#8221;-esque water ride with a Charlie and Chocolate factory theme of course, although it noticeably missed the loveable Oompa Loompas for some reason. Freyja really loved it, but the best bit was the ride in the great glass elevator after! A group of riders were put on a hydraulic platform and 3D projections display to give a convincing illusion of the elevator flying around and smashing into things &#8211; Freyja absolutely loved it and didn&#8217;t stop smiling &#8211; lovely!</p>
<p>We went on Rita after (just me and Han of course, Freyja is a little young still&#8230;) for a quick thrill and then had some yummy lunch &#8211; turkey and ham snammiches and Freyja had some raisins, and we even shared a couple of doughnuts &#8211; even Freyja had a few bites. Post-lunch we had to queue for Thirteen as there was no Fast Track available for this annoyingly, so that took about an hour or so. This new coaster was well worth the wait though &#8211; at first a fairly standard ride until the cars end up in a derelict wooden shed. The lights darken, and the cars drop vertically, which was a great surprise I was not expecting. A backwards stint followed which added more unexpectedness, and we came back to the station grinning from ear to ear. Certainly worth the queue, although I really wish there was Fast Track for this ride. Whilst we were queuing for Thirteen, Hannah&#8217;s mum took little Freyja on Galloper&#8217;s Carousel in a little princess carriage, which she apparently loved.</p>
<p>Next followed the all-time-favourite Nemesis, always worth Fast Tracking I think &#8211; 10 minutes or so queue and makes queuing for the front seats a little more palatable. As Freyja had fallen asleep on the walk to Nemesis, we took advantage of Han&#8217;s mum looking after her and squeezed in the last two rides in one, and got a quick go on Ripsaw in (although came off disappointingly dry) and onto Air, what I like to think of as the &#8220;Superman&#8221; ride.</p>
<p>We ended up all very weary going back on the monorail, on which Freyja stood on the chair and proceeded to have a little shout at a young couple who sat in the same section as us which amused them slightly. She&#8217;s nice and warm, tucked up in bed now and I&#8217;m sure she&#8217;s zonked out for the count all night. A busy day, but I think everyone had lots of fun. Same time next year, eh?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/06/14/alton-towers-review-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freyja Growing Up</title>
		<link>http://www.asgrim.com/2010/06/12/freyja-growing-up/</link>
		<comments>http://www.asgrim.com/2010/06/12/freyja-growing-up/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 09:27:32 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[freyja]]></category>
		<category><![CDATA[growing up]]></category>
		<category><![CDATA[house]]></category>
		<category><![CDATA[krazy kaves]]></category>
		<category><![CDATA[marwell]]></category>
		<category><![CDATA[netmums]]></category>
		<category><![CDATA[walking]]></category>
		<category><![CDATA[zoo]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1700</guid>
		<description><![CDATA[It&#8217;s been a little while since I talked about our little one, and my she has grown up a lot. She&#8217;s 14 months old now and she&#8217;s walking around like no tomorrow. She wants to walk so much that if you let her loose outside she will just walk and walk, and if you try [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/06/FreyjaAtTheZoo.jpg"><img class="alignleft size-medium wp-image-1703" title="FreyjaAtTheZoo" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/06/FreyjaAtTheZoo-300x225.jpg" alt="" width="300" height="225" /></a>It&#8217;s been a little while since I talked about our little one, and my she has grown up a lot. She&#8217;s 14 months old now and she&#8217;s walking around like no tomorrow. She wants to walk so much that if you let her loose outside she will just walk and walk, and if you try picking her up she will protest. She&#8217;s got such a character now, and I&#8217;m happy because she always seems to be so happy. We must be doing <em>something</em> right, right? We went to Marwell Zoo last weekend and she loved it. Maybe she&#8217;s still a little young though as she seemed more interested in the other children than the animals, but she had a lovely day out. You should be able to see a picture of me and her looking at the fishes in the African bit at the top of this post.</p>
<p>In other news, we are settling well into our new home and we couldn&#8217;t have done it without everyone&#8217;s help, especially our lovely parents who have given us guidance and support through everything, so a massive thanks to them! Work is busy as always; it&#8217;s keeping me right on my toes and some of the projects we&#8217;re working on are really exciting.</p>
<p>Hannah has been doing really good too since we moved back to Portsmouth, she&#8217;s making regular visits to new mums she meets on a site called Netmums, and has been visiting lots of play areas in the vicinity such as Krazy Kaves, which Freyja seems to love! I&#8217;m planning on booking a day off work one day so we can all go together as it looks like I&#8217;d have a lot of fun there too&#8230;</p>
<p>All in all, everything has been going really well for us and it&#8217;s thrilling watching Freyja growing up and developing such a wonderful personality. Time really is flying and we&#8217;re having such good memories &#8211; many of which I&#8217;ve got on video camera, but I just haven&#8217;t had time to sort through all the footage and actually get some videos on YouTube. It&#8217;ll happen one day I&#8217;m sure&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/06/12/freyja-growing-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to Linux &#8211; Finding Alternative Software</title>
		<link>http://www.asgrim.com/2010/06/10/moving-to-linux-finding-alternative-software/</link>
		<comments>http://www.asgrim.com/2010/06/10/moving-to-linux-finding-alternative-software/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 19:52:05 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[alternatives]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1693</guid>
		<description><![CDATA[I&#8217;ve been using Linux on servers for years, since before I started learning to code. Finally, after something like 7/8 years I am almost fully confident in severing the ties to my highly underused Windows installation on my personal laptop, but there are still a couple of exceptions. With the release of Ubuntu 10.04 LTS, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://en.wikipedia.org/wiki/Linux">Linux</a> on servers for years, since before I started learning to code. Finally, after something like 7/8 years I am almost fully confident in severing the ties to my highly underused Windows installation on my personal laptop, but there are still a couple of exceptions. With the release of <a href="http://www.ubuntu.com/">Ubuntu 10.04 LTS</a>, I&#8217;ve finally settled down using day-to-day tools that are equivalent to their Windows counterparts. Much of the software I use already have Linux compatible versions such as Eclipse, Google Chrome, FileZilla, Skype etc., however not all software does. Some I am happy to use (and work quite well!) in Wine (Spotify, Adobe Photoshop). Here&#8217;s what I&#8217;ve had to switch though:</p>
<ul>
<li>Windows Live Messenger &gt; Pidgin or Empathy</li>
<li>Microsoft Office &gt; Google Docs</li>
<li>Pinnacle Studio &gt; OpenShot (although I am testing other packages still)</li>
<li>Microsoft Money &gt; Same, but in Virtualbox</li>
<li>Winamp &gt; Rhythmbox</li>
</ul>
<p><span id="more-1693"></span>Annoyingly Microsoft Money didn&#8217;t work in Wine, so I&#8217;m having to use a Virtualbox of XP for that. However, I&#8217;m looking at alternative solutions as personal accounting is important to me to keep on top of my finances.</p>
<p>Strictly speaking I don&#8217;t have a <em>real </em>alternative to Windows Live Messenger and Microsoft Money yet &#8211; Pidgin and Empathy don&#8217;t support webcam very well, and Microsoft Money is an ageing discontinued product anyway. Skype supports webcam just great, but I have privacy issues with Skype so I wouldn&#8217;t recommend my family using it*. I really need webcam to work perfectly as it does under Windows so my family can see my daughter growing up.</p>
<p>Getting the right video editing package is also difficult &#8211; I need one that takes advantage of my hardware. The KDE video editor Kdenlive crashed when I tried to drag an AVCHD file into the timeline, which wasn&#8217;t a good start. I have had a quick play around with OpenShot which seemed fairly smooth until two videos were playing at once, so I&#8217;m not sure whether that will be suitable in the end. Other software I&#8217;m going to look at are Cinelerra and PiTiVi, but so far I have not found a good enough equivalent to Pinnacle, so unfortunately I may still be tied to Windows for video editing. If anyone has any recommendations I&#8217;d love to hear them! Although I have heard that Linux may not have the licensing to use the AVCHD hardware decoder, which may be why I can&#8217;t get anything to work that well?</p>
<p>As for Winamp to Rhythmbox, truth be told I hardly use either these days. I mostly play music through my X-Box 360 which suits me for 99% of purposes.</p>
<p>There is a particular site called <a href="http://www.osalt.com/">osalt.com</a> which allows you to find a Windows package and find an alternative Windows or Linux similar application which can be quite handy for switching to Linux. The one thing that will plague Linux until it can get it&#8217;s act together is that there are no true alternatives to the popular packages (although some would argue otherwise), such as Photoshop. GIMP is nice, but I am too used to Photoshop and try as I might, I can&#8217;t get on with GIMP. The video acceleration (although supported by ATI) doesn&#8217;t seem too good for AVCHD editing, and that puts a spoke in my wheel too. Lack of a decent Windows Live Messenger has been a drawback for a long time. OpenOffice 3.2 <em>still</em> hasn&#8217;t made it into the Ubuntu repositories, which means my desktop office package is slow, so I use Google Docs instead.</p>
<p>As you might have guessed, I could go on for a while. This might all sound very negative, but there is many positives to Linux too. Community support can be excellent &#8211; so much better than calling a &#8220;tech support&#8221; centre in India to be told to restart my computer&#8230; More often than not I find community support is actually much better than paid support. Ubuntu is free, as is all of the software I use on it (apart from a few obvious exceptions mentioned above, but they are Windows software running in Ubuntu). I find the user interface much nicer. It&#8217;s faster than Windows on my laptop. The list could go on for a while.</p>
<p>I sometimes sit and think of reasons why I shouldn&#8217;t just go back to Windows, but I can never get out of my head the thought that &#8211; well Linux works just fine, why go through the transition back to Windows?</p>
<p><small>* The privacy issue I have, if you&#8217;re interested, is that when you open a new Skype account, by default anyone from anywhere can message/call you. Why you would want a random stranger contacting you by default is beyond me&#8230; It&#8217;s simple enough to turn it off, but I really think this option should be disabled by default.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/06/10/moving-to-linux-finding-alternative-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Update</title>
		<link>http://www.asgrim.com/2010/06/10/quick-update/</link>
		<comments>http://www.asgrim.com/2010/06/10/quick-update/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 08:14:40 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[busy]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1697</guid>
		<description><![CDATA[Wow &#8211; Life has been really busy, and I haven&#8217;t blogged here in almost 2 months &#8211; sorry folks! This is just a quick update to say that I&#8217;ve got a few posts already lined up so make sure you&#8217;re subscribed to my feed! Watch this space&#8230;]]></description>
			<content:encoded><![CDATA[<p>Wow &#8211; Life has been really busy, and I haven&#8217;t blogged here in almost 2 months &#8211; sorry folks! This is just a quick update to say that I&#8217;ve got a few posts already lined up so make sure you&#8217;re subscribed to my feed! Watch this space&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/06/10/quick-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing text in MySQL text fields</title>
		<link>http://www.asgrim.com/2010/04/19/replacing-text-in-mysql-text-fields/</link>
		<comments>http://www.asgrim.com/2010/04/19/replacing-text-in-mysql-text-fields/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 14:46:51 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[varchar]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1690</guid>
		<description><![CDATA[I didn&#8217;t even think you could do this: UPDATE table SET something = REPLACE&#40;something,'oldtext','newtext'&#41;; How handy! For replacing text in MySQL tables that is&#8230; not for anything else really.]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t even think you could do this:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">UPDATE</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #990099; font-weight: bold;">SET</span> something <span style="color: #CC0099;">=</span> <span style="color: #000099;">REPLACE</span><span style="color: #FF00FF;">&#40;</span>something<span style="color: #000033;">,</span><span style="color: #008000;">'oldtext'</span><span style="color: #000033;">,</span><span style="color: #008000;">'newtext'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<p>How handy! For replacing text in MySQL tables that is&#8230; not for anything else really.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/04/19/replacing-text-in-mysql-text-fields/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>isset fail</title>
		<link>http://www.asgrim.com/2010/04/08/isset-fail/</link>
		<comments>http://www.asgrim.com/2010/04/08/isset-fail/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 08:33:37 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[context]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[isset]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[value]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1684</guid>
		<description><![CDATA[Srsly PHP, why can&#8217;t I do this: $value = isset&#40;$myGPCWrapper-&#62;Get&#40;&#34;value&#34;&#41;&#41; ? $myGPCWrapper-&#62;Get&#40;&#34;value&#34;&#41; : $default; Resulting in this: Fatal error: Can&#8217;t use method return value in write context in /path/to/my/script.php on line 21 And instead I have to do this: $foo = $myGPCWrapper-&#62;Get&#40;&#34;value&#34;&#41;; $value = isset&#40;$foo&#41; ? $foo : $default; or $value = isset&#40;$_GET&#91;'value'&#93;&#41; ? $myGPCWrapper-&#62;Get&#40;&#34;value&#34;&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>Srsly PHP, why can&#8217;t I do this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$myGPCWrapper</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;value&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$myGPCWrapper</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;value&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$default</span><span style="color: #339933;">;</span></pre></div></div>

<p>Resulting in this:</p>
<blockquote><p><strong>Fatal error</strong>:  Can&#8217;t use method return value in write context in <strong>/path/to/my/script.php</strong> on line <strong>21</strong></p></blockquote>
<p>And instead I have to do this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$foo</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$myGPCWrapper</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;value&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$foo</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$default</span><span style="color: #339933;">;</span></pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'value'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$myGPCWrapper</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;value&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$default</span><span style="color: #339933;">;</span></pre></div></div>

<p>I mean&#8230; how is isset <em>writing</em> to my variable?!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/04/08/isset-fail/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Double quotes in INI files loaded with parse_ini_file</title>
		<link>http://www.asgrim.com/2010/03/01/double-quotes-in-ini-files-loaded-with-parse_ini_file/</link>
		<comments>http://www.asgrim.com/2010/03/01/double-quotes-in-ini-files-loaded-with-parse_ini_file/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 22:27:37 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[escaping]]></category>
		<category><![CDATA[ini]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[parse_ini_file]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[quote]]></category>
		<category><![CDATA[quotes]]></category>
		<category><![CDATA[setting]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1666</guid>
		<description><![CDATA[Writing a bit of PHP tonight and found that if you use parse_ini_file to load an INI file in PHP, there is a slightly hacky way of having double quotes in strings. For example, I tried these: somevalue = &#34;This &#34;&#34;string&#34;&#34; has quotes&#34; somevalue = &#34;This \&#34;string\&#34; has quotes&#34; But none of them worked! Turns [...]]]></description>
			<content:encoded><![CDATA[<p>Writing a bit of PHP tonight and found that if you use parse_ini_file to load an INI file in PHP, there is a slightly hacky way of having double quotes in strings. For example, I tried these:</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000099;">somevalue</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;This &quot;</span><span style="color: #933;">&quot;string&quot;</span><span style="color: #933;">&quot; has quotes&quot;</span>
<span style="color: #000099;">somevalue</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;This \&quot;</span>string\<span style="color: #933;">&quot; has quotes&quot;</span></pre></div></div>

<p>But none of them worked! Turns out a quick look at the PHP manual reveals <a href="http://www.php.net/manual/en/function.parse-ini-file.php#70847">a simple (but a bit hacky) solution</a> to this is to define a constant e.g. QUOTE to be &#8220;, and use that in the INI string.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// In the PHP:</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'QUOTE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">; and in the INI file</span>
<span style="color: #000099;">somevalue</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;This &quot;</span>QUOTE<span style="color: #933;">&quot;string&quot;</span>QUOTE<span style="color: #933;">&quot; has quotes&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/03/01/double-quotes-in-ini-files-loaded-with-parse_ini_file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Browser Choice Update</title>
		<link>http://www.asgrim.com/2010/02/24/microsoft-browser-choice-update/</link>
		<comments>http://www.asgrim.com/2010/02/24/microsoft-browser-choice-update/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 09:02:10 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[ballot]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[choice]]></category>
		<category><![CDATA[EEA]]></category>
		<category><![CDATA[EU]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1663</guid>
		<description><![CDATA[So the &#8220;Microsoft Browser Choice Screen Update For EEA Users&#8221; has arrived in my list of potential updates. Interestingly though, Microsoft have not selected this update by default. That might put a dampener on Opera&#8217;s big day&#8230;]]></description>
			<content:encoded><![CDATA[<p>So the &#8220;Microsoft Browser Choice Screen Update For EEA Users&#8221; has arrived in my list of potential updates. Interestingly though, Microsoft have <em>not</em> selected this update by default. That might put a dampener on Opera&#8217;s big day&#8230;</p>
<p><a href="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/02/BrowserBallot.jpg"><img class="alignleft size-full wp-image-1664" title="BrowserBallot" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/02/BrowserBallot.jpg" alt="" width="800" height="600" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/02/24/microsoft-browser-choice-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Usage Statistics On Asgrim.com</title>
		<link>http://www.asgrim.com/2010/02/09/usage-statistics-on-asgrim-com/</link>
		<comments>http://www.asgrim.com/2010/02/09/usage-statistics-on-asgrim-com/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:30:41 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[asgrim]]></category>
		<category><![CDATA[asgrim.com]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1638</guid>
		<description><![CDATA[So here&#8217;s a few useless usage statistics about this website I found using Google Analytics&#8230; Browser Distribution Firefox &#8211; 58.93% Internet Explorer &#8211; 15.58% Chrome &#8211; 10.33% Safari &#8211; 9.64% Mozilla &#8211; 2.92% Flash Usage 8.31% of visitors do not report to have Flash installed Operating Systems Windows &#8211; 55.95% Linux &#8211; 29.54% Mac &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>So here&#8217;s a few useless usage statistics about this website I found using Google Analytics&#8230;</p>
<p><strong>Browser Distribution</strong></p>
<ul>
<li>Firefox &#8211; 58.93%</li>
<li>Internet Explorer &#8211; 15.58%</li>
<li>Chrome &#8211; 10.33%</li>
<li>Safari &#8211; 9.64%</li>
<li>Mozilla &#8211; 2.92%</li>
</ul>
<p><strong>Flash Usage</strong></p>
<ul>
<li>8.31% of visitors do not report to have Flash installed</li>
</ul>
<p><strong>Operating Systems</strong></p>
<ul>
<li>Windows &#8211; 55.95%</li>
<li>Linux &#8211; 29.54%</li>
<li>Mac &#8211; 8.61%</li>
<li>Android &#8211; 4.90%</li>
<li>iPhone &#8211; 0.31%</li>
<li>iPod &#8211; 0.17%</li>
<li>FreeBSD &#8211; 0.06%</li>
<li>Playstation 3 &#8211; 0.06%</li>
<li>Blackberry &#8211; 0.02%</li>
</ul>
<p><strong>Java Support</strong></p>
<ul>
<li>Yes &#8211; 76.80%</li>
<li>No &#8211; 23.20%</li>
</ul>
<p><strong>Top 10 Countries Ordered By Visits</strong></p>
<p><strong></p>
<ol>
<li><span style="font-weight: normal;">United States</span></li>
<li><span style="font-weight: normal;">United Kingdom</span></li>
<li><span style="font-weight: normal;">Spain</span></li>
<li><span style="font-weight: normal;">Germany</span></li>
<li><span style="font-weight: normal;">Canada</span></li>
<li><span style="font-weight: normal;">Australia</span></li>
<li><span style="font-weight: normal;">France</span></li>
<li><span style="font-weight: normal;">Netherlands</span></li>
<li><span style="font-weight: normal;">India</span></li>
<li><span style="font-weight: normal;">Italy</span></li>
</ol>
<p></strong></p>
<p><strong>Other Figures&#8230;</strong></p>
<ul>
<li>1.23 average page views per visit</li>
<li>59 seconds average time on site (yikes!)</li>
<li>86.51% new visitors versus 13.49% returning visits</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/02/09/usage-statistics-on-asgrim-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing My New Website</title>
		<link>http://www.asgrim.com/2010/02/08/announcing-my-new-website/</link>
		<comments>http://www.asgrim.com/2010/02/08/announcing-my-new-website/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 23:27:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[james]]></category>
		<category><![CDATA[titcumb]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1636</guid>
		<description><![CDATA[It&#8217;s been live for a couple of weeks now, although I haven&#8217;t done much promotion of it, so here is word of an &#8220;official&#8221; announcement of my new portfolio site. Please take a look around and if you have any constructive criticism, feedback or advice, feel free to let me know through the usual channels&#8230; So [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been live for a couple of weeks now, although I haven&#8217;t done much promotion of it, so here is word of an &#8220;official&#8221; announcement of my new portfolio site. Please take a look around and if you have any constructive criticism, feedback or advice, feel free to let me know through the usual channels&#8230;</p>
<p>So without further ado, I pronounce <strong><a href="http://www.jamestitcumb.com/">www.jamestitcumb.com</a></strong> officially open!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/02/08/announcing-my-new-website/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Question: How does source control work in a non-distributed environment?</title>
		<link>http://www.asgrim.com/2010/02/05/question-source-contro/</link>
		<comments>http://www.asgrim.com/2010/02/05/question-source-contro/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 10:54:09 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[CVS]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[scm]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[vcs]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1632</guid>
		<description><![CDATA[At our company we currently all work on one shared network drive. The source code is not under any kind of source control, which for me is a big no-no. I&#8217;d love to be able to set up SVN and us all work of separate repositories and just commit back to a trunk or branch, [...]]]></description>
			<content:encoded><![CDATA[<p>At our company we currently all work on one shared network drive. The source code is not under any kind of source control, which for me is a big no-no. I&#8217;d love to be able to set up SVN and us all work of separate repositories and just commit back to a trunk or branch, but our tech manager doesn&#8217;t agree. The way I see it, there are two major issues:</p>
<ul>
<li>The source has no history &#8211; if there is a problem, we can&#8217;t roll back</li>
<li>We overwrite each other&#8217;s changes if we work on the same file</li>
</ul>
<p>How do other people manage this situation? Having source control on the network drive is fine, but that doesn&#8217;t solve the problem of overwriting each other&#8217;s changes does it&#8230; And setting everyone up with VMs or local repos doesn&#8217;t wash with the tech manager. Would a solutions such as each having their own checkout and then the shared network drive automatically update work? What about slowness in updating &#8211; people making a change and having to wait a while before it takes effect probably wouldn&#8217;t wash with our tech team, and committing back every tiny change seems a bit silly.</p>
<p>What about other source control (i.e. not SVN) &#8211; do you think it would suit us? I&#8217;m open to suggestions, except for Visual SourceSafe. Preferably something that integrates well with Eclipse, and is also cross platform (we use a mix of Windows, OSX and Linux), but something that also works well without Eclipse&#8230; tall order perhaps?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/02/05/question-source-contro/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Very Exciting &#8211; HipHop by Facebook</title>
		<link>http://www.asgrim.com/2010/02/02/very-exciting-hiphop-by-facebook/</link>
		<comments>http://www.asgrim.com/2010/02/02/very-exciting-hiphop-by-facebook/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:08:22 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[compiling]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[hiphop]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[roadsend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1629</guid>
		<description><![CDATA[Well this evening Facebook have revealed what PHP developers globally have been speculating about and revealed their big secret. And boy, this could really change the landscape of PHP as we know it. I&#8217;m a great fan of compiling PHP for one reason or another, but I&#8217;ve never seen it reliably work. Roadsend is an [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/02/HipHop_logo_white.png"><img class="alignleft size-full wp-image-1630" title="HipHop_logo_white" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/02/HipHop_logo_white.png" alt="" width="213" height="278" /></a>Well this evening Facebook have revealed what PHP developers globally have been speculating about and <a href="http://developers.facebook.com/news.php?blog=1&amp;story=358">revealed their big secret</a>.</p>
<p>And boy, this could really change the landscape of PHP as we know it. I&#8217;m a great fan of compiling PHP for one reason or another, but I&#8217;ve never seen it reliably work. <a href="http://www.roadsend.com/">Roadsend</a> is an absolutely fabulous rewrite of the Zend engine that allows compilation of PHP. Unfortunately, there are gaps and certain features are missing (but in the pipeline I&#8217;m sure). If you want to make a generic website though without any specific extensions, then Roadsend is great and works great with Apache.</p>
<p>I&#8217;m really excited to explore HipHop as it claims to be the bee&#8217;s knees, and there&#8217;s been <a href="http://blog.echolibre.com/2010/02/hiphop-for-php-facebook-unveils-its-magic/">a</a> <a href="http://blog.tabini.ca/2010/02/hiphop-what-you-need-to-know/">lot</a> <a href="http://phparch.com/main/news/view/68">of</a> <a href="http://twitter.com/#search?q=%23hiphop">hype</a> over it since the announcement. HipHop claims to improve PHP&#8217;s performance by fifty percent, which is great. Not only this but it&#8217;s clearly proven to be stable as it&#8217;s already in use on 90% of Facebook&#8217;s platform which means it&#8217;s not a lone developer&#8217;s work which is tested on his one box; it&#8217;s been tested by millions of users.</p>
<p>The great thing about HipHop is that it actually generates C++ code from the PHP, and compiles that normally (using g++ I think). From what I understand, the hardest part (logically) is converting a loosely typed language to a statically typed language. This means that in PHP you would declare a variable without specifying it&#8217;s type, in C++ you have to. From what I understand, HipHop parses all the code and attempts to understand all the uses of variables and types them accordingly.</p>
<p>I&#8217;m looking forward to seeing HipHop in action and getting stuck in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/02/02/very-exciting-hiphop-by-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New House &amp; Growing Freyja</title>
		<link>http://www.asgrim.com/2010/01/31/new-house-growing-freyja/</link>
		<comments>http://www.asgrim.com/2010/01/31/new-house-growing-freyja/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 10:02:43 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[completion]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dickens]]></category>
		<category><![CDATA[freyja]]></category>
		<category><![CDATA[house]]></category>
		<category><![CDATA[Portsmouth]]></category>
		<category><![CDATA[quarter]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1623</guid>
		<description><![CDATA[I haven&#8217;t done a &#8220;personal&#8221; update for some time now, so I thought I&#8217;d briefly brush over our recent lives. The photo you can see on the left is the current state of our new house that is being built in the new Dickens Quarter development in Portsmouth. As you can see it is coming [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/01/House30Jan10.jpg"><img class="alignleft size-medium wp-image-1624" title="House30Jan10" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/01/House30Jan10-300x225.jpg" alt="" width="300" height="225" /></a>I haven&#8217;t done a &#8220;personal&#8221; update for some time now, so I thought I&#8217;d briefly brush over our recent lives. The photo you can see on the left is the current state of our new house that is being built in the new Dickens Quarter development in Portsmouth. As you can see it is coming along well, and the estimated completion date is currently the end of April. It&#8217;s exciting to see it come so far and we simply can&#8217;t wait to make it our own lovely home.</p>
<p>On the Freyja side of things, she&#8217;s drawing close to 10 months old now and is coming on leaps and bounds. She can make &#8220;red indian&#8221; noises (patting her mouth and making noise), walk around standing up and holding the furniture, put balls into the &#8220;learn and sort&#8221; helicopter toy I got her for Yule, crawl around on hands and knees with quite a pace, wave, throw tantrums and all sorts of other bits and pieces.</p>
<p>She&#8217;s truly a joy and makes me a very proud parent. She also eats us out of house and home, typically getting through a bowl of porridge and yoghurt for breakfast, a slice of bread with topping and a yoghurt and biscuit for lunch, a snack mid-afternoon, and a bowl of healthy home-made food followed usually by 2 or 3 yoghurts. As you can probably tell, she likes yoghurts, but there&#8217;s nothing wrong with that as they&#8217;re a good source of calcium as Hannah&#8217;s milk starts to deplete.</p>
<p>In other news, it&#8217;s Hannah&#8217;s birthday soon, so if you haven&#8217;t been invited (on Facebook of course&#8230;) and you think you should be, get in touch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/01/31/new-house-growing-freyja/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL gotcha when using non-compulsory foreign keys</title>
		<link>http://www.asgrim.com/2010/01/27/mysql-gotcha-when-using-non-compulsory-foreign-keys/</link>
		<comments>http://www.asgrim.com/2010/01/27/mysql-gotcha-when-using-non-compulsory-foreign-keys/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 10:27:08 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[gotcha]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[left]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1621</guid>
		<description><![CDATA[I&#8217;m just writing a query at the moment that filters out test records from a database. These records have a foreign-keyed value that identifies test apps, e.g. a table with: id name 1 TEST 2 ANOTHER_VALUE 3 SOMETHING_ELSE This is joined onto the main data table, sensibly with a query like this: SELECT * FROM the_data [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m just writing a query at the moment that filters out test records from a database. These records have a foreign-keyed value that identifies test apps, e.g. a table with:</p>
<pre>id  name
1   TEST
2   ANOTHER_VALUE
3   SOMETHING_ELSE
</pre>
<p>This is joined onto the main data table, sensibly with a query like this:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #CC0099;">*</span>
<span style="color: #990099; font-weight: bold;">FROM</span> the_data
<span style="color: #000099;">LEFT</span> <span style="color: #990099; font-weight: bold;">JOIN</span> the_values <span style="color: #990099; font-weight: bold;">ON</span> the_data.some_value <span style="color: #CC0099;">=</span> the_values.id
<span style="color: #990099; font-weight: bold;">WHERE</span> the_values.name <span style="color: #CC0099;">!=</span> <span style="color: #008000;">'TEST'</span></pre></div></div>

<p>The gotcha is however, that this doesn&#8217;t work as you&#8217;d expect. If a record in &#8220;the_data&#8221; table doesn&#8217;t have a corresponding entry in &#8220;the_values&#8221; e.g. if &#8220;the_data.some_value&#8221; is 0 (as in my instance, it doesn&#8217;t need to have a corresponding value), then these entries are completely excluded. The solution (simple once you understand how it works&#8230;) is to check for NULL values too:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #CC0099;">*</span>
<span style="color: #990099; font-weight: bold;">FROM</span> the_data
<span style="color: #000099;">LEFT</span> <span style="color: #990099; font-weight: bold;">JOIN</span> the_values <span style="color: #990099; font-weight: bold;">ON</span> the_data.some_value <span style="color: #CC0099;">=</span> the_values.id
<span style="color: #990099; font-weight: bold;">WHERE</span> <span style="color: #FF00FF;">&#40;</span>the_values.name <span style="color: #CC0099; font-weight: bold;">IS</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #CC0099; font-weight: bold;">OR</span> the_values.name <span style="color: #CC0099;">!=</span> <span style="color: #008000;">'TEST'</span><span style="color: #FF00FF;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/01/27/mysql-gotcha-when-using-non-compulsory-foreign-keys/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Write Stack Dump In PHP</title>
		<link>http://www.asgrim.com/2010/01/21/write-stack-dump-in-php/</link>
		<comments>http://www.asgrim.com/2010/01/21/write-stack-dump-in-php/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 16:37:36 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[backtrace]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[stack]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1616</guid>
		<description><![CDATA[Just a quick one. You probably already use debug_backtrace (and if you don&#8217;t, use it!). I&#8217;ve written this quick bit of PHP that basically just tells you the function stack (i.e. strips args and object, thus leaving no junk!) echo &#34;&#60;pre&#62;&#34;; $bt = debug_backtrace&#40;&#41;; for&#40;$i = 0; $i &#60; count&#40;$bt&#41;; $i++&#41; &#123; unset&#40;$bt&#91;$i&#93;&#91;&#34;args&#34;&#93;&#41;; unset&#40;$bt&#91;$i&#93;&#91;&#34;object&#34;&#93;&#41;; unset&#40;$bt&#91;$i&#93;&#91;&#34;type&#34;&#93;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick one. You probably already use debug_backtrace (and if you don&#8217;t, use it!). I&#8217;ve written this quick bit of PHP that basically just tells you the function stack (i.e. strips args and object, thus leaving no junk!)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;pre&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$bt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">debug_backtrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bt</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;args&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bt</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;object&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bt</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/pre &gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/01/21/write-stack-dump-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Buy a Lexus &#8211; Blind Your Fellow Road Users</title>
		<link>http://www.asgrim.com/2010/01/14/buy-a-lexus-blind-your-fellow-road-users/</link>
		<comments>http://www.asgrim.com/2010/01/14/buy-a-lexus-blind-your-fellow-road-users/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 19:46:53 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[The lols]]></category>
		<category><![CDATA[blind]]></category>
		<category><![CDATA[cars]]></category>
		<category><![CDATA[headlights]]></category>
		<category><![CDATA[lexus]]></category>
		<category><![CDATA[xenon]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1612</guid>
		<description><![CDATA[Everyone who knows me will know that I am marginally prejudiced against people with expensive cars (BMW, Mercedes, Lexus etc.), but not entirely without cause. One of my niggles (pet hates if you will) about them is their unnecessarily dazzling headlights. I just saw the advert shown on a website and made me think of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/01/bi-xenon.jpg"><img class="alignleft size-full wp-image-1613" title="bi-xenon" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2010/01/bi-xenon.jpg" alt="" width="300" height="250" /></a>Everyone who knows me will know that I am marginally prejudiced against people with expensive cars (BMW, Mercedes, Lexus etc.), but not <em>entirely</em> without cause.</p>
<p>One of my niggles (pet hates if you will) about them is their unnecessarily dazzling headlights. I just saw the advert shown on a website and made me think of the title of this blog post&#8230;</p>
<p>It confuses my why Lexus thinks these Bi-xenon headlights are at all a good thing? Surely blinding your fellow road users so much that they crash is a bad thing? Aren&#8217;t Xenon headlights the ones that look blue from certain angles as well, confusing me that there is police ahead?</p>
<p>So yeah &#8211; if you want to blind your fellow users, buy a Lexus. Or a BMW. Or a Mercedes. Or similar car.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2010/01/14/buy-a-lexus-blind-your-fellow-road-users/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>cURL Tips &#8211; HTTPS requests</title>
		<link>http://www.asgrim.com/2009/12/15/curl-tips-https-requests/</link>
		<comments>http://www.asgrim.com/2009/12/15/curl-tips-https-requests/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 20:51:48 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[verifyhost]]></category>
		<category><![CDATA[verifypeer]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1597</guid>
		<description><![CDATA[Too many times have I seen this in cURL clients: curl_setopt&#40;$ch, CURLOPT_SSL_VERIFYHOST, false&#41;; curl_setopt&#40;$ch, CURLOPT_SSL_VERIFYPEER, false&#41;; Why is this bad? You leave yourself totally open to man-in-the-middle attacks, and makes SSL virtually pointless. Sure the data passed between the two servers would still be encrypted, but there is no way of verifying the server you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>Too many times have I seen this in cURL clients:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_SSL_VERIFYHOST<span style="color: #339933;">,</span>  <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_SSL_VERIFYPEER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Why is this bad? You leave yourself totally open to man-in-the-middle attacks, and makes SSL virtually pointless. Sure the data passed between the two servers would still be encrypted, but there is no way of verifying the server you&#8217;re talking to is the server you WANT to be talking to!</p>
<p>My recommendation is that you verify the server is genuine by checking against the genuine CA certificate in PEM format. There are plenty of tutorials (e.g. <a href="http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/">here</a>) on the internet to obtain the PEM certificate, so I won&#8217;t go into that here. All you need to do is change your cURL request like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_CAINFO<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/path/to/your/certificate&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_SSL_VERIFYHOST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_SSL_VERIFYPEER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Set CURLOPT_SSL_VERIFYHOST to 2 &#8220;to check the existence of a common name and also verify that it matches the hostname provided&#8221; (read: <a href="http://uk.php.net/manual/en/function.curl-setopt.php">PHP Manual</a>).</p>
<p>Checking against the CA certificate in this way is the proper way of verifying that the server you&#8217;re talking to is the one you expect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/12/15/curl-tips-https-requests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Semantic Markup &#8211; What should h1 Be?</title>
		<link>http://www.asgrim.com/2009/12/11/semantic-markup-what-should-h1-be/</link>
		<comments>http://www.asgrim.com/2009/12/11/semantic-markup-what-should-h1-be/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 20:47:13 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[company]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[h1]]></category>
		<category><![CDATA[h2]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1606</guid>
		<description><![CDATA[I had an interesting argument earlier today. One of our websites is being redesigned at the moment, and the page layout has the logo and company name at the top, and below the menu is a subtitle. I noticed that two things which should be the same weren&#8217;t, and in doing so noticed that the [...]]]></description>
			<content:encoded><![CDATA[<p>I had an interesting argument earlier today. One of our websites is being redesigned at the moment, and the page layout has the logo and company name at the top, and below the menu is a subtitle. I noticed that two things which should be the same weren&#8217;t, and in doing so noticed that the company name was not in an &lt;h1&gt; tag, but just an &lt;a href=&#8221;..&#8221;&gt;&#8230;</p>
<p>Normally I would do something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;logo.gif&quot;</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;Company Logo&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;/home&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Company Name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>About This<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Portfolio<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Get In Touch<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h2<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>We are an awesome company!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h2<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h3<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>About This Company<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h3<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Content...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Showing here that &#8220;Company Name&#8221; is the overall most important thing on the page. However, one of the developers here has structured it slightly differently:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;logo.gif&quot;</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;Company Logo&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;/home&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Company Name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>About This<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Portfolio<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Get In Touch<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>We are an awesome company!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h2<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>About This Company<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h2<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Content...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>If I view the page without CSS, the company logo becomes unimportant and lost, but the &#8220;We are an awesome company!&#8221; tag line becomes the most important thing on the page. I&#8217;ve not come across this different way of thinking before, and I&#8217;m just wondering what other people think &#8211; what should the &lt;h1&gt; be?</p>
<p>It could just boil down to choice &#8211; whether you see the overall site name (e.g. &#8220;Company Name&#8221;) as the most important thing or something else&#8230; Maybe you design your pages in completely different way?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/12/11/semantic-markup-what-should-h1-be/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Importance of User Agents</title>
		<link>http://www.asgrim.com/2009/12/09/importance-of-user-agents/</link>
		<comments>http://www.asgrim.com/2009/12/09/importance-of-user-agents/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 19:33:15 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[agent]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[identify]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[ua]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1590</guid>
		<description><![CDATA[When you write something that connects to a web server, what user agent do you use? Far too often have I seen things like: curl_setopt&#40;$c, CURLOPT_USERAGENT, &#34;Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)&#34;&#41;; In my opinion you should always use a nice descriptive user agent that explains to the server exactly what your client may [...]]]></description>
			<content:encoded><![CDATA[<p>When you write something that connects to a web server, what user agent do you use?</p>
<p>Far too often have I seen things like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #339933;">,</span> CURLOPT_USERAGENT<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In my opinion you should always use a nice descriptive user agent that explains to the server exactly what your client may be trying to achieve, or at least a unique identifier. Unless you&#8217;re trying to achieve some kind of web scraping client (which probably contravenes some terms of service agreement somewhere, so I certainly don&#8217;t advocate that!), there is no reason not to provide a useful and descriptive UA string.</p>
<p>A good UA string from a little-known client should provide some way of contacting you. When I say little-known, I mean something like your new web app that you&#8217;ve just made that queries Last.fm for user data. In this instance, I&#8217;d give a nice descriptive UA string with contact e-mail, e.g.:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #339933;">,</span> CURLOPT_USERAGENT<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;MyLastFmClient (v0.1) myemail@address.com&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As your client becomes more used, or you already have a decent way of contacting you on your website, perhaps just put a URL:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #339933;">,</span> CURLOPT_USERAGENT<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;MyLastFmClient (v1.2) www.address.com&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Of course, when you&#8217;re Google for example, <em>everyone</em> knows who you are, so for example the UA string &#8220;Mediapartners-Google&#8221; yields 200k-odd results, revealing that this is the AdSense content bot.</p>
<p>Why do I think this is important? It helps servers identify you and <em>help you</em> in most instances. If your client goes wrong and gets itself stuck in a loop because you forgot to increment $i for example, that server can see that MyLastFmClient for example is spamming the server with 1,000+ requests a minute. They can then see your UA string and contact you about it.</p>
<p>Another reason is that some servers might actually block access, or provide different content depending on the client. I know that Google serves up a completely different search results page if you&#8217;re on IE5 than in IE8 for example. Another server might block all known browsers for example from accessing a web service (e.g. with the message &#8220;this page cannot be accessed using a web browser&#8221;). I&#8217;m not saying this is good or bad practice as that is a WHOLE other kettle of fish &#8211; but I&#8217;m just saying it can happen, and that sort of thing can be pretty hard to track down.</p>
<p>Although this all might seem pretty trivial, it is useful, and I think any HTTP(S) client should identify itself properly using a clear and descriptive user agent string. It&#8217;s no harder to do and it just makes everyone&#8217;s lives easier!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/12/09/importance-of-user-agents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Servers Painlessly Migrated to London with Linode</title>
		<link>http://www.asgrim.com/2009/12/08/servers-painlessly-migrated-to-london-with-linode/</link>
		<comments>http://www.asgrim.com/2009/12/08/servers-painlessly-migrated-to-london-with-linode/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 20:34:50 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[linode]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[praise]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1594</guid>
		<description><![CDATA[Last night I read Linode&#8216;s announcement that they have opened a new data centre in London, and jumped at the opportunity. I&#8217;ve been using Linode since January this year, and their VPS hosting has been absolutely trouble-free. Not only that, they have probably the best administration interface I have ever seen. It&#8217;s easy to use, [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I read <a href="http://www.linode.com/?r=939c7865b8818f015533efae7b06cdb06f9b59be">Linode</a>&#8216;s <a href="http://blog.linode.com/2009/12/07/linode-expands-into-europe/?r=939c7865b8818f015533efae7b06cdb06f9b59be">announcement</a> that they have opened a new data centre in London, and jumped at the opportunity. I&#8217;ve been using <a href="http://www.linode.com/?r=939c7865b8818f015533efae7b06cdb06f9b59be">Linode</a> since January this year, and their VPS hosting has been absolutely trouble-free. Not only that, they have probably the best administration interface I have ever seen. It&#8217;s easy to use, clearly labelled and very well laid out.</p>
<p>In addition they have given me probably the best customer service satisfaction of any company I have ever used. Their ticket response time for me has been consistently under 4 minutes, which is hugely impressive. I&#8217;m not the only one who is praising them, they&#8217;ve received <a href="http://twitter.com/unnamedculprit/statuses/6450438326">good</a> <a href="http://twitter.com/mistermartin75/statuses/6455590955">praise</a> <a href="http://twitter.com/srijith/statuses/6459311910">all</a> <a href="http://twitter.com/RichGuk/statuses/6459087605">over</a> <a href="http://twitter.com/Asgrim/status/6446461174">Twitter</a>, with response times of 4-6 minutes.</p>
<p>I highly recommend using Linode if you&#8217;re thinking of getting a VPS &#8211; and if you do decide to sign up, <a href="http://www.linode.com/?r=939c7865b8818f015533efae7b06cdb06f9b59be">please use my referral link</a>! <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Or my code: <code>939c7865b8818f015533efae7b06cdb06f9b59be</code></p>
<p>And as a side note, as my IP has changed, it will take another 24 hours or so for the DNS to propogate probably, so hold fast until then everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/12/08/servers-painlessly-migrated-to-london-with-linode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stop Forwarding E-Mails</title>
		<link>http://www.asgrim.com/2009/12/01/stop-forwarding-e-mails/</link>
		<comments>http://www.asgrim.com/2009/12/01/stop-forwarding-e-mails/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 22:32:30 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[forward]]></category>
		<category><![CDATA[scam]]></category>
		<category><![CDATA[send]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spyware]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1587</guid>
		<description><![CDATA[I get countless e-mails, and it makes it so much worse when I get absolute rubbish sent through to me from friends and family members alike. Let me quickly explain the top reason why you forwarding an e-mail is my problem. Have a look at the e-mail you&#8217;re forwarding. Chances are, you&#8217;ve included hundreds of [...]]]></description>
			<content:encoded><![CDATA[<p>I get countless e-mails, and it makes it so much worse when I get absolute rubbish sent through to me from friends and family members alike.</p>
<p>Let me quickly explain the top reason why you forwarding an e-mail is <strong>my</strong> problem.</p>
<ul>
<li>Have a look at the e-mail you&#8217;re forwarding. Chances are, you&#8217;ve included hundreds of people&#8217;s e-mail addresses. By forwarding to people and using the &#8220;To:&#8221; field of your e-mail client, you&#8217;re basically giving your e-mail address to everyone else you&#8217;re sending that e-mail to. And if that gets forwarded on, and not removing them, those e-mail addresses get sent around the internet. <strong>Would you give your telephone number or address to a complete stranger? No? Well STOP GIVING MY E-MAIL OUT. </strong>I&#8217;ve seen e-mails with literally thousands of e-mail addresses. Were it to fall into the hands of a certain sort of person, that list would make them money.</li>
<li>You will <strong>not </strong>get a free laptop if you forward the e-mail on. Bill Gates will <strong>not</strong> give you any money at all. Your wishes will <strong>not </strong>magically come true. You will <strong>not</strong> get good luck. You will <strong>not </strong>suddenly fall in love. Fairies will <strong>not</strong> appear and grant you 3 wishes.</li>
<li><strong>You <em><span style="text-decoration: underline;">will</span></em> piss people off.</strong></li>
<li>You think you&#8217;re being useful by sending on that &#8220;latest virus news&#8221;? You&#8217;re not &#8211; you&#8217;re <em>fuelling spam</em> which means YOU are just as bad as the VIRUS that you&#8217;re trying to warn people about. <strong>Protect yourself with anti-virus and anti-spyware software.</strong> If you don&#8217;t have some, <a href="http://www.avast.com/eng/download-avast-home.html">get some here</a>. It&#8217;s free, and better than Norton Antivirus Bloatware.</li>
<li>Warning people about telephone scams? See above.</li>
<li>Warning people about postal scams? See above.</li>
<li>&#8220;Oh but my gran/mum/sister might not know and I wouldn&#8217;t want them to get scammed!!!&#8221; Your gran/mum/sister has common sense, and chances are they will have read the e-mail and forgotten about it anyway &#8211; scammers are clever and get you to do things like forwarding e-mails &#8211; oh whoops! You already did that&#8230;</li>
<li>&#8220;I thought I&#8217;d send it just in case&#8230;&#8221; Again &#8211; YOU&#8217;RE SPAMMING, stop it. There is <strong>no reason</strong> to forward the e-mail you want to, so stop it.</li>
<li>It wastes my time, which I could be spending doing something productive, or spending time with my daughter. It also wastes your time.</li>
</ul>
<p>I&#8217;m fed up of it, so please, do me a favour and stop forwarding e-mails &#8211; not just to me, but to anyone. By forwarding e-mails, you are fuelling internet spam.</p>
<p>If you continue forwarding e-mails, then don&#8217;t you <strong>dare</strong> moan about how much spam you get.</p>
<p>Do yourself a favour, and if you recieve a forwarded e-mail from someone, send them a link to this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/12/01/stop-forwarding-e-mails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Job Requirements</title>
		<link>http://www.asgrim.com/2009/11/25/job-requirements/</link>
		<comments>http://www.asgrim.com/2009/11/25/job-requirements/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 21:01:55 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[degree]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[experience]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[posting]]></category>
		<category><![CDATA[requirements]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1584</guid>
		<description><![CDATA[This won&#8217;t have been the first time I&#8217;ve written about degrees&#8230; But I recently noticed a job posting for a server-side developer at Headscape, and in just the third sentence it already got my back up: We are looking for a graduate who is passionate about the web This sort of thing in job postings [...]]]></description>
			<content:encoded><![CDATA[<p>This won&#8217;t have been the first time I&#8217;ve <a href="http://www.asgrim.com/2008/05/30/degrees-are-they-worth-it/">written about degrees</a>&#8230; But I recently noticed a job posting for a <a href="http://boagworld.com/news/another-job">server-side developer at Headscape</a>, and in just the third sentence it already got my back up:</p>
<blockquote><p>We are looking for a graduate who is passionate about the web</p></blockquote>
<p>This sort of thing in job postings <em>really</em> annoy me. The notion that a degree makes a person better than someone with 3+ years of experience to me is a very narrow-minded way of thinking. Many employers use this sort of thing as a &#8220;first line of defence&#8221; tactic &#8211; to eliminate applicants that are clearly not suited to the job. However, there are many great developers out there with no degree, but many years of experience.</p>
<p>I asked an employee of Headscape about this, and he summarised that he expects they would consider those without degrees. Perhaps because I don&#8217;t have a degree it touches a raw nerve with me, because I&#8217;ve been very lucky to get where I am.</p>
<p>I got on the &#8220;software development ladder&#8221; through a good opportunity, because I had zero &#8220;years experience&#8221; and no degree, and from an employers perspective, a pretty risky option. Because I was given that chance, I now have over 6 years of professional development experience. Others in my 2003 situation might not be so lucky, and because employers require things like degrees, it makes those starter developers chances of getting even a junior job even harder.</p>
<p>It seems an odd concept to me that to get on that ladder, you must spend 4 years at university, wasting money and time, learning what you already know&#8230; <em>In this industry*</em> I would disagree that a degree is required, so why do employers still require that candidates have degrees? To me, all a degree does is prove that you can think analytically, but to even learn a programming language properly, you have to think analytically and logically anyway, so surely if you can prove you know the language, you therefore also prove that you can think analytically&#8230;</p>
<p>I&#8217;d like to see what other people think about this, maybe I&#8217;m a minority on this view? <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><small>* I specify in this industry because certain other professions, such as medical, I would say that a degree <em>is</em> required.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/11/25/job-requirements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dixons &#8211; UR DOIN IT WRONG</title>
		<link>http://www.asgrim.com/2009/11/24/dixons-ur-doin-it-wrong/</link>
		<comments>http://www.asgrim.com/2009/11/24/dixons-ur-doin-it-wrong/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 20:34:50 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[disabled]]></category>
		<category><![CDATA[discrimination]]></category>
		<category><![CDATA[dixons]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1579</guid>
		<description><![CDATA[Today when ordering a webcam for my parents, the Dixons website really got my back up. Firstly the page died and never gave me a reference number. Secondly, and most annoyingly, I went to view my account, and every page I attempted to load I was presented with the screen shown. For those of you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-1580" title="dixons-fail" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/11/dixons-fail-300x186.jpg" alt="dixons-fail" width="300" height="186" />Today when ordering a webcam for my parents, the Dixons website <strong>really</strong> got my back up. Firstly the page died and never gave me a reference number. Secondly, and <strong>most annoyingly</strong>, I went to view my account, and every page I attempted to load I was presented with the screen shown.</p>
<p>For those of you who are reading on feed readers or unable to see the image, the text reads:</p>
<blockquote><p>For your additional security and to protect your personal information we request that you re-enter your password each time you wish to view a page containing your personal details.</p></blockquote>
<p>This is probably one of the most annoying things I have ever seen on a website. Not only does it force me to enter my password every time I want to look at something (not just once, but <em><strong>EVERY</strong></em> time), it is also a <em>huge</em> accessibility issue. For goodness sake Dixons, have you even considered people who have difficulty using keyboards? Forcing them to enter their password EVERY SINGLE TIME is like making a bank with steps and no ramp for wheelchair users.</p>
<p>Personally I think it is hugely discriminatory to force users to enter their password not just when initially logging in, but every time you want to look at something? Whichever idiot thought of that idea should be shot, and this issue should be fixed immediately.</p>
<p><strong>Sort your website out Dixons &#8211; employ someone who actually considers the people who may be using your website.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/11/24/dixons-ur-doin-it-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Been Busy Of Late&#8230;</title>
		<link>http://www.asgrim.com/2009/11/23/been-busy-of-late/</link>
		<comments>http://www.asgrim.com/2009/11/23/been-busy-of-late/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:45:59 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[busy]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[christmas]]></category>
		<category><![CDATA[family]]></category>
		<category><![CDATA[freyja]]></category>
		<category><![CDATA[friends]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[skiing]]></category>
		<category><![CDATA[sophia]]></category>
		<category><![CDATA[tom]]></category>
		<category><![CDATA[tweets]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[yuletide]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1573</guid>
		<description><![CDATA[Yeah OK, I&#8217;ve not updated my blog in like 7 weeks aside from increasingly annoying Twitter digests, which I have now disabled. Life has been busy as ever, and I&#8217;ve been working hard at Netbasic, often (much to the annoyance of Hannah) working late. Freyja is already 7 months old, nearing 8 months now, and [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah OK, I&#8217;ve not updated my blog in like 7 weeks aside from increasingly annoying Twitter digests, which I have now disabled. Life has been busy as ever, and I&#8217;ve been working hard at <a href="http://www.netbasic.co.uk/site/team/james.phtml">Netbasic</a>, often (much to the annoyance of <a href="http://www.metalmummy.co.uk/">Hannah</a>) working late. Freyja is already 7 months old, nearing 8 months now, and she&#8217;s just such a character. She&#8217;s happily sitting up and loves playing with Daddy (providing he gets home from work before she goes to sleep!). Her first tooth is very slowly but surely coming through which is great, but the last couple of days have been hard for her and she woke up at half 10 the other night, which was very unlike her.</p>
<p>We had friends over on Saturday &#8211; it was nice to actually see some of my friends for once! We&#8217;ve learnt that having a baby can make socialising very difficult, and many of the things we used to do are not so easy any more, so it was refreshing that Tom &amp; Soph came over to see us and a good night was had by all!</p>
<p>Yuletide is approaching already, and this year we&#8217;re off to Andorra with the family for a skiing trip. Freyja will be a little too young to remember it but I&#8217;m sure she&#8217;ll love the snow. Unfortunately I&#8217;ve learnt that my mum may not be able to ski due to her leg being sore and she&#8217;s had an injection and stuff from the doctors, so she needs to take it easy. Although having said that, she&#8217;d love to spend every day with her three gorgeous grandchildren!</p>
<p>In other news, I&#8217;ve been working hard on a new project of mine which some of you will have heard of. I&#8217;m not far from releasing it as public beta version, but more news when that happens. I&#8217;d love to commit to saying &#8220;Yeah I&#8217;ll blog every few days again&#8221;, but since Freyja was born my life has pretty much entirely evolved around her (of course!) which leaves me very little time &#8211; and the spare time I do have I spend watching films with Hannah! I will see if I can blog more frequently, as some of you have complained to me for not blogging so much and letting it fill up with tweets&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/11/23/been-busy-of-late/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Importance of Configuring Stuff Properly</title>
		<link>http://www.asgrim.com/2009/10/09/the-importance-of-configuring-stuff-properly/</link>
		<comments>http://www.asgrim.com/2009/10/09/the-importance-of-configuring-stuff-properly/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 18:44:09 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1564</guid>
		<description><![CDATA[Today I had a TOS Violation on my Linode VPS for sending spam e-mails. Odd I thought as I only have 1 mail user. So I stopped Postfix and examined the logs and it was pretty obvious that it was sending lots of spam e-mails. Odd though that the connections were coming from 127.0.0.1&#8230; which [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had a TOS Violation on my <a href="http://www.linode.com/?r=939c7865b8818f015533efae7b06cdb06f9b59be">Linode</a> VPS for sending spam e-mails. Odd I thought as I only have 1 mail user. So I stopped Postfix and examined the logs and it was pretty obvious that it was sending lots of spam e-mails. Odd though that the connections were coming from 127.0.0.1&#8230; which pointed that it could be a script or something like that&#8230; but I only have 3 websites on here, all low-traffic and I&#8217;m fairly confident there&#8217;s no security issues there. I checked through the Apache access logs, but nothing seemed odd there. I then did a &#8220;netstat -a&#8221; and discovered there were hundreds and hundreds of connections to a particular port. Running &#8220;netstat -pant&#8221; showed these connections were to Squid &#8211; which is where the problem lay. Basically a couple of weeks ago, I installed Squid (a proxy server) to play around with. I configured it so I could use it as an HTTP proxy. Unfortunately I left a gaping hole where anyone could&#8217;ve used the proxy for anything. Unfortunately for me, it allowed spammers to send mail via my otherwise secure Postfix installation&#8230; but of course Postfix didn&#8217;t require SASL Authentication because the connections were from 127.0.0.1 &#8211; it&#8217;s own network. Anyway, it seems to be fixed now (I removed Squid altogether as I have no real use for it), but this highlights the importance of configuring stuff properly so that all possible security holes are sealed shut!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/10/09/the-importance-of-configuring-stuff-properly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing CSV into MySQL table</title>
		<link>http://www.asgrim.com/2009/10/06/importing-csv-into-mysql-table/</link>
		<comments>http://www.asgrim.com/2009/10/06/importing-csv-into-mysql-table/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 08:27:17 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1554</guid>
		<description><![CDATA[A quick tip &#8211; you can import a CSV into a MySQL table pretty easily. The file must exist on the server and you must create the table first, but this command will import your CSV into a MySQL table easily: LOAD DATA LOCAL INFILE '/tmp/data.csv' INTO TABLE `data_table` FIELDS TERMINATED BY ',' ENCLOSED BY [...]]]></description>
			<content:encoded><![CDATA[<p>A quick tip &#8211; you can import a CSV into a MySQL table pretty easily. The file must exist on the server and you must create the table first, but this command will import your CSV into a MySQL table easily:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">LOAD</span> <span style="color: #990099; font-weight: bold;">DATA</span> <span style="color: #990099; font-weight: bold;">LOCAL</span> <span style="color: #990099; font-weight: bold;">INFILE</span> <span style="color: #008000;">'/tmp/data.csv'</span>
<span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`data<span style="color: #008080; font-weight: bold;">_</span>table`</span>
<span style="color: #990099; font-weight: bold;">FIELDS</span> <span style="color: #990099; font-weight: bold;">TERMINATED BY</span> <span style="color: #008000;">','</span>
<span style="color: #990099; font-weight: bold;">ENCLOSED BY</span> <span style="color: #008000;">'&quot;'</span>
<span style="color: #990099; font-weight: bold;">LINES</span> <span style="color: #990099; font-weight: bold;">TERMINATED BY</span> <span style="color: #008000;">'<span style="color: #004000; font-weight: bold;">\n</span>'</span><span style="color: #000033;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/10/06/importing-csv-into-mysql-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toys In Breakfast Cereals&#8230;</title>
		<link>http://www.asgrim.com/2009/09/28/toys-in-breakfast-cereals/</link>
		<comments>http://www.asgrim.com/2009/09/28/toys-in-breakfast-cereals/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 20:29:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[breakfast]]></category>
		<category><![CDATA[cereal]]></category>
		<category><![CDATA[Food]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1550</guid>
		<description><![CDATA[I realised the other day that breakfast cereals no longer contain toys. The popular opinion seems to be either health &#38; safety, or cutting back on costs. I&#8217;d probably go with the former as some numpty parent probably tried to sue some cereal maker for trying to bring a bit of joy into a child&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I realised the other day that breakfast cereals no longer contain toys.</p>
<p>The popular opinion seems to be either health &amp; safety, or cutting back on costs. I&#8217;d probably go with the former as some numpty parent probably tried to sue some cereal maker for trying to bring a bit of joy into a child&#8217;s life&#8230;</p>
<p>Anyway, I sent messages to Kellogg&#8217;s and Nestlé via their websites, and I actually got a (rubbish) response from Nestlé&#8217;s consumer relations department&#8230;</p>
<blockquote><p>Dear James</p>
<p>We have taken the decision to move away from offering promotions that directly appeal to children. However, we continue to offer promotions which can be taken advantage of and enjoyed by the whole family, like our Go Free promotion.</p>
<p>We hope you will continue to buy Nestle cereals and take up some of our exciting offers lined up for next year.</p>
<p>Kind Regards</p>
<p>&lt;name removed&gt;</p>
<p>Consumer Relations</p></blockquote>
<p>That&#8217;s not really an answer as such, which could be interpreted as them avoiding the topic entirely&#8230;</p>
<p>I have not yet had a response from Kellogg&#8217;s on the matter either&#8230;</p>
<p><strong>Update 6th Oct 2009:</strong></p>
<p>Kellogg&#8217;s responded! With a much more useful answer:</p>
<blockquote><p>Dear Mr Titcumb</p>
<p>Thank you for your e-mail. The reason that we no longer have the inserts inside the packets  is because of a change in Government guidelines in Advertising and Marketing to children.</p>
<p>If you want to have a look at our current sites Headstarters, they are available at <a href="http://www.kelloggs.co.uk/" target="_blank">www.kelloggs.co.uk</a> and I hope you enjoy them.</p>
<p>In the mean, time thanks very much for your interest.</p>
<p>If you have any further questions that I can help you with please let me know.</p>
<p>Kind Regards<br />
&lt;name removed&gt;<br />
Customer Service Representative</p></blockquote>
<p>So basically &#8211; it is Labour&#8217;s fault.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/09/28/toys-in-breakfast-cereals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Overriding Methods With Different Arguments</title>
		<link>http://www.asgrim.com/2009/09/17/overriding-methods-with-different-arguments/</link>
		<comments>http://www.asgrim.com/2009/09/17/overriding-methods-with-different-arguments/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 09:12:34 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[child]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[classes]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[inherit]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[override]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1540</guid>
		<description><![CDATA[Something I was looking at in PHP today, and I was pretty sure of, but I&#8217;m putting here for future reference. If I have a class (&#8220;a&#8221;) with a method that requires an argument, does the child class (&#8220;b&#8221;) have to also inherit the arguments? The answer is no. It&#8217;s a simple question really, but [...]]]></description>
			<content:encoded><![CDATA[<p>Something I was looking at in PHP today, and I was pretty sure of, but I&#8217;m putting here for future reference. If I have a class (&#8220;a&#8221;) with a method that requires an argument, does the child class (&#8220;b&#8221;) have to also inherit the arguments? The answer is no. It&#8217;s a simple question really, but I wanted to change a parent method to an important class and I didn&#8217;t really want to change every other child function, so thankfully nothing will be affected&#8230; Take a look at this example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> a
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">function</span> method<span style="color: #009900;">&#40;</span><span style="color: #000088;">$arg</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;method, with args: <span style="color: #006699; font-weight: bold;">{$arg}</span>&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> b <span style="color: #000000; font-weight: bold;">extends</span> a
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">function</span> method<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;child method, no args&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$a_test</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> a<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$b_test</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> b<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$a_test</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">method</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;test&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$b_test</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">method</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Outputs:</span>
<span style="color: #666666; font-style: italic;">// method, with args: test</span>
<span style="color: #666666; font-style: italic;">// child method, no args</span></pre></div></div>

<p>As you can see, class &#8220;b&#8221; can override &#8220;method&#8221; without using the same prototype as a::method. Bear in mind however, this is most certainly <em>not</em> the case with abstract methods &#8211; as they provide the prototype that child classes <em>must</em> adhere to, as shown here:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
abstract <span style="color: #000000; font-weight: bold;">class</span> a
<span style="color: #009900;">&#123;</span>
	abstract <span style="color: #000000; font-weight: bold;">function</span> method<span style="color: #009900;">&#40;</span><span style="color: #000088;">$arg</span><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;">class</span> b <span style="color: #000000; font-weight: bold;">extends</span> a
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">function</span> method<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;child method, no args&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$a_test</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> a<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$b_test</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> b<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$a_test</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">method</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;test&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$b_test</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">method</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Throws an error:</span>
<span style="color: #666666; font-style: italic;">// Fatal error: Declaration of b::method() must be compatible with that of a::method() in /path/to/inherit-check.php on line 14</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/09/17/overriding-methods-with-different-arguments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Override style=&#8221;..&#8221; using external CSS</title>
		<link>http://www.asgrim.com/2009/09/12/override-style-using-external-css/</link>
		<comments>http://www.asgrim.com/2009/09/12/override-style-using-external-css/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 18:26:30 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[hint]]></category>
		<category><![CDATA[important]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[override]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1533</guid>
		<description><![CDATA[On my blog I use a plugin called Social Homes, which gives me the favicon of each social site I&#8217;m a member of and a link to my profile on each site on the top left hand corner. However the default style is that the icons are left aligned and the margin is a little [...]]]></description>
			<content:encoded><![CDATA[<p>On my blog I use a plugin called <a href="http://silentlycrashing.net/blog/repository/social-homes/">Social Homes</a>, which gives me the favicon of each social site I&#8217;m a member of and a link to my profile on each site on the top left hand corner. However the default style is that the icons are left aligned and the margin is a little bit too big. I tried putting an override in my styles.css:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.socialhomes</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-5px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>However, inline styles (i.e. style=&#8221;&#8230;&#8221;) take precedence over all external styles. My opinion is that they shouldn&#8217;t be used because of this, and the plug-in developer should&#8217;ve used external CSS to achieve the styles. However, there is a way around it, by using the !important modifier. I&#8217;m not sure about browser compatibility, but in my instance it&#8217;s not that critical, so I&#8217;m not fussed about it&#8230; I simply changed the above class to this, and it worked!</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.socialhomes</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-5px</span> !important<span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Like magic&#8230; It basically says &#8220;this style is really important, don&#8217;t over-ride it&#8221;&#8230; so there you have it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/09/12/override-style-using-external-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why You Shouldn&#8217;t Use Your Phone Whilst Driving</title>
		<link>http://www.asgrim.com/2009/09/10/why-you-shouldnt-use-your-phone-whilst-driving/</link>
		<comments>http://www.asgrim.com/2009/09/10/why-you-shouldnt-use-your-phone-whilst-driving/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 12:30:19 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[accident]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[death]]></category>
		<category><![CDATA[driving]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1535</guid>
		<description><![CDATA[Came across this video (via The Register), and being a father of a 5 month old beautiful daughter, this video really hit home for me. Seeing the lifeless infant after the accident, the motionless stare, was just horrible to watch. Warning: This video is not suitable for minors! This video is just a dramatisation, but [...]]]></description>
			<content:encoded><![CDATA[<p>Came across this video (via The Register), and being a father of a 5 month old beautiful daughter, this video really hit home for me.</p>
<p>Seeing the lifeless infant after the accident, the motionless stare, was just horrible to watch.</p>
<p><strong>Warning</strong>: This video is not suitable for minors!</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/8I54mlK0kVw&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/8I54mlK0kVw&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>This video is just a dramatisation, but is a realistic representation of what could happen if you use a mobile phone whilst driving. Watch it, and maybe you&#8217;ll think twice&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/09/10/why-you-shouldnt-use-your-phone-whilst-driving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse, why do you make installing plugins so hard?</title>
		<link>http://www.asgrim.com/2009/09/10/eclipse-why-do-you-make-installing-plugins-so-hard/</link>
		<comments>http://www.asgrim.com/2009/09/10/eclipse-why-do-you-make-installing-plugins-so-hard/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 09:14:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[collabnet]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[mylyn]]></category>
		<category><![CDATA[pdt]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plug-ins]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1531</guid>
		<description><![CDATA[Eclipse PDT and Zend Studio are really nice editors for general use. Once they&#8217;re set up the way you want, they work mostly fine. I have an issue where I type a dollar symbol ($) and the code assist goes off in a wobbly, probably due to the size of the projects we work on [...]]]></description>
			<content:encoded><![CDATA[<p>Eclipse PDT and Zend Studio are really nice editors for general use. Once they&#8217;re set up the way you want, they work mostly fine. I have an issue where I type a dollar symbol ($) and the code assist goes off in a wobbly, probably due to the size of the projects we work on at Netbasic, and the fact that we&#8217;re all working off a network drive (ridiculous in my opinion&#8230;).</p>
<p>The biggest gripe I have with Eclipse however, is trying to install plug-ins. I don&#8217;t think I&#8217;ve EVER installed a plug-in without having to manually mess around with dependencies and trying to manually resolve them. It&#8217;s a HUGE downfall, and makes any Eclipse IDE virtually unusable. It&#8217;s intensely annoying when I just want to get on with things, but some bloody plug-in I need (normally the CollabNet/Mylyn plugins) just won&#8217;t install without getting in a hissy fit.</p>
<p>Take for example this latest error:</p>
<pre>Cannot complete the install because of a conflicting dependency.
Software being installed: Mylyn Task List (Required) 3.2.0.v20090617-0100-e3x (org.eclipse.mylyn_feature.feature.group 3.2.0.v20090617-0100-e3x)
Software currently installed: Zend Studio 7.0.0.v20090806 (com.zend.php.ide 7.0.0.v20090806)
Only one of the following can be installed at once:
Java 5 Compatibility Checker 3.2.0.v20090617-0100-e3x (org.eclipse.mylyn.compatibility 3.2.0.v20090617-0100-e3x)
Java 5 Compatibility Checker 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.compatibility 3.2.1.v20090722-0200-e3x)
Cannot satisfy dependency:
From: Zend Studio 7.0.0.v20090806 (com.zend.php.ide 7.0.0.v20090806)
To: org.eclipse.mylyn.ide_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Task-Focused Interface (Recommended) 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.context_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Bridge: Eclipse IDE 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.ide_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn.team_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Bridge: Team Support 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.team_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn.context_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Task List (Required) 3.2.0.v20090617-0100-e3x (org.eclipse.mylyn_feature.feature.group 3.2.0.v20090617-0100-e3x)
To: org.eclipse.mylyn.compatibility [3.2.0.v20090617-0100-e3x]
Cannot satisfy dependency:
From: Mylyn Task List (Required) 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn.compatibility [3.2.1.v20090722-0200-e3x]</pre>
<p>From what I understand here, I can&#8217;t install Mylyn because of a 0.0.1 version difference. Because of two packages that were released within a month of each other?! That &#8211; in my opinion &#8211; is stupid. I just want to <em>get on with things</em> but I can&#8217;t because of this.</p>
<p>I sincerely hope the next version of Eclipse will sort out this stupid dependency issue, as if I was the Eclipse development team, this sort of difficulty-of-use issue would be a real show-stopper. In addition, I have no idea why Zend would base their €399 IDE which is meant to be a &#8220;professional-grade&#8221; solution to &#8220;maximise developer productivity&#8221; on such a shoddy, buggy IDE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/09/10/eclipse-why-do-you-make-installing-plugins-so-hard/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Filling In Forms &#8211; Increasing Your Form Conversion</title>
		<link>http://www.asgrim.com/2009/09/01/increasing-form-conversion/</link>
		<comments>http://www.asgrim.com/2009/09/01/increasing-form-conversion/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 09:32:37 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[number]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1518</guid>
		<description><![CDATA[This kind of lazy form creation really annoys me. This company is trying to make users jump through hoops just so their form developers don&#8217;t have to bother reformatting the data into an acceptable format to them. It is absolutely critical when developing a form that must convert well to accept pretty much anything in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-1526" title="bad-form" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/08/bad-form.jpg" alt="bad-form" width="655" height="123" /></p>
<p>This kind of lazy form creation really annoys me. This company is trying to make users jump through hoops just so their form developers don&#8217;t have to bother reformatting the data into an acceptable format to them.</p>
<p><span id="more-1518"></span>It is absolutely critical when developing a form that must convert well to accept pretty much <em>anything</em> in the form. For example if I want to write &#8220;15,000&#8243; or even &#8220;£15,000&#8243; in the amount box for my insurance, then let me! Don&#8217;t tell me it&#8217;s wrong, because it isn&#8217;t. The developers here have made a big mistake, and although I was just testing out their form and wasn&#8217;t going to buy a product, this sort of thing <em>really does</em> affect form conversion.</p>
<p>So here&#8217;s a <strong>big hint</strong> to form developers on business-critical forms that must convert well: don&#8217;t be lazy &#8211; let the customer enter whatever they like, and try and interpret the data the best you can. Even better &#8211; if you can&#8217;t truly determine what the user has entered, provide some feedback.</p>
<p>Take for example an amount field for loans, insurance and so on. Valid entries could be:</p>
<ul>
<li>£15000</li>
<li>£15,000</li>
<li>15,000</li>
<li>15.000</li>
<li>15.000,00</li>
<li>15000.00</li>
<li>15,000.-</li>
</ul>
<p>You might think &#8220;well my form is only for UK customers, so the European format isn&#8217;t used&#8221; &#8211; <strong>wrong.</strong> Many UK customers use the European 15.000,00 format. The problem here is trying to determine where decimal places really are.</p>
<p>My preferred solution is to use Javascript to convert the input into what we <em>think</em> the customer is trying to enter, for example converting these numbers:</p>
<ul>
<li>£15,000 &gt; 15000</li>
<li>15,000.- &gt; 15000</li>
<li>15,000.00 -&gt; 1500000</li>
<li>15.000,00 &#8211; 1500000</li>
</ul>
<p>The conversion here could be some Javascript that removes all non-numeric characters and replaces what is in the input box when the focus blurs away. With any luck the user will notice the change, and notice that in the last two instances, the number is 1.5 million, not the 15.000,00 they thought they&#8217;d entered. The customer will then tend to go back to the box, and simply delete the extra zeros.</p>
<p>Enhancements to this idea could be to highlight the box and display a subtle hint that the number the customer entered was changed, e.g. &#8220;Is this number right?&#8221;, or if the number seems too high for the expected range of the input box. Say for example, the likelihood of an insurance quote above 1,000,000 is pretty slim, why not display this &#8220;Is this number right?&#8221; message if the value is 500,000 or above.</p>
<p>There are many tips and tricks that you can use to make filling in your form so much easier &#8211; and I highly recommend doing them. Displaying a big red warning message at the top stating that my postcode was invalid is a huge drop-off point, and you will see users dropping off from the form at this point. You have to <em>help</em> the user, not make them jump through hoops. Encourage them to fill in the form, not tell them they&#8217;re doing it all wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/09/01/increasing-form-conversion/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Rant: Clickable Text and Checkboxes / Radios</title>
		<link>http://www.asgrim.com/2009/08/27/rant-clickable-text-and-checkboxes-radios/</link>
		<comments>http://www.asgrim.com/2009/08/27/rant-clickable-text-and-checkboxes-radios/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 12:10:31 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[box]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[label]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1515</guid>
		<description><![CDATA[Argh, it really annoys me when web designers have check boxes or radio buttons that do not have clickable text attached. If you&#8217;re writing your website correctly (semantics-wise at least) then you shouldn&#8217;t have this problem because you&#8217;ll be making use of &#60;label for=&#8221;&#8230;&#8221;&#62;. It&#8217;s really not hard, and it&#8217;s such a simple solution for [...]]]></description>
			<content:encoded><![CDATA[<p>Argh, it really annoys me when web designers have check boxes or radio buttons that do not have clickable text attached. If you&#8217;re writing your website correctly (semantics-wise at least) then you shouldn&#8217;t have this problem because you&#8217;ll be making use of &lt;label for=&#8221;&#8230;&#8221;&gt;. It&#8217;s really not hard, and it&#8217;s such a simple solution for a big (well, medium) usability issue. Note that the value of the for=&#8221;&#8230;&#8221; attribute must match the id=&#8221;&#8230;&#8221; attribue of the element it is meant to label, <em>not</em> the name=&#8221;&#8230;&#8221; attribute as some people think&#8230;</p>
<p>Consider making:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;checkbox&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;remember_me&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span> Remember my login</pre></div></div>

<p>Into:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;checkbox&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;remember_me&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;remember_me&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;remember_me&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Remember my login<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>kthxbai.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/08/27/rant-clickable-text-and-checkboxes-radios/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lookin&#8217; Good: Two Practise ZCE Tests Passed</title>
		<link>http://www.asgrim.com/2009/08/25/lookin-good-two-practise-zce-tests-passed/</link>
		<comments>http://www.asgrim.com/2009/08/25/lookin-good-two-practise-zce-tests-passed/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 21:22:47 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Certification]]></category>
		<category><![CDATA[exam]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[practise]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[zce]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1512</guid>
		<description><![CDATA[As some of you may know, back in March/April time, I started revising for my Zend PHP5 Certification, but that was pretty much put on hold when we had a baby&#8230; now I&#8217;m revising again and after having revised a couple of topics I retook the test. As you can see, I passed it &#8220;with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-1513" title="zce-test2" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/08/zce-test2.jpg" alt="zce-test2" width="710" height="430" /></p>
<p>As some of you may know, back in March/April time, I started revising for my Zend PHP5 Certification, but that was pretty much put on hold when we had a baby&#8230; now I&#8217;m revising again and after having revised a couple of topics I retook the test. As you can see, I passed it &#8220;with flying colours&#8221; this time, but still have improvement to do with Streams and Design patterns&#8230;</p>
<p>Comparing with my last test:</p>
<ul>
<li>2 categories remained the same;
<ul>
<li>Database access</li>
<li>Web features)</li>
</ul>
</li>
<li>4 categories improved;
<ul>
<li>PHP 4/5 Differences (was FAIL)</li>
<li>Security (was PASS)</li>
<li>String Manipulation and Regular Expressions (was PASS)</li>
<li>Functions (was PASS)</li>
</ul>
</li>
<li>2 categories declined;
<ul>
<li>Streams and Network Programming (was PASS)</li>
<li>Design (was EXCELLENT) <em>[eep - not so good that!]</em></li>
</ul>
</li>
</ul>
<p>I think overall however, these statistics shouldn&#8217;t be examined too much &#8211; there are some questions I can guess and don&#8217;t demonstrate that I truly *know* some topics, so I&#8217;m going to cover off a few categories I don&#8217;t feel to confident on anyway &#8211; but then the practise tests <em>are</em> just indicators, and not meant to represent the final exam&#8230; we&#8217;ll see!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/08/25/lookin-good-two-practise-zce-tests-passed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Google Search Engine&#8230; Possibility for Search API?</title>
		<link>http://www.asgrim.com/2009/08/11/new-google-search-engine-possibility-for-search-api/</link>
		<comments>http://www.asgrim.com/2009/08/11/new-google-search-engine-possibility-for-search-api/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 11:46:33 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1507</guid>
		<description><![CDATA[The news has spread quickly this morning (I first heard through @ryancarson) that Google have been working on a new revamped version of their Google Search Engine. To the untrained eye, it looks pretty much the same. However, it&#8217;s much quicker, and it&#8217;s all based on AJAX-style requests&#8230; Looking at Firebug&#8217;s net monitoring, I thought [...]]]></description>
			<content:encoded><![CDATA[<p>The news has spread quickly this morning (I first heard through <a href="http://twitter.com/ryancarson/statuses/3240553963">@ryancarson</a>) that Google have been working on a new revamped version of their Google Search Engine. To the untrained eye, it looks pretty much the same. However, it&#8217;s much quicker, and it&#8217;s all based on AJAX-style requests&#8230;</p>
<p>Looking at Firebug&#8217;s net monitoring, I thought &#8220;I wonder if Google will open up an API&#8221;? It would be quite cool to have an API to request search results from, and Google returns you a load of results in well under a second (Firebug reports the requests take around 300-400ms, which is nice!). At the moment I don&#8217;t think it&#8217;s a possibility &#8211; even me just playing around brought up Google&#8217;s human checker (a captcha) that is meant to stop automated search requests&#8230;</p>
<p>Makes ya think though, doesn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/08/11/new-google-search-engine-possibility-for-search-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My life according to Bal-Sagoth (A Meme Thingy)</title>
		<link>http://www.asgrim.com/2009/07/30/my-life-according-to-bal-sagoth-a-meme-thingy/</link>
		<comments>http://www.asgrim.com/2009/07/30/my-life-according-to-bal-sagoth-a-meme-thingy/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 12:31:10 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[bal-sagoth]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[meme]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1503</guid>
		<description><![CDATA[Using only song names from ONE ARTIST, cleverly answer these questions. Pass it on to 15 people you like and include me so i can see your answers also comment on my answers =D. You can&#8217;t use the band I used. Try not to repeat a song title. It&#8217;s a lot harder than you think! [...]]]></description>
			<content:encoded><![CDATA[<p>Using only song names from ONE ARTIST, cleverly answer these questions. Pass it on to 15 people you like and include me so i can see your answers also comment on my answers =D. You can&#8217;t use the band I used. Try not to repeat a song title. It&#8217;s a lot harder than you think! Repost as &#8220;my life according to (band name)&#8221;</p>
<p>Pick your Artist: Bal Sagoth</p>
<p>Are you a male or female:<br />
- Enthroned in the Temple of the Serpent Kings</p>
<p>Where do you live:<br />
- Into the Silent Chambers of the Sapphirean Throne (Sagas from the Antediluvian Scrolls) / Valley Of Silent Paths</p>
<p>How do you feel:<br />
- Beneath the Crimson Vaults Of Cydonia</p>
<p>If you could go anywhere, where would you go:<br />
- In search of the lost cities of antarctica</p>
<p>Your favorite form of transportation:<br />
- Shackled To the Trilithon of Kutulu</p>
<p>Your best friend is:<br />
- The Hammer Of The Emperor</p>
<p>Favorite time of day:<br />
- Star-maps of the Ancient Cosmographers</p>
<p>If your life was a TV show, what would it be called?<br />
- The splendour of a thousand swords gleaming beneath the blazon of the hyperborean empire (Part III)</p>
<p>What is life to you:<br />
- The sixth Adulation of his Cthonic Majesty</p>
<p>Your fear:<br />
- The Fallen Kingdoms of the Abyssal Plain</p>
<p>What is the best advice you have to give:<br />
- Blood Slakes The Sand At The Circus Maximus</p>
<p>How I would like to die:<br />
- And Atlantis Falls&#8230;</p>
<p>My motto:<br />
- A Black Moon Broods Over Lemuria</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/07/30/my-life-according-to-bal-sagoth-a-meme-thingy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Festival Excitement Starting&#8230;</title>
		<link>http://www.asgrim.com/2009/07/27/festival-excitement-starting/</link>
		<comments>http://www.asgrim.com/2009/07/27/festival-excitement-starting/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 19:03:53 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[bloodstock]]></category>
		<category><![CDATA[festivals]]></category>
		<category><![CDATA[hellfest]]></category>
		<category><![CDATA[metal]]></category>
		<category><![CDATA[metalcamp]]></category>
		<category><![CDATA[open air]]></category>
		<category><![CDATA[wacken]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1500</guid>
		<description><![CDATA[Many of my friends have already been and gone to many festivals across Europe; Hellfest, Metalcamp and a multitude of others. However, having a little baby can be quite restrictive when it comes to things like that &#8211; camping in a field when Freyja is so young is just a no-go &#8211; so where we [...]]]></description>
			<content:encoded><![CDATA[<p>Many of my friends have already been and gone to many festivals across Europe; <a href="http://www.hellfest.fr/">Hellfest</a>, <a href="http://www.metalcamp.com/">Metalcamp</a> and a multitude of others. However, having a little baby can be quite restrictive when it comes to things like that &#8211; camping in a field when Freyja is so young is just a no-go &#8211; so where we normally would&#8217;ve accompanied everyone, we sat at home cleaning up poo and sick&#8230; although I don&#8217;t think I know anyone going to <a href="http://www.wacken.com/">Wacken Open Air</a> this year due to it&#8217;s weakening line-up and shift towards poor music (Bring Me The Horizon, Bullet For My Valentine for example). However when it comes to <a href="http://www.bloodstock.uk.com/">Bloodstock Open Air</a>, Hannah&#8217;s mum lives just round the corner! This blessing has enabled us to visit the festival grounds during the day, and travel home in the evening to see our gorgeous baby girl. Maybe next year we might be able to bring her with us &#8211; she&#8217;ll be about 16 months by then, but we need to find out if even ear defenders will be enough at that age&#8230; May not even be until 2011&#8230;</p>
<p>Anyway, this year I&#8217;m looking forward to seeing some great bands, including Carcass, Katatonia, Saxon, Apocalyptica, Blind Guardian, Enslaved, Amon Amarth, Anathema, Europe, Satyricon and Turisas. It also means I get to finally update <a href="http://www.asgrim.com/the-metal-page/">The Metal Page</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/07/27/festival-excitement-starting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tethering your HTC Magic Android Phone in Ubuntu 9.04 (Jaunty Jackalope)</title>
		<link>http://www.asgrim.com/2009/07/24/tethering-your-htc-magic-android-phone-in-ubuntu-9-04-jaunty-jackalope/</link>
		<comments>http://www.asgrim.com/2009/07/24/tethering-your-htc-magic-android-phone-in-ubuntu-9-04-jaunty-jackalope/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 19:32:58 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[azilink]]></category>
		<category><![CDATA[cell]]></category>
		<category><![CDATA[cellular]]></category>
		<category><![CDATA[HTC]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[magic]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[tether]]></category>
		<category><![CDATA[tethering]]></category>
		<category><![CDATA[vodafone]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1491</guid>
		<description><![CDATA[Sometimes I have the need to get on the internet using my laptop instead of my lovely HTC Magic. To do that, I&#8217;d have to get mobile internet, which is yet another expense I don&#8217;t really want. Before I go ahead, I&#8217;d like to strongly discourage doing this on a regular basis. Vodafone&#8217;s &#8220;unlimited&#8221; internet [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes I have the need to get on the internet using my laptop instead of my lovely HTC Magic. To do that, I&#8217;d have to get mobile internet, which is yet another expense I don&#8217;t really want. Before I go ahead, I&#8217;d like to strongly discourage doing this on a regular basis. Vodafone&#8217;s &#8220;unlimited&#8221; internet is 500MB fair use policy, which when using a laptop can be used up <em>really</em> quickly &#8211; so <strong>proceed with caution</strong>! In addition, I do not know your contract to confirm that this will not void your warranty or violate your terms of service. <strong>You carry out these steps at your own risk and are provided here for informational purposes only.</strong> Basically, if you mess things up and Vodafone (or whoever your carrier is) comes knocking on your door, I&#8217;m not being held responsible.<span id="more-1491"></span></p>
<p>This process does involve a bit of fiddling and knowledge of how things work, and the instructions on the app&#8217;s page are pretty straightforward anyway.</p>
<p>Tethering has been made really easy by using an app called <a href="http://code.google.com/p/azilink/">Azilink</a>. All it is is an OpenVPN server on your phone, which allows your laptop to connect to it via a USB cable.</p>
<p>Here&#8217;s the steps &#8211; pretty much the same as on the instruction page linked above &#8211; but specifically for Ubuntu:</p>
<ul>
<li>Install OpenVPN (don&#8217;t bother with Network Manager): sudo apt-get install openvpn</li>
<li>Enable USB debugging on your phone. From the home screen, this is under Settings &gt; Applications &gt; Development &gt; USB debugging.</li>
<li>Download the Android 1.5 SDK: <a href="http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r3.zip">http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r3.zip</a></li>
<li>Extract to /opt/android-sdk-linux_x86-1.5_r3</li>
<li>Add the /opt/android-sdk-linux_x86-1.5_r3/tools directory to your path (e.g. in .bashrc add PATH=/opt/android-sdk-linux_x86-1.5_r3/tools:&#8221;${PATH}&#8221;</li>
<li>Log out and back in again for the .bashrc to update</li>
<li>You should be able to run adb now &#8211; type &#8220;adb&#8221;, hit RETURN and it should say it&#8217;s starting a daemon.</li>
<li>Create and open /etc/udev/rules.d/51-android.rules in your favourite editor</li>
<li>Add the line: SUBSYSTEM==&#8221;usb&#8221;, SYSFS{idVendor}==&#8221;0bb4&#8243;, MODE=&#8221;0666&#8243;</li>
<li>Set the permissions of the file: sudo chmod a+rx /etc/udev/rules.d/51-android.rules</li>
<li>Connect your HTC Magic via USB cable to your laptop (hint: &#8220;tail -f /var/log/messages &amp;&#8221; gives you information when your phone is connected)</li>
<li>Check adb recognises your device: &#8220;adb devices&#8221; you should see a device listed</li>
<li>Download: <a href="http://lfx.org/azilink/azilink.apk">http://lfx.org/azilink/azilink.apk</a></li>
<li>Install the app to your phone by doing &#8220;adb install azilink.apk&#8221;</li>
<li>You should see the Azilink app in your apps list (its a little moth icon).</li>
<li>On your laptop, type &#8220;adb forward tcp:41927 tcp:41927&#8243;</li>
<li>On your phone, run the Azilink app, and check the &#8220;Service active&#8221; checkbox. Status will change to &#8220;waiting for connection&#8221;</li>
<li>Download: <a href="http://azilink.googlecode.com/files/azilink.ovpn">http://azilink.googlecode.com/files/azilink.ovpn</a></li>
<li>On your laptop, run &#8220;sudo openvpn azilink.ovpn&#8221;</li>
<li>In a few moments on your phone, Azilink should report the status is now &#8220;Connected to host&#8221;.</li>
<li>In a new terminal (don&#8217;t close the openvpn program, you&#8217;ll lose your connection!) edit /etc/resolv.conf and add &#8220;nameserver 192.168.56.1&#8243;</li>
</ul>
<p>With any luck you should now have internet. Next time you want to connect, I think you&#8217;ll have to do something like (and I&#8217;ve not checked this yet!):</p>
<ul>
<li>On phone, check USB debugging is enabled (if you disabled it)</li>
<li>Connect HTC Magic to laptop with USB cable</li>
<li>On laptop terminal, type: &#8220;adb forward tcp:41927 tcp:41927&#8243;</li>
<li>On phone, check the &#8220;Service active&#8221; box (if you disabled it &#8212; recommended as it will probably drain your battery!)</li>
<li>On laptop run &#8220;sudo openvpn azilink.ovpn&#8221;</li>
<li>Add &#8220;nameserver 192.168.56.1&#8243; into your /etc/resolv.conf (assuming Network Manager over-writes your resolv.conf)</li>
</ul>
<p>I did this on Ubuntu 9.04 (Jaunty Jackalope) and this worked for me. Hopefully this should work pretty straightforward without problems.</p>
<p>Essentially what this app does is run a VPN server on your phone. ADB (Android Debugging Bridge) is a development tool that allows forwarding of TCP traffic from your laptop to the phone (and vica-versa) &#8211; working in a similar way to an SSH tunnel, but this is all unencrypted. Then all you have to do is open an unecrypted VPN connection to the forwarded port (i.e. 127.0.0.1:41927), and route the traffic through that. The nameserver isn&#8217;t auto set of course so that has to be done manually.</p>
<p>I have no idea why tethering is so difficult on the HTC Magic &#8211; it should be made much easier, especially as it&#8217;s such an open phone. However, thanks to it&#8217;s open-ness, apps like Azilink exist and make tethering possible!</p>
<p><strong>Handy tip:</strong> You can download this article and keep it on your PC which may help if you&#8217;re trying to set this up and you dont have an alternative internet connection. Don&#8217;t forget to download all the files mentioned above as well! <a href="http://www.asgrim.com/wp-content/uploads/2009/07/tethering-instructions.html">Right click this link and Save As&#8230;</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/07/24/tethering-your-htc-magic-android-phone-in-ubuntu-9-04-jaunty-jackalope/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>in_array in Excel &#8211; or a Vertical Lookup</title>
		<link>http://www.asgrim.com/2009/07/09/in_array-in-excel-or-a-vertical-lookup/</link>
		<comments>http://www.asgrim.com/2009/07/09/in_array-in-excel-or-a-vertical-lookup/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 18:34:30 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[in_array]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[lookup]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[value]]></category>
		<category><![CDATA[values]]></category>
		<category><![CDATA[vertical]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1484</guid>
		<description><![CDATA[I&#8217;m not a power Excel user, but as we handle a lot of data, I had to use it earlier today to do some in_array type searching. Basically, I had a CSV with a load of IDs, but we&#8217;d already processed some of the IDs. I wanted to remove the IDs from the CSV that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a power Excel user, but as we handle a lot of data, I had to use it earlier today to do some in_array type searching. Basically, I had a CSV with a load of IDs, but we&#8217;d already processed some of the IDs. I wanted to remove the IDs from the CSV that we&#8217;d already processed. So I have this CSV of IDs, and a list of IDs we&#8217;d already processed. Great! In PHP, I could just use in_array on each of them. But I didn&#8217;t have time to do a PHP script, so this is how to do a similar thing in Excel &#8211; a Vertical Lookup.</p>
<p>Open your CSV in Excel, and add two new columns &#8220;vlookup&#8221; and &#8220;is_processed&#8221;. The formula to apply should be something like:</p>
<pre>=VLOOKUP(C2,'already processed'!A:A,1,TRUE)</pre>
<p>C2 is the ID you want to check if is in the list of already processed IDs (the &#8220;needle&#8221;). If you want the matching to be non-strict and have the lookup table sorted in whatever order (probably not), set the last parameter to TRUE. Normally you want FALSE to check anywhere, and make sure you sort the lookup table in ascending order.</p>
<p>Add a new sheet, and call it &#8220;already processed&#8221;, and add your list of IDs in the first column. This is your &#8220;haystack&#8221;.</p>
<p>If you return to your original sheet, you&#8217;ll see the &#8220;vlookup&#8221; column has either IDs (if the ID is found in your list) or #N/A if the value is not found. To make this neat, add this formula to your is_processed column:</p>
<pre>=IF(ISNA(F2),"no","yes")</pre>
<p>Where F2 is the vlookup column. Then for the IDs (&#8220;needles&#8221;) that are found in the search list (&#8220;haystack&#8221;) the value of is_processed will be &#8220;yes&#8221;, and all that aren&#8217;t found it&#8217;ll be &#8220;no&#8221;. You can then filter on this or whatever you like!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/07/09/in_array-in-excel-or-a-vertical-lookup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu One &#8211; Taking Linux To The Clouds</title>
		<link>http://www.asgrim.com/2009/07/04/ubuntu-one-taking-linux-to-the-clouds/</link>
		<comments>http://www.asgrim.com/2009/07/04/ubuntu-one-taking-linux-to-the-clouds/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 07:16:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[one]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntuone]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1479</guid>
		<description><![CDATA[I opened Google Mail on my HTC Magic this morning to find a lovely invitation to the Ubuntu One beta, woot. So I grabbed my shiny Sony Vaio laptop and fired it up, and got straight on with it. Essentially, Ubuntu One is just a sync to a remote network storage, so there shouldn&#8217;t be [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-1480 alignright" title="UbuntuOneScreenshot" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/07/UbuntuOneScreenshot-300x168.png" alt="UbuntuOneScreenshot" width="300" height="168" />I opened Google Mail on my HTC Magic this morning to find a lovely invitation to the Ubuntu One beta, woot. So I grabbed my shiny Sony Vaio laptop and fired it up, and got straight on with it. Essentially, Ubuntu One is just a sync to a remote network storage, so there shouldn&#8217;t be anything too complex about it. The login process is fairly straightforward. First you download their PPA, then the packages themselves; if you use Firefox this is made remarkably simple by just clicking the buttons on the installation web page. Once installed, you start the client, and this should bring up a web page to &#8220;Add your computer&#8221;. It didn&#8217;t do this first time on mine, and I had to manually do:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ubuntuone-client ubuntuone-client-tools</pre></div></div>

<p>to get it to work. Still, after that, it ran pretty smoothly and I&#8217;ve just synced up my first few files. As of yet I don&#8217;t really have a use for this sort of thing, but I expect backups of certain things would be useful. The free tier is a 2GB plan, or there&#8217;s a paid 10GB plan. Personally I&#8217;d prefer more storage if I were to use it but the 10GB is USD $10 so the amount of storage I&#8217;d need would I guess cost around $50 a month going on $1/GB.</p>
<p>Still, it&#8217;s a cool little feature and a welcome addition to my laptop, although as of yet I have no-one to share files with&#8230; I&#8217;ll figure out how to invite people if someone requests <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/07/04/ubuntu-one-taking-linux-to-the-clouds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Type Hinting Patch for PHP 5.3</title>
		<link>http://www.asgrim.com/2009/07/02/type-hinting-patch-for-php-5-3/</link>
		<comments>http://www.asgrim.com/2009/07/02/type-hinting-patch-for-php-5-3/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 20:03:34 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[modification]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[type hinting]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1476</guid>
		<description><![CDATA[The beauty of PHP is that people can modify it to work however they want due to it&#8217;s open sourced nature&#8230; If something annoys you about the programming language itself, you can just go ahead and change it. The upside to that is that you get the features you think are missing in PHP. The [...]]]></description>
			<content:encoded><![CDATA[<p>The beauty of <a href="http://www.php.net/">PHP</a> is that people can modify it to work however they want due to it&#8217;s open sourced nature&#8230;</p>
<p>If something annoys you about the programming language itself, you can just go ahead and change it. The upside to that is that you get the features you think are missing in PHP. The downside is that your code can potentially become incompatible with everyone else, and your code becomes quite unportable.</p>
<p>Nonetheless, <a href="http://ilia.ws/">Ilia Alshanetsky</a> (author of <a href="http://www.amazon.co.uk/gp/product/0973862106?ie=UTF8&amp;tag=mypre-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0973862106">php|architect&#8217;s Guide to PHP Security</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=mypre-21&amp;l=as2&amp;o=2&amp;a=0973862106" border="0" alt="" width="1" height="1" />) has <a href="http://ilia.ws/archives/205-Type-hinting-for-PHP-5.3.html">posted on his blog</a> a patch of PHP 5.3 that provides proper, traditional, <a href="http://php.net/manual/en/language.oop5.typehinting.php">type hinting</a>, currently unsupported for scalar types.</p>
<p>As he explains, type hinting is a controversial topic; what with the fluidity of PHP and it&#8217;s loosely-typed nature. However I think type hinting, especially strict type hinting would be more advantageous than disadvantageous. He explains how his patch adds a certain amount of flexibilty for numbers within strings (using the &#8220;numeric&#8221; pseudo-type) allowing a string to be passed off as a number (perfectly legal in PHP&#8230; e.g. &#8220;1&#8243; + &#8220;1&#8243; = 2), or alternatively using the stricter &#8220;int&#8221; type to specify a number and must be of integer type i.e. &#8220;1&#8243; is not valid, but 1 is.</p>
<p>Unfortunately I don&#8217;t like delving into compiling stuff, so I&#8217;ll just have to hope it gets included in the main trunk of PHP&#8230; until then I can pretend I have type hinting, perhaps by adding comments such as this messy mess&#8230; *ahem*:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> foo<span style="color: #009900;">&#40;</span><span style="color: #666666; font-style: italic;">/* int */</span> <span style="color: #000088;">$bar</span><span style="color: #009900;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/07/02/type-hinting-patch-for-php-5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome: Short Ternary Operators</title>
		<link>http://www.asgrim.com/2009/06/30/awesome-short-ternary-operators/</link>
		<comments>http://www.asgrim.com/2009/06/30/awesome-short-ternary-operators/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 18:35:31 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[goto]]></category>
		<category><![CDATA[namespaces]]></category>
		<category><![CDATA[operators]]></category>
		<category><![CDATA[phar]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ternary]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1473</guid>
		<description><![CDATA[I&#8217;m an advocate of tidy, well commented code, and something that has bugged me for a little while was the messiness of the ternary operator (?:) in PHP. With the introduction of PHP 5.3.0, we can now miss out the duplication messiness of using the ternary operator for existance checks for example. Instead of: $value [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m an advocate of tidy, well commented code, and something that has bugged me for a little while was the messiness of the ternary operator (?:) in PHP. With the introduction of PHP 5.3.0, we can now miss out the duplication messiness of using the ternary operator for existance checks for example. Instead of:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a_value</span> ? <span style="color: #000088;">$a_value</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$b_value</span><span style="color: #339933;">;</span></pre></div></div>

<p>We can now simply do:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a_value</span> ?<span style="color: #339933;">:</span> <span style="color: #000088;">$b_value</span><span style="color: #339933;">;</span></pre></div></div>

<p>It goes without saying that one should still not nest ternary operators as they become messy and extremely difficult to understand, even with good commenting. Consider an if/elseif/else or switch instead.</p>
<p>There are a few other things in PHP 5.3.0 that I&#8217;m looking forward to as well, one of which is the bundling of <a href="http://uk.php.net/phar">ext/phar</a> which is really rather cool.</p>
<p>There are other dubious things, which are covered (and argued) in great detail elsewhere such as the <a href="http://uk2.php.net/goto">goto operator</a> and the introduction of <a href="http://uk2.php.net/namespaces">namespaces</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/30/awesome-short-ternary-operators/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Parcelforce&#8217;s Web Developers are Idiots</title>
		<link>http://www.asgrim.com/2009/06/16/parcelforces-web-developers-are-idiots/</link>
		<comments>http://www.asgrim.com/2009/06/16/parcelforces-web-developers-are-idiots/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 05:40:28 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[idiots]]></category>
		<category><![CDATA[inept]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[naive]]></category>
		<category><![CDATA[parcelforce]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1465</guid>
		<description><![CDATA[This sort of thing really angers me and displays the fact that the web developers of the Parcelforce website will happily display total ineptitude at developing websites. To block off an entire operating system for no reason whatsoever, is simply astounding, and I can&#8217;t believe companies still employ such idiots. Why should I not be [...]]]></description>
			<content:encoded><![CDATA[<p>This sort of thing really angers me and displays the fact that the web developers of the Parcelforce website will happily display total ineptitude at developing websites. To block off an entire operating system <em>for no reason whatsoever</em>, is simply astounding, and I can&#8217;t believe companies still employ such idiots.</p>
<p>Why should I not be allowed to send a parcel, just because I use Linux? There is no reason for it &#8211; especially as they support Mozilla Firefox! There is no difference between Windows Firefox and Linux Firefox, and no reason to stop me using Linux to send a parcel. Thankfully plug-ins like the User Agent Switcher exist, to circumvent such inept and naive programming.</p>
<p><img class="aligncenter size-full wp-image-1466" title="Parcelforce" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/06/Parcelforce.jpg" alt="Parcelforce" width="801" height="702" /></p>
<p><strong>Update: </strong>User Agent Switcher didn&#8217;t work. I used Firebug to enable the submit button though, which let me through happily&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/16/parcelforces-web-developers-are-idiots/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Good Site Design, SEO and Semantics all in one</title>
		<link>http://www.asgrim.com/2009/06/14/good-site-design-seo-and-semantics-all-in-one/</link>
		<comments>http://www.asgrim.com/2009/06/14/good-site-design-seo-and-semantics-all-in-one/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 15:21:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[h1]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[title]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1460</guid>
		<description><![CDATA[One thing I ensure I do on all sites is to develop for two audiences at once. The first audience is of course the end user of the site. This user has CSS enabled, and can view all the prettyness of the site in all its original intended glory. But I also develop the site [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I ensure I do on all sites is to develop for two audiences at once. The first audience is of course the end user of the site. This user has CSS enabled, and can view all the prettyness of the site in all its original intended glory. But I also develop the site for text-based browsers, search engines and those with CSS disabled. The advantage of this is that the page is semantically correct. You have &lt;h1&gt; tags around the site title, &lt;h2&gt; around the page title and so on. Menus are in &lt;ul&gt; unordered lists, and so on. Semantically correct pages are instantly more SEO-effective. Working at Netbasic has shown me how important that is <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ! In addition, for the small population that use text-based browsers, it enables them to view the site without mess.</p>
<p>If you have a nice logo to display, and you don&#8217;t want to display a big bulky &lt;h1&gt; tag on your page, there&#8217;s a really easy way of doing that:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;site-title&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Your Site Name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This markup is great for search engines. Search engines will see the &lt;h1&gt; tag and notice that &#8220;Your Site Name&#8221; is the page&#8217;s main title. Little things like this help search engines determine what your site actually contains, as opposed to the hugely ineffective method of repeating a load of words several thousand times in tiny text&#8230;</p>
<p>The way to make that neat semantic code look nice and pretty is with CSS, in order to hide that &#8220;Your Site Name&#8221; text but display your nice company logo instead&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.site-title</span>
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'/images/your-company-logo.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #6666ff;">.site-title</span> h1
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>As you can probably tell, what this CSS does is ask the browser to display your company&#8217;s logo as the background image to this div, and hide the &lt;h1&gt; text.</p>
<p>There&#8217;s another issue though &#8211; how do we make that lovely logo clickable to go to the home page? That&#8217;s easy too, and semantically.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;site-title&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Your Site Name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;/home/page/url&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Click here to go to the home page<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>We modify the CSS as well to hide the text itself (in the &lt;span&gt;) but make the anchor (the &lt;a&gt;) tag into a block, which turns it into a link that covers the entire logo.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.site-title</span>
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'/images/your-company-logo.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #6666ff;">.site-title</span> h1
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #6666ff;">.site-title</span> a
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #6666ff;">.site-title</span> a span
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We&#8217;ve used a similar trick here to hide the text that should only appear when CSS is turned off. As mentioned, we explicitly set the dimensions of the anchor tag to fill the dimensions of the logo image.</p>
<p>That&#8217;s all there is to it, and search engines will love that as opposed to just using something like this for your logo:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;/home/page/path&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;/images/company-logo.png&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Company logo&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The search engine or text-based user looking at your site will be able to see clearly what the page title is, and it will load really quickly as unless you&#8217;re applying the CSS styles, there will be no images to load, which makes it an all-round winner really!</p>
<p>I&#8217;m not saying this is the best way of doing it, but I&#8217;ve found it to be quite clever and I use it. If someone&#8217;s got some better ideas out there, why not add a comment with your idea <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/14/good-site-design-seo-and-semantics-all-in-one/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Bing &#8211; A blip, or something more?</title>
		<link>http://www.asgrim.com/2009/06/10/bing-a-blip-or-something-more/</link>
		<comments>http://www.asgrim.com/2009/06/10/bing-a-blip-or-something-more/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 13:06:59 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bing]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[market]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[thought]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1456</guid>
		<description><![CDATA[Now that the fuss over Bing&#8216;s launch is already over (that didn&#8217;t last long, did it?), what is the future for it? According to this article&#8216;s source, Bing had a 11.1% share of the US Search market. Microsoft apparently haven&#8217;t hit above 10% since 2007, so that could be seen as quite a positive thing. [...]]]></description>
			<content:encoded><![CDATA[<p>Now that the fuss over <a href="http://www.bing.com/">Bing</a>&#8216;s launch is already over (that didn&#8217;t last long, did it?), what is the future for it? According to <a href="http://www.theregister.co.uk/2009/06/10/google_schmidt_bing/">this article</a>&#8216;s source, Bing had a 11.1% share of the US Search market. <a href="http://www.microsoft.com/">Microsoft</a> apparently haven&#8217;t hit above 10% since 2007, so that could be seen as quite a positive thing. But <a href="http://www.google.com/">Google</a> seems pretty confident this is just a blip on the radar and they are unconcerned, and that could potentially be true.</p>
<p>I&#8217;m no expert by any means, but it will be interesting to see how this pans out.</p>
<p>Whats more, if Microsoft really love the Bing name, will they start replacing all the Windows Live products after replacing Live Search? Will we start using Bing Messenger, Bing Hotmail and so on? Will they do a last minute re-brand of Windows 7 to be Windows Bing? That would be quite funny&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/10/bing-a-blip-or-something-more/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Usernameless and Passwordless logon with SSH</title>
		<link>http://www.asgrim.com/2009/06/09/usernameless-and-passwordless-logon-with-ssh/</link>
		<comments>http://www.asgrim.com/2009/06/09/usernameless-and-passwordless-logon-with-ssh/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 21:35:33 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[credentials]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[logon]]></category>
		<category><![CDATA[passwordless]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[usernameless]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1454</guid>
		<description><![CDATA[Fabien Potencier wrote a nice article that I&#8217;m going to try out &#8211; usernameless and passwordless logon with SSH on Linux systems. This tutorial is especially useful for those with 1and1.co.uk hosting where the username is something like u12345678, which I never bother remembering&#8230; First create the logon key. SSH to the server you wish [...]]]></description>
			<content:encoded><![CDATA[<p>Fabien Potencier wrote <a href="http://fabien.potencier.org/article/19/quick-ssh-tip">a nice article</a> that I&#8217;m going to try out &#8211; usernameless <em>and</em> <a href="http://www.asgrim.com/2008/10/21/server-refused-our-key/">passwordless logon with SSH</a> on Linux systems. This tutorial is especially useful for those with 1and1.co.uk hosting where the username is something like u12345678, which I never bother remembering&#8230;</p>
<p>First create the logon key. SSH to the server you wish to set up the connection to using your normal username and password.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">700</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> authorized_keys
<span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> dsa
<span style="color: #c20cb9; font-weight: bold;">cat</span> id_dsa.pub <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</pre></div></div>

<p>Then download the id_dsa file to your laptop, using SFTP or similar, move it to something like ~/.ssh/keys/myserver.key and chmod 600 myserver.key. On your laptop, edit ~/.ssh/config and add something like this:</p>
<pre>
Host myserver
    HostName 1.2.3.4
    User u12345678
    IdentityFile /home/user/.ssh/keys/myserver.key
</pre>
<p>That should be all there is to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/09/usernameless-and-passwordless-logon-with-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why the iPhone is a rip-off</title>
		<link>http://www.asgrim.com/2009/06/09/why-the-iphone-is-a-rip-off/</link>
		<comments>http://www.asgrim.com/2009/06/09/why-the-iphone-is-a-rip-off/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 12:26:35 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[expensive]]></category>
		<category><![CDATA[htc magic]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[rip-off]]></category>
		<category><![CDATA[smartphone]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1450</guid>
		<description><![CDATA[I think this table (source) pretty much explains itself&#8230; Basically to get the iPhone 3G S 16GB for free, you must be tied into a £73.41 a month contract for 18 months. Pay-as-you-go prices for the iPhones 3G S 16GB and 32GB are £440.40 and £538.30 respectively, which is just disgusting. The HTC Magic (released [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-1451" title="iphone-pricing" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/06/iphone-pricing.png" alt="iphone-pricing" width="630" height="236" /></p>
<p>I think this table (<a href="http://www.reghardware.co.uk/2009/06/09/iphone_3gs_o2/">source</a>) pretty much explains itself&#8230;</p>
<p>Basically to get the iPhone 3G S 16GB for free, you must be tied into a £73.41 a month contract for 18 months. Pay-as-you-go prices for the iPhones 3G S 16GB and 32GB are £440.40 and £538.30 respectively, which is just disgusting.</p>
<p>The HTC Magic (released back in May) already has most of the features the new iPhone is now touting &#8211; so why bother spending all the money when you could get just as good a smartphone, but for much less. I&#8217;m on a £35 a month 18 month contract, and my phone was free. The only feature the HTC Magic doesn&#8217;t currently have is internet tethering, but I&#8217;ve only had a use for that once in my life&#8230; so&#8230; I&#8217;m not really that bothered. And from what I&#8217;ve led to believe the HTC Magic hardware does support it, but it requires a little hacking to get working. And despite what you might read in the press, it&#8217;s actually a bloody good smartphone, and I got along with it much better than the iPod Touch I tried. Admittedly I&#8217;ve only played with an iPhone for about 10/15 minutes, but I found it pretty janky, just like the iPod Touch I tried.</p>
<p>And if you don&#8217;t like the virtual keyboard on the HTC Magic, word on the street is that there will be a new Android-based phone released in the summer that returns the physical qwerty&#8230; along with a whole host of other Android-based phones from various manufacturers.</p>
<p>Today is a good day for Android, and a bad day for your pocket if you&#8217;re an iPhone fan&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/09/why-the-iphone-is-a-rip-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans &#8211; A Couple of Pointers</title>
		<link>http://www.asgrim.com/2009/06/04/netbeans-a-couple-of-pointers/</link>
		<comments>http://www.asgrim.com/2009/06/04/netbeans-a-couple-of-pointers/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 16:47:01 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[completion]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[indentation]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[netbasic]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[pdt]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[spaces]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1443</guid>
		<description><![CDATA[I&#8217;ve started giving Netbeans for PHP a try, considering everyone is saying how much better it is than Eclipse PDT. So far I&#8217;m very impressed at it&#8217;s simplicity and ease of use &#8211; which for the main tool a programmer uses day in an day out for at least 8 hours, is a very good [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started giving <a href="http://www.netbeans.org/">Netbeans</a> for PHP a try, considering everyone is saying how much better it is than <a href="http://www.eclipse.org/pdt/">Eclipse PDT</a>. So far I&#8217;m very impressed at it&#8217;s simplicity and ease of use &#8211; which for the main tool a programmer uses day in an day out for at least 8 hours, is a <em>very</em> good thing.</p>
<p>However I came across a couple of &#8220;issues&#8221; or teething problems rather, that thankfully with a short Google (sorry Bing&#8230;), I managed to find solutions for&#8230;</p>
<p><strong><span id="more-1443"></span>Delaying the Code Completion Pop-up</strong></p>
<p>Here at Netbasic towers, we have very big projects. The main project I work with has nearly 5,000 files, most of which are classes, and our custom framework has around 500 files, again mostly consisting of classes. Can you tell we love OOP PHP? Anyhow, this makes Netbeans run a little slow when loading the code completion pop-up. In Eclipse PDT, there is the option to delay the appearance of the code completion so it only appears if you&#8217;re stuck. In Netbeans I could not find such an option, and my only option appeared to be turn of auto appearing the pop-up, thus forcing me to Ctrl+Space every time I wanted code completion. This is a little niggle, but there is a solution for it:</p>
<blockquote>
<pre>As a workaround in the file:
%USERPROFILE%/.netbeans/6.5/config/Editors/text/x-java/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml

The value completion-auto-popup-delay can be set manually.</pre>
</blockquote>
<p>Source: <a href="http://www.netbeans.org/issues/show_bug.cgi?id=124540">http://www.netbeans.org/issues/show_bug.cgi?id=124540</a></p>
<p><strong>Tabs versus Spaces for Indentation<br />
</strong></p>
<p><a href="http://www.asgrim.com/2008/08/08/code-indents-tab-or-spaces/">We use tabs</a> at Netbasic, and using tabs is my preference over using 4 or another number of spaces. Despite how simple the interface is for Netbeans, it&#8217;s a little confusing. The reason is because it&#8217;s actually aimed towards Java developers. Read this and comprehend it, and it might just help you figure out how to use tabs instead of spaces&#8230;</p>
<blockquote><p>Four spaces should be used as the unit of indentation. The exact construction of the indentation (spaces vs. tabs) is unspecified. Tabs must be set exactly every 8 spaces (not 4).</p></blockquote>
<p>Source: <a href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#262">http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#262</a></p>
<p>Basically what you have to do is set the &#8220;Exand Tabs to Spaces&#8221; off, and set the &#8220;Tab Size&#8221; to 4.</p>
<p>Credit goes to <a href="http://alwold.blogspot.com/2009/05/tabs-vs-spaces-in-netbeans.html">Al&#8217;s Blog</a> for that one. And the issue for it: <a href="http://www.netbeans.org/issues/show_bug.cgi?id=52053">http://www.netbeans.org/issues/show_bug.cgi?id=52053</a></p>
<p>With these couple of things out the way (which were show-stoppers for us using Netbeans at Netbasic), I can continue using Netbeans for now and hopefully recommend that we switch from Eclipse PDT! <img src='http://www.asgrim.com/_wordpress_live_J4M3S/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/04/netbeans-a-couple-of-pointers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>7 Weeks, 4 Days On</title>
		<link>http://www.asgrim.com/2009/06/03/7-weeks-4-days-on/</link>
		<comments>http://www.asgrim.com/2009/06/03/7-weeks-4-days-on/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 21:21:14 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[busy]]></category>
		<category><![CDATA[freyja]]></category>
		<category><![CDATA[laugh]]></category>
		<category><![CDATA[laughing]]></category>
		<category><![CDATA[smile]]></category>
		<category><![CDATA[smiling]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[warm]]></category>
		<category><![CDATA[weather]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1440</guid>
		<description><![CDATA[Well time has just flown hasn&#8217;t it. Freyja is already 7 weeks and 4 days old, and she&#8217;s still as gorgeous as ever! She&#8217;s so amazing and I&#8217;m such a proud dad. She&#8217;s doing really well sleep-wise, and we consider ourselves very lucky. We manage to get her to sleep around 8pm of an evening, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1441" title="019" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/06/019-300x225.jpg" alt="019" width="300" height="225" />Well time has just flown hasn&#8217;t it. Freyja is already 7 weeks and 4 days old, and she&#8217;s still as gorgeous as ever! She&#8217;s so amazing and I&#8217;m such a proud dad. She&#8217;s doing really well sleep-wise, and we consider ourselves very lucky. We manage to get her to sleep around 8pm of an evening, and normally she&#8217;s sleeping through til about 6am! Over the last couple of days she&#8217;s been waking up a couple of hours earlier, we guess because she&#8217;s so hot with all the warm weather, but we really can&#8217;t complain!</p>
<p>Last weekend we spent outdoors with her at a couple of picnics (one of which was my nephew Finley&#8217;s birthday!) which was really nice and so she got to see some friends and family. We&#8217;re keeping in touch with my parents in France via webcam which is great, and she gave them a smile the other morning which was really nice to see. If you&#8217;ve been following my tweets, you&#8217;ll know that she&#8217;s already smiling and laughing. At the moment most laughs turn into hiccups, but there is the odd time (normally when I&#8217;m at work, damnit!) that she does a proper laugh. I managed to catch her doing it this morning which was so awesome to see.</p>
<p>It&#8217;s a busy and hectic life at the moment, and I rarely get a chance to do anything for myself, but she is totally worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/06/03/7-weeks-4-days-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing Project Types in Eclipse</title>
		<link>http://www.asgrim.com/2009/05/27/changing-project-types-in-eclipse/</link>
		<comments>http://www.asgrim.com/2009/05/27/changing-project-types-in-eclipse/#comments</comments>
		<pubDate>Wed, 27 May 2009 15:07:22 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[buildSpec]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[changing]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[modify]]></category>
		<category><![CDATA[nature]]></category>
		<category><![CDATA[pdt]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1435</guid>
		<description><![CDATA[If you created a project in Eclipse, but you created a regular &#8220;Project&#8221; instead of a particular project type (in my case, a &#8220;PHP Project&#8221; then there is a fairly easy way of fixing it. I had to do this to make a particular project work in the PHP Explorer (which for some reason worked [...]]]></description>
			<content:encoded><![CDATA[<p>If you created a project in Eclipse, but you created a regular &#8220;Project&#8221; instead of a particular project type (in my case, a &#8220;PHP Project&#8221; then there is a fairly easy way of fixing it. I had to do this to make a particular project work in the PHP Explorer (which for some reason worked fine on Windows version of Eclipse, but not my version&#8230;)</p>
<p>Create a new project of the type you want to convert your existing project to. In my case, I just created a new PHP Project. Alternatively, you can use an existing PHP Project (or project of the type you want to convert to) if you have one. Open the .project file of this, and copy the &lt;natures&gt; and &lt;buildSpec&gt; XML sections. Open the .project file of the project you wish to convert. Remove the old &lt;natures&gt; and &lt;buildSpec&gt; sections and replace with the copied section. If you have other &lt;natures&gt;, for example PDE etc., then you&#8217;ll have to merge them by hand. Mine now looks a little like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;projectDescription<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>someprojectname<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;comment<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/comment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;projects<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>otherproject<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/projects<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildSpec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.wst.validation.validationbuilder<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.dltk.core.scriptbuilder<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.php.core.PhpIncrementalProjectBuilder<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.php.core.ValidationManagerWrapper<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/buildSpec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;natures<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nature<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.php.core.PHPNature<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nature<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/natures<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/projectDescription<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>It&#8217;s as simple as that! Close the project and re-open it and you&#8217;ll have all the magical features of PDT (or whichever project type you wanted&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/27/changing-project-types-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freyja&#8217;s First Laugh</title>
		<link>http://www.asgrim.com/2009/05/20/freyjas-first-laugh/</link>
		<comments>http://www.asgrim.com/2009/05/20/freyjas-first-laugh/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:31:56 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[babies]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[first]]></category>
		<category><![CDATA[freyja]]></category>
		<category><![CDATA[giggle]]></category>
		<category><![CDATA[laughing]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1428</guid>
		<description><![CDATA[Freyja laughed today for the first time (at 5 weeks, 4 days old), which was exciting, and this video pretty much says it all!]]></description>
			<content:encoded><![CDATA[<p>Freyja laughed today for the first time (at 5 weeks, 4 days old), which was exciting, and this video pretty much says it all!</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/y1W2q4OmYRI&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/y1W2q4OmYRI&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/20/freyjas-first-laugh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Zend Framework 1.8.x on Ubuntu 9.04 (Jaunty Jackalope) using SVN</title>
		<link>http://www.asgrim.com/2009/05/20/installing-zend-framework-18x-on-ubuntu-904-jaunty-jackalope-using-svn/</link>
		<comments>http://www.asgrim.com/2009/05/20/installing-zend-framework-18x-on-ubuntu-904-jaunty-jackalope-using-svn/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:24:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1420</guid>
		<description><![CDATA[With the release of the 1.8 series of Zend Framework, I felt the need to update this article, especially due to the entirely new project setup process provided by Zend_Tool. Again, we start with installing the LAMP stack if you haven&#8217;t done so already: sudo tasksel install lamp-server So now you&#8217;ve got your LAMP stack [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of the 1.8 series of Zend Framework, I felt the need to update <a href="http://www.asgrim.com/2009/04/07/installing-zend-framework-on-ubuntu-810-intrepid-ibex-using-svn/">this article</a>, especially due to the entirely new project setup process provided by Zend_Tool.</p>
<p>Again, we start with installing the LAMP stack if you haven&#8217;t done so already:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> tasksel <span style="color: #c20cb9; font-weight: bold;">install</span> lamp-server</pre></div></div>

<p>So now you&#8217;ve got your LAMP stack up and running, lets download the latest SVN tag of Zend Framework. At the time of writing, the latest stable is 1.8.1, which I&#8217;ll use here. If you want to check for the latest version, visit <a href="http://framework.zend.com/svn/framework/standard/tags/">http://framework.zend.com/svn/framework/standard/tags/</a> in your browser, and the last folder is the one you want. If you want stable full releases, ignore the RC/PR versions. So, once you&#8217;ve determined the version you want, we&#8217;ll check out the release:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ZendFramework
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>framework.zend.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>framework<span style="color: #000000; font-weight: bold;">/</span>standard<span style="color: #000000; font-weight: bold;">/</span>tags<span style="color: #000000; font-weight: bold;">/</span>release-1.8.1<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>It is likely you&#8217;ll need to use sudo for these commands as /opt is owned by root by default. You&#8217;ll see a big long list of files being checked out, and once that&#8217;s done you&#8217;ll have a new folder appropriately named &#8220;release-1.8.1&#8243;. Create a soft link called &#8220;current&#8221; to the release folder so you can change the default included Zend Framework version without restarting Apache in the future:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> release-1.8.1 current</pre></div></div>

<p>You can stop there if you like, and manually add the include path into your PHP scripts using set_include_path. However, if you would like the current Zend Framework included automatically, then continue by opening /etc/php5/apache2/php.ini in your favourite editor. Add the path to your include_path list. For example, if your current include_path is (and this is the default):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">include_path = <span style="color: #ff0000;">&quot;.:/usr/share/php5:/usr/share/pear&quot;</span></pre></div></div>

<p>Then change it to:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">include_path = <span style="color: #ff0000;">&quot;.:/usr/share/php5:/usr/share/pear:/opt/ZendFramework/current/library&quot;</span></pre></div></div>

<p>All you need to do now is restart Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>In the future, if you wish to change to a new default Zend Framework version (for example 1.8.2), then just check out the SVN directory and change the soft link. You won&#8217;t even have to restart Apache, and the changes will take effect immediately! For example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>framework.zend.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>framework<span style="color: #000000; font-weight: bold;">/</span>standard<span style="color: #000000; font-weight: bold;">/</span>tags<span style="color: #000000; font-weight: bold;">/</span>release-1.8.2<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> current
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> release-1.8.2 current</pre></div></div>

<p>Now to initialise a new Zend Framework project using Zend_Tool, we need to set up paths and so on for your command line. If you haven&#8217;t already, you need to install the CLI (Command Line Interface) for PHP:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-cli</pre></div></div>

<p>Once that&#8217;s installed, we need to add the Zend Framework&#8217;s bin directory to the path. First lets add the framework path to the CLI&#8217;s php.ini. Do the same php.ini modification as above but in /etc/php5/cli/php.ini.</p>
<p>Edit your ~/.bashrc or /etc/profile (or wherever you&#8217;d like to add the path) and add this line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ZendFramework<span style="color: #000000; font-weight: bold;">/</span>current<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #ff0000;">&quot;<span style="color: #007800;">${PATH}</span>&quot;</span></pre></div></div>

<p>To check this is all working properly, you can:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zf.sh show version</pre></div></div>

<p>If you see the above output, then Zend Framework is successfully setup. For more information about Zend_Tool and how to set up a new Zend Framework 1.8.x project, <a href="http://framework.zend.com/manual/en/zend.application.quick-start.html#zend.application.quick-start.zend-tool">read the documentation</a>.</p>
<p>You can keep up to date with the latest Zend software, then just <a href="http://devzone.zend.com/tag/Zend_Framework_Management/format/rss2.0">subscribe to their RSS feed</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/20/installing-zend-framework-18x-on-ubuntu-904-jaunty-jackalope-using-svn/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Zend Framework: Default Action in a Controller</title>
		<link>http://www.asgrim.com/2009/05/16/zend-framework-default-action-in-a-controller/</link>
		<comments>http://www.asgrim.com/2009/05/16/zend-framework-default-action-in-a-controller/#comments</comments>
		<pubDate>Sat, 16 May 2009 07:26:35 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1415</guid>
		<description><![CDATA[As with everything I do, I hack together solutions when there&#8217;s probably a much better and easier way of doing things. But anyway &#8211; if there&#8217;s not an easier way, then here&#8217;s a solution to my problem, and if there is, well&#8230; I&#8217;ll just use that in future&#8230; My problem is that I want pretty [...]]]></description>
			<content:encoded><![CDATA[<p>As with everything I do, I hack together solutions when there&#8217;s probably a much better and easier way of doing things. But anyway &#8211; if there&#8217;s not an easier way, then here&#8217;s a solution to my problem, and if there is, well&#8230; I&#8217;ll just use that in future&#8230;</p>
<p>My problem is that I want pretty URLs for my app, such as http://blah.com/home/folder/5/item/27. The URL structure of Zend Framework means that the URL has to look like this: http://blah.com/home/index/folder/5/item/27. There&#8217;s probably a way around that (my original idea was to use http://blah.com/home/?folder=5&amp;item=27 but that&#8217;s just ugly), but I&#8217;ll settle for using the pointless verb &#8220;go&#8221; as the action name, resulting in http://blah.com/home/go/folder/5/item/27. But I also want that goAction to be called when I just go to http://blah.com/home/. I had a quick look at the ZF documentation, but I couldn&#8217;t see much about setting a default action in a controller, so here&#8217;s my solution:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> HomeController <span style="color: #000000; font-weight: bold;">extends</span> Zend_Controller_Action
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> indexAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// ... action code here ...</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> goAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_forward<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'index'</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>

<p>As I said, there&#8217;s probably an easier way around this, but this works for me, so ner!</p>
<p><strong>Update:</strong> As always, there is an easier way of doing this and I was reading the wrong part of the documentation. As Patrick says in his comment:</p>
<blockquote><p>
Hello, there is a way to specify default module, controller and action for each active route in the Zend_Controller_Router used by Zend_Controller_Front.</p>
<p><a href="http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.standard.variable-defaults">http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.standard.variable-defaults</a></p>
<p>just pass an array</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/16/zend-framework-default-action-in-a-controller/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu: Trac Broken After Ubuntu Upgrade</title>
		<link>http://www.asgrim.com/2009/05/13/ubuntu-trac-broken-after-ubuntu-upgrade/</link>
		<comments>http://www.asgrim.com/2009/05/13/ubuntu-trac-broken-after-ubuntu-upgrade/#comments</comments>
		<pubDate>Wed, 13 May 2009 18:40:46 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[dist-upgrade]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[modpython_frontend]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[mod_python]]></category>
		<category><![CDATA[named]]></category>
		<category><![CDATA[no]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1413</guid>
		<description><![CDATA[If you&#8217;ve recently done an upgrade or dist-upgrade (as I did) on your Ubuntu server and it broke Trac with 500 errors, then this might be the solution for you&#8230; If you&#8217;re seeing something like this in your Apache error.log: No module named trac.web.modpython_frontend Then what has probably happened is Python was upgraded to a [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve recently done an upgrade or dist-upgrade (as I did) on your Ubuntu server and it broke Trac with 500 errors, then this might be the solution for you&#8230;</p>
<p>If you&#8217;re seeing something like this in your Apache error.log:</p>
<pre>No module named trac.web.modpython_frontend</pre>
<p>Then what has probably happened is Python was upgraded to a more recent version. I install Trac in python 2.4, therefore the Trac egg was in the /usr/lib/python2.4/site-packages directory. After the upgrade to python 2.6, the location would&#8217;ve changed. Thankfully, a very quick and simple solution fixed it for me:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> easy_install Trac</pre></div></div>

<p>It worked like a charm for me, but if you have to install manually then I expect you&#8217;ll have to follow the <a href="http://trac.edgewall.org/wiki/TracInstall">TracInstall</a> instructions over again&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/13/ubuntu-trac-broken-after-ubuntu-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Talk Like Apache Day</title>
		<link>http://www.asgrim.com/2009/05/11/talk-like-apache-day/</link>
		<comments>http://www.asgrim.com/2009/05/11/talk-like-apache-day/#comments</comments>
		<pubDate>Mon, 11 May 2009 11:26:33 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[The lols]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[day]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1410</guid>
		<description><![CDATA[I&#8217;m sure you&#8217;ve all heard of Talk Like A Pirate Day, and here&#8217;s my rather geeky idea for another day. It&#8217;s Talk Like Apache Day! Basically, you talk like an HTTP server (not specifically Apache, but &#8220;Apache&#8221; was similar to &#8220;A pirate&#8221;&#8230;). If you need help, here are some responses you can give people to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure you&#8217;ve all heard of <a href="http://www.talklikeapirate.com/">Talk Like A Pirate Day</a>, and here&#8217;s my rather geeky idea for another day. It&#8217;s Talk Like <a href="http://www.apache.org/">Apache</a> Day!</p>
<p>Basically, you talk like an HTTP server (not specifically Apache, but &#8220;Apache&#8221; was similar to &#8220;A pirate&#8221;&#8230;). If you need help, <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">here are some responses</a> you can give people to confuse them.</p>
<p>Other ideas could be borne from this, such as Talk Like an MTA Day, or Talk Like SSH Day. I expect the later would have to be encrypted though&#8230;</p>
<p>Just imagine the conversation anyway:</p>
<p><strong>You:</strong> Hi James, how are you?</p>
<p><strong>Me: </strong>200 OK</p>
<p><strong>You:</strong> What?</p>
<p><strong>Me:</strong> 304 Not Modified</p>
<p><strong>You: </strong>I don&#8217;t understand&#8230;</p>
<p><strong>Me:</strong> 304 Not Modified</p>
<p><strong>You:</strong> You&#8217;re such an idiot&#8230;</p>
<p><strong>Me: </strong>400 Bad Request</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/11/talk-like-apache-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CollabNet for Eclipse</title>
		<link>http://www.asgrim.com/2009/05/09/collabnet-for-eclipse/</link>
		<comments>http://www.asgrim.com/2009/05/09/collabnet-for-eclipse/#comments</comments>
		<pubDate>Sat, 09 May 2009 09:07:08 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[collabnet]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[pdt]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[SourceForge]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1404</guid>
		<description><![CDATA[Just a quick reminder to myself as I always end up Googling for this. The update sites for CollabNet for Eclipse are: Current Release (1.5.1): Eclipse 3.2: http://downloads.open.collab.net/eclipse/update-site/e3.2 Current Release (1.8.1): Eclipse 3.3: http://downloads.open.collab.net/eclipse/update-site/e3.3 Eclipse 3.4: http://downloads.open.collab.net/eclipse/update-site/e3.4 Development Builds: Eclipse 3.2: http://downloads.open.collab.net/eclipse/dev-builds/e3.2 Eclipse 3.3: http://downloads.open.collab.net/eclipse/dev-builds/e3.3 Eclipse 3.4: http://downloads.open.collab.net/eclipse/dev-builds/e3.4 These are sourced from: http://desktop-eclipse.open.collab.net/servlets/ProjectProcess?pageID=3794]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder to myself as I always end up Googling for this. The update sites for CollabNet for Eclipse are:</p>
<p><strong>Current Release (1.5.1):</strong></p>
<p>Eclipse 3.2: http://downloads.open.collab.net/eclipse/update-site/e3.2</p>
<p><strong>Current Release (1.8.1):</strong></p>
<p>Eclipse 3.3: http://downloads.open.collab.net/eclipse/update-site/e3.3<br />
Eclipse 3.4: http://downloads.open.collab.net/eclipse/update-site/e3.4</p>
<p><strong>Development Builds:</strong></p>
<p>Eclipse 3.2: http://downloads.open.collab.net/eclipse/dev-builds/e3.2<br />
Eclipse 3.3: http://downloads.open.collab.net/eclipse/dev-builds/e3.3<br />
Eclipse 3.4: http://downloads.open.collab.net/eclipse/dev-builds/e3.4</p>
<p>These are sourced from: <a href="http://desktop-eclipse.open.collab.net/servlets/ProjectProcess?pageID=3794">http://desktop-eclipse.open.collab.net/servlets/ProjectProcess?pageID=3794</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/09/collabnet-for-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaHL Not Available: Solution</title>
		<link>http://www.asgrim.com/2009/05/07/javahl-not-available-solution/</link>
		<comments>http://www.asgrim.com/2009/05/07/javahl-not-available-solution/#comments</comments>
		<pubDate>Thu, 07 May 2009 21:03:37 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[available]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[collabnet]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[javahl]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[not]]></category>
		<category><![CDATA[pdt]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unable]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1400</guid>
		<description><![CDATA[Whenever I tried to get CollabNet for Eclipse plugin working in Eclipse PDT, it always failed, yielding the error &#8220;Unable to load SVN client&#8221; upon any SVN activity. I did endless amounts of Googling to try to solve the problem, but always came to a brick wall. The big problem here is that Eclipse is [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever I tried to get CollabNet for Eclipse plugin working in Eclipse PDT, it always failed, yielding the error &#8220;Unable to load SVN client&#8221; upon any SVN activity. I did endless amounts of Googling to try to solve the problem, but always came to a brick wall.</p>
<p>The big problem here is that Eclipse is just too new for Ubuntu &#8211; even Jaunty. An <em>apt-get install subversion</em> on Jaunty Jackalope will install subversion 1.5.4, which just doesn&#8217;t work, and thats where the big problem lies. CollabNet for Eclipse categorically <em>requires</em> Subversion 1.6. Unfortunately the only solution I&#8217;ve come up with is to compile subversion and it&#8217;s javahl bindings yourself. I&#8217;ll try and remember all the steps I took to make it work.</p>
<p>First, download the latest subversion and subversion-deps tgz from <a href="http://subversion.tigris.org/">http://subversion.tigris.org/</a>. At time of writing they are <a href="http://subversion.tigris.org/downloads/subversion-1.6.1.tar.gz">here</a> and <a href="http://subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz">here</a>. Extract them both:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf subversion-1.6.1.tar.gz
$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf subversion-deps-1.6.1.tar.gz
$ <span style="color: #7a0874; font-weight: bold;">cd</span> subversion-1.6.1</pre></div></div>

<p>You&#8217;ll need to install a couple of extra packages (this assumes you&#8217;re using Sun&#8217;s JRE), and assuming you already had subversion and libsvn-javahl already installed, uninstall a couple:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libssl-dev sun-java6-jdk <span style="color: #c20cb9; font-weight: bold;">g++</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove subversion libsvn-javahl</pre></div></div>

<p>Configure, make and install subversion. You can check it&#8217;s the right version too:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--disable-nls</span> <span style="color: #660033;">--enable-javahl</span> <span style="color: #660033;">--with-jdk</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java-<span style="color: #000000;">6</span>-sun-1.6.0.13
$ <span style="color: #c20cb9; font-weight: bold;">make</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #660033;">--version</span></pre></div></div>

<p>Once that&#8217;s done, you&#8217;ll want to compile the javahl binding. Once installed, check it&#8217;s installed correctly too. It&#8217;s fairly likely the .so file will be in /usr/local/lib.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">make</span> javahl
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> install-javahl
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">updatedb</span>
$ <span style="color: #c20cb9; font-weight: bold;">locate</span> libsvnjavahl-1.so
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> ldconfig</pre></div></div>

<p>Open your eclipse.ini, and after the -vmargs line, add:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">-Djava.library.path=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib</pre></div></div>

<p>replacing the path with the path where the libsvnjavahl-1.so with your correct path.</p>
<p>Now fire up Eclipse, go to Window &gt; Preferences &gt; Team &gt; SVN. The SVN Interface should now say JavaHL (JNI) 1.6.1 and a revision, depending on the particular version of SVN you installed.</p>
<p>I think that&#8217;s all the steps I took, so I apologise if I missed something out &#8211; if I remember something I&#8217;ll add it in!</p>
<p><strong>Update:</strong> Compiling javahl requires g++, so I added that into the apt-get install line.</p>
<p><strong>Update 2: </strong>Missed out ldconfig after libraries creation.</p>
<p><strong>Update 3: </strong>If you still have issues getting it to work, I recommend looking at <a href="http://subclipse.tigris.org/wiki/JavaHL">http://subclipse.tigris.org/wiki/JavaHL</a>, reading it carefully, especially the Troubleshooting on Linux section. The javahltests.jar JUnit tests that are provided on the page may be very handy when debugging problems!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/05/07/javahl-not-available-solution/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Introducing&#8230;</title>
		<link>http://www.asgrim.com/2009/04/11/introducing/</link>
		<comments>http://www.asgrim.com/2009/04/11/introducing/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 21:16:15 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[birth]]></category>
		<category><![CDATA[born]]></category>
		<category><![CDATA[eowyn]]></category>
		<category><![CDATA[father]]></category>
		<category><![CDATA[fatherhood]]></category>
		<category><![CDATA[freyja]]></category>
		<category><![CDATA[hospital]]></category>
		<category><![CDATA[midwife]]></category>
		<category><![CDATA[newborn]]></category>
		<category><![CDATA[nhs]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1392</guid>
		<description><![CDATA[This is our newborn daughter Freyja Éowyn, who at the time of writing is nearing just 10 hours old. She weighed in at 8lbs 8oz, and is just adorable. Hannah laboured for a little over 13 hours, and did exceptionally well. We have both been awake for approximately 36 hours now, and are both exhausted. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1393" title="p4110008" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/04/p4110008-300x225.jpg" alt="p4110008" width="300" height="225" />This is our newborn daughter Freyja Éowyn, who at the time of writing is nearing just 10 hours old. She weighed in at 8lbs 8oz, and is just adorable. Hannah laboured for a little over 13 hours, and did exceptionally well. We have both been awake for approximately 36 hours now, and are both exhausted.</p>
<p>Unfortunately due to a large amount of blood loss (from Hannah, not the baby!), Hannah and Freyja have been kept in overnight, which means I am home alone tonight with my thoughts and experiences on this truly lifechanging thing.</p>
<p>I will certainly never forget the first time I saw Freyja&#8217;s hair appearing, or when the head was born, or the cutting of the umbilical cord. I&#8217;m not exactly squeemish so I got stuck right in with everything I could, but of course mainly supporting Hannah the best I could.</p>
<p>I also would like to send a rather large hat tip to our absolutely fantastic midwife, and the rest of the staff in the labour suite. She did an astounding job at calming Hannah, keeping myself and Hannah up to date with the happenings, and surprisingly &#8211; for an NHS hospital &#8211; attentiveness was excellent, and for most of the time we felt like we had her [the midwife] to ourselves! Unfortunately we didn&#8217;t get the planned water birth at Blakes in Gosport, but all that matters is that both Hannah and our gorgeous daughter are OK, and for that I am truly thankful.</p>
<p>Well, I have sheets to change so I must get on &#8211; I am so tired and can hardly function, and I have to be up early tomorrow to visit Hannah at the hospital. So, until next time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/04/11/introducing/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>CIFS Not Unmounting On Shutdown?</title>
		<link>http://www.asgrim.com/2009/04/10/cifs-not-unmounting-on-shutdown/</link>
		<comments>http://www.asgrim.com/2009/04/10/cifs-not-unmounting-on-shutdown/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 09:03:28 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[hanging]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[timeout]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1390</guid>
		<description><![CDATA[On Ubuntu 8.10 (Intrepid Ibex) I always get an error something like this when I shut down: CIFS VFS: server not responding CIFS VFS: no response for cmd 50 mid 0 This started happening when I added a CIFS mount to our NAS box at home in /etc/fstab. Basically what is happening is that the [...]]]></description>
			<content:encoded><![CDATA[<p>On Ubuntu 8.10 (Intrepid Ibex) I always get an error something like this when I shut down:</p>
<p><code>CIFS VFS: server not responding<br />
CIFS VFS: no response for cmd 50 mid 0</code></p>
<p>This started happening when I added a CIFS mount to our NAS box at home in /etc/fstab. Basically what is happening is that the wireless network interfaces (set up by NetworkManager in Gnome) are being shut down prior to the CIFS mount being unmounted, which causes a timeout trying to unmount&#8230; because there&#8217;s no network connection.</p>
<p>Turns out this is a very well-known issue, but won&#8217;t be fixed for Jaunty Jackalope (the next Ubuntu version). <a href="https://bugs.launchpad.net/ubuntu/+source/samba/+bug/211631">Read more here</a>.</p>
<p>There are some <a href="https://bugs.launchpad.net/ubuntu/+source/samba/+bug/211631/comments/100">proposed workarounds</a>, some of which aren&#8217;t suitable in all cases (hence why the Ubuntu team haven&#8217;t got a fix for it yet):</p>
<ol>
<li>Do not use system-wide CIFS mounts but use Gnome VFS pseudomounts like typing smb://foo/bar in nautilus</li>
<li>Define your network in /etc/network/interfaces rather than in NetworkManager</li>
<li>Hacking the shutdown sequence to make it unmount network filesystems earlier (for example moving S31umountnfs.sh to S14umountnfs.sh in /etc/rc[06].d) : will fix it if you aren&#8217;t executing anything on those network filesystems</li>
</ol>
<p>Method 2 and 3 require a little technical knowledge, and method 1 (pseudomounts) aren&#8217;t really suitable as they&#8217;re not permanent. Another solution not listed here is to add a kill script to the shutdown sequence that runs pretty much immediately to unmount the directory you want unmounted. Again though, that requires a little Linux knowledge.</p>
<p>So for those of you who aren&#8217;t Linux savvy, unfortunately there isn&#8217;t a simple solution out there yet. I haven&#8217;t got around to fixing it on my own laptop yet, but when I do, I&#8217;ll probably post a quick tutorial!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/04/10/cifs-not-unmounting-on-shutdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linking CSS on Zend Framework, the XHTML Valid way</title>
		<link>http://www.asgrim.com/2009/04/10/linking-css-on-zend-framework-the-xhtml-valid-way/</link>
		<comments>http://www.asgrim.com/2009/04/10/linking-css-on-zend-framework-the-xhtml-valid-way/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 07:44:28 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[valid]]></category>
		<category><![CDATA[view]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1384</guid>
		<description><![CDATA[I&#8217;ve been getting to know Zend Framework, and despite it being awesome so far, there&#8217;s a few quirks I just don&#8217;t understand&#8230; maybe I missed something&#8230; Anyway, David Cooper posted a quick howto on adding CSS to a Zend Framework page, which works and is all well and good, but there was a problem. The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been getting to know <a href="http://framework.zend.com/">Zend Framework</a>, and despite it being awesome so far, there&#8217;s a few quirks I just don&#8217;t understand&#8230; maybe I missed something&#8230;</p>
<p>Anyway, David Cooper posted a quick howto on <a href="http://www.dazecoop.co.uk/22-10-2008/linking-css-stylesheet-on-zend-framework-specific-pages">adding CSS to a Zend Framework page</a>, which works and is all well and good, but there was a problem. The code that Zend Framework spits out was not XHTML valid. As I said, I might&#8217;ve missed something out, and this might be a really convoluted way of doing things, but give me a break, I&#8217;m just learning it!</p>
<p>Firstly, in your controller&#8217;s action (e.g. IndexController::indexAction), add a list of CSS files:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$css_files</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'index.css'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'test.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFrontController</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setParam</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'css'</span><span style="color: #339933;">,</span><span style="color: #000088;">$css_files</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Modify the list of CSS files to suit your needs. Note that the $css_files <em>must</em> be an array, otherwise the helper class will ignore it. Now add a new PHP file in application/views/helpers called &#8216;CssInclude.php&#8217;, and put this in it:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Zend_View_Helper_CssInclude
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">function</span> cssInclude<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$fc</span> <span style="color: #339933;">=</span> Zend_Controller_Front<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$baseUrl</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$fc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBaseUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$css_files</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$fc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getParam</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$css_files</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$css_files</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$css_file</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen&quot; href=&quot;'</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$baseUrl</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/css/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$css_file</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This is a helper class that takes the parameter you set in the controller, and simply churns out an XHTML valid &lt;link&gt; tag. There&#8217;s just one more step, add this in your layout or view:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cssInclude</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>And voila! If there&#8217;s a better way of doing this, then I&#8217;d like to know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/04/10/linking-css-on-zend-framework-the-xhtml-valid-way/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing Zend Framework on Ubuntu 8.10 (Intrepid Ibex) using SVN</title>
		<link>http://www.asgrim.com/2009/04/07/installing-zend-framework-on-ubuntu-810-intrepid-ibex-using-svn/</link>
		<comments>http://www.asgrim.com/2009/04/07/installing-zend-framework-on-ubuntu-810-intrepid-ibex-using-svn/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 19:49:36 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Ibex]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[Intrepid]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1379</guid>
		<description><![CDATA[UPDATE!! For the new Zend Framework 1.8.x series, please refer to this article. This is still here for historical purposes. This is a pretty simple howto, but here it is anyway! I assume already that you&#8217;ve got a LAMP stack working, and if you don&#8217;t, it&#8217;s easy as pie to install one in Ubuntu: sudo [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE!!</strong></p>
<p><strong>For the new Zend Framework 1.8.x series, please <a href="http://www.asgrim.com/2009/05/20/installing-zend-framework-18x-on-ubuntu-904-jaunty-jackalope-using-svn/">refer to this article</a>. This is still here for historical purposes.<br />
</strong></p>
<p>This is a pretty simple howto, but here it is anyway!</p>
<p>I assume already that you&#8217;ve got a LAMP stack working, and if you don&#8217;t, it&#8217;s easy as pie to install one in Ubuntu:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> tasksel <span style="color: #c20cb9; font-weight: bold;">install</span> lamp-server</pre></div></div>

<p>So now you&#8217;ve got your LAMP stack up and running, lets download the latest SVN tag of Zend Framework. At the time of writing, the latest stable is 1.7.8, which I&#8217;ll use here. If you want to check for the latest version, visit <a href="http://framework.zend.com/svn/framework/standard/tags/">http://framework.zend.com/svn/framework/standard/tags/</a> in your browser, and the last folder is the one you want. If you want stable full releases, ignore the RC/PR versions. So, once you&#8217;ve determined the version you want, we&#8217;ll check out the release:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ZendFramework
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>framework.zend.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>framework<span style="color: #000000; font-weight: bold;">/</span>standard<span style="color: #000000; font-weight: bold;">/</span>tags<span style="color: #000000; font-weight: bold;">/</span>release-1.7.8<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>It is likely you&#8217;ll need to use sudo for these commands as /usr/share/php5 is owned by root by default. You&#8217;ll see a big long list of files being checked out, and once that&#8217;s done you&#8217;ll have a new folder appropriately named &#8220;release-1.7.8&#8243;. Create a soft link called &#8220;current&#8221; to the release folder so you can change the default included Zend Framework version without restarting Apache in the future:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> release-1.7.8 current</pre></div></div>

<p>You can stop there if you like, and manually add the include path into your PHP scripts using set_include_path. However, if you would like the current Zend Framework included automatically, then continue by opening /etc/php5/apache2/php.ini in your favourite editor. Add the path to your include_path list. For example, if your current include_path is (and this is the default):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">include_path = <span style="color: #ff0000;">&quot;.:/usr/share/php5:/usr/share/pear&quot;</span></pre></div></div>

<p>Then change it to:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">include_path = <span style="color: #ff0000;">&quot;.:/usr/share/php5:/usr/share/pear:/usr/share/php5/ZendFramework/current/library&quot;</span></pre></div></div>

<p>All you need to do now is restart Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>In the future, if you wish to change to a new default Zend Framework version (for example 1.8.0), then just check out the SVN directory and change the soft link. You won&#8217;t even have to restart Apache, and the changes will take effect immediately! For example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>framework.zend.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>framework<span style="color: #000000; font-weight: bold;">/</span>standard<span style="color: #000000; font-weight: bold;">/</span>tags<span style="color: #000000; font-weight: bold;">/</span>release-1.8.0<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> current
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> release-1.8.0 current</pre></div></div>

<p>If you want to keep up to date with the latest Zend software, then just <a href="http://devzone.zend.com/tag/Zend_Framework_Management/format/rss2.0">subscribe to their RSS feed</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/04/07/installing-zend-framework-on-ubuntu-810-intrepid-ibex-using-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fallout 3: Awesome</title>
		<link>http://www.asgrim.com/2009/03/30/fallout-3-awesome/</link>
		<comments>http://www.asgrim.com/2009/03/30/fallout-3-awesome/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 22:16:38 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[amiga]]></category>
		<category><![CDATA[bethesda]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[fallout]]></category>
		<category><![CDATA[fallout 3]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[puzzles]]></category>
		<category><![CDATA[rpg]]></category>
		<category><![CDATA[strategy]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[xbox]]></category>
		<category><![CDATA[Xbox 360]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1372</guid>
		<description><![CDATA[OK, so the game has been out what, 5 months now? What can I say, I&#8217;m a busy man. Can I just say how outstanding I think this game is? I was glued to my 360 for the entire weekend playing it as for once I decided to nothing at all. The graphics are perfect, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1373" title="fallout-3" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/03/fallout-3-242x300.jpg" alt="fallout-3" width="242" height="300" />OK, so the game has been out what, 5 months now? What can I say, I&#8217;m a busy man.</p>
<p>Can I just say how outstanding I think this game is? I was glued to my 360 for the entire weekend playing it as for once I decided to nothing at all. The graphics are perfect, the storyline is awesome, and the sheer amount of detail is unimaginable!</p>
<p>Like other Bethesda games, it&#8217;s hugely overwhelming the amount of stuff one can do, and I highly recommend the strategy guide, especially for setting up your character at the moment. It tells you things you wouldn&#8217;t think of, like the fact Lockpick is probably <em>the</em> most important skill in the entire game if you want any decent rewards (much to my annoyance, I didn&#8217;t read this prior to creating my character). The quest guides are pretty much walkthroughs, so if you prefer to play, just use the strategy guide as reference, although there are some good hints and tips (such as there&#8217;s only one way to get Three Dog&#8217;s cache).</p>
<p>Anyway, back to the game instead of the strategy guide&#8230; As I mentioned earlier, the storyline for this is just awesome, but I think the reason for that is because the story is so flexible and you can make it as dynamic as you want. For most of the part (excluding quests like Tranquillity Lane etc.) you&#8217;re given the freedom to do what you want, when you want. For a casual gamer such as myself, that is an enormous tick in the &#8220;pro&#8217;s&#8221; column.</p>
<p>The thing I love the most about this game is how engaged you can or can&#8217;t get. It&#8217;s good to play for 15 minutes; you can mess around blowing stuff up and hiring prostitutes, or you can play it for hours and get really involved, and often very sidetracked from what you were doing originally. Add to this the most important value in video games (that I haven&#8217;t seen pulled off effectively since the days of Elite and Monkey Island): awesome logic and literal puzzles. From the downright obvious (Prime&#8217;s Puzzle for example) to hacking those terminals if you don&#8217;t have the password, which require a little thought.</p>
<p>Fallout 3 really has done it for me, and I&#8217;m loving it. Not since the days of my Amiga 500 have I felt this engaged in a video game. Yeah, you can have COD4 and all your shooty crap where the objective is clear (point gun and shoot) and the storyline is weak at best, and by no means can you not just point and shoot in Fallout 3&#8230; but this game gives you the tools to go so much further than that and really get into it.</p>
<p>Hell I&#8217;m not even a big fan of futuristic sci-fi, I prefer a good fantasy theme any day, but this post-nuclear 50&#8242;s theme demonstrating total armageddon upon Washington D.C. and surrounding area is just irresistible to even the casual RPG fan when presented to you in such eye-candy graphics. As you might realise by now, I really love this game, and if you&#8217;re a fan of RPGs I highly recommend you pick yourself up a copy of this if you haven&#8217;t already &#8211; and even if you&#8217;re not a fan, play it round a mates and you might just like it and get yourself one.</p>
<p>And honest &#8216;guv, I&#8217;m not sponsored by Bethesda!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/30/fallout-3-awesome/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hannah: A Trooper</title>
		<link>http://www.asgrim.com/2009/03/24/hannah-a-trooper/</link>
		<comments>http://www.asgrim.com/2009/03/24/hannah-a-trooper/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 09:50:07 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ada]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[hannah]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[lovelace]]></category>
		<category><![CDATA[netbasic]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[woman]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1369</guid>
		<description><![CDATA[Many people across the world have made this pledge: I will publish a blog post on Tuesday 24th March about a woman in technology whom I admire but only if 1,000 other people will do the same. Here is mine, and although I didn&#8217;t have to think very hard about who to post about, I [...]]]></description>
			<content:encoded><![CDATA[<p>Many people across the world have made <a href="http://www.pledgebank.com/AdaLovelaceDay">this pledge</a>:</p>
<blockquote><p>I will <strong>publish a blog post on Tuesday 24th March about a woman in technology whom I admire</strong> but only if <strong>1,000</strong> other people will do the same.</p></blockquote>
<p>Here is mine, and although I didn&#8217;t have to think very hard about who to post about, I still admire her more than anyone in the world.</p>
<p>Hannah is 39 weeks and 1 day pregnant today, and she&#8217;s still working hard at <a href="http://www.netbasic.co.uk/site/team/james.phtml">Netbasic</a>. She&#8217;s not exactly a pro programmer, but she&#8217;s learning so quickly. From knowing nothing at all about HTML or CSS or Photoshop, she&#8217;s come forwards in leaps and bounds with the help of everyone here. It&#8217;s certainly not easy for her, she gets aches and pains all day, Braxton Hicks contractions, extremely painful kicks, and all sorts. She&#8217;s under the weather, tired and very drained, yet somehow she is carrying on, she&#8217;s still working hard and creating pages that are helping keep the company going!</p>
<p>I suppose this is just my way of saying how proud I am of her, and how awesome she is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/24/hannah-a-trooper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fact: Playstations Kill You Early</title>
		<link>http://www.asgrim.com/2009/03/19/fact-playstations-kill-you-early/</link>
		<comments>http://www.asgrim.com/2009/03/19/fact-playstations-kill-you-early/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 19:14:29 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[advert]]></category>
		<category><![CDATA[advertisement]]></category>
		<category><![CDATA[death]]></category>
		<category><![CDATA[early]]></category>
		<category><![CDATA[fitness]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[premature]]></category>
		<category><![CDATA[PS2]]></category>
		<category><![CDATA[PS3]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1360</guid>
		<description><![CDATA[Nothing personal against PS3 lovers, but it has been recently revealed that Playstations cause premature death&#8230; Disclaimer: Read the linked page and you&#8217;ll see it&#8217;s actually a completely different story. It could&#8217;ve been any console controller there&#8230; except for Wii&#8217;s, because clearly you won&#8217;t die fat using one of them&#8230; I actually agree with the [...]]]></description>
			<content:encoded><![CDATA[<p>Nothing personal against PS3 lovers, but it has been <a href="http://www.reghardware.co.uk/2009/03/19/asa_gaming_advert/">recently revealed</a> that Playstations cause premature death&#8230;</p>
<p><img class="aligncenter size-full wp-image-1361" title="gaming_lifestyle_advert" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/03/gaming_lifestyle_advert.jpg" alt="gaming_lifestyle_advert" width="317" height="400" /></p>
<p><strong>Disclaimer:</strong> Read the linked page and you&#8217;ll see it&#8217;s actually a completely different story. It could&#8217;ve been any console controller there&#8230; except for Wii&#8217;s, because clearly you won&#8217;t die fat using one of them&#8230;</p>
<p>I actually agree with the ASA in this instance, I think the advert is suitably fitting. It doesn&#8217;t mean you&#8217;ll die playing computer games, it&#8217;s more of a generalisation that sitting on your bum all day watching TV and generally not being active could lead to obesity or health problems.</p>
<p>The message I get from that advert is that my 15/20 minute walks are good, and if anything I should be getting more active!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/19/fact-playstations-kill-you-early/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Toothy Woes, Argh!</title>
		<link>http://www.asgrim.com/2009/03/14/toothy-woes-argh/</link>
		<comments>http://www.asgrim.com/2009/03/14/toothy-woes-argh/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 22:25:30 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[cost]]></category>
		<category><![CDATA[dentist]]></category>
		<category><![CDATA[insurance]]></category>
		<category><![CDATA[nhs]]></category>
		<category><![CDATA[pain]]></category>
		<category><![CDATA[price]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[teeth]]></category>
		<category><![CDATA[tooth]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1357</guid>
		<description><![CDATA[I discovered today that I have a big split in my upper right wisdom tooth. When we moved to Whiteley, we looked at dentists in the area, and most of them were private. We nearly registered, but then we didn&#8217;t because it was too expensive. Now I pretty much have to go &#8211; if the [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered today that I have a big split in my upper right wisdom tooth. When we moved to Whiteley, we looked at dentists in the area, and most of them were private. We nearly registered, but then we didn&#8217;t because it was too expensive. Now I pretty much have to go &#8211; if the tooth splits much more I&#8217;m going to be in agony.</p>
<p>I&#8217;ll have to go further afield to find a dentist, and it still isn&#8217;t going to be free. Last time I had a tooth pulled it cost about £100 on the NHS. That&#8217;s not a pretty sum. I also had a quick Google and found <a href="http://www.dailyexpress.co.uk/posts/view/36111">this Daily Express article</a>. Clearly, NHS dentistry in the UK is abysmal. Why can&#8217;t it be free like medical services? I pay income tax and National Insurance &#8211; so what makes teeth so special? No wonder most people allow their teeth to rot away &#8211; they&#8217;d rather have that then pay the stupid NHS prices.</p>
<p>Perhaps we should start getting dental insurance&#8230;?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/14/toothy-woes-argh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Impatience Increasing&#8230;</title>
		<link>http://www.asgrim.com/2009/03/13/impatience-increasing/</link>
		<comments>http://www.asgrim.com/2009/03/13/impatience-increasing/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 16:49:36 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[babies]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[contractions]]></category>
		<category><![CDATA[impatient]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[waiting]]></category>
		<category><![CDATA[when]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1355</guid>
		<description><![CDATA[It&#8217;s been just 10 days since I last posted about the pregnancy, and we&#8217;re both already getting increasingly impatient I think. Every pained expression I see on Hannah&#8217;s face makes me think &#8220;is that a real contraction?&#8221; until she assures me it&#8217;s not. We&#8217;re still over 2 weeks before the estimated due date and we&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been just 10 days since I last posted about the pregnancy, and we&#8217;re both already getting increasingly impatient I think. Every pained expression I see on Hannah&#8217;s face makes me think &#8220;is that a real contraction?&#8221; until she assures me it&#8217;s not. We&#8217;re still over 2 weeks before the estimated due date and we&#8217;re starting to get impatient!</p>
<p>Pregnancy would be so much easier if we knew exactly when baby was coming&#8230; we still wait!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/13/impatience-increasing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More Good Causes!</title>
		<link>http://www.asgrim.com/2009/03/12/more-good-causes/</link>
		<comments>http://www.asgrim.com/2009/03/12/more-good-causes/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 11:19:26 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[donate]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[house]]></category>
		<category><![CDATA[jacks]]></category>
		<category><![CDATA[naomi]]></category>
		<category><![CDATA[place]]></category>
		<category><![CDATA[sponsor]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1352</guid>
		<description><![CDATA[Help Secure Jacks Place @ Naomi House Once again Sii is running everywhere in an effort to make himself fit enough for another sponsered marathon. This time, he&#8217;s trying to raise money for jacksplace@naomihouse. Naomi House provide respite care, terminal care and bereavement support for children, young people and their families. Netbasic organised a trip [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1353" title="naomihouse" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/03/naomihouse.jpg" alt="naomihouse" width="150" height="145" /></p>
<p><a href="http://www.justgiving.com/siicockerill"><strong>Help Secure Jacks Place @ Naomi House</strong></a></p>
<p>Once again <a href="http://www.sjcdesign.com/journal/tag/jacks-place/">Sii is running everywhere</a> in an effort to make himself fit enough for another sponsered marathon.</p>
<p>This time, he&#8217;s trying to raise money for <a href="http://www.naomihouse.org.uk/who/jacksplace/index.aspx">jacksplace@naomihouse</a>. <a href="http://www.naomihouse.org.uk/">Naomi House</a> provide respite care, terminal care and bereavement support for children, young people and their families. <a href="http://www.netbasic.co.uk/site/team/james.phtml">Netbasic</a> organised a trip last year to visit the hospice, and it&#8217;s really good to see what a fantastic job they are doing there.</p>
<p>Jack&#8217;s Place is a multi-million pound project to create an entire new building to provide support for young people. Because of the financial crisis,  Naomi house, like many charities, are currently going through a really hard time &#8211; they have a huge amount of funds at risk in the bank &#8211; and are campaigning to secure the funds that the hospice rely on to keep giving support for children with life-limiting and terminal illnesses.</p>
<p><a href="http://www.bbc.co.uk/radio4/">Radio 4</a> will be airing a programme called Seven Days tonight at 8pm, which I hope will raise awareness for Naomi House&#8217;s campaign.</p>
<p>In the mean time you can help <em>right now</em> by sponsoring Sii&#8217;s run &#8211; it&#8217;s for a really good cause and your donation really will be appreciated, and will go towards buying a door that will allow the young people to go where they please, see their friends, or pop out in the garden for some fresh air &#8211; just like you and I can whenever we want.</p>
<p><a href="http://www.justgiving.com/siicockerill"><strong>Help Secure Jacks Place @ Naomi House</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/12/more-good-causes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No New Laptop For Me&#8230; For Now</title>
		<link>http://www.asgrim.com/2009/03/05/no-new-laptop-for-me-for-now/</link>
		<comments>http://www.asgrim.com/2009/03/05/no-new-laptop-for-me-for-now/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 12:52:10 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[consumer]]></category>
		<category><![CDATA[credit]]></category>
		<category><![CDATA[crisis]]></category>
		<category><![CDATA[crunch]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[lending]]></category>
		<category><![CDATA[market]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[new]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1347</guid>
		<description><![CDATA[Reading this article from The Register got me thinking about my recent laptop purchasing failure. Hannah and I tried to buy a very nice Sony Vaio laptop with bells and whistles, but both of us got refused the credit to buy the laptop. The current financial &#8220;credit crunch&#8221; is such that your everyday bloke can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Reading <a href="http://www.channelregister.co.uk/2009/03/05/intel_update/">this article</a> from <a href="http://www.theregister.co.uk/">The Register</a> got me thinking about my recent laptop purchasing failure. Hannah and I tried to buy a very nice Sony Vaio laptop with bells and whistles, but both of us got refused the credit to buy the laptop. The current financial &#8220;credit crunch&#8221; is such that your everyday bloke can&#8217;t afford to simply spend £1,500 upwards on a nice shiny new laptop. There&#8217;s the other end of the rope where the retailers (or rather, the lenders who lend to the consumer so the retailer can sell their products) aren&#8217;t willing to give credit to consumers. It&#8217;s not a new situation, and anyone even remotely keeping up to date with news will know this.</p>
<p>It fustrates me though when people (even an established name like Intel) are trying to lower the cost of laptops (or in this case Ultra Low Voltage technology) such as the Macbook Air when, even at reduced prices, most consumers still can&#8217;t afford them, and lenders still can&#8217;t afford to give out credit. All they&#8217;re doing is reducing the value of these laptops and (although ULV tech is a bit expensive even for the current climate) making them almost a &#8220;cheap&#8221; alternative to a decent laptop. Essentially, the market won&#8217;t be stimulated until people have money again. How that happens isn&#8217;t really my area of expertise.</p>
<p>In my personal situation, I can afford repayments on a laptop but no-one will give me credit in these &#8220;exciting&#8221; <a href="http://news.bbc.co.uk/1/hi/business/7925620.stm">0.5% base rate</a> times. That means I won&#8217;t be getting a new laptop any time soon.</p>
<p>Now is the time I really wish I was one of those fat cat execs with <a href="http://www.theregister.co.uk/2009/03/03/google_bonuses/">$1.2 million bonuses after 5 months of work</a>. I want a new laptop, damnit!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/05/no-new-laptop-for-me-for-now/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Nearly At Term!</title>
		<link>http://www.asgrim.com/2009/03/03/nearly-at-term/</link>
		<comments>http://www.asgrim.com/2009/03/03/nearly-at-term/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 20:17:52 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[antenatal]]></category>
		<category><![CDATA[babies]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[bump]]></category>
		<category><![CDATA[nursery]]></category>
		<category><![CDATA[term]]></category>
		<category><![CDATA[weeks]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1344</guid>
		<description><![CDATA[I can hardly believe it! Today, Hannah is 36 weeks and 1 day through her pregnancy, and comparing to this, it&#8217;s amazing how much she&#8217;s grown! We&#8217;re all prepared, we&#8217;ve got all the baby gubbinz sat in the nursery, and the labour bag is packed. Just 6 more days and we&#8217;ll be full term, which [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1345" title="p3030003-copy" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/03/p3030003-copy-300x208.jpg" alt="p3030003-copy" width="300" height="208" />I can hardly believe it! Today, Hannah is 36 weeks and 1 day through her pregnancy, and <a href="http://www.asgrim.com/2009/02/01/another-week-passes/">comparing to this</a>, it&#8217;s amazing how much she&#8217;s grown! We&#8217;re all prepared, we&#8217;ve got all the baby gubbinz sat in the nursery, and the labour bag is packed.</p>
<p>Just 6 more days and we&#8217;ll be full term, which basically means I will become Daddy James very soon. We are both going to her antenatal appointment (nice and early, 8:45am) tomorrow morning, and Sunday we&#8217;ll be checking out Blakes Birthing Centre in Gosport, hopefully where the birth will take place.</p>
<p>So&#8230; it is just a matter of time&#8230; more news as it comes!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/03/03/nearly-at-term/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Well Thats New&#8230;</title>
		<link>http://www.asgrim.com/2009/02/26/well-thats-new/</link>
		<comments>http://www.asgrim.com/2009/02/26/well-thats-new/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 15:06:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1337</guid>
		<description><![CDATA[It&#8217;s been a while since I played Diablo 2, but I dug it out this morning so I could play it at lunchtimes in the long wait for Diablo 3. A new patch was released since I last played (and that could&#8217;ve been ages ago), the 1.12a patch. I noticed this in the patch readme: [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-1338" title="diablo2" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/02/diablo2-300x176.jpg" alt="diablo2" width="210" height="123" />It&#8217;s been a while since I played <a href="http://www.blizzard.com/diablo2exp/">Diablo 2</a>, but I dug it out this morning so I could play it at lunchtimes in the long wait for <a href="http://www.diablo3.com/">Diablo 3</a>. A new patch was released since I last played (and that could&#8217;ve been ages ago), <a href="http://eu.blizzard.com/support/article.xml?articleId=22604">the 1.12a patch</a>. I noticed this in the patch readme:</p>
<blockquote><p>If all required Diablo 2 &#8216;.MPQ&#8217; files are installed on the hard drive, the game will no longer require the CD to play.</p>
<p>For users that originally performed a &#8216;Full Installation&#8217; and wish to run without the CD, all &#8216;.MPQ&#8217; files should be copied from the Diablo 2 CDs to the Diablo 2 directory. Most users will only need to copy D2Music.mpq from the Diablo 2 Play CD and/or D2xMusic.mpq from the Lord of Destruction CD. Mac users will need to copy these music files and rename them to &#8216;Diablo II Music&#8217; and &#8216;Diablo II Expansion Music&#8217; respectively.</p>
<p>Anyone who did not perform a &#8216;Full Installation&#8217; will need to re-install from CD again to ultimately play without the CD. In this case, a &#8216;Full Installation&#8217; is required, followed by file copy step noted above.</p></blockquote>
<p>Which basically means, the need for a No-CD crack is no longer required for playing Diablo 2, wahey! I suppose the reason for that is beacuse they&#8217;ve made Diablo 2 and <a href="http://www.blizzard.com/starcraft/">Starcraft</a> available on their <a href="http://www.blizzard.com/store/">Blizzard Store</a> for download to play, meaning that some users simply don&#8217;t have a CD to use. I never used a No-CD crack myself as I had my own copy of the game (I say this with sincerity!), but I know a fair few people who did &#8211; probably due to Diablo 2 being one of the <a href="http://www.youtube.com/watch?v=26Fwya8xTlA"><em>best</em></a> games ever.</p>
<p>I really hope Diablo 3 lives up to my extremely high expectations, and is worth the wait. In the mean time, I shall have to settle for <a href="http://eu.blizzard.com/store/details.xml?id=221003233">a cool shirt</a>*.</p>
<p><small>* Anyone notice that Blizzard&#8217;s site is entirely XSLT? How cool is that! I might learn me some of that&#8230;</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/26/well-thats-new/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yet Another Fill-it-in Thing</title>
		<link>http://www.asgrim.com/2009/02/25/yet-another-fill-it-in-thing/</link>
		<comments>http://www.asgrim.com/2009/02/25/yet-another-fill-it-in-thing/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 11:19:04 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[meme]]></category>
		<category><![CDATA[questions]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1335</guid>
		<description><![CDATA[It seems to be the craze recently, I get loads of these on Facebook. I enjoy being on the bandwagon, so here&#8217;s another one&#8230; WERE YOU NAMED AFTER ANYONE? King James and King Edward. WHEN WAS THE LAST TIME YOU CRIED? Last time I had a few too many drinks I expect DO YOU LIKE [...]]]></description>
			<content:encoded><![CDATA[<p>It seems to be the craze recently, I get loads of these on Facebook. I enjoy being on the bandwagon, so here&#8217;s another one&#8230;</p>
<ol>
<li>WERE YOU NAMED AFTER ANYONE? King James and King Edward.</li>
<li> WHEN WAS THE LAST TIME YOU CRIED? Last time I had a few too many drinks I expect</li>
<li> DO YOU LIKE YOUR HANDWRITING? Depends how neatly I decide to write, but I prefer to type</li>
<li> WHAT IS YOUR FAVORITE LUNCH MEAT? Salami or Antipasto</li>
<li> DO YOU HAVE KIDS? Nearly! Due 30th March.</li>
<li> IF YOU WERE ANOTHER PERSON, WOULD YOU BE FRIENDS WITH YOU? Yeah, I&#8217;m loveable and awesome&#8230;</li>
<li> DO YOU USE SARCASM? Yes, I love it</li>
<li> DO YOU STILL HAVE YOUR TONSILS? Yes</li>
<li> WOULD YOU BUNGEE JUMP? Probably, yes</li>
<li> WHAT IS YOUR FAVORITE CEREAL? Strawberry crisp stuff, but it&#8217;s so expensive</li>
<li> DO YOU UNTIE YOUR SHOES WHEN YOU TAKE THEM OFF? No</li>
<li> WHAT IS YOUR FAVORITE ICE CREAM? Phish Food</li>
<li> WHAT IS THE FIRST THING YOU NOTICE ABOUT PEOPLE? Their face</li>
<li> RED OR PINK? Black &#8211; blacker than the blackest black times infinity.</li>
<li> WHAT IS YOUR LEAST FAVORITE THING ABOUT YOURSELF? I can be very stubborn and react before thinking</li>
<li> WHO DO YOU MISS THE MOST? Hannah, Family and the Frosthold guys</li>
<li> DO YOU WANT EVERYONE TO COMPLETE THIS LIST? I don&#8217;t tag people. If they want to fill it out, they will.</li>
<li> WHAT COLOR PANTS AND SHOES ARE YOU WEARING? Black &amp; Blue</li>
<li> WHAT GOALS DO YOU HAVE FOR 2009? Bring up our baby as best I can, and generally enjoy life.</li>
<li> WHAT ARE YOU LISTENING TO RIGHT NOW? Burzum &#8211; Hliðskjálf&#8230; it&#8217;s a good atmospheric album, I like it.</li>
<li>IF YOU WERE A CRAYON, WHAT COLOR WOULD YOU BE? I dunno.. red or something.</li>
<li> FAVORITE SMELLS? Fresh bedsheets, pesto or most things being cooked.</li>
<li> WHO WAS THE LAST PERSON YOU TALKED TO ON THE PHONE? The service department at Peugeot Hamble to tell me the car has passed it&#8217;s MOT and is ready to be picked up.</li>
<li> FAVORITE SPORTS TO WATCH? Anything involving people dying&#8230;</li>
<li> HAIR COLOR? Brown</li>
<li> EYE COLOR? Brown</li>
<li> DO YOU WEAR CONTACTS? Yes, every day, dailies.</li>
<li> FAVORITE FOOD? Pesto dishes, and creamy dishes like home-made Chicken &amp; Mushroom Pie or my Philly pasta, or pork loins, done most ways, preferably with some home-made crackling. Yum!</li>
<li> SCARY MOVIES OR HAPPY ENDINGS? Scary movies WITH happy endings, otherwise I have to watch a happy film after otherwise I get scared.</li>
<li> LAST MOVIE YOU WATCHED? The first half of The Sum of All Fears on Film4 last night before I got tired, had a shower and went to snuggle with Hannah.</li>
<li> WHAT COLOR SHIRT ARE YOU WEARING? <a href="http://www.frosthold.com/">Frosthold</a> shirt!</li>
<li> SUMMER OR WINTER? Summer, except when there&#8217;s snow!</li>
<li> HUGS OR KISSES? Both</li>
<li>MOST LIKELY TO RESPOND? I don&#8217;t tag people.</li>
<li> LEAST LIKELY TO RESPOND? I don&#8217;t tag people.</li>
<li> WHAT BOOK ARE YOU READING NOW? <a href="http://www.amazon.co.uk/gp/product/0973862149?ie=UTF8&amp;tag=mypre-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0973862149">Php|architect’s Zend PHP 5 Certification Study Guide</a><img style="border: medium none ! important; margin: 0px ! important;" src="http://www.assoc-amazon.co.uk/e/ir?t=mypre-21&amp;l=as2&amp;o=2&amp;a=0973862149" border="0" alt="" width="1" height="1" /></li>
<li> WHAT IS ON YOUR MOUSE PAD? Mouse pads are GAY</li>
<li> WHAT DID YOU WATCH ON TV LAST NIGHT? The Sum Of All Fears</li>
<li> FAVORITE SOUND(S)? Metal and Hannah</li>
<li> ROLLING STONES OR BEATLES? Neither &#8211; I&#8217;m just not a fan of either, sorry.</li>
<li> WHAT IS THE FARTHEST YOU HAVE BEEN FROM HOME? California or Whistler or Egypt &#8211; not sure which is furthest.</li>
<li> DO YOU HAVE A SPECIAL TALENT? I&#8217;m a loyal friend &#8211; something that lacks in many people these days.</li>
<li> WHERE WERE U BORN? Fareham &#8211; Blackbrook Birthing Centre to be precise, which <a href="http://news.bbc.co.uk/1/hi/england/hampshire/4427938.stm">is now shut</a>.</li>
<li> WHOSE ANSWERS ARE YOU LOOKING FORWARD TO GETTING BACK? Meh.</li>
<li> HOW DID YOU MEET YOUR SPOUSE/SIGNIFICANT OTHER? Drunk at house party, yay!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/25/yet-another-fill-it-in-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annoyance Rant: Windows Live</title>
		<link>http://www.asgrim.com/2009/02/21/annoyance-rant-windows-live/</link>
		<comments>http://www.asgrim.com/2009/02/21/annoyance-rant-windows-live/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 15:28:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[antitrust]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[lawsuit]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[messenger]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[monopoly]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1330</guid>
		<description><![CDATA[This bears slight resemblance to the already widely publicised anti-trust/monopolising cases against Microsoft for bundling their own software with their OS, without offering the alternatives (read here (Windows Media Player) and here (Internet Explorer)). Admittedly, the competition for browsers and media player software is much higher than instant messaging software, but it&#8217;s slightly related. Many [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1331" title="wlsetup" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/02/wlsetup-300x254.jpg" alt="wlsetup" width="300" height="254" />This bears slight resemblance to the already widely publicised anti-trust/monopolising cases against Microsoft for bundling their own software with their OS, without offering the alternatives (read <a href="http://en.wikipedia.org/wiki/European_Union_Microsoft_antitrust_case">here</a> (Windows Media Player) and <a href="http://news.bbc.co.uk/1/hi/business/7834792.stm">here</a> (Internet Explorer)). Admittedly, the competition for browsers and media player software is much higher than instant messaging software, but it&#8217;s slightly related.</p>
<p>Many Windows users will have already seen this install software, which is now downloaded every time you want to update a program, such as Windows Live Messenger. The program itself isn&#8217;t my concern, rather the automatic ticking of nearly every other Windows Live software on the list. I only wanted to update Windows Live Messenger, yet the program had automatically selected Mail, Photo Gallery, Toolbar, Writer, Family Safety, Office Outlook Add-on and Office Live Add-on for additional installation. That is an extra 128mb &#8211; a paltry amount, by most accounts, yet still an amount I have no need for.</p>
<p>To rub salt into the wound, post installation the default option is to change your search engine as well as fix your homepage. Rumours on the Internet are that if you do not remove the &#8220;Set my homepage&#8221; link, then the program installs an additional program that forces your homepage to stay the same; apparently (although I have not had first hand evidence) to the extent of not letting the user change their homepage for themselves. The idea behind it is to stop spy ware changing the homepage, yet this seems counter-intuitive to not allow users to change their homepage at all&#8230; As I said though, I cannot confirm the legitimacy of this rumour, so it may be speculative.</p>
<p>To summarise, Microsoft shouldn&#8217;t have these additional pieces of software automatically selected for installation &#8211; a less savvy user (family members come to mind&#8230;) might not look at this list and add these unnecessary pieces of software to their system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/21/annoyance-rant-windows-live/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zend Server Released</title>
		<link>http://www.asgrim.com/2009/02/21/zend-server-released/</link>
		<comments>http://www.asgrim.com/2009/02/21/zend-server-released/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 09:59:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[pdt]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[studio]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[wamp]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1326</guid>
		<description><![CDATA[OK, so far all that I&#8217;ve managed to do is install it and have a dabble with the config pages and go &#8220;oooh that looks pretty&#8221;, so this isn&#8217;t a hardcore review or anything. Zend have unveiled their newest product, Zend Server&#8230; which is essentially Zend&#8217;s own W/M/LAMP stack, but with Zend Framework and other [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1327" title="zendserverconfig" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/02/zendserverconfig-300x141.jpg" alt="zendserverconfig" width="300" height="141" />OK, so far all that I&#8217;ve managed to do is install it and have a dabble with the config pages and go &#8220;oooh that looks pretty&#8221;, so this isn&#8217;t a hardcore review or anything.</p>
<p>Zend have unveiled their newest product, Zend Server&#8230; which is essentially Zend&#8217;s own W/M/LAMP stack, but with Zend Framework and other components Zend have written, including the very handy Zend Debugger. What does that mean? Well to me, that means there&#8217;s quite an easy choice for my web development at home &#8211; I just installed it in 10 minutes and now have a fully working WAMP stack I can develop on before pushing to my <a href="http://www.linode.com/?r=939c7865b8818f015533efae7b06cdb06f9b59be">Linode</a> test server. It was 100 times easier than any other WAMP stack I&#8217;ve worked with including XAMPP and the other ones I&#8217;ve tried. It has a very shiny web GUI as well (pictured), that &#8211; as I mentioned before &#8211; I went &#8220;oooh&#8221; at lots. I personally think Zend Server has the potential to be really frickin&#8217; awesome if I get to know it better. From the Public Beta Invitation e-mail, Zend states it includes:</p>
<ul>
<li>Fully supported and certified distribution of PHP 5.2</li>
<li>Fully supported Zend Framework 1.7 release</li>
<li>Integrated native installers (RPM/DEB/MSI)</li>
<li>Web-based administration Interface</li>
<li>Comprehensive out-of-the-box database connectivity</li>
<li>Powerful PHP monitoring capabilities to identify problems and help fix them quickly</li>
<li>URL-based output caching required by today&#8217;s modern web applications</li>
<li>Zend Optimizer+ &#8211; byte code cache to boost application performance</li>
<li>New &#8220;Guard Loader&#8221; to enable processing of Zend Guard encoded files</li>
</ul>
<p>Not bad &#8211; and there&#8217;s a community edition too, which means if you&#8217;re a sole developer like me it&#8217;s affordable.</p>
<p>&lt;rant&gt;Unfortunately, they don&#8217;t do a community edition of Zend Studio for Eclipse&#8230; and although PDT is good, I feel like its the hacky &#8220;well Zend Studio uses PDT at it&#8217;s core&#8221; alternative &#8211; without the cool enhancements that ZS has&#8230; oh well!&lt;/rant&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/21/zend-server-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Impending Brutality!</title>
		<link>http://www.asgrim.com/2009/02/18/impending-brutality/</link>
		<comments>http://www.asgrim.com/2009/02/18/impending-brutality/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 11:07:01 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Frosthold]]></category>
		<category><![CDATA[cannibal]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[corpse]]></category>
		<category><![CDATA[cradle]]></category>
		<category><![CDATA[filth]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[promotion]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1323</guid>
		<description><![CDATA[Today is another big step in Frosthold&#8216;s career. Tonight we&#8217;re playing with one of the most well known death metal bands, Cannibal Corpse. It&#8217;s an exciting time for us; we&#8217;ve released our new album which is finally complete. The intention now of course, is to spread the CD as far and wide as we can. [...]]]></description>
			<content:encoded><![CDATA[<p>Today is another big step in <a href="http://www.frosthold.com/">Frosthold</a>&#8216;s career. Tonight we&#8217;re playing with one of the most well known death metal bands, <a href="http://www.cannibalcorpse.net/">Cannibal Corpse</a>. It&#8217;s an exciting time for us; we&#8217;ve released our new album which is finally complete. The intention now of course, is to spread the CD as far and wide as we can. We&#8217;ve already got a huge list of labels, magazines etc. to send the CD to, and we&#8217;ll start getting them shipped off after the gig.</p>
<p>The show tonight is totally sold out, which makes it our first sold-out show ever, and possibly our largest crowd &#8211; I don&#8217;t know how many people were at our Cradle of Filth gig. Anyway, I&#8217;m playing some suitably brutal music to get myself in the mood including:</p>
<ul>
<li><a href="http://www.myspace.com/theaxisofperdition">The Axis of Perdition</a> &#8211; The Ichneumon Method (And Less Welcome Techniques)</li>
<li>Carcass &#8211; Necroticism: Descanting the Insalubrious</li>
<li>Bolt Thrower &#8211; Those Once Loyal</li>
<li>Bloodbath &#8211; The Fathomless Mastery</li>
<li>Morbid Angel &#8211; Covenant</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/18/impending-brutality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Half Life &#8211; Escape From City 17</title>
		<link>http://www.asgrim.com/2009/02/18/half-life-escape-from-city-17/</link>
		<comments>http://www.asgrim.com/2009/02/18/half-life-escape-from-city-17/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 09:35:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[17]]></category>
		<category><![CDATA[brothers]]></category>
		<category><![CDATA[city]]></category>
		<category><![CDATA[escape]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[half]]></category>
		<category><![CDATA[half life]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[purchase]]></category>
		<category><![CDATA[series]]></category>
		<category><![CDATA[short]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1319</guid>
		<description><![CDATA[This is surprisingly really good, it&#8217;s a short film series based on the Half Life world that some guys called the Purchase Brothers are making.]]></description>
			<content:encoded><![CDATA[<p>This is surprisingly really good, it&#8217;s a short film series based on the Half Life world that some guys called the <a href="http://purchasebrothers.com/">Purchase Brothers</a> are making.</p>
<p><object width="480" height="295" data="http://www.youtube.com/v/q1UPMEmCqZo&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/q1UPMEmCqZo&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/18/half-life-escape-from-city-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On The Way To A Zend PHP5 Certification</title>
		<link>http://www.asgrim.com/2009/02/16/on-the-way-to-a-zend-php5-certification/</link>
		<comments>http://www.asgrim.com/2009/02/16/on-the-way-to-a-zend-php5-certification/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 10:40:24 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Certification]]></category>
		<category><![CDATA[exam]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1315</guid>
		<description><![CDATA[If you follow my Twitter, then you already know that I&#8217;m intending to get a Zend PHP5 Certification. I&#8217;ve started off by ordering the Php&#124;architect&#8217;s Zend PHP 5 Certification Study Guide from Amazon as I read an excerpt from that the other day and found it to be generally quite good. Still waiting for that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1316" title="zendlogo" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/02/zendlogo.gif" alt="zendlogo" width="193" height="67" />If you follow <a href="http://twitter.com/Asgrim">my Twitter</a>, then you already know that I&#8217;m intending to get a Zend PHP5 Certification. I&#8217;ve started off by ordering the <a href="http://www.amazon.co.uk/gp/product/0973862149?ie=UTF8&amp;tag=mypre-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0973862149">Php|architect&#8217;s Zend PHP 5 Certification Study Guide</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=mypre-21&amp;l=as2&amp;o=2&amp;a=0973862149" border="0" alt="" width="1" height="1" /> from Amazon as I read an excerpt from that the other day and found it to be generally quite good. Still waiting for that to arrive, but next month I&#8217;m going to be ordering the <a href="http://www.amazon.co.uk/gp/product/0672327090?ie=UTF8&amp;tag=mypre-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0672327090">Zend PHP Certification: Study Guide</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=mypre-21&amp;l=as2&amp;o=2&amp;a=0672327090" border="0" alt="" width="1" height="1" /> and some online practise tests. With any luck, that should be all I need to ace the test, and after reading <a href="http://www.mikebernat.com/blog/Zend_Certified!">Mike Bernat&#8217;s post</a> about his experiences and a few other posts about the certification, I hope I should be able to pass. I&#8217;ll blog what I can about it, obviously those who take the test have to sign the NDA, but I&#8217;ll put as much of my experiences pre and post as I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/16/on-the-way-to-a-zend-php5-certification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detox (Strapping Young Lad) &#8211; A Music Meme</title>
		<link>http://www.asgrim.com/2009/02/13/detox-strapping-young-lad-a-music-meme/</link>
		<comments>http://www.asgrim.com/2009/02/13/detox-strapping-young-lad-a-music-meme/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:17:25 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[meme]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1310</guid>
		<description><![CDATA[I&#8217;m a music lover, and I&#8217;ve been getting sucked into these annoying things, but here goes another one. Put your music library on shuffle. For each question, press the next button to get your answer. You must write that song title as the answer to the question, no matter how silly it sounds! Most of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a music lover, and I&#8217;ve been getting sucked into these annoying things, but here goes another one.</p>
<ol>
<li>Put your music library on shuffle.</li>
<li> For each question, press the next button to get your answer.</li>
<li> You must write that song title as the answer to the question, no matter how silly it sounds! Most of the time they seem to work though, strangely enough.</li>
<li> Ok, go!</li>
<li> When you&#8217;re done, tag 20 people in this note, and make sure to tag the person who sent you this. The answer to #20 is the Title of your note.</li>
</ol>
<p>1) IF SOMEONE SAYS &#8220;IS THIS OK?&#8221; YOU SAY?<br />
The Amen Corner (Opeth)</p>
<p>2) WHAT WOULD BEST DESCRIBE YOUR PERSONALITY?<br />
Atrum Regina (Dark Funeral)</p>
<p>3) WHAT DO YOU LIKE IN A GUY/GIRL?<br />
Waking Up Blind (Evergrey)</p>
<p>4) HOW DO YOU FEEL TODAY?<br />
Pyschopathologist (Carcass)</p>
<p>5) WHAT IS YOUR LIFE&#8217;S PURPOSE?<br />
No Strings Attached (Skyclad)</p>
<p>6) WHAT IS YOUR MOTTO?<br />
Sea Wolf (Bathory)</p>
<p>7) WHAT DO YOU THINK OF YOUR PARENTS?<br />
Decade of Therion (Behemoth)</p>
<p>8.) WHAT DO YOU THINK ABOUT VERY OFTEN?<br />
Chimera (Mayhem)</p>
<p>9) WHAT IS 2+2?<br />
Tomorrow Belongs to Nobody (Carcass)</p>
<p>10) WHAT DO YOU THINK OF YOUR BEST FRIEND?<br />
Land of the Miracle (Edguy)</p>
<p>11) WHAT DO YOU THINK OF THE PERSON YOU LIKE?<br />
The Star-Spangled Banner (Iced Earth)</p>
<p>12) WHAT IS YOUR LIFE STORY?<br />
The Pilgrim (Iron Maiden)</p>
<p>13) WHAT DO YOU WANT TO BE WHEN YOU GROW UP?<br />
Into Battle (Ensiferum)</p>
<p>14) WHAT DO YOU THINK WHEN YOU SEE THE PERSON YOU LIKE?<br />
Annihilation of a Hammerfest (Amon Amarth)</p>
<p>15) WHAT DO YOUR PARENTS THINK OF YOU?<br />
Clouds (Enslaved)</p>
<p>16) WHAT WILL YOU DANCE TO AT YOUR WEDDING?<br />
Under the Ice (Blind Guardian)</p>
<p>17) WHAT WILL THEY PLAY AT YOUR FUNERAL?<br />
At The Left Hand Ov God (Behemoth)</p>
<p>18) WHAT IS YOUR HOBBY/INTEREST?<br />
Psychotic Precision (Cannibal Corpse)</p>
<p>19) WHAT IS YOUR BIGGEST SECRET?<br />
Under The Northern Star (Amon Amarth)</p>
<p>20) WHAT DO YOU THINK OF YOUR FRIENDS?<br />
Soul Burn (Meshuggah)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/13/detox-strapping-young-lad-a-music-meme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Word Meme</title>
		<link>http://www.asgrim.com/2009/02/11/one-word-meme/</link>
		<comments>http://www.asgrim.com/2009/02/11/one-word-meme/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 12:28:53 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[meme]]></category>
		<category><![CDATA[one]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1307</guid>
		<description><![CDATA[Here&#8217;s another exciting meme&#8230; Type ONLY one word answers. It&#8217;s harder than you think!! Here is what you are supposed to do&#8230;and please don&#8217;t spoil the fun&#8230;copy and paste into your own note, type in your answers and tag people. Where is your cell phone? Desk Your hair? Brown Your father? Awesome Your favorite thing? [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another exciting meme&#8230;</p>
<blockquote><p>Type ONLY one word answers.</p>
<p>It&#8217;s harder than you think!! Here is what you are supposed to do&#8230;and please don&#8217;t spoil the fun&#8230;copy and paste into your own note, type in your answers and tag people.</p></blockquote>
<p><strong>Where is your cell phone?</strong><br />
Desk</p>
<p><strong>Your hair?</strong><br />
Brown</p>
<p><strong>Your father?</strong><br />
Awesome</p>
<p><strong>Your favorite thing?</strong><br />
Hannah</p>
<p><strong>Your dream last night?</strong><br />
Forgotten</p>
<p><strong>Your favorite drink?</strong><br />
Mead</p>
<p><strong>Your dream/goal?</strong><br />
BABIES</p>
<p><strong>The room you are in?</strong><br />
Office</p>
<p><strong>Your fear?</strong><br />
Death</p>
<p><strong>Where do you want to be in 6 years?</strong><br />
Stable</p>
<p><strong>Muffins?</strong><br />
Chocolate</p>
<p><strong>One of your wish list items?</strong><br />
Certification</p>
<p><strong>Where you grew up?</strong><br />
Fareham</p>
<p><strong>The last thing you did?</strong><br />
PHP</p>
<p><strong>What are you wearing?</strong><br />
Clothes</p>
<p><strong>Your TV?</strong><br />
On</p>
<p><strong>Your pets?</strong><br />
Dead</p>
<p><strong>Your computer?</strong><br />
Huge</p>
<p><strong>Your life?</strong><br />
Shiny</p>
<p><strong>Your mood?</strong><br />
Hungry</p>
<p><strong>Missing someone?</strong><br />
Yes</p>
<p><strong>Your car?</strong><br />
Outside</p>
<p><strong>Favorite store?</strong><br />
Amazon</p>
<p><strong>Your summer?</strong><br />
Child</p>
<p><strong>Your favorite color?</strong><br />
Red</p>
<p><strong>When is the last time you laughed?</strong><br />
Today</p>
<p><strong>Last time you cried?</strong><br />
Dunno</p>
<p><strong>Three people who email me?</strong><br />
Sii, Chris, Jon</p>
<p><strong>Three of my favorite foods?</strong><br />
Pesto, Bacon, Pork</p>
<p><strong>Three places I would rather be right now?</strong><br />
Home, Bed, France</p>
<p><strong>Three people I think will respond?</strong><br />
Dunno, Dunno, Dunno</p>
<p><em>Well that really wasn&#8217;t that hard&#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/11/one-word-meme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP POST Webservice Client</title>
		<link>http://www.asgrim.com/2009/02/06/http-post-webservice-client/</link>
		<comments>http://www.asgrim.com/2009/02/06/http-post-webservice-client/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 11:56:15 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[endpoint]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[submit]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1302</guid>
		<description><![CDATA[Here&#8217;s something I don&#8217;t do very often, but I&#8217;ve written a quick procedural script that could easily be turned into a class that will submit data to a HTTP POST &#8220;webservice&#8221;. It wouldn&#8217;t be a web service per se, rather than just a PHP script that accepts POST parameters, as opposed to an actual SOAP [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s something I don&#8217;t do very often, but I&#8217;ve written a quick procedural script that could easily be turned into a class that will submit data to a HTTP POST &#8220;webservice&#8221;. It wouldn&#8217;t be a web service per se, rather than just a PHP script that accepts POST parameters, as opposed to an actual SOAP endpoint.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Put the URL of your &quot;POST endpoint&quot;</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://some/script/that/accepts/POST/input.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Add your field pairs to this array...</span>
<span style="color: #000088;">$field_pairs</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;field1&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;avalue&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;field2&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;bvalue&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// This bit prepares the fields by imploding them into a format similar to a query string...</span>
<span style="color: #000088;">$fields</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$field_pairs</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$field_pair</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;=&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$field_pair</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$postfields</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$fields</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// This sends the request through cURL</span>
<span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$postfields</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/06/http-post-webservice-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validation &#8211; Repeated Characters</title>
		<link>http://www.asgrim.com/2009/02/06/validation-repeated-characters/</link>
		<comments>http://www.asgrim.com/2009/02/06/validation-repeated-characters/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 11:41:04 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[characters]]></category>
		<category><![CDATA[expressions]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regular]]></category>
		<category><![CDATA[repeat]]></category>
		<category><![CDATA[repeated]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1300</guid>
		<description><![CDATA[Someone puts in your form &#8220;William&#8221;, that&#8217;s great. But what about &#8220;Willliam&#8221;? That needs to fail validation. There&#8217;s been some cases here at Netbasic where people put &#8220;UUUUUU&#8221; or &#8220;AAAAAA&#8221; as their names, obviously fake names. It seems a simple enough task, but I did have a bit of trouble finding a good regexp to [...]]]></description>
			<content:encoded><![CDATA[<p>Someone puts in your form &#8220;William&#8221;, that&#8217;s great. But what about &#8220;Willliam&#8221;? That needs to fail validation. There&#8217;s been some cases here at <a href="http://www.netbasic.co.uk/site/team/james.phtml">Netbasic</a> where people put &#8220;UUUUUU&#8221; or &#8220;AAAAAA&#8221; as their names, obviously fake names. It seems a simple enough task, but I did have a bit of trouble finding a good regexp to check for repetative characters. I&#8217;m not always the best with regular expressions, so this is what I found:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/([a-z])\1{3,}/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That works!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/06/validation-repeated-characters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customised Twitter Page, At Last!</title>
		<link>http://www.asgrim.com/2009/02/05/customised-twitter-page-at-last/</link>
		<comments>http://www.asgrim.com/2009/02/05/customised-twitter-page-at-last/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 17:38:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[hannah]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1297</guid>
		<description><![CDATA[929 tweets later, and I finally got around to customising my Twitter page. I used the basic colours from my blog, with a huge mug shot on the side. How attractive! It was much simpler than I thought it was going to be&#8230; I think it&#8217;s rather fetching personally&#8230; Hannah disagrees, but I don&#8217;t see [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1298" title="twitterpage" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/02/twitterpage-300x251.jpg" alt="twitterpage" width="300" height="251" />929 tweets later, and I finally got around to customising <a href="http://twitter.com/Asgrim">my Twitter page</a>. I used the basic colours from my blog, with a huge mug shot on the side. How attractive! It was much simpler than I thought it was going to be&#8230;</p>
<p>I think it&#8217;s rather fetching personally&#8230; <a href="http://twitter.com/Hanzor">Hannah</a> disagrees, but I don&#8217;t see her with a fancy customised Twitter page&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/05/customised-twitter-page-at-last/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RE: On $_GET and $_POST</title>
		<link>http://www.asgrim.com/2009/02/05/re-on-_get-and-_post/</link>
		<comments>http://www.asgrim.com/2009/02/05/re-on-_get-and-_post/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 10:22:07 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[superglobals]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1292</guid>
		<description><![CDATA[Danish blogger Troels Knak-Nielsen wrote an interesting article about the PHP superglobals $_GET and $_POST today, bemoaning the fact they&#8217;re not technically named correctly. Reading through it, he makes a good point: The current names are confusing and obscures the intention of HTTP; More descriptive names would have been $_QUERY instead of $_GET and $_FORM [...]]]></description>
			<content:encoded><![CDATA[<p>Danish blogger Troels Knak-Nielsen <a href="http://www.sitepoint.com/blogs/2009/02/05/on-get-and-post/">wrote an interesting article</a> about the PHP superglobals <code>$_GET</code> and <code>$_POST</code> today, bemoaning the fact they&#8217;re not technically named correctly. Reading through it, he makes a good point:</p>
<blockquote><p>The current names are confusing and obscures the intention of HTTP; More descriptive names would have been <code>$_QUERY</code> instead of <code>$_GET</code> and <code>$_FORM</code> instead of <code>$_POST</code></p></blockquote>
<p>What&#8217;s he&#8217;s saying in a nutshell that if you send an HTTP POST request, such as:</p>
<pre>POST /submit.php?param=HelloWorld HTTP/1.1
Host: asgrim.com
Content-Length: 29

name=James&amp;url=www.asgrim.com</pre>
<p>Then <code>$_POST["name"]</code> is &#8220;James&#8221;, <code>$_POST["url"]</code> is &#8220;www.asgrim.com&#8221;, but despite the form being submitted as POST, <code>$_GET["param"]</code> is HelloWorld. Technically, yes &#8211; he&#8217;s right. Logically, because name and url are part of the form data, the variables should be called <code>$_FORM["name"]</code>, <code>$_FORM["url"]</code> and <code>$_QUERY["param"]</code>.</p>
<p>He also makes the point that it might not be that big a disruption to change, sporting the introduction of superglobals instead of <code>$_GET</code> and <code>$_POST</code> as a replacement for register_globals as an example.</p>
<p>However, as one commenter, Rory, points out:</p>
<blockquote><p>I can see what you’re getting at with <code>$_QUERY</code> and <code>$_FORM</code> but if you define your form as <code>&lt;form method="get"&gt;</code> your form data will be in <code>$_QUERY</code> not <code>$_FORM</code> which is possibly just as confusing for those who don’t understand the difference. I suspect the method attribute on forms is where <code>$_GET</code> and <code>$_POST</code> came from.</p></blockquote>
<p>And my opinion? Well I can see what Troels is saying, and it&#8217;s a good valid point&#8230; I might have a little bit of cainophobia, but I&#8217;m happy with the way things are, and I&#8217;ll use Rory&#8217;s argument to back me up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/05/re-on-_get-and-_post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Credit Lottery</title>
		<link>http://www.asgrim.com/2009/02/03/the-credit-lottery/</link>
		<comments>http://www.asgrim.com/2009/02/03/the-credit-lottery/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 13:58:55 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[buying]]></category>
		<category><![CDATA[credit]]></category>
		<category><![CDATA[crunch]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[lottery]]></category>
		<category><![CDATA[spending]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1288</guid>
		<description><![CDATA[Do you ever get that feeling that you&#8217;re playing the lottery, or a scratchcard or something when applying for credit? Probably because you always lose&#8230; &#8220;sorry, you&#8217;ve been declined&#8230;&#8221; Unfortunately that means we can&#8217;t get the new shiny laptop we wanted&#8230;]]></description>
			<content:encoded><![CDATA[<p>Do you ever get that feeling that you&#8217;re playing the lottery, or a scratchcard or something when applying for credit?</p>
<p>Probably because you always lose&#8230; &#8220;sorry, you&#8217;ve been declined&#8230;&#8221;</p>
<p>Unfortunately that means we can&#8217;t get the new shiny laptop we wanted&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/03/the-credit-lottery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sliding Out of Whiteley</title>
		<link>http://www.asgrim.com/2009/02/02/sliding-out-of-whiteley/</link>
		<comments>http://www.asgrim.com/2009/02/02/sliding-out-of-whiteley/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 10:03:06 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[ice]]></category>
		<category><![CDATA[sliding]]></category>
		<category><![CDATA[snow]]></category>
		<category><![CDATA[whiteley]]></category>
		<category><![CDATA[winter]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1285</guid>
		<description><![CDATA[As much of England grinds to a halt, I woke up like everyone else to find a nice white blanket of snow over everything. Thankfully, this area is a lot less harder hit than some places I&#8217;ve seen on the news. Nevertheless, it was a slightly hair-raising journey out of the ARK+ part of Whiteley, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1286" title="image002" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/02/image002-300x225.jpg" alt="image002" width="300" height="225" />As much of England grinds to a halt, I woke up like everyone else to find a nice white blanket of snow over everything. Thankfully, this area is a lot less harder hit than some places I&#8217;ve seen on the news. Nevertheless, it was a slightly hair-raising journey out of the <a href="http://www.whiteleyarkplus.org.uk/">ARK+ </a>part of Whiteley, keeping it dead slow.</p>
<p>Still, I made it to <a href="http://www.netbasic.co.uk/site/team/james.phtml">Netbasic</a> this morning, and so did most of the office aside from Chris (stranded by trains &#8211; why have they not invented self-heating train lines that defrost??), and Sii (who lives on a hill which I expect is pretty frozen&#8230;).</p>
<p>Woot for snow!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/02/sliding-out-of-whiteley/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Another Week Passes&#8230;</title>
		<link>http://www.asgrim.com/2009/02/01/another-week-passes/</link>
		<comments>http://www.asgrim.com/2009/02/01/another-week-passes/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 19:20:35 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Our Baby]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[babies]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[cheesecake]]></category>
		<category><![CDATA[dinner]]></category>
		<category><![CDATA[Food]]></category>
		<category><![CDATA[pregnancy]]></category>
		<category><![CDATA[restaurants]]></category>
		<category><![CDATA[salmon]]></category>
		<category><![CDATA[strawberry]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1281</guid>
		<description><![CDATA[Another week is nearly over, which means that tomorrow is week 32 of pregnancy. Hannah has a nice concise bump now, as pictured left. Everyone has commented on how little weight she&#8217;s put on elsewhere, and she&#8217;s really lucky to not have it spread out. As from tomorrow, she&#8217;s also lucky enough to be able [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1282" title="bump-32weeks" src="http://www.asgrim.com/_wordpress_live_J4M3S/wp-content/uploads/2009/02/bump-32weeks-300x278.jpg" alt="bump-32weeks" width="300" height="278" />Another week is nearly over, which means that tomorrow is week 32 of pregnancy. Hannah has a nice concise bump now, as pictured left. Everyone has commented on how little weight she&#8217;s put on elsewhere, and she&#8217;s really lucky to not have it spread out. As from tomorrow, she&#8217;s also lucky enough to be able to start working from home, meaning that we are both still earning and not losing out on increasingly valuable money!</p>
<p>We&#8217;ve had a really nice weekend; Friday evening was spent at <a href="http://www.cassonsrestaurant.co.uk/">Casson&#8217;s Restaurant</a> in Tangmere near Chichester, and Saturday night was a yummy dinner with Tom &amp; Sophia. Between Hannah and me, we managed to cook a pesto salmon en croûte and a very messy but sweet strawberry cheesecake; both courtesy of <a href="http://www.amazon.co.uk/gp/product/0718148622?ie=UTF8&amp;tag=mypre-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0718148622">Jamie Oliver&#8217;s Ministry of Food</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=mypre-21&amp;l=as2&amp;o=2&amp;a=0718148622" border="0" alt="" width="1" height="1" /> book, which I highly recommend to anyone wanting to begin cooking. I warn you, the recipes do have slightly more expensive ingredients, but it&#8217;s well worth the extra pennies!</p>
<p>So here&#8217;s to the final 8 weeks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asgrim.com/2009/02/01/another-week-passes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filter Input, Escape Output</title>
		<link>http://www.asgrim.com/2009/01/29/filter-input-escape-output/</link>
		<comments>http://www.asgrim.com/2009/01/29/filter-input-escape-output/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 17:00:45 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Certification]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[netbasic]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.asgrim.com/?p=1270</guid>
		<description><![CDATA[<br />
<b>Fatal error</b>:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in <b>/home/asgrim/public_html/_wordpress_live_J4M3S/wp-content/plugins/wp-syntax/geshi/geshi/php.php</b> on line <b>366</b><br />
