<?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>CJ Jackson</title>
	<atom:link href="http://cj-jackson.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cj-jackson.com</link>
	<description>Web Dev Freelancer with a Motorcycle!</description>
	<lastBuildDate>Mon, 09 Jan 2012 12:00:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>XML Parsing with PHP &amp; Python</title>
		<link>http://cj-jackson.com/2012/01/08/xml-parsing-with-php-and-python/</link>
		<comments>http://cj-jackson.com/2012/01/08/xml-parsing-with-php-and-python/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 22:39:56 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2193</guid>
		<description><![CDATA[Awhile ago I attended an interview with Kaweb (I didn&#8217;t get the role btw), they asked me, if I did XML processing before, which I said I did XML and HTML processing with DOMDocument, they also asked me if I used &#8230; <a href="http://cj-jackson.com/2012/01/08/xml-parsing-with-php-and-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Awhile ago I attended an interview with <a href="http://www.kaweb.co.uk/">Kaweb</a> (I didn&#8217;t get the role btw), they asked me, if I did <a href="http://en.wikipedia.org/wiki/XML">XML</a> processing before, which I said I did XML and <a href="http://en.wikipedia.org/wiki/HTML">HTML</a> processing with <a href="http://php.net/manual/en/class.domdocument.php">DOMDocument</a>, they also asked me if I used <a href="http://en.wikipedia.org/wiki/Xpath">XPath</a>, which I said no to, but I have heard of it, I remember saying it&#8217;s like <a href="http://en.wikipedia.org/wiki/Unix">Unix </a>directory structures.</p>
<p>Anyhow I just go ahead, the script in <a href="http://en.wikipedia.org/wiki/PHP">PHP </a>&amp; <a href="http://en.wikipedia.org/wiki/Python_(programming_language)">Python</a>.  I didn&#8217;t use XPath with Python, only PHP.</p>
<h2>PHP (with XPath)</h2>
<pre class="brush: php; title: ; notranslate">&lt;?php

$dom = new DOMDocument();
$dom-&gt;load('http://cj-jackson.com/feed/');

$xpath = new DOMXPath($dom);
$nodes = $xpath-&gt;query(&quot;//channel/item[position() &lt;=5]&quot;);

foreach($nodes as $node) {
	echo $node-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;nodeValue . '&lt;br /&gt;';
}</pre>
<h2>Python (no XPath)</h2>
<pre class="brush: python; title: ; notranslate">#!/usr/bin/python2.7
from urllib2 import build_opener
from xml.etree.cElementTree import parse as xmlparse

opener = build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0'), ('Accept', '*/*')] # To get round anti-spam system.
source = opener.open('http://cj-jackson.com/feed/')

feed = xmlparse(source).getroot()

for element in feed.findall('channel/item')[:5]:
	print element.findtext('title')</pre>
<h2>Output</h2>
<pre>Happy New Year!
RockForums.Co Revisited
Screw dual-boot, Synergy is Awesome!
My Motorbike Got Stolen
No more post for awhile</pre>
<h2>Conclusion</h2>
<p>Python and <a href="http://docs.python.org/library/xml.etree.elementtree.html">ElementTree</a> are so elegant, it&#8217;s pretty much written in a way that I don&#8217;t need to use XPath. As for PHP DOMDocument, at least it&#8217;s support HTML Processing as well, with Python I had to use <a href="http://code.google.com/p/html5lib/">html5lib</a> for HTML Processing, the only problem I have with html5lib is that it&#8217;s not come with Python by default unlike ElementTree and cElementTree.</p>
<p>The different between ElementTree and cElementTree, the former written in Python, the latter written in C as the name implies for that reason it&#8217;s also the fastest, nothing is faster than C except the speed of light.</p>
<p><strong>Update:</strong></p>
<p>ElementTree does not support XPath, if you want to use XPath in Python use <a href="http://lxml.de/">lxml</a> instead, it&#8217;s does not come with Python by default.</p>
<div class="shr-publisher-2193"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2012/01/08/xml-parsing-with-php-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy New Year!</title>
		<link>http://cj-jackson.com/2012/01/01/happy-new-year/</link>
		<comments>http://cj-jackson.com/2012/01/01/happy-new-year/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 23:49:16 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[happy new year]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2183</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="aligncenter size-full wp-image-2184" title="Happy MMXII (2012)" src="http://cj-jackson.com/wp-content/uploads/2012/01/2012-01.png" alt="Happy MMXII (2012)" width="480" height="329" /></p>
<div class="shr-publisher-2183"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2012/01/01/happy-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RockForums.Co Revisited</title>
		<link>http://cj-jackson.com/2011/11/10/rockforums-co-revisited/</link>
		<comments>http://cj-jackson.com/2011/11/10/rockforums-co-revisited/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 11:37:31 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[object role moddelling]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rockforums.co]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2166</guid>
		<description><![CDATA[I have spent most of my Web Development years using PHP, one of the limitations is conforming to the shared server php.ini file such as file upload limit which is 64mb and cannot be changed by myself (http://support.hostgator.com/articles/cpanel/php-settings-that-cannot-be-changed), only the &#8230; <a href="http://cj-jackson.com/2011/11/10/rockforums-co-revisited/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I have spent most of my Web Development years using PHP, one of the limitations is conforming to the shared server php.ini file such as file upload limit which is 64mb and cannot be changed by myself (<a href="http://support.hostgator.com/articles/cpanel/php-settings-that-cannot-be-changed">http://support.hostgator.com/articles/cpanel/php-settings-that-cannot-be-changed</a>), only the server admin can do that (very unlikely to change setting even if I asked nicely); One way of avoiding php.ini is to use a language other than PHP, I choose to go by what the Scotsman (in one of the job interview I had) suggested to me, Python, which is virtually zero configuration at the core because of the general purpose nature, framework like Django has its own set of configurations which I have full control of by modifying settings.py in the project folder.</p>
<p>The design methodology is based on Object Role Modelling (ORM) not to be confused with Object Relational Mapping which happens to share the same initial.  I could of used Entity Relational Diagram (ERD) in Visio, but then I would find myself fighting with dialogue boxes which I find very tedious with ORM I never get into that situation with those, I just simply drag and drop the symbols and type in the labels.</p>
<p>Here the ORM Design, those dashed boxes are not part of the ORM standard, but at least it’s fellow Django structure quite well.</p>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/11/Object_Role_Model.png"><img class="alignnone size-medium wp-image-2167" title="Object Role Model of RockForums.Co" src="http://cj-jackson.com/wp-content/uploads/2011/11/Object_Role_Model-640x445.png" alt="" width="640" height="445" /></a></p>
<p>The prototype is all up and running at <a href="http://rockforums.co/">http://rockforums.co</a>, I still got to fully implement the Message App and the password reset feature.</p>
<p>I find Python to be faster than PHP, PHP tends to include all the modules, with Python I have to explicitly specify the required modules to import, Python is compiled while PHP is interpreted, plus someone in London pointed out to me is that most shared server have PHP poorly configured, PHP can do html cache but many of them choose not to set it up,  I believe Django also has html cache (<a href="https://docs.djangoproject.com/en/dev/topics/cache/">https://docs.djangoproject.com/en/dev/topics/cache/</a>).  I also find Python a lot tidier then PHP, mainly because it’s not so dependent on wildcard ‘$’ or dollar as it’s known in currency.</p>
<p>I had fun with Python and Django, I plan on getting the rest done in January next year 2012.</p>
<div class="shr-publisher-2166"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/11/10/rockforums-co-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screw dual-boot, Synergy is Awesome!</title>
		<link>http://cj-jackson.com/2011/09/25/screw-dual-boot-synergy-is-awesome/</link>
		<comments>http://cj-jackson.com/2011/09/25/screw-dual-boot-synergy-is-awesome/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 17:58:04 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[synergy]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2139</guid>
		<description><![CDATA[One day I was sitting in front of both computers, I noticed that both have Windows 7 installed and I thought having two computers with the same OS is a bit pointless so I decided to have Ubuntu (GNU/Linux) installed &#8230; <a href="http://cj-jackson.com/2011/09/25/screw-dual-boot-synergy-is-awesome/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>One day I was sitting in front of both computers, I noticed that both have Windows 7 installed and I thought having two computers with the same OS is a bit pointless so I decided to have Ubuntu (GNU/Linux) installed on my Dell laptop, before I did that I switched the hard drive, so I can always switch it back to Windows with no problem.</p>
<p><img class="aligncenter size-full wp-image-2140" title="My workspace!" src="http://cj-jackson.com/wp-content/uploads/2011/09/Image1.jpg" alt="" width="640" height="480" /></p>
<p>Also I have Synergy server installed on Windows and the client on Ubuntu, the server shares it’s keyboard and mouse with the client, in other words I can control both computers with the same keyboard and mouse.  It’s also share the clipboard (copy &amp; paste).</p>
<p>Plus I can use the Web Browser and Secure Shell (SSH) (viewing apache web log) without having to minimize the IDE.</p>
<p>Without doubt, the solution is more expensive than dual-boot, but yet it’s more productive as I don’t have to keep on rebooting just to use a different OS or minimize Virtual Machine.</p>
<div class="shr-publisher-2139"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/09/25/screw-dual-boot-synergy-is-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Motorbike Got Stolen</title>
		<link>http://cj-jackson.com/2011/08/08/my-motorbike-got-stolen/</link>
		<comments>http://cj-jackson.com/2011/08/08/my-motorbike-got-stolen/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 17:50:51 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[motorbike]]></category>
		<category><![CDATA[motorcycle]]></category>
		<category><![CDATA[motorcycle got stolen]]></category>
		<category><![CDATA[stolen]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2111</guid>
		<description><![CDATA[Sinnis Vista 125cc (GX07 KKT) DELETED! It&#8217;s 2012 now, I rather puts this behind, it&#8217;s so 2011. Comments closed, don&#8217;t want to talk about that.  It&#8217;s was my fault, I left the bike on the front drive, I don&#8217;t keep &#8230; <a href="http://cj-jackson.com/2011/08/08/my-motorbike-got-stolen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p style="text-align: left;">Sinnis Vista 125cc (GX07 KKT)<a href="http://cj-jackson.com/wp-content/uploads/2011/08/CIMG0866.jpg"><img class="aligncenter size-medium wp-image-2112" title="Motorbike" src="http://cj-jackson.com/wp-content/uploads/2011/08/CIMG0866-640x480.jpg" alt="" width="640" height="480" /></a></p>
<p><strong>DELETED!</strong></p>
<p>It&#8217;s 2012 now, I rather puts this behind, it&#8217;s so 2011. Comments closed, don&#8217;t want to talk about that.  It&#8217;s was my fault, I left the bike on the front drive, I don&#8217;t keep my new bike on the front drive.  Also I have learned that complacency can have a nasty impact on financials.</p>
<div class="shr-publisher-2111"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/08/08/my-motorbike-got-stolen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>No more post for awhile</title>
		<link>http://cj-jackson.com/2011/08/01/no-more-post-for-awhile/</link>
		<comments>http://cj-jackson.com/2011/08/01/no-more-post-for-awhile/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 16:37:40 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Illustration]]></category>
		<category><![CDATA[seat]]></category>
		<category><![CDATA[settee]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2102</guid>
		<description><![CDATA[I&#8217;m currently busy at the moment, with other projects, so there won&#8217;t be any more blog post for awhile, so take a seat and stay tuned for more blog posts. P.S. Yes I&#8217;m getting better at Adobe Illustrator.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p style="text-align: left;"><img class="aligncenter size-full wp-image-2103" title="Settee" src="http://cj-jackson.com/wp-content/uploads/2011/08/settee.png" alt="" width="505" height="404" />I&#8217;m currently busy at the moment, with other projects, so there won&#8217;t be any more blog post for awhile, so take a seat and stay tuned for more blog posts.</p>
<p>P.S. Yes I&#8217;m getting better at Adobe Illustrator.</p>
<div class="shr-publisher-2102"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/08/01/no-more-post-for-awhile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RockForums.Co 0.95 – Bye Bye Symfony</title>
		<link>http://cj-jackson.com/2011/07/03/rockforums-co-0-95-%e2%80%93-bye-bye-symfony/</link>
		<comments>http://cj-jackson.com/2011/07/03/rockforums-co-0-95-%e2%80%93-bye-bye-symfony/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 18:10:02 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[RockFofrums.Co]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2091</guid>
		<description><![CDATA[On the last post I said I had the confidence to rewrite RockForums.Co from scratched, without the use of the Symfony or any other PHP framework, also on the last post I showed you the source code to the URL &#8230; <a href="http://cj-jackson.com/2011/07/03/rockforums-co-0-95-%e2%80%93-bye-bye-symfony/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>On the last post I said I had the confidence to rewrite RockForums.Co from scratched, without the use of the Symfony or any other PHP framework, also on the last post I showed you the source code to the URL Routing System, well I also used that source code in RockForums.Co and it works like a charm, well I did make a few modification to the code to get it to work on the production server.</p>
<p>Also my development server which happen to run on Windows 7 and IIS actually let me off with something like “include ‘/../view/example.php’;” but on the production server it didn’t work, it runs on Linux and Apache, I had to add “dirname(__FILE__)” to get it to work on the production server, and still work on the development server.</p>
<p>Neither the less the code on the development server is exactly the same as the production server, because I written a simple if statement which determine the different between development and production therefore load the correct database configuration with no problem.  I couldn’t do that with the Symfony Framework, I had to correct the configuration manually for production and like any other human, I am prone to making mistakes, I could accidently overwrite the configuration with the wrong configuration, because I rewritten the script that won’t happen.</p>
<p>Speaking of Framework, the best PHP Framework there is, is PHP itself, not Symfony, not CakePHP and certainly not Zend Framework, but PHP itself from PHP.net because it simple and does not add too much complexity plus PHP follows the reflection pattern quite well the URL Routing System is an example of a reflection pattern.   I find the Symfony function link_to() ridiculous because all that does is generate a hyperlink, which is very easy to write in html. (&lt;a  class=”link” href=”http://example.com”&gt;Example&lt;/a&gt;)</p>
<p>I written in an auto-upgrade script, what that script does is update the tables automatically so I don’t need to modify the tables manually while deploying to production.  <a href="http://wordpress.org/extend/plugins/html5avmanager/">HTML5 AV Manager for WordPress</a> also has that script.</p>
<p>I also written an auto embed library called oEmbedder, yes as the name implies it uses oEmbed and it includes support for embedly and plus I opened sourced it and release it into Google Code under the MIT License, available from <a href="http://code.google.com/p/oembedder/">http://code.google.com/p/oembedder/</a> .  I am aware of PHP-oEmbed and oEmbed-PHP on Google Code, one was a bit bloated, and the other was simpler but not flexible enough to my taste, both of them had error checking which I find kind of pointless because the thing with json_decode and simple_xml is that they both return false on fail and that all the information I need to know, so basically it either works or it doesn’t just like HDMI Cables, so please don’t buy the expensive ones it just a waste of money.</p>
<p>The forum is at <a href="http://rockforums.co/">http://rockforums.co</a> , enjoy.</p>
<div class="shr-publisher-2091"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/07/03/rockforums-co-0-95-%e2%80%93-bye-bye-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple &amp; Effective URL Routing System.</title>
		<link>http://cj-jackson.com/2011/06/19/simple-effective-url-routing-system/</link>
		<comments>http://cj-jackson.com/2011/06/19/simple-effective-url-routing-system/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 22:21:44 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2071</guid>
		<description><![CDATA[I have learned how to build a Model-View-Controller and Object-Relational-Mapping, now I learned how to build a simple and effective URL Routing System.  I should now have the confidence to rewrite RockForums.Co without the use of symfony or any other PHP Framework. &#8230; <a href="http://cj-jackson.com/2011/06/19/simple-effective-url-routing-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I have learned how to build a Model-View-Controller and Object-Relational-Mapping, now I learned how to build a simple and effective URL Routing System.  I should now have the confidence to rewrite RockForums.Co without the use of symfony or any other PHP Framework.  Beside PHP is an excellent framework in itself.</p>
<p>Here the PHP code for the Simple &amp; Effective URL Routing System.</p>
<pre class="brush: php; title: ; notranslate">class route {

    static private $ROUTES;

    static public function init() {
        $path = false;
        if (isset($_SERVER['PATH_INFO'])) {
            $path = $_SERVER['PATH_INFO'];
        } else {
            $path = $_SERVER['REQUEST_URI'];
            $self = $_SERVER['PHP_SELF'];
            $self = dirname($self);
            $self = str_replace('\\', '/', $self); // for Windows Compatibility.
            $self = strlen($self);
            $path = substr($path, $self);
            if ($path != '') {
                $thehash = strpos($path, '#');
                if ($thehash) {
                    $path = substr($path, 0, $thehash);
                }
                $question = strpos($path, '?');
                if ($question) {
                    $path = substr($path, 0, $question);
                }
            } else {
                $path = false;
            }
        }

        if (!$path) {
            $routes = array('index', 'index');
        } else {
            $path = trim($path);
            $path = trim($path, &quot;/&quot;);
            $routes = strtolower($path);
            $routes = explode('/', $routes);
        }

        // Useful for pagenationing an index. <img src='http://cj-jackson.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
        if (is_numeric($routes[0])) {
            $tempRoutes = array('index', 'index');
            foreach ($routes as $route) {
                $tempRoutes[] = $route;
            }
            unset($route);
            $routes = $tempRoutes;
            unset($tempRoutes);
        }

        if (class_exists($routes[0] . '_action')) {
            if (!isset($routes[1])) {
                $routes[1] = 'index';
            }
            if (method_exists($routes[0] . '_action', $routes[1])) {
                self::$ROUTES = $routes;
            } else {
                $altRoutes = array($routes[0], 'index');
                $count = 1;
                while (isset($routes[$count])) {
                    $altRoutes[] = $routes[$count];
                    $count++;
                }
                self::$ROUTES = $altRoutes;
            }
            call_user_func(array(self::$ROUTES[0] . '_action',
                self::$ROUTES[1]));
            return;
        } elseif (class_exists('index_action')) {
            if (method_exists('index_action', $routes[0])) {
                $altRoutes = array('index', $routes[0]);
                $count = 1;
            } else {
                $altRoutes = array('index', 'index');
                $count = 0;
            }
            while (isset($routes[$count])) {
                $altRoutes[] = $routes[$count];
                $count++;
            }
            self::$ROUTES = $altRoutes;
            call_user_func(array(self::$ROUTES[0] . '_action',
                self::$ROUTES[1]));
            return;
        }

        page::show404();
    }

    static public function getRoutes() {
        return self::$ROUTES;
    }

}

class index_action {

    static public function index() {
        echo 'Index, Index';
        $route = route::getRoutes();
        if (isset($route[2])) {
            echo ', ' . $route[2];
        }
    }

    static public function testing() {
        echo 'Index, Testing';
        $route = route::getRoutes();
        if (isset($route[2])) {
            echo ', ' . $route[2];
        }
    }

}

class test_action {

    static public function index() {
        echo 'Test, Index';
        $route = route::getRoutes();
        if (isset($route[2])) {
            echo ', ' . $route[2];
        }
    }

    static public function test() {
        echo 'Test, Test';
        $route = route::getRoutes();
        if (isset($route[2])) {
            echo ', ' . $route[2];
        }
    }

}

route::init();</pre>
<p>The class name is in 0, the method name is in 1, 2 and above are the parameters.  The benefit of writing a URL Routing System in PHP rather than writing it purely in .htaccess (Apache) or web.config (IIS7) is cross compatibly with Apache and IIS, and probably with some other web servers.</p>
<p>Code for Apache .htaccess</p>
<p><code>&lt;IfModule mod_rewrite.c&gt;<br />
  RewriteEngine On<br />
  RewriteCond %{REQUEST_FILENAME} -f &#91;NC,OR&#93;<br />
  RewriteCond %{REQUEST_FILENAME} -d &#91;NC&#93;<br />
  RewriteRule .* - &#91;L&#93;<br />
  RewriteRule ^(.*)$ index.php/$1 &#91;QSA,L&#93;<br />
&lt;/IfModule&gt;</code></p>
<p>Code for IIS7 web.config</p>
<pre class="brush: xml; title: ; notranslate">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;configuration&gt;
    &lt;system.webServer&gt;
        &lt;rewrite&gt;
            &lt;rules&gt;
                &lt;rule name=&quot;Imported Rule 3&quot; stopProcessing=&quot;true&quot;&gt;
                    &lt;match url=&quot;.*&quot; ignoreCase=&quot;false&quot; /&gt;
                    &lt;conditions logicalGrouping=&quot;MatchAny&quot;&gt;
                        &lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot; /&gt;
                        &lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsDirectory&quot; /&gt;
                    &lt;/conditions&gt;
                    &lt;action type=&quot;None&quot; /&gt;
                &lt;/rule&gt;
                &lt;rule name=&quot;Imported Rule 4&quot; stopProcessing=&quot;true&quot;&gt;
                    &lt;match url=&quot;^(.*)$&quot; ignoreCase=&quot;false&quot; /&gt;
                    &lt;action type=&quot;Rewrite&quot; url=&quot;index.php/{R:1}&quot; appendQueryString=&quot;true&quot; /&gt;
                &lt;/rule&gt;
            &lt;/rules&gt;
        &lt;/rewrite&gt;
    &lt;/system.webServer&gt;
&lt;/configuration&gt;</pre>
<p>.htaccess and web.config are used as pointers to the file.</p>
<p>One more thing if you&#8217;re planning on using URL slug, always prefix it with a dash (-) to avoid problems.</p>
<p>Let me know what you think?</p>
<p><strong>Update:</strong> I have added rtrim and other improvement to the script, e.g. if a class is not detected it will try to detect it as a method in the index class, if that fails it will use the index method.</p>
<p><strong>Update 2:</strong> Now uses trim rather than rtrim, works better.</p>
<p><strong>Update 3:</strong> Found out that $_SERVER['PATH_INFO'] does not seem to work with mod_rewrite on some servers, but can be emulated in combination with $_SERVER['REQUEST_URI'] and $_SERVER['PHP_SELF'].</p>
<div class="shr-publisher-2071"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/06/19/simple-effective-url-routing-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 AV Manager vs. HTML5 Multimedia Framework in Quality</title>
		<link>http://cj-jackson.com/2011/06/18/html5-av-manager-vs-html5-multimedia-framework-in-quality/</link>
		<comments>http://cj-jackson.com/2011/06/18/html5-av-manager-vs-html5-multimedia-framework-in-quality/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 21:15:07 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[quality]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2059</guid>
		<description><![CDATA[I am the developer of HTML5 AV Manager and HTML5 Multimedia Framework so the review should be mostly unbiased and should not involve pissing off other plugin developers not that I do anyway.  They are both WordPress plugins btw. Okay &#8230; <a href="http://cj-jackson.com/2011/06/18/html5-av-manager-vs-html5-multimedia-framework-in-quality/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I am the developer of HTML5 AV Manager and HTML5 Multimedia Framework so the review should be mostly unbiased and should not involve pissing off other plugin developers not that I do anyway.  They are both WordPress plugins btw.</p>
<p>Okay I start off with the HTML5 Multimedia Framework, the project started with intention of making the most flexible video plugin that will hopefully benefit theme designers, at least I thought I was building a flexible video plugin but as I started putting more features into the plugin the more complex the plugin got, the code got more sloppy, it became harder to maintain.</p>
<p>The Fact that the plugin use WP Embed and tries to determine the different between audio and video, that actually adds more complexity, file extension such as Ogg, MP4 and WebM can be used for video and audio, but sometime it used to store only audio.  This is not the case with HTML5 AV Manager the users have to define audio or video for themselves.</p>
<p>Code behind HTML5 Multimedia Framework was so poor, that the presentation was actually mixed with the business logic, so the design pattern was poor.  With HTML5 AV Manager, the product follows two tried and tested design pattern the Model-View-Controller (MVC) and Object-Relation-Mapping (ORM), the ORM is the model part of the MVC.</p>
<p>The Model is responsible for data storage, the View is responsible for presentation, by presentation in Web Development term I mean HTML Code and JavaScript, in PHP they are usually stored as files rather than an object and the Controller is responsible for the business logic.</p>
<p>The ORM is when I map the entity (table) to a (static) class, the tuple (record or row) to an object and an attributes (fields) to the properties.</p>
<p>Also I have allowed users control of some of the views and can be edited via the WordPress Theme editor, the views covers every aspect of html audio and video.</p>
<p>Yes I did have a ridiculous amount of commit with HTML5 AV Manager, but neither the less the code was very easy to maintain and why? Because I followed tried and tested design patterns!  Sadly there are a lot of Web Developers that don’t follow tried and tested design patterns; I was guilty of that with HTML5 Multimedia Framework.</p>
<p>HTML5 AV Manager is available from <a href="http://wordpress.org/extend/plugins/html5avmanager/">http://wordpress.org/extend/plugins/html5avmanager/</a></p>
<div class="shr-publisher-2059"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/06/18/html5-av-manager-vs-html5-multimedia-framework-in-quality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Talking about Deep Purple!</title>
		<link>http://cj-jackson.com/2011/06/18/talking-about-deep-purple/</link>
		<comments>http://cj-jackson.com/2011/06/18/talking-about-deep-purple/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 18:28:39 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=2049</guid>
		<description><![CDATA[Hello, I got bored of the blue theme already, so I decided to do a major overhaul, use a complete combination of Adobe Illustrator and CSS3.  I only used Adobe Illustrator for the header and footer, I used CSS3 for &#8230; <a href="http://cj-jackson.com/2011/06/18/talking-about-deep-purple/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello, I got bored of the blue theme already, so I decided to do a major overhaul, use a complete combination of Adobe Illustrator and CSS3.  I only used Adobe Illustrator for the header and footer, I used CSS3 for the rest of effect.</p>
<p>What I thought is how can I make font stand out in a purple background? The answer to the question is PT Sans, white font and CSS3 text-shadow, text-shadow adds to the contrast and does it very nicely.  I don&#8217;t know what you think?  But I thought the text-shadow was stunning but it does not work with IE9 and below, just looks plain on IE9, still stand out.</p>
<p>The great thing about purple is that it&#8217;s not as common as black or white, a lot of site use black a lot more site use white, lol I say no more.</p>
<div class="shr-publisher-2049"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/06/18/talking-about-deep-purple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 AV Manager Introduction</title>
		<link>http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/</link>
		<comments>http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 23:50:20 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1986</guid>
		<description><![CDATA[Video Courtesy of MediaElement.js (John Dyer). Hello it&#8217;s been a while, I been working on a new WordPress plugin called HTML5 AV Manager, I built it to replace HTML5 Multimedia Framework for WordPress, so it&#8217;s a completely different beast to the framework.  The Framework &#8230; <a href="http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><video class="video"
       id="video-1"
       title="HTML5 AV Manager Intro"
       alt=""
       poster="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg"
       width="480"
       height="270"
       controls>
                   <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.mp4"
                type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
                    <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.webm"
                type='video/webm; codecs="vp8, vorbis"' />
                    <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.ogv"
                type='video/ogg; codecs="theora, vorbis"' />
                                <track src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/mediaelement.srt"
               kind="subtitles"
               srclang="en"
               label="English" />
                              <object width="480" height="270"
                type="application/x-shockwave-flash"
                data="http://cj-jackson.com/wp-content/plugins/html5avmanager/lib/mediaelement/flashmediaelement.swf">
            <param name="movie"
                   value="http://cj-jackson.com/wp-content/plugins/html5avmanager/lib/mediaelement/flashmediaelement.swf" />
            <param name="flashvars" value="controls=true&poster=http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg&file=http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.mp4" />
            <!-- Image as a last resort -->
            <img src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg"
                 width="480"
                 height="270"
                 title="No video playback capabilities" />
        </object>
    </video><br /><p>Video Courtesy of <a href="http://mediaelementjs.com/">MediaElement.js</a> (John Dyer).</p>
<p>Hello it&#8217;s been a while, I been working on a new WordPress plugin called HTML5 AV Manager, I built it to replace HTML5 Multimedia Framework for WordPress, so it&#8217;s a completely different beast to the framework.  The Framework was getting to complex to manage so I had to build a new plugin from scratch and there is no backward compatibility with the Framework sadly but does work along side.</p>
<p>Anyway so here the gallery, have fun browsing.  Because pictures are worth a thousand words.</p>

<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/html5av/' title='The Admin Sidebar'><img width="156" height="144" src="http://cj-jackson.com/wp-content/uploads/2011/06/html5av.png" class="attachment-thumbnail" alt="The Admin Sidebar" title="The Admin Sidebar" /></a>
<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/html5avsettings/' title='Settings, not many to adjust'><img width="195" height="45" src="http://cj-jackson.com/wp-content/uploads/2011/06/html5avsettings-195x45.png" class="attachment-thumbnail" alt="Settings, not many to adjust" title="Settings, not many to adjust" /></a>
<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/addvideo/' title='Add Video Panel'><img width="148" height="195" src="http://cj-jackson.com/wp-content/uploads/2011/06/addvideo-148x195.png" class="attachment-thumbnail" alt="Add Video Panel" title="Add Video Panel" /></a>
<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/addaudio/' title='Add Audio Panel'><img width="123" height="195" src="http://cj-jackson.com/wp-content/uploads/2011/06/addaudio-123x195.png" class="attachment-thumbnail" alt="Add Audio Panel" title="Add Audio Panel" /></a>
<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/manager/' title='Add, Reorder, Upload, Edit Info, all with ease!'><img width="195" height="110" src="http://cj-jackson.com/wp-content/uploads/2011/06/manager-195x110.png" class="attachment-thumbnail" alt="Add, Reorder, Upload, Edit Info, all with ease!" title="Add, Reorder, Upload, Edit Info, all with ease!" /></a>
<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/thepostwidget/' title='The Widget, it&#039;s all buttons, very easy to use!'><img width="195" height="39" src="http://cj-jackson.com/wp-content/uploads/2011/06/thepostwidget-195x39.png" class="attachment-thumbnail" alt="The Widget, it&#039;s all buttons, very easy to use!" title="The Widget, it&#039;s all buttons, very easy to use!" /></a>
<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/videodefaultintheme/' title='You can edit video html in theme with ease, pretty neat huh?'><img width="195" height="118" src="http://cj-jackson.com/wp-content/uploads/2011/06/videodefaultintheme-195x118.png" class="attachment-thumbnail" alt="You can edit video html in theme with ease, pretty neat huh?" title="You can edit video html in theme with ease, pretty neat huh?" /></a>
<a href='http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/audiodefaultintheme/' title='Edit Audio HTML Code in theme, with ease'><img width="195" height="105" src="http://cj-jackson.com/wp-content/uploads/2011/06/audiodefaultintheme-195x105.png" class="attachment-thumbnail" alt="Edit Audio HTML Code in theme, with ease" title="Edit Audio HTML Code in theme, with ease" /></a>

<p>It&#8217;s took me about 3 or 4 days to get this far, I have applied two concept a Model-View-Controller and Object-Relationship-Mapping, some say PHP is not good at ORM, but at least PHP has the basic tools such as if statement and foreach loops and the ORM works solidly and I have made heavy use of jQuery in the admin panel.  Like the Framework it will come with MediaElement.JS by John Dyer and of course you can change MediaElement.JS settings in the theme editor and you can add your own views with different settings.</p>
<p>You can either upload videos or use external URL, I used a re-factored version of <a href="http://www.uploadify.com/">Uploadify</a> for upload, it&#8217;s re-factored so it&#8217;s does not interfere with other WordPress plugins that relies on Uploadify.  I love the MIT license.</p>
<p>The plugin will require PHP5.2 with PDO (with PDO_MySQL), I just don&#8217;t like WPDB classes and it&#8217;s easier for me.</p>
<p><strong>Update: </strong>I added two more views to the configuration, one that forces flash and the other forces silverlight.  Mainly just to show off the consistency of mediaelement.js.</p>
<p><code>&#91;html5av id=&quot;1&quot; view=&quot;flash&quot;&#93;</code></p>
<video class="video"
       id="video-1"
       title="HTML5 AV Manager Intro"
       alt=""
       poster="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg"
       width="480"
       height="270"
       controls>
                   <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.mp4"
                type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
                    <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.webm"
                type='video/webm; codecs="vp8, vorbis"' />
                    <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.ogv"
                type='video/ogg; codecs="theora, vorbis"' />
                                <track src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/mediaelement.srt"
               kind="subtitles"
               srclang="en"
               label="English" />
                              <object width="480" height="270"
                type="application/x-shockwave-flash"
                data="http://cj-jackson.com/wp-content/plugins/html5avmanager/lib/mediaelement/flashmediaelement.swf">
            <param name="movie"
                   value="http://cj-jackson.com/wp-content/plugins/html5avmanager/lib/mediaelement/flashmediaelement.swf" />
            <param name="flashvars" value="controls=true&poster=http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg&file=http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.mp4" />
            <!-- Image as a last resort -->
            <img src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg"
                 width="480"
                 height="270"
                 title="No video playback capabilities" />
        </object>
    </video>
<p><code>&#91;html5av id=&quot;1&quot; view=&quot;silverlight&quot;&#93;</code></p>
<video class="video"
       id="video-1"
       title="HTML5 AV Manager Intro"
       alt=""
       poster="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg"
       width="480"
       height="270"
       controls>
                   <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.mp4"
                type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
                    <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.webm"
                type='video/webm; codecs="vp8, vorbis"' />
                    <source src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.ogv"
                type='video/ogg; codecs="theora, vorbis"' />
                                <track src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/mediaelement.srt"
               kind="subtitles"
               srclang="en"
               label="English" />
                              <object width="480" height="270"
                type="application/x-shockwave-flash"
                data="http://cj-jackson.com/wp-content/plugins/html5avmanager/lib/mediaelement/flashmediaelement.swf">
            <param name="movie"
                   value="http://cj-jackson.com/wp-content/plugins/html5avmanager/lib/mediaelement/flashmediaelement.swf" />
            <param name="flashvars" value="controls=true&poster=http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg&file=http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.mp4" />
            <!-- Image as a last resort -->
            <img src="http://cj-jackson.com/wp-content/videoaudio/2011/06/html5-av-multimedia-intro/echo-hereweare.jpg"
                 width="480"
                 height="270"
                 title="No video playback capabilities" />
        </object>
    </video>
<p>Yes, it&#8217;s only has two parameters, because the rest of the information is stored on the database.  I think I use flash as the default, it&#8217;s doesn&#8217;t seem to have the alignment problem unlike native html5.</p>
<p><strong>Update 2: </strong>I have uploaded a copy of the plugin which should be ready for production use and hopefully will soon be available on WordPress.org if it get approved, should be tomorrow, I don&#8217;t think they work weekends. Anyway the link is below.</p>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/06/html5avmanager.zip">HTML5 AV Manager 0.1.0</a></p>
<p><strong>Update 3:</strong> Now available on WordPress.org.</p>
<p><a href="http://wordpress.org/extend/plugins/html5avmanager/">http://wordpress.org/extend/plugins/html5avmanager/</a></p>
<div class="shr-publisher-1986"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/06/11/html5-av-manager-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Rig, My Workspace and Specification</title>
		<link>http://cj-jackson.com/2011/05/29/my-rig-my-workspace-and-specification/</link>
		<comments>http://cj-jackson.com/2011/05/29/my-rig-my-workspace-and-specification/#comments</comments>
		<pubDate>Sun, 29 May 2011 20:11:00 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[kick-ass]]></category>
		<category><![CDATA[rig]]></category>
		<category><![CDATA[specification]]></category>
		<category><![CDATA[workspace]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1972</guid>
		<description><![CDATA[My Kick-ass Rig Yes, it&#8217;s nice and tidy, all thanks to the cable routing feature on the case, the case is a Corsair 600T Graphite Series.  This is the best case I have had so far, the previous ones were &#8230; <a href="http://cj-jackson.com/2011/05/29/my-rig-my-workspace-and-specification/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h2>My Kick-ass Rig</h2>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/05/CIMG0860.jpg"><img class="aligncenter size-medium wp-image-1973" title="Inside of the rig" src="http://cj-jackson.com/wp-content/uploads/2011/05/CIMG0860-640x600.jpg" alt="Inside of the rig" width="640" height="600" /></a></p>
<p>Yes, it&#8217;s nice and tidy, all thanks to the cable routing feature on the case, the case is a Corsair 600T Graphite Series.  This is the best case I have had so far, the previous ones were more tedious to manage because the cables keep getting in the way even with a modular PSU, as you can see it&#8217;s not a problem with the current case.</p>
<p>The only problem I had so far was the vibration noise coming off the PSU, I fixed the problem by placing a <a href="http://wedge.org/">wedge</a> made out of paper between the PSU and the Case (as you can see in the picture), therefore the PC is now nice and quiet.</p>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/05/CIMG0865.jpg"><img class="aligncenter size-medium wp-image-1974" title="Top and front of rig" src="http://cj-jackson.com/wp-content/uploads/2011/05/CIMG0865-311x640.jpg" alt="Top and front of rig" width="311" height="640" /></a></p>
<p>As you can see, this is the top and front of the case, it&#8217;s has 4 USB2 port, a USB3 port (not currently connected), mic &amp; headphone socket and a Firewire port, also the power and reset button on top.  The reset button is covered up with the iPhone dock, because my cat love to jump on my case and hit the reset button. The power button will tell the computer to go to sleep while it&#8217;s switch on so I&#8217;m not worried about the cat hitting that.</p>
<p>So yes there disadvantage of having a power button on top of the case if you own a house cat =D, the advantage is that it&#8217;s allows room for large front fan.</p>
<h2>My Cool Workspace</h2>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/05/CIMG0868.jpg"><img class="aligncenter size-medium wp-image-1975" title="Cool Workspace" src="http://cj-jackson.com/wp-content/uploads/2011/05/CIMG0868-640x480.jpg" alt="Cool Workspace" width="640" height="480" /></a>I currently use <a href="http://www.inputdirector.com/">Input Director</a> to control both computers, under one mouse and keyboard, eventually I will switch from Input Director to <a href="http://synergy-foss.org/">Synergy</a> when the sticky key bug is fixed.  I forgot to minimize Input Director.</p>
<p>I was also thinking about turning my laptop in something that Mr. Jobs won&#8217;t allow under EULA.</p>
<h2>My Ridiculous Specification</h2>
<h3>CPU</h3>
<p>AMD Phenom II 1090T overclocked to 3.82Ghz and disabled turbo core.</p>
<p>Encode 1080p video at around 30-40fps x264 (ffmpeg)</p>
<h3>Motherboard</h3>
<p>Gigabyte MA770-US3</p>
<h3>Memory</h3>
<p>8GB DDRII-800 Ram (Corsair XMS2)</p>
<p>Still performs quite well with modern games, which is awesome.</p>
<h3>GPU</h3>
<p>AMD Radeon HD 6970 (2GB GDDR5 Memory)</p>
<p>Decode Xvid &amp; DivX, which is nice, considering that decoding those format is not a problem with Intel Atom let alone Phenom II or i5. Unlike H.264 and VC1 they struggle with Intel Atom.  My HTPC has Intel Atom with Nvidia Ion.</p>
<h3>HDD</h3>
<p>500GB &amp; 1TB Seagate Hard Drives</p>
<h3>Monitor</h3>
<p>22″ Samsung Syncmaster 2232bw</p>
<h3>Speakers/Headphones</h3>
<p>Logitech LS11 / Sennheiser HD201 (Cushioned) &amp; CX300-II (In-ear)</p>
<p>Sennheiser is a very good make, Cushioned is good for movies and games, In-ear is good for iPods the bass is amazing on the CX300-II, if you are a fan of Rock go for it.</p>
<p>I use audio jack on top of the case, not the speaker because I find it&#8217;s better.</p>
<h3>Keyboard</h3>
<p>Microsoft Wired Keyboard 600.</p>
<p>I used to have Microsoft Natural Ergonomic Keyboard 4000 (still got it), it&#8217;s good but it&#8217;s took up too much desk space, so I which to a smaller keyboard.</p>
<h3>Mouse</h3>
<p>Microsoft Wireless Mobile Mouse 6000</p>
<p>Yes it&#8217;s wireless, yes it&#8217;s design for laptop, but I have small hands and feels great because there no wires causing a bit of tension.</p>
<h3>OS</h3>
<p>Microsoft Windows 7 Ultimate 64-bit</p>
<p>I like to stay flexible, fully activated under OEM-SLP, MS shot themselves in the foot.</p>
<h3>Case</h3>
<p>Corsair 600T Graphite Series</p>
<p>It&#8217;s got lot of rubber grommet for cable router and water cooling, which is nice and awesome.</p>
<div class="shr-publisher-1972"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/05/29/my-rig-my-workspace-and-specification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CJ-Jackson.com gone cool blue!</title>
		<link>http://cj-jackson.com/2011/05/27/cj-jackson-com-gone-cool-blue/</link>
		<comments>http://cj-jackson.com/2011/05/27/cj-jackson-com-gone-cool-blue/#comments</comments>
		<pubDate>Fri, 27 May 2011 20:46:11 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[busy]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[paid project]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1964</guid>
		<description><![CDATA[It&#8217;s been awhile since I made my last blog post, I have been quite busy lately, I haven&#8217;t even had time to work on RockForums.Co as I&#8217;m currectly working on a paid project at the moment. I have change the &#8230; <a href="http://cj-jackson.com/2011/05/27/cj-jackson-com-gone-cool-blue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>It&#8217;s been awhile since I made my last blog post, I have been quite busy lately, I haven&#8217;t even had time to work on RockForums.Co as I&#8217;m currectly working on a paid project at the moment.</p>
<p>I have change the theme once again, I was getting bored of the grey background, I also change the webfont in the header because it&#8217;s was slow on the iPhone, why Apple uses SVG? I don&#8217;t know.</p>
<p>Anyway I will post my rig in my next post!  So see ya around!</p>
<p><strong>Update: </strong>I know this is not the best theme in the world, but what awesome about it, is the fact I applied my own Illustrator skills in place with this theme.</p>
<div class="shr-publisher-1964"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/05/27/cj-jackson-com-gone-cool-blue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RockForums.tk Public Beta</title>
		<link>http://cj-jackson.com/2011/04/11/rockforums-tk-public-beta/</link>
		<comments>http://cj-jackson.com/2011/04/11/rockforums-tk-public-beta/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 20:01:17 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[evaluation]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[public beta]]></category>
		<category><![CDATA[rockforums.tk]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1949</guid>
		<description><![CDATA[I have finally open up RockForums.tk to the public, the deployment went OK, although I did have a few problems.  Email validation didn&#8217;t seem to work, in context with spambots, thank goodness as well, otherwise the forums would of been a &#8230; <a href="http://cj-jackson.com/2011/04/11/rockforums-tk-public-beta/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I have finally open up RockForums.tk to the public, the deployment went OK, although I did have a few problems.  Email validation didn&#8217;t seem to work, in context with spambots, thank goodness as well, otherwise the forums would of been a complete mess, full of nonsense.  I wouldn&#8217;t want that.</p>
<p>How I dealt with the spambots, the first attempt was implementing reCAPTCHA, which didn&#8217;t work, the spambots OCR has advanced and will continue to do because some people are simply just motivated by greed and probably has no value for morality but that another story so let move on.</p>
<p>Advanced spambots uses random emails addresses, you probably would think it might be a problem, well trust me they are very easy to detect, why? because those email addresses are so random that almost none of them have a Gravatar.</p>
<p><a href="http://gravatar.com">Gravatar</a> is an online service that a image (knowns as avatar) to one email or more email address, of course not many user have a Gravatar account,  Wordpress bloggers are very likely to have an Gravatar.</p>
<p>Yes I have use Gravatar as the second attempt to prevent, yep I&#8217;m actually using beyond it&#8217;s purpose.  Here a sample code, it&#8217;s very simple.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
$email = &quot;whatever@whatever.com&quot;;
$gravatar = 'http://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?d=404'; // Note the 404 so it returns blank if there no avatar
$file = @file_get_contents($gravatar);
if($file == '') { // If $file compare to blank
echo 'Error: No Avatar';
} else {
echo 'Avatar found';
}
?&gt;</pre>
<p>What I did to the email address was trim it so there no white space, lower cased it and then converted to a md5 checksum and place it into a URL.  Get the contents of the url, run it through a if logic, if true then there no gravatar, therefore stopping the spambots from registering on rockforums.tk as most (if not, all) spambots don&#8217;t bother with gravatar.</p>
<p>I have took my time to fixed the email validation problem, I couldn&#8217;t get it to work with swiftmailer which came with the framework, so instead I used PHP mail() and it worked like a charm, the validation that came in the email worked with no problem.</p>
<p>Most of the pages on RockForums.tk have passed HTML5 validation, but there is one shortcode that produces img html code without the &#8220;alt&#8221; attribute, that shoudn&#8217;t be a problem I can fixed that very easily.</p>
<p>I have made good use of jQuery, I have not used it in a way that would impair bookmarking or any other critical features of any web browser, it just there to enhance the user experience especially on registration (mostly data validation) and posting new topics.  Enhancing user experience is the general idea of JavaScript, jQuery is just library, a very good one as well, it&#8217;s make JavaScript hell of a lot easier.</p>
<p>On the storyboard there was a tag cloud, but trying implement that feature was very frustration and eventually started getting very counter-productive, the main problem was trying to write a SQL query, I just couldn&#8217;t get it to count the related records between tag and tag-topic table, maybe it was just a bug with the current version of MySQL, I don&#8217;t know.  I did say it was getting counter-productive, so it not wise to dwell on it, so let move on. <img src='http://cj-jackson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I have added a few moderation and admin options, such as the ability to edit and promote members and to ban certain tags.</p>
<p>Anyway the forum is in public and this probably won&#8217;t be the last evaluation, the link to the forum is below.</p>
<p><a href="http://rockforums.tk">http://rockforums.tk</a></p>
<p>I will think about how I can improve the software.  Anyway I prefer Symfony over CakePHP anyday, anywhere.</p>
<div class="shr-publisher-1949"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/04/11/rockforums-tk-public-beta/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>More on RockForums.tk</title>
		<link>http://cj-jackson.com/2011/03/26/more-on-rockforums-tk/</link>
		<comments>http://cj-jackson.com/2011/03/26/more-on-rockforums-tk/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 19:41:21 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[rockforums.tk]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1944</guid>
		<description><![CDATA[This is a screen-shot of the registration page for rockforums.tk, the very first page I have made use with jQuery and AJAX (with JSON instead of XML), there only two field that have to be unique to other accounts which &#8230; <a href="http://cj-jackson.com/2011/03/26/more-on-rockforums-tk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://cj-jackson.com/wp-content/uploads/2011/03/registration_screenshot.png"><img class="aligncenter size-medium wp-image-1945" title="RockForums.tk Registration" src="http://cj-jackson.com/wp-content/uploads/2011/03/registration_screenshot-607x640.png" alt="" width="607" height="640" /></a></p>
<p>This is a screen-shot of the registration page for rockforums.tk, the very first page I have made use with jQuery and AJAX (with JSON instead of XML), there only two field that have to be unique to other accounts which are username and email, which are validated on both sides client and server, the other fields are validated client-side except for Time Zone and Time Format, they don&#8217;t need validation so therefore the ticks will be noticed straight away on those fields as they are actually drop down as you can see.</p>
<p>It took me about two or three hours to perfect this page, I had to make sure that there was no errors and that why it took me longer.</p>
<p>As for RockForums.tk, I really want to get this project out as quick as possible and of course I will make sure that there are no serious errors.  On the positive note I am making good progress on the project, let not forget I have finished University and therefore this project has nothing to do with University.</p>
<p>P.S. I&#8217;m aware that my email address is on the screen-shot, but it&#8217;s also on my CV anyway, so it not really an issue.  Yes I have change the design, changes happen.</p>
<div class="shr-publisher-1944"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/03/26/more-on-rockforums-tk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RockForums.tk design progress</title>
		<link>http://cj-jackson.com/2011/03/17/rockforums-tk-design-progress/</link>
		<comments>http://cj-jackson.com/2011/03/17/rockforums-tk-design-progress/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 23:17:21 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[designs]]></category>
		<category><![CDATA[ERD]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[rockforums.tk]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1937</guid>
		<description><![CDATA[First Step &#8211; Object-Role Modeling (ORM) The very first thing I did on the project was design a database using the Object-Role Modeling concept, the only many-to-many relationship mentioned in the diagram is the relationship between the Topic and the &#8230; <a href="http://cj-jackson.com/2011/03/17/rockforums-tk-design-progress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h1>First Step &#8211; Object-Role Modeling (ORM)</h1>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/03/Object_Role_Model.png"><img class="aligncenter size-medium wp-image-1938" title="Object Role Model" src="http://cj-jackson.com/wp-content/uploads/2011/03/Object_Role_Model-640x453.png" alt="" width="640" height="453" /></a></p>
<p>The very first thing I did on the project was design a database using the <a href="http://en.wikipedia.org/wiki/Object-Role_Modeling">Object-Role Modeling</a> concept, the only many-to-many relationship mentioned in the diagram is the relationship between the Topic and the Tag.</p>
<h1>Second Step &#8211; Entity-Relationship Diagram (ERD)</h1>
<p><img class="aligncenter size-full wp-image-1939" title="Entity Relationa Diagram" src="http://cj-jackson.com/wp-content/uploads/2011/03/Entity_Relational_Diagram.png" alt="" width="545" height="323" /></p>
<p>I converted the original database design into a simpler Entity-Relationship Diagram, where there was a many-to-many relationships, the attribute tag became an entity, with a new entity added between Topic and Tag therefore eliminating the need for a many-to-many relationship the very logic that does not apply very well to a real working database such as Oracle and MySQL.  I pronounce SQL as sequel, not S-Q-L.</p>
<h1>Third Step &#8211; Master Template Design</h1>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/03/TheMainTemplate.jpg"><img class="aligncenter size-medium wp-image-1940" title="Master Template" src="http://cj-jackson.com/wp-content/uploads/2011/03/TheMainTemplate-640x465.jpg" alt="" width="640" height="465" /></a></p>
<p>I get more satisfaction doing it on paper then designing it on a screen, mostly because it just help me think out the position and come up with new ideas, I will probably have the login part on the top right corner.  As for the current year, easy &#8216;date(&#8220;y&#8221;);&#8217; on the bottom right corner.  The content are in the next step.</p>
<h1>Forth Step &#8211; Content Storyboards</h1>
<h2>Front Page &amp; Bulletin Board</h2>
<p style="text-align: center;"><a href="http://cj-jackson.com/wp-content/uploads/2011/03/FrontPage_Storyboard.jpg"><img class="aligncenter size-medium wp-image-1941" title="Front Page Design" src="http://cj-jackson.com/wp-content/uploads/2011/03/FrontPage_Storyboard-640x483.jpg" alt="" width="640" height="483" /></a></p>
<p style="text-align: left;">The tag page will be the same but without the tag cloud.  The finished project will have the announcement thing on top.  The Bulletin Board will be a tag-based concept rather than a usual forum-based concept.  A lot of musicians like to experiment with different genre and make new one, therefore forum-based concept will be very complex in that area, with a tag-based concept any users can define there own tag just as musicians can define there own genre therefore adding level of flexibility and cutting down on complexity.</p>
<h2 style="text-align: left;">User Profile</h2>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/03/UserProfile_Storyboard.jpg"><img class="aligncenter size-medium wp-image-1942" title="User Profile Design" src="http://cj-jackson.com/wp-content/uploads/2011/03/UserProfile_Storyboard-460x640.jpg" alt="" width="460" height="640" /></a>Bio part is all about the users, I allow shortcode in there as well, save the admin time from adding custom field.  The shortcode feature is very similar to the one in WordPress.</p>
<div class="shr-publisher-1937"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/03/17/rockforums-tk-design-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Best Tick</title>
		<link>http://cj-jackson.com/2011/03/13/my-best-tick/</link>
		<comments>http://cj-jackson.com/2011/03/13/my-best-tick/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 12:12:01 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Illustration]]></category>
		<category><![CDATA[tick]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1930</guid>
		<description><![CDATA[Before Digitisation The rough copy I did on paper, I&#8217;m aware that I still need to improve on my drawing. After Digitisation What I did with the tick above is scanned the image, pick out the anchor points, use brazier &#8230; <a href="http://cj-jackson.com/2011/03/13/my-best-tick/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h1>Before Digitisation</h1>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1931" title="Tick on Paper" src="http://cj-jackson.com/wp-content/uploads/2011/03/tick.jpg" alt="" width="482" height="345" /></p>
<p>The rough copy I did on paper, I&#8217;m aware that I still need to improve on my drawing.</p>
<h1>After Digitisation</h1>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/03/tick.png"><img class="aligncenter size-medium wp-image-1932" title="Perfected Tick done on Illustator." src="http://cj-jackson.com/wp-content/uploads/2011/03/tick-640x461.png" alt="" width="640" height="461" /></a></p>
<p>What I did with the tick above is scanned the image, pick out the anchor points, use brazier curve, use gradient of green for two different ticks and plain black for the shadow effect.  Here my point:-</p>
<p><img class="alignnone size-full wp-image-1933" title="Small Tick" src="http://cj-jackson.com/wp-content/uploads/2011/03/smalltick.png" alt="" width="40" height="29" /> Stand out quite well.</p>
<p><img title="Small Tick" src="http://cj-jackson.com/wp-content/uploads/2011/03/smalltick.png" alt="" width="40" height="29" /> Looks alright on smaller scale.</p>
<p><img title="Small Tick" src="http://cj-jackson.com/wp-content/uploads/2011/03/smalltick.png" alt="" width="40" height="29" /> As you can see makes good bullet points, sorry did I poke you there.</p>
<p>Probably one of my best I done on Illustrator.</p>
<div class="shr-publisher-1930"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/03/13/my-best-tick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I have pass University</title>
		<link>http://cj-jackson.com/2011/02/27/i-have-past-university/</link>
		<comments>http://cj-jackson.com/2011/02/27/i-have-past-university/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 23:50:07 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[2nd class]]></category>
		<category><![CDATA[BSc Honours]]></category>
		<category><![CDATA[passed]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1914</guid>
		<description><![CDATA[Yep I have finally past University, I will be graduating and getting my certificate this year, the part I enjoyed most was doing web development obviously and of course having a laugh, yeah there has been a few up and &#8230; <a href="http://cj-jackson.com/2011/02/27/i-have-past-university/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Yep I have finally past University, I will be graduating and getting my certificate this year, the part I enjoyed most was doing web development obviously and of course having a laugh, yeah there has been a few up and down on and off university, but I have made it though and have learned from my mistakes I have made.</p>
<p>Knowing myself well I have had a lot of distraction while I was at University but I past Computer Science with Bachelor of Science with Honours 2nd class, 2nd division, well it&#8217;s better than a pass and that for sure.</p>
<h1>My Future Plans</h1>
<p>At the moment I&#8217;m on Freelance Web Development which is way better than being unemployed, I could do with full time employment in Web Development and that would hopefully help me to gain the edge in that subject, but thing are just going bad in Britain, there hardly any jobs going on for Web Development or graduate jobs.</p>
<p>Even the people who go to Cambridge and Oxford University have a slim chance of getting graduate job in Britain, as for me I&#8217;m Wolverhampton.  However I have found quite a few Web Development in the United States, but the expectation tend to be high when compared to shitty Britain. I guess I have to work to that expectation, which is going to be challenging and probably fun as well.  I don&#8217;t mind a challenge.</p>
<p>Christopher John Jackson, BSc Honours.</p>
<h1>On second thought</h1>
<p>Forget the United States, I ain&#8217;t waiting five years to get a visa, they can forget me!</p>
<div class="shr-publisher-1914"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/02/27/i-have-past-university/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Let Play Bejewelled 3</title>
		<link>http://cj-jackson.com/2011/02/07/let-playerbejewelled-3/</link>
		<comments>http://cj-jackson.com/2011/02/07/let-playerbejewelled-3/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 21:39:25 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[720p]]></category>
		<category><![CDATA[bejewelled 3]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1851</guid>
		<description><![CDATA[Me playing bejewelled 3 as you can see! =D]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p> <!-- Video for Everybody, Kroc Camen of Camen Design --><video  poster="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.jpg" width="640" height="400" title="Bejewelled 3" controls preload="none" class="media" > <source src="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.main.m4v" type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"' /><source src="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /><source src="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.webm" type='video/webm; codecs="vp8, vorbis"' /> <object   type="application/x-shockwave-flash"  data="http://cj-jackson.com/wp-content/plugins/wphtml5player/inc/flowplayer.swf"  width="640"  height="400"  title="Bejewelled 3"><param name="movie" value='http://cj-jackson.com/wp-content/plugins/wphtml5player/inc/flowplayer.swf' /><param name="allowfullscreen" value='true' /><param name="cachebusting" value='true' /><param name="bgcolor" value='#000000' /><param name="wmode" value='transparent' /><param name="flashvars" value='config={"playlist":[{"url":"http:\/\/cj-jackson.com\/wp-content\/uploads\/2011\/02\/Bejeweled3.jpg"},{"url":"http:\/\/cj-jackson.com\/wp-content\/uploads\/2011\/02\/Bejeweled3.main.m4v","autoPlay":false,"scaling":"fit"}],"plugins":{"controls":{"fullscreen":false}},"canvas":{"backgroundGradient":"none"}}' /><img src="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.jpg" /><br />No video playback capabilities, please download the video below<br /></object> <!-- Generated by HTML5 Multimedia Framework (http://code.google.com/p/html5videoplayer) --> </video>
<p><strong>Download Video:</strong> Closed Format: <a href="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.main.m4v">MP4 (Main)</a> <a href="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.m4v">MP4</a> Open Format: <a href="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.webm">WebM</a></p>
<p>Me playing bejewelled 3 as you can see! =D</p>
<div class="shr-publisher-1851"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/02/07/let-playerbejewelled-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://cj-jackson.com/wp-content/uploads/2011/02/Bejeweled3.main.m4v" length="57058950" type="video/mp4" />
		</item>
		<item>
		<title>Getting the hang of symfony!</title>
		<link>http://cj-jackson.com/2011/01/25/getting-the-hang-of-symfony/</link>
		<comments>http://cj-jackson.com/2011/01/25/getting-the-hang-of-symfony/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 21:14:15 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1831</guid>
		<description><![CDATA[I&#8217;m currently working on a new forum script for rockforums.tk using the symfony framework (rolls off my tongue nicely), the reason why I&#8217;m doing this so that I can improve on my prospects and have something to show off in my &#8230; <a href="http://cj-jackson.com/2011/01/25/getting-the-hang-of-symfony/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I&#8217;m currently working on a new forum script for rockforums.tk using the <a href="http://www.symfony-project.org/">symfony framework</a> (rolls off my tongue nicely), the reason why I&#8217;m doing this so that I can improve on my prospects and have something to show off in my portfolio for the potential employer to see.  Anyway I just off my two pieces of work, which are the controller and the view of a page as well as the output, as for the model and other parts of the code I would rather keep that a closely guarded secret.</p>
<h2>Controller</h2>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class contentActions extends sfActions {

    public function executeIndex(sfWebRequest $request) {
        $pager = new sfDoctrinePager('Topic', 10);
        $pager->getQuery();
        $pager->setPage($this->getRequestParameter('page',1));
        $pager->init();

        $this->topics = $pager->getResults();
    }
}
?&gt;
</pre>
<h2>View</h2>
<pre class="brush: php; title: ; notranslate">
<h1>Topics!</h1>
&lt;?php foreach($topics as $topic) : ?&gt;
&lt;?php echo $topic->getID(); ?&gt;<br />
&lt;?php echo $topic->getTitle(); ?&gt;<br />
&lt;?php echo $topic->getSlug(); ?&gt;<br />
&lt;?php echo $topic->getFormattedStartDate(); ?&gt;<br />
&lt;?php echo $topic->getFormattedLastPostDate(); ?&gt;<br />
&lt;?php echo $topic->getIpAddress(); ?&gt;<br />
&lt;?php endforeach; ?&gt;
</pre>
<h2>Output</h2>
<p><a href="http://cj-jackson.com/wp-content/uploads/2011/01/symfony3.png"><img class="aligncenter size-medium wp-image-1837" title="Output of Forums" src="http://cj-jackson.com/wp-content/uploads/2011/01/symfony3-640x256.png" alt="" width="640" height="256" /></a>As you can see, I got the design out of the way and I still have a lot of work to do and please do not ask question, I simply don&#8217;t have the bloody time to answer, thank you. But you can give me tips if you want to. <img src='http://cj-jackson.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1831"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/01/25/getting-the-hang-of-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move Program Files and Users directory to another hard drive/partition on Vista/7</title>
		<link>http://cj-jackson.com/2011/01/18/move-program-files-and-users-directory-to-another-hard-drivepartition-on-vista7/</link>
		<comments>http://cj-jackson.com/2011/01/18/move-program-files-and-users-directory-to-another-hard-drivepartition-on-vista7/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 20:11:15 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hard-drive organisation]]></category>
		<category><![CDATA[symlink]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1826</guid>
		<description><![CDATA[I believe some computer users are moving on to Solid State Drive, so I thought I just write and post this tutorial esspecially for the ones who want to keep the Program Files, as well as the Users directory on &#8230; <a href="http://cj-jackson.com/2011/01/18/move-program-files-and-users-directory-to-another-hard-drivepartition-on-vista7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I believe some computer users are moving on to Solid State Drive, so I thought I just write and post this tutorial esspecially for the ones who want to keep the Program Files, as well as the Users directory on seperate disc drive.</p>
<p><strong>Requisite:</strong> Windows Vista/7 installation disc, you do not need to turn off UAC btw.</p>
<p>1. Prepare the batch files, similar to the examples below, place them on the root of the C drive and make sure there is no mistakes.</p>
<p><strong>copy.bat</strong></p>
<p><code>xcopy &quot;C:\Program Files&quot; &quot;D:\Program Files&quot; /e /q /h /k /x<br />
xcopy &quot;C:\Program Files (x86)&quot; &quot;D:\Program Files (x86)&quot; /e /q /h /k /x<br />
xcopy &quot;C:\Users&quot; &quot;D:\Users&quot; /e /q /h /k /x</code></p>
<p><strong>removeAndSymlink.bat</strong></p>
<p><code>rmdir &quot;C:\Program Files&quot; &quot;C:\Program Files (x86)&quot; &quot;C:\Users&quot; /s /q<br />
mklink /d &quot;C:\Program Files&quot; &quot;D:\Program Files&quot;<br />
mklink /d &quot;C:\Program Files (x86)&quot; &quot;D:\Program Files (x86)&quot;<br />
mklink /d &quot;C:\Users&quot; &quot;D:\Users&quot;</code></p>
<p>2. Bootup the Windows Vista/7 installation disc.</p>
<p>3. As soon as you see the language selection screen press shift+F10 which should bring up the command prompt.</p>
<p>4. Type in C: and press enter (You may want to check the content of each drive just to be sure, just type dir for each drive).</p>
<p>5. Execute copy.bat, if successful go to next step, otherwise check for errors.</p>
<p>6. Execute removeAndSymlink.bat, if successful go to next step, otherwise check for errors.</p>
<p>7. You&#8217;re done, feel free to press reset on the hardware. =D</p>
<p>One more thing take no notice of those linux fanboys, saying that Windows has no symlink. =D</p>
<div class="shr-publisher-1826"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2011/01/18/move-program-files-and-users-directory-to-another-hard-drivepartition-on-vista7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow, Snow, Snow</title>
		<link>http://cj-jackson.com/2010/12/18/snow-snow-snow/</link>
		<comments>http://cj-jackson.com/2010/12/18/snow-snow-snow/#comments</comments>
		<pubDate>Sat, 18 Dec 2010 14:54:16 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1814</guid>
		<description><![CDATA[Never get fed of that stuff, but riding my motorbike is always out of the question!]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->
<a href='http://cj-jackson.com/2010/12/18/snow-snow-snow/img_0064/' title='Snow and Trees 7'><img width="146" height="195" src="http://cj-jackson.com/wp-content/uploads/2010/12/IMG_0064-146x195.jpg" class="attachment-thumbnail" alt="Snow and Trees 7" title="Snow and Trees 7" /></a>
<a href='http://cj-jackson.com/2010/12/18/snow-snow-snow/img_0065/' title='Snow and Trees 6'><img width="195" height="146" src="http://cj-jackson.com/wp-content/uploads/2010/12/IMG_0065-195x146.jpg" class="attachment-thumbnail" alt="Snow and Trees 6" title="Snow and Trees 6" /></a>
<a href='http://cj-jackson.com/2010/12/18/snow-snow-snow/img_0066/' title='Snow and Trees 5'><img width="146" height="195" src="http://cj-jackson.com/wp-content/uploads/2010/12/IMG_0066-146x195.jpg" class="attachment-thumbnail" alt="Snow and Trees 5" title="Snow and Trees 5" /></a>
<a href='http://cj-jackson.com/2010/12/18/snow-snow-snow/img_0067/' title='Snow and Trees 4'><img width="146" height="195" src="http://cj-jackson.com/wp-content/uploads/2010/12/IMG_0067-146x195.jpg" class="attachment-thumbnail" alt="Snow and Trees 4" title="Snow and Trees 4" /></a>
<a href='http://cj-jackson.com/2010/12/18/snow-snow-snow/img_0068/' title='Snow and Trees 3'><img width="195" height="146" src="http://cj-jackson.com/wp-content/uploads/2010/12/IMG_0068-195x146.jpg" class="attachment-thumbnail" alt="Snow and Trees 3" title="Snow and Trees 3" /></a>
<a href='http://cj-jackson.com/2010/12/18/snow-snow-snow/img_0069/' title='Snow and Trees 2'><img width="146" height="195" src="http://cj-jackson.com/wp-content/uploads/2010/12/IMG_0069-146x195.jpg" class="attachment-thumbnail" alt="Snow and Trees 2" title="Snow and Trees 2" /></a>
<a href='http://cj-jackson.com/2010/12/18/snow-snow-snow/img_0070/' title='Snow and Trees 1'><img width="146" height="195" src="http://cj-jackson.com/wp-content/uploads/2010/12/IMG_0070-146x195.jpg" class="attachment-thumbnail" alt="Snow and Trees 1" title="Snow and Trees 1" /></a>

<p>Never get fed of that stuff, but riding my motorbike is always out of the question!</p>
<div class="shr-publisher-1814"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2010/12/18/snow-snow-snow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The One API</title>
		<link>http://cj-jackson.com/2010/11/04/the-one-api/</link>
		<comments>http://cj-jackson.com/2010/11/04/the-one-api/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 16:47:33 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[the one api]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1809</guid>
		<description><![CDATA[I was planning on making an open source competitor to Janrain RPX, but then I thought to myself &#8220;woah, this is going to be to damn complicated to take on&#8221; and then I also thought &#8220;no, I won&#8217;t have the &#8230; <a href="http://cj-jackson.com/2010/11/04/the-one-api/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="aligncenter size-full wp-image-1810" title="The One API" src="http://cj-jackson.com/wp-content/uploads/2010/11/TheOneAPI.png" alt="" width="528" height="512" /></p>
<p>I was planning on making an open source competitor to Janrain RPX, but then I thought to myself &#8220;woah, this is going to be to damn complicated to take on&#8221; and then I also thought &#8220;no, I won&#8217;t have the time to do this.&#8221;  The UML diagram you see now is the incomplete design of the project and sadly won&#8217;t be completed, I posted this on my blog because I didn&#8217;t want this to go to waste and in hope that it will give other PHP developers/programmers ideas.</p>
<div class="shr-publisher-1809"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2010/11/04/the-one-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Cube, First Cylinder, First Cone</title>
		<link>http://cj-jackson.com/2010/10/15/first-cube-first-cylinder-first-cone/</link>
		<comments>http://cj-jackson.com/2010/10/15/first-cube-first-cylinder-first-cone/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 20:08:24 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[drawing]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1795</guid>
		<description><![CDATA[Yeah I&#8217;m sharpening up my drawing, hopefully with a lot more practice it will get better then the drawing above.  As for previous work I did on illustrator, let just say I relied too much on logic and hardly used my artistic part of &#8230; <a href="http://cj-jackson.com/2010/10/15/first-cube-first-cylinder-first-cone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://cj-jackson.com/wp-content/uploads/2010/10/first-cube-first-cylinder-first-cone.jpg"><img class="aligncenter size-medium wp-image-1796" title="A Cube, Cylinder and Cone" src="http://cj-jackson.com/wp-content/uploads/2010/10/first-cube-first-cylinder-first-cone-640x462.jpg" alt="" width="640" height="462" /></a>Yeah I&#8217;m sharpening up my drawing, hopefully with a lot more practice it will get better then the drawing above.  As for previous work I did on illustrator, let just say I relied too much on logic and hardly used my artistic part of the brain, yeah I guess you could say that I have been naive.</p>
<div class="shr-publisher-1795"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2010/10/15/first-cube-first-cylinder-first-cone/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Theme</title>
		<link>http://cj-jackson.com/2010/10/05/new-theme/</link>
		<comments>http://cj-jackson.com/2010/10/05/new-theme/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 21:53:01 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[new theme]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1760</guid>
		<description><![CDATA[Yeah, I had fun designing the theme and yes like before it is based on WordPress default Twenty 10 Theme, but I have taken my time just for the sake of perfection and was not a rush job like my &#8230; <a href="http://cj-jackson.com/2010/10/05/new-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Yeah, I had fun designing the theme and yes like before it is based on WordPress default Twenty 10 Theme, but I have taken my time just for the sake of perfection and was not a rush job like my last theme was, let face it my last theme was shit compared to the current one I&#8217;m using now and nobody needs to tell me that (not that anybody did tell me, probably too focus on being nice, therefore not being brutality honest, blahhh =D ) and yes I think might stick to this one for quite awhile.</p>

<a href='http://cj-jackson.com/2010/10/05/new-theme/webdesign1-05-10-2010/' title='Chrome 6.0 Preview'><img width="195" height="183" src="http://cj-jackson.com/wp-content/uploads/2010/10/webdesign1-05-10-2010-195x183.png" class="attachment-thumbnail" alt="Chrome 6.0 Preview" title="Chrome 6.0 Preview" /></a>
<a href='http://cj-jackson.com/2010/10/05/new-theme/webdesign2-05-10-2010/' title='Opera 10.62 Preview'><img width="195" height="184" src="http://cj-jackson.com/wp-content/uploads/2010/10/webdesign2-05-10-2010-195x184.png" class="attachment-thumbnail" alt="Opera 10.62 Preview" title="Opera 10.62 Preview" /></a>
<a href='http://cj-jackson.com/2010/10/05/new-theme/webdesign3-05-10-2010/' title='Firefox 4 Beta 6 Preview'><img width="195" height="184" src="http://cj-jackson.com/wp-content/uploads/2010/10/webdesign3-05-10-2010-195x184.png" class="attachment-thumbnail" alt="Firefox 4 Beta 6 Preview" title="Firefox 4 Beta 6 Preview" /></a>
<a href='http://cj-jackson.com/2010/10/05/new-theme/webdesign4-05-10-2010/' title='Internet Explorer 9 Preview'><img width="195" height="182" src="http://cj-jackson.com/wp-content/uploads/2010/10/webdesign4-05-10-2010-195x182.png" class="attachment-thumbnail" alt="Internet Explorer 9 Preview" title="Internet Explorer 9 Preview" /></a>

<p>Judging by the screen dump, Internet Explorer gang needs a kick up the arse, Opera too focus on speed and falling behind in respect to CSS3 and HTML5, Firefox is doing surprisingly well and Chrome well they use webkit, which is very well infront with respect to CSS3 and HTML5.</p>
<p>Everybody welcome to criticise me by writing comment!</p>
<div class="shr-publisher-1760"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2010/10/05/new-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Switch vs. Command Pattern</title>
		<link>http://cj-jackson.com/2010/10/01/php-switch-vs-command-pattern/</link>
		<comments>http://cj-jackson.com/2010/10/01/php-switch-vs-command-pattern/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 17:55:53 +0000</pubDate>
		<dc:creator>Christopher J Jackson</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://cj-jackson.com/?p=1726</guid>
		<description><![CDATA[The example above is obviously a switch, although it&#8217;s very simple but there issues with the code, sure it allows me to add multiple cases but it does not seem to allow regular expressions and the other issue is that it&#8217;s easy to &#8230; <a href="http://cj-jackson.com/2010/10/01/php-switch-vs-command-pattern/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><pre class="brush: php; title: ; notranslate">&lt;?php
$case = "x";
switch($case) {
	case "x":
	case "*":
		echo "do multiplcation";
		break;
	case "+":
		echo "do addition";
		break;
	case "/":
		echo "do division";
		break;
	default:
		echo "invalid command";
}
?&gt;</pre>
<p>The example above is obviously a switch, although it&#8217;s very simple but there issues with the code, sure it allows me to add multiple cases but it does not seem to allow regular expressions and the other issue is that it&#8217;s easy to forget to apply the breaks, not applying the breaks would lead to code leakage without warning.</p>
<p>I once read something about bad smells in programming and believe it or not switch statement are one of the bad smells. <a href="http://www.dcs.gla.ac.uk/~hcp/psd/lectures/badsmells.pdf">http://www.dcs.gla.ac.uk/~hcp/psd/lectures/badsmells.pdf</a></p>
<pre class="brush: php; title: ; notranslate">&lt;?php
class commandPattern {
	private $lists

	public function __construct() {
		$this->lists = array(
			array(
				"cmd" => "#^(x|*)$#",
				"call" => "multiply"
			),
			array(
				"cmd" => "#^+$#",
				"call" => "addition"
			),
			array(
				"cmd" => "#^/$#",
				"call" => "divide"
			)
		);
	}
	
	private function multiply() {
		return "do multiplication";
	}
	
	private function addition() {
		return "do addition";
	}
	
	private function divide() {
		return "do division";
	}
	
	public function command($call) {
		foreach($this->lists as $list) {
			if(preg_match($list["cmd"], $call)) {
				return $this->$list["call"]();
			}
		}
		return "invalid command";
	}
}

$command = new commandPattern();
$case = "x";
echo $command->command($case);
?&gt;</pre>
<p>This piece of code is a command pattern, it does the same thing as the switch above, but this one allow rooms for regular expressions as well as other improvement, the code was inspired by the work I did for Java last year, doing the command pattern in Java is not as easy as doing it in PHP, in Java I had to use the arraylist rather then associative array, because Java does not have associative array also it does not have foreach loop neither.</p>
<div class="shr-publisher-1726"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cj-jackson.com/2010/10/01/php-switch-vs-command-pattern/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

