<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>Blog</title>
		<link>http://jrgns.net//?q=tag/1</link>
		<description>Random thoughts, solutions to niggling programming problems, what ever is on my mind!</description>
		<language>en-us</language>
		<pubDate>Mon, 21 May 2012 06:06:07 +0200</pubDate>

		<lastBuildDate>Mon, 21 May 2012 06:06:07 +0200</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Backend-PHP</generator>
		<managingEditor>jrgns@jrgns.net</managingEditor>
		<webMaster>jrgns@jrgns.net</webMaster>

					<item>
				<title>Decorator Pattern Implemented Properly In PHP</title>
				<link>http://jrgns.net/contents/36</link>
				<description><![CDATA[ <p>While working on <a href="http://backend-php.net">Backend-PHP</a> I needed to do a proper implementation of the <a href="http://en.wikipedia.org/wiki/Decorator_pattern">Decorator Pattern</a> in PHP. Just googling PHP decorator pattern will come up with a number of simple solutions, but none of them are usable in a general, robust way that a framework requires. So I extended and tweaked the implementations a bit.&hellip; ]]></description>
				<pubDate>Sat, 17 Mar 2012 11:14:56 +0200</pubDate>
				<guid>http://jrgns.net/contents/36</guid>
			</item>
					<item>
				<title>The Low Hanging Fruit Of Testing</title>
				<link>http://jrgns.net/contents/35</link>
				<description><![CDATA[ <p>I've been getting more into Testing (specifically Unit Testing) the past few weeks, and although I'm still struggling to firstly get it right, and secondly see the long term benefits, I know that the quality of my code is already better. Let's call it the low hanging fruit of Testing.</p>&hellip; ]]></description>
				<pubDate>Fri, 16 Mar 2012 15:14:03 +0200</pubDate>
				<guid>http://jrgns.net/contents/35</guid>
			</item>
					<item>
				<title>json-encode'ing Private and Protected Properties</title>
				<link>http://jrgns.net/contents/34</link>
				<description><![CDATA[ <p>When you <code>json_encode</code> an object, it will ignore all protected and private properties if the <code>json_encode</code> isn't called from within the object. Sometimes you want to output the protected and private properties of an object when you're JSON encoding it. Here's how to do it in an easy and elegant way:&hellip; ]]></description>
				<pubDate>Fri, 24 Feb 2012 06:51:15 +0200</pubDate>
				<guid>http://jrgns.net/contents/34</guid>
			</item>
					<item>
				<title>22seven.com - Folly, or Genius?</title>
				<link>http://jrgns.net/contents/33</link>
				<description><![CDATA[ <h2>Promising Product</h2>

<p>Last week Christo Davel, founder of the now defunct <a href="http://mg.co.za/article/2005-11-02-online-bank-20twenty-up-for-sale">twenty20</a> bank, released an online personal accounting service called <strong><a href="http://22seven.com">22seven.com</a></strong>. It <a href="http://www.itweb.co.za/index.php?option=com_content&amp;view=article&amp;id=50971:22seven-goes-live">looked</a> like a great product. Something I was looking for for quite a while: A simple online interface that automatically imports my transaction details, and reports on how much I'm spending on what.</p>

<p>I will never use it, though. Why? The app asks for your online banking login details.&hellip; ]]></description>
				<pubDate>Sat, 28 Jan 2012 08:37:06 +0200</pubDate>
				<guid>http://jrgns.net/contents/33</guid>
			</item>
					<item>
				<title>Setting up Puppet on Ubuntu 10.4</title>
				<link>http://jrgns.net/contents/32</link>
				<description><![CDATA[ <p>I'm trying to use puppet to setup standard dev and (eventually) production environments. As Ubuntu 10.4 is the current LTS release (at least until 12.4), I need to get puppet running on 10.4. The problem is that although the latest stable release for puppet is 2.7.6, puppet in the ubuntu repo is version 0.25.4. Here's how to firstly set it up, and then upgrade it to the latest version.</p>&hellip; ]]></description>
				<pubDate>Wed, 16 Nov 2011 04:24:06 +0200</pubDate>
				<guid>http://jrgns.net/contents/32</guid>
			</item>
					<item>
				<title>Backend-Core: A RESTful MVC PHP Framework</title>
				<link>http://jrgns.net/contents/31</link>
				<description><![CDATA[ <p>I like frameworks. I like working with them, I like writing them. I wrote <a href="http://backend-php.net">Backend-PHP</a>, which I'm using personally and at <a href="http://www.brandedinternet.co.za">Branded Internet</a>. Unfortunately it has a number of major flaws: It's not easily unit testable, not really a REST web service, and it doesn't conform to any popular coding standards. So I wrote <a href="https://github.com/jrgns/backend-core">Backend-Core</a> as the first step towards addressing these issues.&hellip; ]]></description>
				<pubDate>Fri, 14 Oct 2011 06:59:32 +0200</pubDate>
				<guid>http://jrgns.net/contents/31</guid>
			</item>
					<item>
				<title>Why Johnny Died (or, How I Finally Realised Why Singletons And Global Variables Are Bad)</title>
				<link>http://jrgns.net/contents/29</link>
				<description><![CDATA[ <p>Johnny (an asthma sufferer and fictitious character) died yesterday. He got an asthma attack, but he could not find his inhaler, and sadly passed away. Usually his mother kept it for him and made sure he used it, but on the first day he ventured out alone, he got an asthma attack, realised that he didn't have his inhaler with him, and died. What does this have to do with Singletons or Global variables? Read on...&hellip; ]]></description>
				<pubDate>Wed, 28 Sep 2011 04:06:19 +0200</pubDate>
				<guid>http://jrgns.net/contents/29</guid>
			</item>
					<item>
				<title>A PHP Virtual Host</title>
				<link>http://jrgns.net/contents/27</link>
				<description><![CDATA[ <p>I hate repetitive work. I love solving a puzzle. So it often happens that I'd spend 2 hours writing a script to solve a repetitive problem, than just taking the 2 minutes to do it manually. Creating apache config files are tedious and boring, so I wrote a PHP script that emulates Virtual Hosting.&hellip; ]]></description>
				<pubDate>Tue, 13 Sep 2011 03:18:03 +0200</pubDate>
				<guid>http://jrgns.net/contents/27</guid>
			</item>
					<item>
				<title>A JavaScript trim function</title>
				<link>http://jrgns.net/contents/25</link>
				<description><![CDATA[ <p>A simple enough <code>trim</code> function for JavaScript:</p>

<pre><code>function trim(string) {
    return string.replace(/^\s*|\s*$/g, '')
}
</code></pre>

&hellip; ]]></description>
				<pubDate>Mon, 18 Jul 2011 04:55:32 +0200</pubDate>
				<guid>http://jrgns.net/contents/25</guid>
			</item>
					<item>
				<title>Quick Guide To Creating A Website Quickly</title>
				<link>http://jrgns.net/contents/24</link>
				<description><![CDATA[ <p>The last two weeks I had the privilege of staying in a house on the beach near Mosselbay. This time of the year whales start coming into the bay, and, if you're lucky, you can spot them breaching or displaying their flukes or fins. This inspired me to create <a href="http://whalespotter.co.za">WhaleSpotter</a>, a site that uses Twitter to help people spot whales along South Africa's south coast. It took me less than 2 hours to do it. Here's how.&hellip; ]]></description>
				<pubDate>Mon, 11 Jul 2011 21:31:53 +0200</pubDate>
				<guid>http://jrgns.net/contents/24</guid>
			</item>
			</channel>
</rss>
