<?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/">
  <channel>
    				                      
<title>charles marshall rss feed</title>
<language>en-gb</language>
<link>http://charlesmarshall.co.uk</link>
<description>rss feed</description>

  <item>
    <title><![CDATA[Plugins Galore]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2011/11/10/plugins.html]]></link>
    <description><![CDATA[<p><a href="https://github.com/phpwax/phpwax/">Phpwax</a> is the framework we use and develop at <a href="http://oneblackebar.com">one black bear</a> for the majority of websites and is normally used in conjunction with its cms, <a href="https://github.com/phpwax/wildfire">wildfire</a>.</p>
<p>There are several things we constantly do on websites as standard, sitemaps, contact forms and similar. By themselves they aren&#8217;t very big jobs, but they eat in to project time.</p>
<p>We&#8217;ve now made the most common tasks into wildfire (v6+ only) friendly plugins:</p>
<h3>Search</h3>
<p>Most sites have a similar site search, so this is no abstracted in to a plugin (<a href="https://github.com/phpwax/wildfire.search">wildfire.search</a>) and all you need to do is create the views for it.</p>
<h3>Sitemap</h3>
<p>A plugin (<a href="https://github.com/phpwax/wildfire.sitemap">wildfire.sitemap</a>) with built in google xml sitemap view automatically generated from the cms content is included (just need to create a sitemap page in the cms) along with a recursive html version that you can include where needed on the site. Obviously it doesn&#8217;t do the verification / signup for you so you&#8217;ll still need to do that in google webmaster tools.</p>
<h3>Basket</h3>
<p>Many recent sites have a basket of some kind, be it a lightbox, job basket, pdf download etc so here is a <a href="https://github.com/phpwax/wildfire.basket">wildfire based one</a> that can be plugged in with ease, just setup the config and your done. This only provides basket tracking, not payments etc, that will be a different plugin later on.</p>
<h3>Dynamic content</h3>
<p>An interesting stop gap until php gets traits fully stable. With several plugins needing to extend the content model and be <a href="https://github.com/phpwax/wildfire.dynamic_content">used at the same time this model allows for fields and scopes to be added dynamically</a> by other plugins, so no need keep extending models.</p>
<h3>Advertising</h3>
<p>Lots of sites like to have and sell advertising space on to others and <a href="https://github.com/phpwax/wildfire.advertising">this gives wildfire cms a basic module that allows adding and tracking of different types of adverts</a> based on the sites needs. Provides the backend code, front end views will need to be created.</p>
<h3>Forms</h3>
<p><a href="https://github.com/phpwax/wildfire.forms">Covering off the most common types of forms</a> used on websites: contact form, quick callback and email subscription. Provides cms modules and notification email hooks for each.</p>
<h3>Competitions</h3>
<p>A common request on sites is a <a href="https://github.com/phpwax/wildfire.competitions">standard competition forms</a>. Generally requested as either multiple choice or free text, so this plugin makes use of the dynamic content plugin to create the ability to do either on any cms page. Entries are recorded with a module in the cms to view them.</p>
<h3>Events</h3>
<p><a href="https://github.com/phpwax/wildfire.events">A standard events section for a website</a>, hooks in to the dynamic content model and adds relevant fields and extra scopes. Provides a calendar partial and an ics view.</p>
<p>In between other projects I&#8217;ll try to make more of these so using a wildfire site is super easy.</p>]]></description>
    <pubDate>2011-11-10T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Localyser]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2011/07/10/localyser.html]]></link>
    <description><![CDATA[<p><a href="http://localyser.com">Localyser is an attempt to crowd-source postcode to address lookups</a> and thus start to avoid Royal Mail&#8217;s monopoly on what should be public data.</p>
<p>It&#8217;s simple to include on your site and provides free postcode to address lookups in return for your sharing of similar data.</p>
<p>Installing is easy, a Google Analytics style javascript snippet gets you up and running immediately and there&#8217;s an <span class="caps">API</span> too for more in depth usage.</p>
<p>All the data is free for any use under the Creative Commons license.</p>
<p><a href="http://www.guardian.co.uk/technology/2009/jul/22/free-our-data">Read more about freeing UK postcode data</a>.</p>
<p>If you are looking for postcode to coordinate data you can <a href="http://parlvid.mysociety.org:81/os/ONSPD_FEB_2011_UK_O.zip">find it on a mirror here</a>.</p>]]></description>
    <pubDate>2011-07-10T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Bloorhomes Mobile]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2011/05/04/bloorhomes-mobile.html]]></link>
    <description><![CDATA[<p>As &#8216;smart phone&#8217; usage &amp; popularity increases so does the number of people surfing the web via such a device. With information &amp; asset heavy sites it makes sense to have a simplified version for those as the normal mobile connection is a bit rough around the edges.</p>
<p>As part of Bloor Homes project we&#8217;ve <a href="http://m.bloorhomes.com/">now launched the mobile site</a> to suit those users who are on flakey 3G and don&#8217;t want to load up large images etc.</p>]]></description>
    <pubDate>2011-05-04T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Bloorhomes and SVG]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2011/04/01/bloorhomes.html]]></link>
    <description><![CDATA[<p>With a higher rate of adoption of &#8216;class a&#8217; browsers the new <a href="http://bloorhomes.com">bloorhomes site</a> has some great features that really push the boundaries of current technology.</p>
<p>As your typical development has hundreds of plots, sometimes even thousands, one of the key factors to address is the laborious task of adding information for each of these plots. As you can imagine this data is very important to the people visiting but if you had to do it by hand it would take hours.</p>
<p>Obviously, we needed to automate this process; SVG&#8217;s to the rescue.</p>
<h2><span class="caps">SVG</span> import</h2>
<p>All development layouts are already generated within Illustrator, so getting that data to a <span class="caps">SVG</span> is easy (that&#8217;s why we picked them). Before the original files are exported to <span class="caps">SVG</span> some extra data is added via attributes (plot number, number of rooms, house style etc) and each plot is grouped together. That file is then exported and uploaded to the cms.</p>
<p>Once on the cms the code reads and parses the <span class="caps">SVG</span> file creating or updating plots and matching them up with styles. This means your typical development is now ready to go in a few minutes.</p>
<h2>Front end <span class="caps">SVG</span> usage</h2>
<p>As the development now has an <span class="caps">SVG</span> attached to it, its time to do some cool front end things with it. All zooming &amp; panning are built in <span class="caps">SVG</span> features, so thats great, but not very useful.</p>
<p>To give the layouts something extra they have some nice javascript interactions:</p>
<ul>
	<li>Hovering on the plot listings highlights the matching area on the layout</li>
	<li>Hovering on the layout displays plot information</li>
	<li>The on hover details can be automatically opened via the url</li>
</ul>
<p>Along with loots of other nice bits.</p>]]></description>
    <pubDate>2011-04-01T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[PHP Iterators, RecursiveIterators and RecursiveRegexIterators]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/11/11/recursive-regex-iterator.html]]></link>
    <description><![CDATA[<p>As one the of big parts of our php wax framework we recursively scan over a set of directories and find all the php files. This did throw up quite a few performance issues over the course of developing wax, which I&#8217;ll go over.</p>
<h2>Vanilla Iterators</h2>
<p>At the very start of wax we started to use the slightly documented RecursiveDirectoryIterator with the RecursiveIteratorIterator like this:</p>
<p><code>$dir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory), true);</code></p>
<p>However, this gave us a big old problem with hidden files. The iterators themselves only ignore . &amp; .. directories, everything else it will recurse into, including .git folders.</p>
<p>As wax has been around for a while with lost of changes using that iterator setup meant we were scanning over thousands of git files that we didn&#8217;t need to.</p>
<p>We improved this slightly by checking the file name inside the loop that traverses the <code>$dir</code> variable, but that had knock on effect of now having to fetch the file name of all the files, even when they aren&#8217;t php ones.</p>
<h2>Custom Iterator</h2>
<p>To try and combat the extra invocations and reduce the number of the iterations <code>$dir</code> causes we created a custom recursive iterator, <code>WaxRecursiveDirectoryIterator</code>, this is a simple extension of a standard <code>RecursiveDirectoryIterator</code> that overrides the <code>hasChildren</code> method:</p>
<p><code>
class WaxRecursiveDirectoryIterator extends RecursiveDirectoryIterator {</p>
public function hasChildren() {
if(substr($this&#8594;getFilename(),0,1)==&#8220;.&#8221;) return false;
else return parent::hasChildren();
}
<p>}<br />
</code></p>
<p>This worked well, it reduced iteration count substantially by ignoring any folder starting with . (therefore ignoring everything in .git). The downside of this is invocation of getFilename &amp; the performance drop of leaving the raw c class.</p>
<h2>Keeping Standard</h2>
<p>Recently we&#8217;ve started looking at some performance and functionality changes and as every page runs though the autoloader, it is very important to get it as quick and light as possible. The majority of the self cost was still the recursive looping.</p>
<p>After looking around for new ways of doing this, I found the RecursiveRegexIterator. As one of the more obscure iterators, there just isn&#8217;t much in the way of documentation or examples or how it works,</p>
<p>With some playing around we found the right order to use:</p>
<p><code>
$dir = new RecursiveIteratorIterator(new RecursiveRegexIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::FOLLOW_SYMLINKS), $PATTERN), true);
</code></p>
<p>Doing it this way allow for recursive scanning of the directories (so all files are found), matched against the regex pattern, and then a recursive iterator to go over the results.</p>
<p>While testing we found that the regex pattern used must be able to match files and directories (so it recurses) and this is the solution:</p>
<p><code>
$dir = new RecursiveIteratorIterator(new RecursiveRegexIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::FOLLOW_SYMLINKS), '#(?&lt;!/)\.php$|^[^\.]*$#i'), true);
</code></p>]]></description>
    <pubDate>2010-11-11T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Regular Expressions]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/11/10/stand-back-i-know-regular-expressions.html]]></link>
    <description><![CDATA[<p>At some point in time you always end up having to write a regular expression to parse something. In the web, it&#8217;s normally because the site/service you want to use doesn&#8217;t provide and <span class="caps">API</span>, so you end up scrapping the page and having to rip the data out. Sometimes you need them for something simple, like finding links inside a block of plain text.</p>
<p>The common problem, I can never remember them and end up redoing them each time, so I&#8217;m listing some here.</p>
<p>As most of these include /&#8216;s &amp; similar I normally use # as the pattern delimiter so I don&#8217;t have to back slash them and as I work mostly in <span class="caps">PHP</span>, the code will be <span class="caps">PHP</span> code.</p>
<h2>URLs in plain text</h2>
<p>With everyone wanting their latest tweet on their websites this is a pretty common case. You can use the plain text version of the tweet from the persons <span class="caps">RSS</span> feed (no need for oauth) and replace and urls with a working anchor tag:</p>
<p><code>$tweet = preg_replace('#(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)#i', '&lt;a href="$1"&gt;$1&lt;/a&gt;', $tweet);</code></p>
<h2>Find date &amp; time</h2>
<p>Sometimes you need to pull out a date &amp; time from a block of copy (like an email) in an automated way.</p>
<p><code>preg_match_all('#([0-9-]{4}-[0-9]{2}-[0-9]{2}\s{1}[0-9]{2}:[0-9]{2}:[0-9]{2}|[0-9-]{4}-[0-9]{2}-[0-9]{2})#i', $copy, $matches);</code></p>
<h2>Roughly check for a postcode</h2>
<p>Several of our sites have geo-location based services (like finding your nearest dealer for example) and like to incorporate those into the main search facility.</p>
<p>We take what you entered and use a regex to guess if what you typed conforms to a postcode.</p>
<p><code>preg_match('#^([A-z]{1,3}[0-9]{1,2})+#i', $search_string)</code></p>
<p>If it matches, then we look for a dealer nearby.</p>]]></description>
    <pubDate>2010-11-10T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[National Express Buses]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/10/20/national-express-buses.html]]></link>
    <description><![CDATA[<p><a href="http://nxbus.co.uk/"><img src="/images/work/national-express-homepage.jpg" alt="" /></a> We&#8217;ve just launched the <a href="http://nxbus.co.uk/">brand new national express buses website</a>. It has some very nice new features, such as the live service alerts system, maps of the routes, and an overall improved interface, searching and of course tech.</p>
<p>Previously all the areas had their own individual websites, domains, admin area and were totally separated. With this new site we have merged all of the previous sites under the single domain, so each share a common identity, layout, structure and functionality.</p>
<p>Since the original design (on the right) we have added some illustrated cityscapes matching the section of the you are viewing; so the bullring shows up for the west midlands, desperate dan for dundee etc.</p>
<p>To go with these we have also got a mobile version of the website coming out very soon.</p>
<h3>Tech used</h3>
<p>In previous posts I&#8217;ve mentioned changes like <a href="/web/2010/09/15/nginx-apache.html">swapping apache for nginx</a> and the improvements to the framework, well those are all in use on <a href="http://nxbus.co.uk">national express</a> and working nicely.</p>
<p>Combining both layout cache with partial cache mechanism also means that (unless the cache is cleared) all pages are served from the cache with load times and size being tiny.</p>
<p>YSlow gives the site between 89 and 93 out of 100, depending on the page. Pretty good performance!</p>]]></description>
    <pubDate>2010-10-20T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Background Caching]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/10/15/background-caching.html]]></link>
    <description><![CDATA[<p>To keep websites running fast phpwax has a built in caching system of different flavours: layout cache (the entire page), partial cache (segments of the page) and image cache.</p>
<h2>Layout Cache</h2>
<p>The biggest gains come from using layout cache; almost the entire framework is circumvented with only the required files being loaded and ignoring the auto loader stage.</p>
<p>Layout cache currently supports both memcache and flat files, so if you have minimal memory you can use disk and vice-versa.</p>
<p>On each page load (when active) the cache engine is called, a unique identifier is created for the page (based on url, request data, session values etc) and then checked to see if it exists.</p>
<p>When it does, the time is then checked to make sure it is valid and then data is returned. This is were the big change is; traditionally if the data was no longer valid (too old etc) then nothing would be returned and everything would have to be recreated.</p>
<p>On larger sites this can lead to slow page loads every time a page gets beyond its lifetimes, and on sites with short lifetimes, that&#8217;s not a good thing.</p>
<h3>In the Background</h3>
<p>The updated version takes a different approach, as long as the cache exists it will always be returned, even if its out of date. This means that the user will always get the cached page, making for a faster experience.</p>
<p>However, you now have a site that is displaying old and out of date information; which isn&#8217;t good.</p>
<p>To get around this we still check the cache for validity, return it even if it&#8217;s no longer valid, but at this point a background process is created which allows the main code execution to continue, so there is no delay to the user.</p>
<p>The new process is a self contained script that excepts some meta data about the page in question so it can then go an retrieve the page with all the same information that was used to create it along with a flag to ensure that no cached values are used.</p>
<p>Results from this process are then used to overwrite the existing cache entry so the next time its called the new data will be present.</p>
<h2>Partial Cache</h2>
<p>Ideally it would be great to be able to recreate a cached partial in the same way we do for the layouts, but this currently isn&#8217;t working.</p>
<p>Instead, I find mixing in partial cache with layout cache is very effective and something I have in use on our current big projects.</p>
<h2>Generalisation</h2>
<p>Will soon be making a generic Curl class that adopts the same approach.</p>
]]></description>
    <pubDate>2010-10-15T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Load Balancing (Nginx / Apache) and Cache]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/09/15/nginx-apache.html]]></link>
    <description><![CDATA[<p>On our larger sites, such as <a href="http://subaru.co.uk">Subaru</a> (and a couple more I can&#8217;t name), we&#8217;ve got a nice set up with Nginx handling static files and anything else getting passed off to Apache.</p>
<h2>Nginx takes over</h2>
<p>Normally you would have Apache listening on port 80, passing everything though to your cgi environment/scripts (php, python etc), but with all of those mod files &amp; shared objects loaded an Apache thread can have quite a large footprint.</p>
<p>To avoid this we put Nginx on to port 80 in a very minimal config, then create a host file (similar to Apache, but different syntax). This is then the clever bit, you can check to see if the url being requested is a file, if it isn&#8217;t you use proxy pass to send the request to Apache.</p>
<p>It doesn&#8217;t sound like much, but if you have 3 style sheets (core, css3 fancy bits and one for old IE) a few images, some javascript files (tabs, sliders, all those other pretty ui bits) you end up with in the region 10-15 files per page that you no longer need to bother Apache about.</p>
<p>Considering the reduction in requests going to Apache, thats a whole lot of <span class="caps">RAM</span> being saved.</p>
<h2>Apache sees double</h2>
<p>With the proxy pass in place on nginx Apache still needs to be running to handle the heavy lifting side of things, so move it over to another available port (typically 8080) and make sure your vhost for the site is listening to the local host (127.0.0.1) as well as the system ip.</p>
<p>Once you&#8217;ve done that you good to go.</p>
<p>Theres a good (informative &amp; accurate) &#8211; but ugly &#8211; guide on doing this at <a href="http://www.debian-administration.org/article/649/Speeding_up_dynamic_websites_via_an_nginx_proxy">Debian Administration</a> and sure plenty of other just as good (but less ugly) guides to be found via the magic of google.</p>
<h2>Still not fast enough?</h2>
<p>Say you have a really data intensive part of a site, say listing all the prices, specs, features, accessories &amp; images for a car (yet another Subaru example..) and your doing the kind of processing and display of that data which would melt your cpu if you had to do on every page load. Well, cache is your friend.</p>
<p>Without sounding too much like a RoR programmer, throw hardware at it; in this case <span class="caps">RAM</span>.</p>
<p>By adding a little bit of abstraction to the code, memcache can be used to reduce database load, circumvent heavy looping algorithms and much more.</p>
<p>Lets say you have part of page that queries, loops and displays 3k features/specs; the database query running that would be a significant drain on resources, so lets avoid doing it. In fact, avoid doing the loop as well. We can run this query once, store the results with a unique id into memcache and you never have to worry about it again.</p>
<p>Memcache isn&#8217;t the only tool out there that does this kind of job, but it was one of the earliest and has the most features. You even go as far as sticking something like Reddis as a front end to your normal <span class="caps">SQL</span> queries as long as you have enough <span class="caps">RAM</span> free that is.</p>
<p>Last time I checked, the response time for the initial page response on Subaru was down to between 50 &amp; 80 ms (average time to blink is about 300 ms).</p>]]></description>
    <pubDate>2010-09-15T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Peer 2 Peer Distribution]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/07/29/more-on-peer-2-peer.html]]></link>
    <description><![CDATA[<p>So after my previous post, I did start (and mostly finished) a python app engine torrent server using memcache. The main thing left to do is sort out the compressed view&#8230; I&#8217;ve been very busy (more about that later), with a new project.</p>
<p>I&#8217;ve used a cross between a 2 existing python code bases (neither of which I can remember at the moment, will find them and include links later). The first was a memcache cut down version of the torrent protocal, the second was a fully fledged gql version.  I&#8217;ve mixed the 2 together to make a full torrent server based on memcache.</p>
<p>Have a look at <a href="http://github.com/charlesmarshall/tracker">my github project page</a> for the code base.</p>
<p>As soon as I get round to finishing it I will write a more detailed post!</p>]]></description>
    <pubDate>2010-07-29T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Server Utilities]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2010/07/28/updated-server-utilities.html]]></link>
    <description><![CDATA[<p>The previous version of these server scripts ran locally on your machine and ssh&#8217;d to the server you were after. This had some issues, the big was presuming the machine you were on had a &#8217;NIX style environment, leaving the Windows users out in the cold.</p>
<p>Personally, I don&#8217;t any linux server admins that run windows on their machine, but it could happen. With that in mind (and making the code easier) I changed it over so they are now designed to run on the server itself and I try to keep things like the admin password out of the history.</p>
<p>So far the new shell scripts do <a href="#user_script">user admin</a> (including mysql), <a href="#vhost_script">apache vhost creation</a>, <a href="#git_script">git checkouts</a> and a work in progress <a href="#ubuntu_script">ubuntu 10.04 <span class="caps">LTS</span> configuration</a> script.</p>
<h2 id="user_script">User Admin</h2>
<p>The <code>user.sh</code> bash script has create and delete options only. As these commands can be damaging, there is also an echo only option, By using <code>-e</code> the commands are simply printed out and not actually run.</p>
<p>To try and keep the admin passwords out of the limelight and the history, the first thing the script does is request the root password (you can use another user other than root if you want), at this point it copies to an internal variable which is piped in to other commands along the way.</p>
<p>The process is very similar to that of the <a href="/general/2009/11/05/useful-bash-shell-scripts.html">previous scripts</a> after that point.</p>
<h3>Creating a user</h3>
<p>By using the -c flag you signify your desire to make a new user; the command would look something like this:</p>
<p><code>./user.sh -c USERNAME PASSWORD</code></p>
<p>With <code>USERNAME</code> being the name of the user you want to create and <code>PASSWORD</code> is the password for that user. As leaving the password in the history isn&#8217;t such a good idea, you can exclude that from the command and the script will ask you for it. This way, the command would look like this:</p>
<p><code>./user.sh -c USERNAME</code></p>
<p>By default the scripts use <code>root</code>  as the user to do the mysql setup, this can be changed by using the -r flag:</p>
<p><code>./user.sh -c USERNAME -r</code></p>
<p>Once -r is set it will ask you an alternative user account to use. If you&#8217;re not sure about what will happen with any of the commands, just pass along the <code>-e</code> flag:</p>
<p><code>./user.sh -c USERNAME -r -e</code></p>
<p>All the commands will be echo&#8217;d out instead of being ran</p>
<p>The creation process makes a new group (via <code>groupadd</code>), then a new user (with <code>useradd</code>), creates a mysql database (matching the users name) and then finally generates an ssh key file.</p>
<h3>Deleting a user</h3>
<p>Deletion basically reverses everything the creation side of the script did. It&#8217;s quick and easy to run:</p>
<p><code>./user.sh -d USERNAME</code></p>
<p>By default this leaves the database and mysql alone (as you don&#8217;t want to accidentally wipe all your data!), but you can force it to with <code>-k</code>:</p>
<p><code>./user.sh -d USERNAME -k</code></p>
<p>Then you can kiss goodbye to your database and the user permissions along with the normal user deletion.</p>
<p>As with the creation <code>-e</code> will echo it out and not run</p>
<h2 id="vhost_script">Vhosts</h2>
<p>As these are normally web servers, this is a quick way to make a vhost for your newly created user. Again, create and delete options.</p>
<h3>Creating a vhost</h3>
<p>Very simple:</p>
<p><code>./vhost -c WEBSITE USERNAME</code></p>
<p>As you might of guessed, <code>WEBSITE</code> is the full server name &#8211; google.com &#8211; for example, and <code>USERNAME</code> is (if you hadn&#8217;t guessed) the user name.</p>
<p>It comes with a couple of extra options, <code>-i</code> can be handy. This changes the ip address used on the vhost from * to the servers ip address (via <code>hostname -i</code>):</p>
<p><code>./vhost -c WEBSITE USERNAME -i</code></p>
<p>If your running something like ubuntu and your vhost path is not the normal <code>/etc/http2/conf.d/</code> you can change that as well:</p>
<p><code>./vhost -c WEBSITE USERNAME -i --vhost_dir PATH_VHOSTS</code></p>
<p>Where <code>PATH_VHOSTS</code> is the full path to the folder (with the trailing /), so something like <code>/etc/apache2/conf.d/</code></p>
<p>If you are happy and want to make that vhost live, you can use <code>--restart</code> to restart apache:</p>
<p><code>./vhost -c WEBSITE USERNAME --restart</code></p>
<p>The file created is <code>WEBSITE</code>-apache-vhost.conf</p>
<h3>Deleting a vhost</h3>
<p>Just use the <code>-d</code>:</p>
<p><code>./vhost -d WEBSITE</code></p>
<p>Again, you can make use of <code>--restart</code> if you are sure about it.</p>
<h2 id="git_script">GiT setup</h2>
<p>Most occasions you need to deploy your site to your newly created user, this lets you pull in from a git repo, but does presume that in the case of private repos you&#8217;ve given the new user access to the repo.</p>
<p>Once you have, just run this to set it up:</p>
<p><code>./git USERNAME ORIGIN BRANCH</code></p>
<p>Can you guess what <code>USERNAME</code> is? That&#8217;s right, the user you want to fetch the git repo with. The script makes use of <code>su -c</code> to run the git setup.</p>
<p><code>ORIGIN</code> is a bit complicated, its the web accessible path that git can fetch the repo from, something like <code>git://website.com/user/project.git</code>, see the git docs for more info.</p>
<p><code>BRANCH</code> is the git branch you want to checkout to; in the case of these scripts it would be <code>on-server</code></p>
<p>There is also an optional parameter that you can pass in to place the repo in a sub-folder of the user, rather than directly on the users home. For example, if you are using <code>public</code> as the base of your project you can run:</p>
<p><code>./git USERNAME ORIGIN BRANCH public/</code></p>
<p>That will checkout your repo into public subfolder..</p>
<p><code>./git USERNAME ORIGIN BRANCH public/more/depth/</code></p>
<p>The bash makes use of <code>mkdir -p</code>, so go as deep as you like.</p>
<h2 id="ubuntu_script">Ubuntu setup</h2>
<p>To speed things along, I threw together most of the commands used for setting up a Ubuntu 10.04 <span class="caps">LTS</span> for running a typical <span class="caps">LAMP</span> stack.</p>
<h3>The Files</h3>
<p>All these scripts are sitting over on <a href="http://github.com/charlesmarshall/Utils">my github project page</a></p>]]></description>
    <pubDate>2010-07-28T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Acme Trees]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/07/20/acme-trees.html]]></link>
    <description><![CDATA[<p><a href="http://acmetreeservices.co.uk/"><img src="/images/work/acme-trees.png" alt="" /></a></p>
<p>Green fingered experts handling everything from patchy grass to forested glens. A husband and wife team founded in 2000 now grown in to a quality specialists in tree care and grounds maintenance (domestic, business and local authority).</p>
<p>One of very few websites that is running on our framework, but not making use of our cms. Mostly due to the extremely custom layouts of each page, but also the budget!</p>
<p>Really nice design, put together by <a href="http://www.helenwilliamsdesign.co.uk/">Helen Williams</a> with a helping hand from Gareth Brown.</p>
<p>It has some nice fading between images on the home page (jQuery for the win!) and good visual touches like the custom bullet point images.</p>]]></description>
    <pubDate>2010-07-20T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Rayburn]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/07/15/rayburn.html]]></link>
    <description><![CDATA[<p>Even though I was born only a few miles away it was my colleague <a href="http://sheldon.github.com/">Sheldon Els</a> who built this one, but as I&#8217;m a local lad I thought I&#8217;d blog about it anyway!</p>
<p>This time, the client is handling the hosting and further work themselves, so its been built on software they request; umbraco. Not a bad cms, but .net is still overly complicated.</p>
<p>Doing simple things like recursive and nested navigations take more time than can believe, but on the whole the interface is reasonable, updated regularly and pretty stable.</p>
<p>The end result is good, the <a href="http://rayburn-web.co.uk/">new version of the website is up and looking good</a>!</p>]]></description>
    <pubDate>2010-07-15T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Ideas on Asset Distribution]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/06/15/peer-to-peer-tracking-for-easy-distribution.html]]></link>
    <description><![CDATA[<p>After the past few months we&#8217;ve done some very media heavy adverts with much back and forth over image changes. As you can imagine, this can be troublesome especially when you have lots of files, each one at about 150Mb.</p>
<p>More concerning, with changes coming thick and fast how do you make sure everyone has the most recent files?</p>
<h2>Existing Tech</h2>
<p>Any tech that can be used needs to be evaluated based on a few, simple, criteria. The &#8220;granny factor&#8221;, technical viability and cost.</p>
<p>The &#8220;granny factor&#8221; is simple: would your 70 year old grandma be able to do it without supervision.</p>
<p>From the geek side of things it needs to be pain free (no one wants to spend hours answering emails about it), capable of handling large quantity of files, massive individual sizes and be as fast as possible.</p>
<h3>The Contenders</h3>
<h4>Email</h4>
<p>The simplest (scores very high in the granny side of things, once setup), but not capable of handling the load; most providers have 2-5Mb limits.</p>
<h4>Ftp</h4>
<p>Technically good, simple for your bog standard server admin to setup and no maintenance problems, but have you ever tried to explain to your non-techy gran how to upload something using it? Yeah, not going to happen&#8230;</p>
<p>How about a comprise, something simple and something technically sound&#8230; How about a recent startup favourite..</p>
<h4>Dropbox</h4>
<p>Not the simplest to setup; a guide &amp; instructions are going to be needed to get your granny going, but once it is installed it checks most of the boxes.</p>
<p>It&#8217;s easy to use on a daily basis; just drop it the files and it sync them for you to all the other relevant people.</p>
<p>Version control is supported, so if you delete the wrong file you can retrieve it without any problems. But that doesn&#8217;t make it perfect&#8230;</p>
<p>Firstly, size problems. The base level account is way too small (5Gb), the last campaign had 19 images and weighed in at 2.8Gb. What would you do if you had 3 going at once? You&#8217;d have to upgrade&#8230;</p>
<p>The largest size available is 100Gb, so thats not quite 20 campaigns&#8230;</p>
<p>Of course that size account is not free; it&#8217;s $19.99 a month; and thats the second problem, budget.</p>
<p>Access is also troubling. Without getting each client to create their own dropbox account and share folders with your account there is no way to limit access, not so good.</p>
<h4>Torrents (peer 2 peer)</h4>
<p>Yes, it&#8217;s a dirty word, synonymous with pirating; but lets look at this objectively and not though the eyes of the media / <span class="caps">RIAA</span> / Disney etc.</p>
<p>Simplicity is the key to the spread of torrents. If a 12 year old can use it to download the latest top 10 it&#8217;s a good bet your gran can handle it too.</p>
<p>When it comes to creating a new torrent it&#8217;s not quite as easy as downloading, but if you&#8217;re using something like utorrent there is a simple step-by-step wizard that takes care of it for you.</p>
<p>Like drop box, it high scores on the technical side. Setting up a torrent tracker is simple (and dozens of free / open trackers exist already), the network traffic can be shaped and throttled (your isp probably does that already) and (if you believe the <span class="caps">RIAA</span> figures) almost everyone will have the software installed and know how to use it.</p>
<p>As widely used as email, as simple as dropbox and without any charges&#8230; Sounds good..</p>
<p>If you need some level of access control you can; just email the torrent file to the correct people.</p>
<p>The only serious draw back is whoever created the torrent needs to be online long enough for someone else to download it.</p>
<h2>Where Next?</h2>
<p>As the assets we tend to handle are copyrighted artwork, unreleased advertising (on and offline), large data sets and such like a private tracker is the ideal solution.</p>
<p>I&#8217;ve made a start on creating a super-fast memcache based tracker running off google app engine (again free at a certain level) which is working nicely and once it fully complies with the torrent protocol I&#8217;ll be blogging about it here!</p>
<p>Until it&#8217;s all sorted out we&#8217;ll be sticking with dropbox, but the way forward (especially in web side of things) really is though distribution.</p>]]></description>
    <pubDate>2010-06-15T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Cosworth Impreza]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/05/30/cosworth-impreza.html]]></link>
    <description><![CDATA[<p><img src="/images/work/cosworth-impreza.jpg" title="Cosworth Impreza" alt="Cosworth Impreza" />If you&#8217;ve been keeping up on the latest motoring news you will have heard about this already. Although I can&#8217;t tell you anything about the car (yet), I can tell you it will be making an appearance on the website very soon.</p>
<p>After everything is up and running on the main Subaru site we will pushing it out to all the dealer sites we run; so it wont be long till you can pester your nearest dealership about trying one.</p>
<p><strong><span class="caps">EDIT</span> (07/05/2010):</strong> Now we have some approved images we&#8217;ve added a gallery section to the <a href="http://subaru.co.uk/vehicles/cosworth#cosgallery">Cosworth page</a></p>
<p><strong><span class="caps">EDIT</span> (01/05/2010):</strong> The Cosworth Impreza is now live and ready for you to buy! More details see the <a href="http://subaru.co.uk/vehicles/cosworth">main site</a></p>]]></description>
    <pubDate>2010-05-30T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[GBR Phoenix Beard]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/05/03/gbr-phoenix-beard.html]]></link>
    <description><![CDATA[<p><a href="http://www.gbrpb.com"><img src="/images/work/gbr-phoenix-beard-website.png" alt="" /></a></p>
<p>The new, improved and re-written website for <span class="caps">GBR</span> (now <span class="caps">GBR</span> Phoenix Beard) is alive and kicking!</p>
<h2>The New</h2>
<p>Making use of css3 and html5 the new version is faster and slicker than ever (as long as you&#8217;re using a good browser).</p>
<p>All the pretty rounded corners, gradients and of course the drop shadows (inset shadows as well) the like are now all done via css3, with some nasty old school images for the Internet Explorer users out there (sorry, but you should use a better browser).</p>
<p>While I was at it, I also upgrade the site to run from the latest stable branch of both the cms and php wax framework to take advantage of some nice new improvements (I will back port them soon, honest!).</p>
<p>One of the handy features is a new helper function to figure out the sha1 one of the git repo and store it in a config var. Great to append on the end of stylesheet, javascript and the like to avoid pesky caching issues with clients!</p>
<h2>Replaced</h2>
<p>The code has been updated to be faster and leaner, maps (now using v3 of googles api), searching, property listing and of course the entire html.</p>]]></description>
    <pubDate>2010-05-03T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Birmingham City of Culture]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/04/30/birmingham-city-of-culture.html]]></link>
    <description><![CDATA[<p><a href="http://birminghamculture.org"><img src="/images/work/birmingham-city-of-culture-website.png" alt="" /></a></p>
<p>With the short list announced for the inaugural UK City of Culture we&#8217;re happy to say that Birmingham made the list! The other contenders are Londonderry, Norwich and Sheffield.</p>
<p>We&#8217;ve put the <a href="http://birminghamculture.org/">website live</a>, so get on there and get posting why you think Birmingham should win. You can also have a look at the <a href="http://birminghamculture.org/advocates">advocates section</a> for inspiration from one of the dozens of locals backing the bid.</p>
<h2>About the site</h2>
<p>The lions share of the work was done by <a href="http://sheldon.github.com/">Sheldon Els</a>, I occasionally gave a helping hand when needed.</p>
<p>The site is running from the latest and greatest versions of our <a href="http://php-wax.com">php framework</a> and <span class="caps">CMS</span>, with some custom modules to control the cultural facts and the like.</p>
<h3>Info</h3>
<p>With something as large scale as a national bid to be the cultural centre of the country, there is lots and lots of information about the process. Very dry and boring, but the site has to contain that information, so theres plenty of copy and keywords at least.</p>
<p>Not all of the fact and figures are boring, there are plenty of tit-bits about Birmingham mixed in to keep it interesting and of course quotes and stories from the local celebrities backing the bid.</p>
<h3>Joining In</h3>
<p>If you don&#8217;t agree with their options, you can have your own say in the <a href="http://birminghamculture.org/join-the-big-conversation/the-big-conversation">Join the Big Conversation</a> section.</p>
<p>If you want to see Birmingham crowned the City of Culture for 2013 you can help out by uploading images and movies (to flickr and vimeo respectively) to the <a href="http://birminghamculture.org/share">Share</a> segment of the website.</p>
<h3>Mash-tastic</h3>
<p>The interactive side of things I&#8217;ve mentioned are mostly provided by external services at the back end with our cms pulling it together on the front.</p>
<p>The Big Conversation section makes use of Disqus masquerading as a very basic forum system. With the threaded nature of their comments and uniqueness based on the <span class="caps">URL</span> it works very nicely!</p>
<p>With this kind of high profile site the number of people uploading videos and photos could quite easily reach large numbers, that can cause performance problems and in worst case even take down servers. To avoid this kind of mess we make use of vimeo for videos (re-encoding is heavy work and these guys do it well), and flickr for photos. Both are sync&#8217;d with our cms to give a seamless appearance.</p>
<p><span class="caps">EDIT</span> (Jul 30 2010): Well, Birmingham didn&#8217;t win, the City of Culture for 2013 is Londonderry, such a shame, but here&#8217;s hoping we get it next time!</p>]]></description>
    <pubDate>2010-04-30T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[New Subaru UK website]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/04/14/new-subaru-uk-site.html]]></link>
    <description><![CDATA[<p><img src="/images/work/subaru-home.jpg" title="Subaru UK" alt="Subaru UK" />You might of noticed that it has been quite a while since I posted anything new in the work section; I haven&#8217;t been slacking off, honest! What has been taking up my time in between launching dealer websites (we now have 3 versions, <a href="http://www.exetersubaru.co.uk/">original subaru</a>, <a href="http://subaruvehicles.co.uk/">new style subaru site</a> and of course the <a href="http://isuzu.alexandra-cars.co.uk/">isuzu dealer</a> sites) has been the work towards the new Subaru UK site.</p>
<p><strong>As of yesterday (13/01/2010) <a href="http://subaru.co.uk">this new version went live</a>!</strong></p>
<p>Most of the One Black Bear team have been working on the the Subaru UK project in some form. A large amount of my work for the project was spent adding functionality and content to the existing <span class="caps">API</span>, in particular adding all of the accessories information.</p>
<p>The accessories are currently being limited to the most recent models, but are quite extensive in what they cover with almost everything you could expect to see on a Subaru being shown.</p>
<p>As well as the accessories back end I also developed the accessories section with a pretty new interface allowing filtering, searching, baskets and generating requests to your local dealership.</p>
<p>Some of my favourite features of the new site is the 360 images and the range selector.</p>]]></description>
    <pubDate>2010-04-14T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Table Highlighter]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2010/04/07/table-highlighter.html]]></link>
    <description><![CDATA[<p>Many moons ago I wrote a plugin to do table highlighting. It has been sitting on tinyjs ever since and has proven to be quite popular</p>
<p>Since then my jQuery foo has improved a lot, so I thought it was about time to re make it. It should be much faster and handle larger datasets than before, it&#8217;s pretty straight forward to use, and this is how.</p>
<h2 id="working-example">Working Example</h2>
<div class='example'>
<table id='exampletableone'>
<thead>
<tr class='heading'>
				<td></td>
				<th class='column_header'>Visits</th>
				<td class='column_header'>Unique Visits</td>
				<td class='column_header'>Average Time</td>				
				<td class='column_header'>Bounce Rate</td>								
</tr>
</thead>
<tbody>
<tr class='row'>
				<th class='row_header'><a href='/jquery/2009/04/29/jquery-modal.html'>jQuery Smart Modal</a></th>
				<td class='row_data'>109</td>
				<td class='row_data'>82</td>
				<td class='row_data'>00:02:50</td>
				<td class='row_data'>81.58%</td>
</tr>
<tr class='row'>
				<th class='row_header'><a href='/jquery/2008/11/11/jquery-draggable.html'>jQuery Draggable</a></th>
				<td class='row_data'>54</td>
				<td class='row_data'>46</td>
				<td class='row_data'>00:03:33</td>
				<td class='row_data'>59.09%</td>
</tr>
<tr class='row'>
				<th class='row_header'><a href='/jquery/2009/08/02/expanding-grid.html'>Expanding Grid</a></th>
				<td class='row_data'>36</td>
				<td class='row_data'>35</td>
				<td class='row_data'>00:02:59</td>
				<td class='row_data'>83.33%</td>
</tr>
</tbody>
</table>
<p></p>
</div>
<p>All you have to do is include the jQuery and the plugin file:</p>
<pre>
&lt;script src='http://www.google.com/jsapi'  type='text/javascript'&gt;&lt;/script&gt;
&lt;script type='text/javascript'&gt;
  google.load('jquery', '1.3');
&lt;/script&gt;
&lt;script src='/path/to/plugin/file.js'  type='text/javascript'&gt;&lt;/script&gt;
</pre>
<p>Once thats loaded in you then need to use the plugin on the table of your choice; in this case the id is <code>exampletableone</code> so using the default classes, all you do is this:</p>
<pre>
&lt;script type='text/javascript'&gt;
	jQuery('#exampletableone').tablehighlight();
&lt;/script&gt;	
</pre>
<p>In order for the plugin to visibly change you need to do some styling (with the default classes) something like this:</p>
<pre>
&lt;style&gt;
.active_column_header, .active_row_header{background:#A3A9E1;}
.active_row_data{background:#B7BEFC;}
tr.row td.active_position{background:black;color:white;}
&lt;/style&gt;
</pre>
<p>That&#8217;s all you need to do!</p>
<h2 id="customisation">Customisation</h2>
<p>There are several options you can change and configure so the plugin works the way you need it to; these options are passed as normal.</p>
<h3 id="optional-values">Options</h3>
<p>You pass in an object, which by default has these values, each item has a comment explaining it:</p>
<pre>
{
//selectors are the jquery selectors used to find things
"selectors":{ 
 "headings":'.heading', //this is the row containing the main headers
 'column_header': '.column_header', //the actual column header
 'rows': '.row',  //rows containing the actual data
 'row_header': '.row_header', //part of the data row that acts as the header for that row
 'row_data': '.row_data' //parts of the row that are data
 },
"active_classes":{
 "all": "active", //applied to all active elements
 "column_header":"active_column_header", //applied to the currently active column header
 "rows":"active_row", //applied to the currently active row
 "row_header": "active_row_header", //the currently active row header
 "row_data": "active_row_data", //the data elements within the active row
 "current_hover": "active_position" //the element where you are hovering over
 }
};	
</pre>
<h3>The Files</h3>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='http://github.com/charlesmarshall/jQuery-Table-Highlighter/raw/master/jquery.tablehightlight.js' title='Plugin' class='category curvy'>JavaScript</a></li>
    <li class='category'><a href='http://github.com/charlesmarshall/jQuery-Table-Highlighter/raw/master/styles.css' title='css' class='category curvy'>css</a></li>
    <li class='category'><a href='http://github.com/charlesmarshall/jQuery-Table-Highlighter/raw/master/index.html' title='demo page' class='category curvy'>demo page</a></li>
    <li class='category'><a href='http://github.com/charlesmarshall/jQuery-Table-Highlighter/zipball/master' title='zip of all' class='category curvy'>zip of all</a></li>
</ul>
</div>
<p><!-- here is the code that does it all --><br />
<link rel="stylesheet" href="http://github.com/charlesmarshall/jQuery-Table-Highlighter/raw/master/styles.css" type="text/css" media="all" charset="utf-8"/><br />
<script type='text/javascript' src="http://github.com/charlesmarshall/jQuery-Table-Highlighter/raw/master/jquery.tablehightlight.js"></script><br />
<script type='text/javascript'>
jQuery(document).ready(function(){
	jQuery('#exampletableone').tablehighlight();
});
</script></p>]]></description>
    <pubDate>2010-04-07T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Google Street View Made Easy]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2010/03/25/google-street-view-made-easy.html]]></link>
    <description><![CDATA[<p><strong><span class="caps">EDIT</span>: 26/10/2010</strong> The street view man and all the triggers associated with it are now built in to v3 of google maps <span class="caps">API</span>, so please use that instead of this!</p>
<h2>Summary</h2>
<div class='introduction curvy'>
<ul>
	<li><a href="#map_street_view">Working example</a></li>
	<li><a href="#whats-missing">What is missing</a> from the street view <span class="caps">API</span></li>
	<li>Details on <a href="#using-street-view">how to use the plugin</a></li>
	<li><a href="#download-files">Download</a></li>
	<li>Big thanks to <a href="http://sheldon.github.com/">Sheldon Els</a> for helping out</li>
</ul>
</div>
<p><strong>Browser compatibility is an on going issue, this is only guaranteed to work in Firefox 3.2 at the moment, working on rest!</strong></p>
<p>Street view is one the most outstanding features of not just google maps, but any google project. Just think how many photos are needed, and then how do you stitch them together?</p>
<p>Then you have to blur peoples faces, watch out for public displays of nudity and a whole bunch of other checks.</p>
<p>Unsurprisingly enough getting street view on your google map isn&#8217;t any easy task. It has got a lot better recently, with more functions making life easier but nothing to match to complexity or the features of the main google maps site.</p>
<h2 id="whats-missing">What&#8217;s Missing</h2>
<p>In order to replicate the googles own maps there are certain key features that don&#8217;t exist by default, so I&#8217;ve had to copy it as close as possible.</p>
<h3>The Little Man</h3>
<p>The big one, that little man just above the zoom. There simply isn&#8217;t an <span class="caps">API</span> feature for that. This is why you don&#8217;t see any demos that have that man, it&#8217;s a Google only interface item.</p>
<p>At a guess, this is a heavily customised GControl with a GMarker mixed in to provide the draggable ability. Not something that can be replicated quickly.</p>
<p>Instead, the comprise is to use a GControl (to find the correct position) and a GMarker (to do all the hard work). The GMarker triggers the turning on of GStreetviewOverlay, loading of the GStreetviewPanorama and a few others.</p>
<p>Although in the <a href="#map_street_view">example</a> the little man never seems to move, but it does. It&#8217;s position is reset on the map move event.</p>
<h3>Closing</h3>
<p>One thing you notice when your using the <span class="caps">API</span> based street view is the lack of a little x.</p>
<p>Strangely enough, it is on the google maps one. With a bit of reverse engineering that problem was overcome (big thanks to <a href="http://sheldon.github.com/">Sheldon Els</a> for sorting that part out).</p>
<h2>Demo</h2>
<p>Enough talk, here is the working demo.</p>
<div class='example' id="map_street_view">
  <div id="gmap" class='gmap'></div>
</div>
<p>It&#8217;s also easy to use..</p>
<h2 id="using-street-view">Using Street View</h2>
<p>To make it easy to use I&#8217;ve made a jQuery plugin wrapper for the custom <span class="caps">SVC</span> prototype object (which handles the grunt work).</p>
<p>First and foremost, make sure you are using v2 of google maps <span class="caps">API</span> (no street view yet in v3) and a recent version of jQuery. I tend to use google.load() for kind of thing.</p>
<pre>
&lt;script type='text/javascript'&gt;
  google.load('jquery', '1.3');
  google.load('maps', '2', {"other_params":"sensor=true&amp;key=YOUR_GOOGLE_KEY"});
&lt;/script&gt;
</pre>
<p>Make sure you have set up your markup to something sensible</p>
<pre>
&lt;div class='example' id="map_street_view"&gt;
  &lt;div id="gmap" class='gmap'&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>As always, style the google map</p>
<pre>
#gmap{
  width:100%;
  height:350px;
}
</pre>
<p>Make a new instance of a google map</p>
<pre>
&lt;script&gt;
var MAP = new GMap2(document.getElementById("gmap"));
&lt;/script&gt;
</pre>
<p>Configure the defaults for map, position, zoom etc.</p>
<pre>
&lt;script&gt;
var latlng = new google.maps.LatLng(52.502625,-1.893997),
    opts = {zoom: 12, center: latlng}
    ;
MAP.setCenter(opts.center, opts.zoom);
MAP.setUIToDefault();
&lt;/script&gt;
</pre>
<p>Triggering street view at this point is easy, in fact, it&#8217;s one line</p>
<pre>
&lt;script&gt;
jQuery('#gmap').streetview({map:MAP, icon_image: "path/to/man-marker"});
&lt;/script&gt;
</pre>
<p>All you have to do is pass in the GMap2 you just made and the path to the image file for the man.</p>
<h3>Configurable Options</h3>
<p>Say you don&#8217;t want to use the default ids that the plugin makes use of, well thats ok, you can just change them.</p>
<p>These are the default settings:</p>
<pre>
map:false,
icon_image: "street-view.png",
control:false,
selector_ids:{
  map_container:false,
  control_container:"sv_control",
  control_ui:"sv_ui",
  control_text:"sv_text",
  street_view: "gstreetview"
  }
</pre>
<p>What they mean&#8230;</p>
<ul>
	<li>map &#8211; this is the GMap2 object</li>
	<li>icon_image &#8211; path to the image for the marker</li>
	<li>control &#8211; the custom <span class="caps">SVC</span> (and extended GControl) object</li>
	<li>selector_ids</li>
	<li>map_container &#8211; auto generated by called map.getContainer().parent</li>
	<li>control_container &#8211; id of container for the custom control (if the selector isn&#8217;t there the markup is inserted)</li>
	<li>control_ui &#8211; id of container for part of the custom control</li>
	<li>control_text &#8211; id of container for part of the custom control</li>
	<li>street_view &#8211; the id of the container for the street view flash object (if the selector isn&#8217;t there the markup is inserted)</li>
</ul>
<h3 id="download-files">The Files</h3>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='http://github.com/charlesmarshall/streetview/raw/v2-jquery/streetview.js' title='jQuery and SVC' class='category curvy'>Javascript file &raquo;</a></li>
    <li class='category'><a href='http://github.com/charlesmarshall/streetview/raw/v2-jquery/styles.css' title='Stylesheet' class='category curvy'>css file &raquo;</a></li>
    <li class='category'><a href='http://github.com/charlesmarshall/streetview/zipball/v2-jquery' title='Zip of all' class='category curvy'>Zip file &raquo;</a></li>
</ul>
</div>
<p><!-- WORKING CODE HERE --><br />
<link rel="stylesheet" href="http://github.com/charlesmarshall/streetview/raw/v2-jquery/styles.css" type="text/css" media="screen" charset="utf-8"/><br />
<script type='text/javascript'>
  google.load('maps', '2', {"other_params":"sensor=true&key=ABQIAAAAQ_MbVb_KdIi7Z-3agFFibxTr40-U6rKi3H1zIkD0TDNPyGQE8BRJbeg0G5ZalFKDmIo4Mlkk2y9uyw"});
</script>
<script src="http://github.com/charlesmarshall/streetview/raw/v2-jquery/streetview.js" type="text/javascript" charset="utf-8"></script><br />
<script type='text/javascript'>
var latlng = new google.maps.LatLng(52.502625,-1.893997),
    opts = {zoom: 12, center: latlng},
    MAP = new GMap2(document.getElementById("gmap"))
    ;
MAP.setCenter(opts.center, opts.zoom);
MAP.setUIToDefault();
jQuery('#gmap').streetview({map:MAP, icon_image: "http://github.com/charlesmarshall/streetview/raw/v2-jquery/street-view.png"});
</script></p>]]></description>
    <pubDate>2010-03-25T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Python Parameter Parsing to Array]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2010/03/04/python-parameter-parsing.html]]></link>
    <description><![CDATA[<p>As I&#8217;ve been working on a project on Google App Engine, using Python, I&#8217;ve needed to grab data from the post or get request data.</p>
<p>I&#8217;m coming from a mostly <span class="caps">PHP</span> scripting background, so I might be missing something, but I will go over what I think is happening&#8230;</p>
<h2>Raw Tools in App Engine</h2>
<p>So you can get hold of simple data easily enough, you can query the request object thats attached to self, like this:</p>
<pre>
class Home(webapp.RequestHandler):
  def get(self):
    self.response.get('x')
</pre>
<p>For most cases, that works. However, I have a cases that don&#8217;t&#8230; The main one being multi-dimensional arrays as get data. My query string looks a bit like this:</p>
<pre>
?names[0][firstname]=foo&amp;names[0][surname]=bar&amp;names[1][firstname]=first&amp;names[1][surname]=last
</pre>
<p>With <span class="caps">PHP</span> you would simply do <code>$names = $_REQUEST['names']</code> and <span class="caps">PHP</span> works out the array for you. Not so in Python. Calling <code>self.request.get('names')</code> returns an error, saying that index doesn&#8217;t exist.</p>
<p>Python does have other helpers which are more useful, like <code>self.request.GET.items()</code>, that lets you loop over the entire <span class="caps">GET</span> data set, and if you enumerate it you get key value pairs:</p>
<pre>
for key,value in enumerate(self.request.GET.items()):
  print key
  print value
  
</pre>
<p>Success, or so you&#8217;d think&#8230; However, the key is not very useful, it comes out as the full thing. So, the first key is <code>[0][firstname]</code> which is about as useful as a chocolate tea pot when I&#8217;m trying to make a multi-dimensional array.</p>
<p>In the end, I couldn&#8217;t find a way to handle incoming data structured like that. Instead I had to revert to using single names like this:</p>
<pre>
?firstname=foo&amp;surname=bar&amp;firstname=first&amp;surname=last
</pre>
<p>This is not something I like. What do you do if some of the fields are blank? Or if the order is jumbled, with the second <code>surname</code> belonging to the first <code>firstname</code>.. It doesn&#8217;t handle it..</p>
<p>The best I could do to take care of this and get a nicely formatted array of data was to parse it based on the keys I want and use <code>self.request.get_all</code> in a nested loop.</p>
<h2>The Python Class</h2>
<pre>
#class to handle parsing of post/get data in to multi arrays
class ParamSort():
  def __init__(self, structure, request_obj):
    self.structure = structure
    self.request = request_obj
    self.results = []

  def sort(self):
    grouped = {}
    lengths = []
    results=[]
    #convert the post data to key based array
    for i, v in enumerate(self.structure):
      grouped[v]=[]
      lengths.insert(i,0)
      for f in self.request.get_all(v):
        grouped[v].append(f)
        lengths[i] += 1
    #convert the grouped to a multi dimensional
    for x in range(max(lengths)):
      tmp = {}
      for f in self.structure:
        if len(grouped[f]) &gt; x :
          tmp[f] = grouped[f][x]
      #if everything mapped properly, save this sucker
      if len(tmp) == len(self.structure):
        results.append(tmp)
    return results


</pre>
<p>Example use:</p>
<pre>
dbkeys = ['firstname', 'lastname']
sorter = ParamSort(dbkeys, request)
res = sorter.sort()
</pre>
<p>As I&#8217;m fairly new to Python, I might be totally wrong and missing something that everyone else knows&#8230; Please tell me if I am!</p>
<h3>The Files</h3>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='/python-parameters/ParamSort.py' title='Python Class' class='category curvy'>Python file &raquo;</a></li>
</ul>
</div>
<p><strong><span class="caps">EDIT</span> (08/06/2010):</strong> It seems I was indeed wrong, there is a utility for this built in to the cgi module (and in 2.6 the urlparse module) called <a href="http://docs.python.org/library/urlparse.html#module-urlparse">parse_qs</a> that does this for query strings (<span class="caps">GET</span> data). I&#8217;ll presume there is something similar that does the same for post data.</p>]]></description>
    <pubDate>2010-03-04T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[XML Schema Generation]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2010/03/02/xml-schema-generation.html]]></link>
    <description><![CDATA[<p>As we add more functionality to the IM Group <span class="caps">API</span> keeping up with the documentation changes can be painful. To keep on top of it, I made a useful <a href="/general/2010/02/24/pre-commit-script.html">git pre-commit script</a> which reads and downloads xml data in order to keep the example files up to date.</p>
<p>With more people using the <span class="caps">API</span> I&#8217;ve started to receive requests for an up to date schema, so time to automate that as well&#8230;</p>
<p>Thankfully I found a <a href="http://www.xmlforasp.net/CodeBank/System_Xml_Schema/BuildSchema/BuildXMLSchema.aspx">very useful website that you can feed a url of some valid xml and it will give you a schema</a> so all that need to be done was write some code to post data to the form and parse the result.</p>
<p>Now every time the <span class="caps">API</span> is updated new examples and schema are automatically downloaded!</p>
<h2>The Code</h2>
<p>The code reads a yaml array (from a local config file), posts the url for the xml file to the website, and saves the schema to a relative folder called &#8216;schema&#8217;.</p>
<h3>Config</h3>
<pre>
key: "api-key"
base_url: "http://api-key.api.co.uk"
schema_pages:
  news:
    url: "/news/limit/4.xml"
    filename: "news.xml"
  events:
    url: "/events/limit/4.xml"
    filename: "events.xml"
  offers:
    url: "/offers/limit/4.xml"
    filename: "offers.xml"
  cars:
    url: "/cars/all/limit/4.xml"
    filename: "cars.xml"  
</pre>
<h3>Ruby Script</h3>
<pre>
#!/usr/bin/ruby

require "yaml"
require "open-uri"
require "net/http"
require "CGI"


def get_schemas(schemas, baseurl, basefolder)
  generator_url = "http://www.xmlforasp.net/CodeBank/System_Xml_Schema/BuildSchema/BuildXMLSchema.aspx"
  schemas.each do |name, info |
    xurl = "#{baseurl}#{info['url']}"
    puts "  #{name}\n"
    result = post_schema(generator_url, xurl)
    if result
      writeOut = open("#{basefolder}#{info['filename']}", "wb")
      writeOut.write(CGI.unescapeHTML(result))
      writeOut.close
    else
      puts "!! ERROR - #{name} !!\n"
    end
  end
end

def post_schema(form_url, xml_url)
  #the __VIEWSTATE &amp; __EVENTVALIDATION might change, not sure
  params = {'txtXML' =&gt; xml_url, 
            'rdoList'=&gt;0,
            'btnGenerateSchema' =&gt; 'Generate Schema',
            '__VIEWSTATE' =&gt; '/wEPDwULLTE0NDc4ODY1NjZkZD8xIV1mw4aDZAU2p55EgLM0Vbe0',
            '__EVENTVALIDATION' =&gt; '/wEWBgKyvaD5BQKj+/r1AwKM1c/8AwKkyPGDAQK7yPGDAQK0p9vtDZZo8t55cXeilmxwatAyFeQD0njY'

            }
  uri = URI.parse(form_url)
  req = Net::HTTP::Post.new(form_url)
  req.set_form_data(params)
  res = Net::HTTP.new(uri.host, uri.port).start { |http| http.request(req) }
  raw = res.body
  if res.body =~ /&lt;textarea name="txtSchema"[^&gt;]*&gt;(.*?)&lt;\/textarea&gt;/im
  	return $1
  else
  	return false;
  end
end

#MAIN
config = YAML::load_file("./example_config.yml");
schemas = config['schema_pages'].sort
puts "-- generating schema\n"
get_schemas(schemas, config['base_url'],"./schema/")
puts "-- done\n"

</pre>
<p>It won&#8217;t make the directories for you, and will fail if it doesn&#8217;t have permission to write to that folder.</p>
<h3>The Files</h3>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='/xml-schema-generation/example_config.yml' title='example config' class='category curvy'>config file &raquo;</a></li>
    <li class='category'><a href='/xml-schema-generation/hook.rb' title='hook rb script' class='category curvy'>ruby script &raquo;</a></li>
    <li class='category'><a href='/xml-schema-generation/all.zip' title='zip' class='category curvy'>all files &raquo;</a></li>
</ul>
</div>]]></description>
    <pubDate>2010-03-02T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Git Pre-Commit]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2010/02/24/pre-commit-script.html]]></link>
    <description><![CDATA[<p>With the new Subaru UK site in development we&#8217;ve been expanding on the functionality of the <span class="caps">API</span>. Unfortunately, this means updating documentation&#8230; boo.. As we&#8217;ve been making many changes with several more to come, I needed something to fetch and update the example files&#8230;</p>
<p>Firstly, I&#8217;m using yaml because the <a href="http://api.imwww.co.uk">documentation site</a> is running on <a href="http:/github.com">github</a> pages and I can therefore use a global _config.yml file and have access to the same data within the actual pages.</p>
<p>This makes it easier for me, as I can just reference the config array within the site pages; so no need to remember the paths etc.</p>
<p>Normally for such a script I would write it in bash shell, but I needed to do it quickly and a commonly used language with built in yaml parsing would be needed. Python came close, but the library isn&#8217;t install by default, where as the Ruby equivalent does; so I&#8217;m using Ruby for it.</p>
<h2>The Code</h2>
<p>The code is fairly basic, but hopefully others might find it useful. The Ruby file reads in a local _config.yml file and uses the resulting config array to fetch and save files to relative directories.</p>
<h3>The Config</h3>
<p>Just to keep the page short, I&#8217;ve only put a couple of pages to fetch, but you can use as many as you want.</p>
<pre>
key: "1234567890"
base_url: "http://1234567890.api.co.uk/"
pages:
  news:
    url: "/news/all.xml"
    filename: "news.xml"
  offers:
    url: "/offers/all.xml"
    filename: "offers.xml"
</pre>
<h3>The Ruby</h3>
<p>The files that are downloaded are saved within a local folder called results; as this was a quick script I left it hard coded, feel free to change it.</p>
<pre>
#!/usr/bin/ruby

require "yaml"
require "open-uri"

def fetch(xmlfile, localname, replace)
  writeOut = open(localname, "wb")
  writeOut.write(open(xmlfile).read)
  writeOut.close
end

def download(examples, base_url, replace)
  examples.each do |name, info|
    puts "  #{name} \n"
    fetch("#{base_url}#{info['url']}", "./results/#{info['filename']}", replace)
  end
end


config = YAML::load_file("./_config.yml");
examples = config['pages'].sort

puts "-- fetching examples\n"
download(examples, config['base_url'], config['key'])
puts "-- done\n"  
</pre>
<h3>The Files</h3>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='/git-pre-commit-files/example_config.yml' title='example config' class='category curvy'>config file &raquo;</a></li>
    <li class='category'><a href='/git-pre-commit-files/hook.rb' title='hook rb script' class='category curvy'>ruby script &raquo;</a></li>
    <li class='category'><a href='/git-pre-commit-files/all.zip' title='zip' class='category curvy'>all files &raquo;</a></li>
</ul>
</div>]]></description>
    <pubDate>2010-02-24T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Something new for Subaru and Isuzu]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/02/22/something-new-for-subaru.html]]></link>
    <description><![CDATA[<p>I can&#8217;t go in much detail, but we&#8217;ve been quietly working away on a new website for Subaru UK; that&#8217;s one of the reasons I&#8217;ve been so quiet recently. I&#8217;ve been working primarily on the new accessories section, but also helping out where needed.</p>
<p>The new features don&#8217;t stop with just the website though; 360 photography and accessory data are all running from the <a href="/work/2009/09/29/im-group-api.html">IM Group <span class="caps">API</span></a> sitting there for anyone authenticated person to use.</p>
<p>When I&#8217;ve not been doing that I&#8217;ve been working on the new <a href="http://dealer.oneblackbear.com">Isuzu dealer websites</a> which uses some lovely css3 features to do gradients and nice touches like that.</p>]]></description>
    <pubDate>2010-02-22T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Playing With Google Charts API]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/02/15/playing-with-google-charts.html]]></link>
    <description><![CDATA[<p>With the up coming <a href="http://multipack.co.uk">Multipack</a> Hack day to work on <a href="http://agreenfocus.org/">a green focused end product</a> I thought I&#8217;d make use of the newly <a href="http://data.gov.uk">released data from the government</a> and <a href="http://code.google.com/apis/charttools/index.html">google charts new api</a> to make something useful.</p>
<p>I&#8217;ve gone for <strong>recycling per region during 2005/2006</strong> in 1000s of tonnes and plugged in a few different chart types. When I get a bit more time will improve this.</p>
<p>All the javascript is inline (I know, very naughty..) so feel free to use whatever you want; although some backlinks would be nice!</p>
<form action='' method='post' name='chart_api' id='chart_api_example' class='inlineform'>
<fieldset>

    <label for='recycle_region'>Region:</label>
<select id='recycle_region' name='recycle_region'>
      <option value='' selected='selected'>Please select&#8230;</option>
</select>

    <label for='chart_type'>Chart type:</label>
<select id='chart_type' name='chart_type'>
      <option value='' selected='selected'>Please select&#8230;</option>
</select>

</fieldset>
  <fieldset id="g_chart"></fieldset>
</form>
<script type="text/javascript" charset="utf-8">
var chart_container = document.getElementById('g_chart'),
    chart_types = ['barchart', 'piechart', 'areachart', 'columnchart', 'linechart'],
    chart_options = {
                  'barchart':{},
                  'piechart':{is3D: true},
                  'areachart':{},
                  'columnchart':{is3D: true},
                  'linechart':{}
                },
    area_list = {
                'East': 'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=6',
                'East Midlands': 'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=3',
                'London': 'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=7',
                'North East': 'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=4',
                'South West':'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=9',
                'South East': 'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=8',                               
                'West Midlands': 'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=5',                  
                'Yorkshire and the Humber': 'http://spreadsheets.google.com/tq?key=0Aj0ssMmpf7rJdGEwN09JeldsYlJmN29vS1lRMTBlQ2c&gid=2'
                }
    ;
google.load("visualization", "1", {packages:chart_types});

jQuery(document).ready(function(){
  load_options();
  load_chart();
});
function load_options(){
  var regions = '', charts = '';
  for(var i in chart_types) charts +='<option value="'+chart_types[i]+'">'+chart_types[i]+'</option>';
  jQuery('#chart_type').html(charts);
  for(var i in area_list) regions +='<option value="'+i+'">'+i+'</option>';
  jQuery('#recycle_region').html(regions);
  jQuery('#recycle_region, #chart_type').change(function(){
    load_chart(jQuery('#recycle_region').val(), jQuery('#chart_type').val());
  });
}
function load_chart(region, type){
  if(!region) var region = 'East';
  if(!type) var type = chart_types[0];
  var query = new google.visualization.Query(area_list[region]);
  
  query.send(function(response){
    var data = response.getDataTable(),
        opts = jQuery.extend({}, chart_options[type], {height:400, legend: 'bottom', title: 'Recycling By Area and Type (in 1000s tonnes)', 'backgroundColor':'#EBE8D8', 'legendBackgroundColor':'#EBE8D8'}),
        chart = false          
        ;
    if(type == 'barchart') chart = new google.visualization.BarChart(chart_container);
    else if(type == 'piechart') chart = new google.visualization.PieChart(chart_container);
    else if(type == 'areachart') chart = new google.visualization.AreaChart(chart_container);
    else if(type == 'columnchart') chart = new google.visualization.ColumnChart(chart_container);
    else if(type == 'linechart') chart = new google.visualization.LineChart(chart_container);
    
    chart.draw(data, opts);
  });
}

</script>]]></description>
    <pubDate>2010-02-15T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[jQuery Translator]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2010/01/24/jquery-translator.html]]></link>
    <description><![CDATA[<p>Came across googles ever handy Ajax translator <span class="caps">API</span> and I thought I&#8217;d write a quick jQuery plugin for it.</p>
<h2>Summary</h2>
<div class='introduction curvy'>

<ul>
	<li>The plugin should be run on a form (for dynamic switching) or the document for static content</li>
	<li><a href="#language-sniffing">Automatic language detection</a> (by leaving origin_language empty)</li>
	<li>You can mix <a href="#fixed-content-fixed-language">static content</a> (even <a href="#translating-html-blocks">html blocks</a>) with <a href="#fixed-content-dynamic-language">dynamic</a>, so you can translate page content or form values, by simply switching the selector</li>
	<li>Supports all <a href="http://code.google.com/apis/ajaxlanguage/documentation/#Details">languages available from google</a></li>
	<li>When passing in languages they should use the standard 2 character short code.</li>
	<li><a href="#after-translation-hooks">After translation hooks</a></li>
	<li><a href="#download-the-plugin">Download</a></li>
</ul>
</div>
<h3 id="working-example">Working Example</h3>
<form action='' method='get' id='translation_form' class='inlineform curvy'>
<fieldset class='half'>

    <label for='translate'>Translate:</label>
<input type='text' name='translate' id='translate' value='' class='text_field'/>

    <label for='from_lang'>From</label>
<select id='from_lang' name='from_lang'>
      <option value='en' selected="selected">English</option>
      <option value='es'>Spanish</option>
      <option value='fr'>French</option>
</select>


</fieldset>

<fieldset class='half'>

    <label for='to_lang'>To</label>
<select id='to_lang' name='to_lang'>
      <option value='en'>English</option>
      <option value='es' selected="selected">Spanish</option>
      <option value='fr'>French</option>
</select>

    <label for='result'>Result:</label>
<input type='text' name='result' id='result' value='' class='text_field'/>

</fieldset>

</form>
<p>Using the plugin is straight forward enough. Once you have a form, like the one above, you need to load in the google language <span class="caps">API</span>, this plugin and on document ready call the translator plugin.</p>
<p>You should end up with something a bit like this:</p>
<pre>
&lt;script src='http://www.google.com/jsapi'  type='text/javascript'&gt;&lt;/script&gt;	
&lt;script type='text/javascript'&gt;                      
  google.load("language", "1");
&lt;/script&gt;
&lt;script src="http://github.com/charlesmarshall/jQuery-Translator/raw/master/jquery.translator.js" 
  type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
&lt;script type='text/javascript'&gt;
jQuery(document).ready(function(){
  jQuery('#translation_form').translator({
    "origin": '#translate',
    "origin_language": '#from_lang',
    "result": '#result',
    "result_language": '#to_lang'
  });
});
&lt;/script&gt;  
</pre>
<p>For a list of all supported languages have a look at <a href="http://code.google.com/apis/ajaxlanguage/documentation/reference.html#LangNameArray">googles languages enum</a></p>
<h3 id="events-and-triggers">Plugin Events and Triggers</h3>
<p>The plugin should be called on the parent form as it captures the form submit event and runs the translate. It also runs the a translation call on the following events:</p>
<ul>
	<li>Form submit</li>
	<li>Pressing space or enter within the origin field</li>
	<li>Changing either the source or result language (these should both be drop downs)</li>
</ul>
<h3 id="language-sniffing">Language Sniffing</h3>
<p>As part of the google <span class="caps">API</span> you can leave the origin language blank and it will try and figure it for itself. It&#8217;s very simple to do with this plugin, just don&#8217;t make a selector for it!</p>
<form action='' method='get' id='auto_translation_form' class='inlineform curvy'>
<fieldset class='half'>

    <label for='translate'>Translate:</label>
<input type='text' name='translate' id='translate_from' value='' class='text_field'/>


</fieldset>

<fieldset class='half'>

    <label for='dest_lang'>To</label>
<select id='dest_lang' name='dest_lang'>
      <option value='en'>English</option>
      <option value='es'>Spanish</option>
      <option value='fr' selected="selected">French</option>
</select>

    <label for='auto_result'>Result:</label>
<input type='text' name='auto_result' id='auto_result' value='' class='text_field'/>

</fieldset>

</form>
<p>To do this, you just need to modify the call to translator to have an empty origin_language parameter:</p>
<pre>
jQuery('#auto_translation_form').translator({
  "origin": '#translate_from',
  "origin_language": '',
  "result": '#auto_result',
  "result_language": '#dest_lang'
});
</pre>
<p>The only issue that does sometimes come up is with using <span class="caps">UTF</span>-8 characters and how they are displayed in text areas and the like.</p>
<h3 id="fixed-content-fixed-language">Translating Page Content With a Fixed Language</h3>
<p>If you want to translate a static segment or an entire page, this plugin can do that also. Again, all you need to do is modify the call to translator plugin. Here is an example:</p>
<p id='my_english_version' class='example'>Hello, my name is Charles.</p>
<p id='my_french_result' class='example'></p>
<p>Here I change the selectors and manually pass in the language codes to translate between as such:</p>
<pre>
jQuery(document).translator({
  "origin": '#my_english_version',
  "origin_language": 'en',
  "result": '#my_french_result',
  "result_language": 'fr'
});
</pre>
<h3 id="translating-html-blocks">Translating Blocks of Markup</h3>
<p>As the <a href="http://code.google.com/apis/ajaxlanguage/documentation/reference.html#GlobalMethods">google <span class="caps">API</span> supports and preserves markup</a> with the string that is passed along, it is pretty straight forward. In this example the outer containers contents is translated from English to Spanish and maintains all markup.</p>
<div id="preserve-markup" class='example'>
	<p>This is a paragraph that was in english, but should be translated to spanish.</p>
<ul>
		<li>This is a bullet point, within an unordered list</li>
		<li>so is this</li>
</ul>
	<p>This <a href='#translating-html-blocks' title='example link'>paragraph</a> has an a tag within it.</p>
</div>
<p>And it works in exactly the same way as the static selector with just one change:</p>
<pre>
jQuery(window).translator({
   "origin": '#preserve-markup',
   "origin_language": 'en',
   "result": '#preserve-markup',
   "result_language": 'es',
   "after_translate": track
 });	
</pre>
<p>As you can see, the origin and the result parameters are the same selector, resulting in a replacement.</p>
<p><span class="caps">NOTE</span>: I update the plugin to do this due to a request from <a href="#comment-43473998">Parthiban</a> , hope this works for you!</p>
<h3 id="fixed-content-dynamic-language">Translating Page Content With a Selectable Language</h3>
<p>You can also mix and match the two methods, having static content but swapping between languages like below:</p>
<form action='' method='get' id='static_content_translation_form' class='inlineform curvy'>
<fieldset class='half'>
    <label for='trans_to'>Translate to</label>
<select id='trans_to' name='trans_to'>
      <option value='en'>English</option>
      <option value='es' selected="selected">Spanish</option>
      <option value='fr'>French</option>
</select>
</fieldset>
</form>
<p id='static_english_version' class='example'>Translation is the name of the game!</p>
<p id='dynamic_result' class='example'></p>
<p>This is achieved very easily by switching the result_language parameter to a selector while keeping the origin_language as &#8216;en&#8217;</p>
<pre>
jQuery('#static_content_translation_form').translator({
  "origin": '#static_english_version',
  "origin_language": 'en',
  "result": '#dynamic_result',
  "result_language": '#trans_to'
});  
</pre>
<h3 id="after-translation-hooks">Hooks</h3>
<p>The plugin gives the ability to add a post hook on a successful translation. On this site for example I track (via google analytics page events) what is translated from each query.</p>
<p>In normal jQuery style you can pass in a function as a parameter to be run like this:</p>
<pre>
jQuery('#static_content_translation_form').translator({
  "origin": '#static_english_version',
  "origin_language": 'en',
  "result": '#dynamic_result',
  "result_language": '#trans_to',
  "after_translate": function(original, translation){alert('translated!');}
});
</pre>
<p>Both the original text and the translated text is passed in to the function.</p>
<h3 id="notes-about-the-plugin">Notes</h3>
<p>The only issue that I know is that the plugin works only once per selector, so you can&#8217;t use it on jQuery(document) more than once for example.</p>
<h3 id="download-the-plugin">Download</h3>
<p><a href="http://github.com/charlesmarshall/jQuery-Translator/raw/master/jquery.translator.js">Grab the plugin here</a></p>
<script type='text/javascript'>                      
  google.load("language", "1");
</script><script src="http://github.com/charlesmarshall/jQuery-Translator/raw/master/jquery.translator.js" type="text/javascript" charset="utf-8"></script><script type='text/javascript'>
var track = function track_translate(original, result){
  _gaq.push(['_trackEvent', 'translator', original, result]);
};


jQuery(document).ready(function(){
  jQuery('#translation_form').translator({
    "origin": '#translate',
    "origin_language": '#from_lang',
    "result": '#result',
    "result_language": '#to_lang',
    "after_translate": track
  });
  jQuery('#auto_translation_form').translator({
    "origin": '#translate_from',
    "origin_language": '',
    "result": '#auto_result',
    "result_language": '#dest_lang',
    "after_translate": track
  });  
  jQuery(document).translator({
    "origin": '#my_english_version',
    "origin_language": 'en',
    "result": '#my_french_result',
    "result_language": 'fr',
    "after_translate": track
  });
  jQuery('#static_content_translation_form').translator({
    "origin": '#static_english_version',
    "origin_language": 'en',
    "result": '#dynamic_result',
    "result_language": '#trans_to',
    "after_translate": track
  });
	jQuery(window).translator({
    "origin": '#preserve-markup',
    "origin_language": 'en',
    "result": '#preserve-markup',
    "result_language": 'es',
    "after_translate": track
  });
});

</script>]]></description>
    <pubDate>2010-01-24T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Amazon S3 Does Version Control]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/01/23/amazon-s3-version-control.html]]></link>
    <description><![CDATA[<p>Amazon have set up <a href="http://doc.s3.amazonaws.com/betadesign/Versioning.html">version control on their S3 system</a> ; it is currently in Beta (isn&#8217;t everything?) but looks like it could be very handy.</p>
<p>Having a scan over it the main problem I see is that instead of storing diffs between the versions of file they are storing the entire file again as a new object. As storage on s3 is insanely cheap anyway, you wouldn&#8217;t think its that big a deal, but think about it for a second.</p>
<p>If you are editing a high res video and storing it on s3, you could see your bills sky rocket. Lets say the video is 1gb, and you need to make lots of amends and get client approval for each one. With normal version control (something like dropbox I think is a suitable comparison here) you&#8217;d only be saving the changes between the original file and the current one. With s3 it&#8217;s an entire new file.</p>
<p>That is where you could easily end up using 10gb of storage by just amending a single file a few times. I can understand why, storing entire copies is easier then trying to figure out a diff engine capable of handling obscene file sizes.</p>]]></description>
    <pubDate>2010-01-23T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Facebook - Why I left and won't be going back!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2010/01/22/facebook-underhand-dealings.html]]></link>
    <description><![CDATA[<p>I had an account on facebook for a long, long time; but no longer. At the end of last year (2009) I&#8217;d had enough and deleted my account, which is a challenge in itself. Since then, I&#8217;ve not missed it one bit.</p>
<h3>Notifications &#8211; aka Spam Galore</h3>
<p>Every time any of my friends or groups did anything you can bet your life I&#8217;d get a notification about it. I don&#8217;t care if you&#8217;ve just bought 5 more sheep or got a full house, I&#8217;m not interested!!</p>
<p>You can turn most of the email about these off, but every time you log back in you&#8217;ll get dozens of them in your face with each application wanting you to join up.</p>
<p>This is only a minor annoyance when you log in regularly, but when you only use the site once a week you can imagine the amount of spam have to wade though before can find anything useful.</p>
<p>Eventually facebook introduced a blocking ability, so you can stop those annoying apps slightly, but some still make it though :|</p>
<h3>Applications and the Zynga Saga</h3>
<p>This was probably the final nail in the coffin for my account. The amazingly bad practices that one of the largest facebook app providers admit to is shocking. Everything from selling on user data to trying to push scam offers!</p>
<p>When you add an application to your account, you gave them permission to do what the hell they liked with your personal data. Combining that with Zyngas ploy to make money by scamming users enough was enough.</p>
<p>Techcrunch covered this far better than I ever could, so have a read of what Zynga thinks about you really:</p>
<ul>
	<li><a href="http://www.techcrunch.com/2009/11/06/zynga-scamville-mark-pinkus-faceboo/">I Did Every Horrible Thing In The Book Just To Get Revenues</a></li>
	<li><a href="http://www.techcrunch.com/2010/01/03/zynga-investor-calls-scamville-debate-irrelevant-and-unfair/" title="a summary">Zynga Scamville</a></li>
</ul>
<p>Sadly, these practices were known about by facebook, and they didn&#8217;t (and still don&#8217;t) care. Why? Because the make a small fortune from advertising on those games.</p>
<h3>The Almighty Dollar</h3>
<p>This is what facebook guys really want, above all else. They don&#8217;t care about you, or how they make their money as long as they are rolling in it they are happy.</p>
<p>The most recent and worrying one would have to be <a href="http://www.techcrunch.com/2010/01/23/facebook-vanity-url-harman/">Harman Bajwa and his vanity url</a> that was nicely sold to a corporation&#8230;</p>
<h3>Delete and be Happy!</h3>
<p>Stop spending hours on end on that nightmare of a website and get out more! Follow the instructions on this <a href="http://www.facebook.com/group.php?gid=16929680703">facebook group</a> (as they like to make it hard for you to leave) or use the <a href="http://suicidemachine.org/">amusing web suicide machine</a> for a laugh.</p>]]></description>
    <pubDate>2010-01-22T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Johnny Cash Planner]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/01/20/johnny-cash-planner.html]]></link>
    <description><![CDATA[<p><a href="http://johnnycashplanner.com"><img src="/images/work/jcp.jpg" alt="" /></a></p>
<p>Unsuitable and One Black Bear have got involved in setting up and launching a company to help people better manage their money and educate school kids on money matters, so we hopefully don&#8217;t see the financial meltdown again that we&#8217;re just going through.</p>
<p><a href="http://johnnycashplanner.com">A new website is on the way</a> but in the meantime we&#8217;re trying to build up a social side to it.</p>
<p>If you&#8217;d like to get involved as a Beta tester once the site goes live, <a href="http://johnnycashplanner.com">you can sign up here</a></p>]]></description>
    <pubDate>2010-01-20T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[WAAs New Website]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/01/15/ex-employer-done-something-right.html]]></link>
    <description><![CDATA[<p>As I never seem to have the time to blog about much any more; it&#8217;s taken me far too long to mention this.</p>
<p><span class="caps">WAA</span> used to have a reasonable website (I didn&#8217;t like all the pink). It was, most importantly, a valid <span class="caps">XHTML</span> site with only a single bit of flash. This version of their site had plenty of content, was updated regularly (until Chris Tomlinson left) with a really good page rank in google (If memory serves it was a 6).</p>
<p>What replaced it (not long after I left) was an abortion of a flash website, which I have already berated in an earlier post. Flash websites can still do well, if content is exposed properly. Theirs wasn&#8217;t. The number of times it was updated you could count on a single hand and they had removed pretty much every single article that had ever been written for that site. This is old ground; I&#8217;ve already moaned about it many times.</p>
<p>Towards the end of last year (2009) they launched a new website; and it wasn&#8217;t flash! Instead it is a good quality html website with some fresh content. A positive move for a change; lets see what happens.</p>]]></description>
    <pubDate>2010-01-15T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Piano Debbie]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2010/01/12/piano-debbie.html]]></link>
    <description><![CDATA[<p>A friend of mine is moving back over to Birmingham and setting up to be a piano teacher; so I&#8217;ve made a <a href="http://pianodebbie.co.uk">website for it</a>.</p>
<p>Site is set up and running on the quick &amp; simple github pages and I&#8217;m slowly adding content as I get it. Hopefully it will help get off the ground.</p>]]></description>
    <pubDate>2010-01-12T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[More Git Hub Pages...]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2010/01/12/more-on-github-pages.html]]></link>
    <description><![CDATA[<p>Last year I moved my blog over to use <a href="http://pages.github.com">git hub pages</a> which makes use of liquid &amp; jekyll to compile your website to a static version.</p>
<p>Git hub pages have now become my choice for any simple project website (just like my little front end to <a href="http://closureoptimizer.com/">google&#8217;s closure optimiser</a>) and to that end I&#8217;ve found a whole bunch of useful resources which will hopefully save digging around in the future.</p>
<ul>
	<li><a href="http://wiki.github.com/tobi/liquid/liquid-for-designers">Guide to liquid</a></li>
	<li><a href="http://wiki.github.com/mojombo/jekyll/template-data">Standard template variables</a></li>
	<li><a href="http://wiki.github.com/mojombo/jekyll/liquid-extensions">Basic functions</a></li>
</ul>
<p>So now I know how to use them well; just need to make a better design for this blog!</p>]]></description>
    <pubDate>2010-01-12T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Google Closure Optimiser]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/11/11/closure-optimiser.html]]></link>
    <description><![CDATA[<p>After the release of Googles Closure library I decided to quickly put together a site using it; pass in some javascript and out comes your compiled version. <a href="http://closureoptimizer.com/">Nice and simple</a></p>]]></description>
    <pubDate>2009-11-11T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Google Closure Javascript Library]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/11/10/google-closure.html]]></link>
    <description><![CDATA[<p><a href="http://closureoptimizer.com"><img src="http://closureoptimizer.com/images/google-closure-logo.jpg" alt="" /></a></p>
<p>Google have released their <a href="http://code.google.com/closure/">internal javascript library</a> (no, this isn&#8217;t about <span class="caps">GWT</span>, that is something different) and called it Closure. Odd name and one that is already heavily in use</p>
<ul>
	<li>Closure &#8211; the <a href="http://en.wikipedia.org/wiki/Closure_%28computer_science%29">first-class function</a></li>
	<li>Clojure &#8211; the <a href="http://en.wikipedia.org/wiki/Clojure">lisp dialect</a></li>
	<li>Clozure &#8211; another <a href="http://en.wikipedia.org/wiki/Clozure_CL">lisp implementation</a></li>
	<li>Closure &#8211; a <a href="http://code.google.com/p/closure/">shutdown tool for X windows</a></li>
	<li>Closure &#8211; a <a href="http://www.stud.uni-karlsruhe.de/~unk6/closure/">web browser</a></li>
	<li>and a <a href="http://www.google.co.uk/search?hl=en&amp;q=closure">whole load more</a> ..</li>
</ul>
<p>Naming issues aside, <a href="http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/index.html">the library</a> offers a whole host of functions (like all the other major libraries) for dom manipulation, event handling, asynchronous calls etc. There are a couple of nice extras that it does have over other libraries.</p>
<h3>Require and Provide</h3>
<p>Instead of loading the entire library in (which would be huge) you can just load the bits you need using the <code>require</code> call. Nice start, but it gets better.</p>
<p>If you load part of the library that requires another part of the library google sorts that out for you and loads in for you; now that is smart.</p>
<p>It does this using the <code>.require</code> &amp; <code>.provide</code> methods included in the base closure file.</p>
<p>In the closure files the first thing each one does is tell you what it does and then what it needs&#8230;</p>
<pre>
goog.provide('goog.math');
goog.require('goog.array');
</pre>

<p>No more missing dependancies!</p>
<h3>Compression</h3>
<p>As part of the closure library google they also made a <a href="http://code.google.com/closure/compiler/">lovely compressor</a> to shrink their code to tiny size and then made it into an <span class="caps">API</span>. It has a few settings related to how much it compresses the code by (<code>compilation_level</code>).</p>
<ul>
	<li><code>WHITESPACE_ONLY</code></li>
	<li><code>SIMPLE_OPTIMIZATIONS</code></li>
	<li><code>ADVANCED_OPTIMIZATIONS</code></li>
</ul>
<p><code>WHITESPACE_ONLY</code> does what you might think, it removes all the whitespace from your js like any other minifying tool. <code>SIMPLE_OPTIMIZATIONS</code> is where it starts to get interesting; white space is gone and local variable names get renamed. Now, when you set it <code>ADVANCED_OPTIMIZATIONS</code> <a href="http://code.google.com/closure/compiler/docs/api-tutorial3.html">the really clever stuff starts to happen</a>.</p>
<p>There are still a few things you need to watch out for when using <code>ADVANCED_OPTIMIZATIONS</code>, mostly to do with consistency and string literals.</p>
<p>The most obvious one is of course external files using the now compiled javascript will struggle as function names have changed and name spaces might no longer be the same (I need to test this out in detail).</p>
<p>As the google complier page isn&#8217;t exactly friendly I knocked up a quick site to handle the most common queries and called it <a href="http://closureoptimizer.com/">closure optimiser</a></p>]]></description>
    <pubDate>2009-11-10T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Useful Bash Shell Scripts]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2009/11/05/useful-bash-shell-scripts.html]]></link>
    <description><![CDATA[<p>Bash is a type of shell; you will find it sitting on almost every nix based computer you can get your hands on. To check if your running <code>bash</code> type in this on your command prompt</p>
<p><code>echo $SHELL</code></p>
<p>If it returns something like</p>
<p><code>/bin/bash</code></p>
<p>Then you are. There are alternatives to bash; C Shell (<code>csh</code>) and Bourne Shell (<code>sh</code>) being popular ones.</p>
<p>Anyway, getting to the point &#8230;</p>
<h3>Scripting</h3>
<p>I wrote some bash scripts to help with setting up websites; I know the current trend is to use <code>Capistrano</code> but not everyone wants to install all of it&#8217;s dependancies.</p>
<p>Currently, there is one main script called <code>sitecreate.sh</code>, this takes in an bunch of arguments and then goes off and calls utility scripts in the same directory. As long as you get the command right, the following happens:</p>
<h4>user.sh</h4>
<ul>
	<li>Shell in to remote server</li>
	<li>Create group for user</li>
	<li>Create user &amp; home directory</li>
	<li>Add user to group</li>
	<li>Setup users password</li>
</ul>
<h4>vhost.sh</h4>
<ul>
	<li>Reads in and parses a vhost skeleton file</li>
	<li>Saves parsed vhost to apache directory</li>
</ul>
<h4>mysql.sh</h4>
<ul>
	<li>Create mysql user</li>
	<li>Create mysql database</li>
	<li>Give user permissions to the db</li>
</ul>
<h4>checkout.sh</h4>
<ul>
	<li>Checks out the projects GiT repository</li>
</ul>
<p>Once all of those are done, it then restarts apache. The scripts aren&#8217;t fully tested yet, but feel free to <a href="http://github.com/charlesmarshall/Utils">grab them over at github</a></p>]]></description>
    <pubDate>2009-11-05T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Version Control]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2009/10/28/version-control.html]]></link>
    <description><![CDATA[<p>Version control is important&#8230; <span class="caps">VERY</span> <span class="caps">IMPORTANT</span>! I have yet to come across a single university / college course for programmers that even mentions it, never mind teaching it in detail.</p>
<p>No matter what element of computer work you&#8217;re in (web, c++, java etc) you need to be using version control of some form. You do one update, say change a logo or adjust the number of centroids for your k-means algorithm, what do you if 3 days later you find out it was the wrong decision? If you&#8217;re not using version control its going to be a painful experience and heavy reliance on your memory; after 3 days you might remember it, but what if it was 3 weeks, or months or even years? There is no way you will remember that far back!</p>
<p>This where good version control steps in. In the old old days you had <a href="http://en.wikipedia.org/wiki/Concurrent_Versions_System"><span class="caps">CVS</span></a> ; please forgot this existed (even though it did pave the way). In 2000 the <a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</a> open source project was born.</p>
<h3>Subversion</h3>
<p>It was fast and handled binary files very well; which is why it is the base for such things as <a href="http://getdropbox.com">Dropbox</a>. However, it does have draw backs. It&#8217;s branching and tagging truly are a nightmare to use and it relies on a central point for a repository.</p>
<p>What this means is that you will need to be online in order to make commits; this is not ideal, how do you do work on a train or plane? You can&#8217;t.</p>
<p>Subversions biggest weakness (in my opinion) is its problems with renaming things. Instead of marking your rename as a rename it adds the file again under its new name and deletes the old one&#8230; Leaving lots of opportunity to lose changes. Say I made some changes in the a random project file, renamed it, and then checked it in. Those changes would show in the new file, but not the old one&#8230;.</p>
<p>Reverting back to a previous commit isn&#8217;t exactly a barrel of laughs. However the difficulty you have to endure when working on the same project as someone else is the straw that broke this programmers back.</p>
<p>Lets say Bob is editing a large library file on Project X, say one that handles all file operations and makes several amends, but at the same time Jon made a whole bunch of amends to the same file. Checking those changes in is going to be interesting.</p>
<p>At best you will have to resolve conflicts with a merging utility and hope you got it right. At worst, they will have changed the same areas of the file and who knows what will get checked in.</p>
<p>A better solution was needed&#8230; Just like buses you spend ages waiting for one then 3 turn up at once!</p>
<h3>Distribution <span class="caps">FTW</span></h3>
<p>Instead of a centralised, upstream only repository you have a local repository to call your own. You can make your changes, commit them locally, revise your commits if you want and then push to whatever other repository you fancy. Working with version control offline is now possible!</p>
<p>Distributed version control systems come in many flavours, but the current favourites are:</p>
<ul>
	<li>GiT</li>
	<li>Bazaar</li>
	<li>Mercurial</li>
</ul>
<p>GiT is my <span class="caps">DVCS</span> of choice. The main reason for originally selecting GiT was its backwards compatibility with Subversion; <code>git svn</code> basically allows your upstream origin to be a Subversion repository but keeping your local repository running on GiT!</p>
<h3>Working With GiT</h3>
<p>First off, installing GiT is super simple:</p>
<ul>
	<li>Windows has the ever wonderful Tortoise (TortoiseGiT)</li>
	<li>Linux is easy, as GiT was made by Linus, so in most distros its a single command to install</li>
	<li>OS X is based on FreeBSD and there is now a dmg install image</li>
</ul>
<p>That should take you about 5 minutes. Once you&#8217;re done you need to get used to the command set. Many people (Mercurial &amp; Bazaar uses, wonder why?) always complain about the number of commands Git has, but lets be honest here, in daily usage you use 6 commands:</p>
<ul>
	<li><code>git init</code></li>
	<li><code>git checkout</code></li>
	<li><code>git add</code></li>
	<li><code>git commit</code></li>
	<li><code>git pull</code></li>
	<li><code>git push</code></li>
</ul>
<p>How hard is that? GiT is simple to use for ever day tasks and wins hands down when it comes to smart merging of conflicts etc. You can learn all 100+ commands, or you can be sensible and google for them when you need to use them!</p>
<h3>Simplicity</h3>
<p>Although I am a programmer and treat the command line like a second home, GUIs such as GitX makes some of those complicated things much easier. For example the latest build of GitX allows you to commit changes on specific lines, line at a time! Doing a command line alternative to this would be horrific.</p>
<p>All they need to do is add a button to do a push command &#8230;</p>
<p>Couple that with the very handy <code>Capistrano</code> and deploying becomes easier.</p>
<h3>Negatives&#8230;</h3>
<p>GiT is not perfect&#8230; Just google and I&#8217;m sure you&#8217;ll find dozens of people slagging it off (documentation is for wimps :P ).</p>]]></description>
    <pubDate>2009-10-28T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[The Next Revision...]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/10/22/the-next-revision.html]]></link>
    <description><![CDATA[<p>I got bored with my site design a few months back, finding it to fiddly and image heavy; so time for a change. Something simple this time, clean, plain, and a scatter in a few bright colours for contrast.</p>
<p>After searching around for a while I found the rather cool abstract vector image (sitting on the left ) over at <a href="http://www.pinkmoustache.net/free-vectors-colorful-backgrounds">pink moustache</a> &#8211; strange name, cool image.</p>
<p>Mainly just something to break the whiteness and introduce the colour scheme used to signify categories.</p>
<p>I think this is about the 5th iteration of my site, switching platforms and designs along the way. My site is now sitting over on <a href="http://github.com">github</a> &#8211; just need to add an external comments system &#8230;</p>
<p><span class="caps">EDIT</span> (January 24 2010): Well that version was short lived, it was very ugly so changed it this weekend! Much better this way.</p>]]></description>
    <pubDate>2009-10-22T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[B-Hive - Creative &amp; Marketing Placements]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/10/20/bhive-creative.html]]></link>
    <description><![CDATA[<p><a href="http://bhive-creative.com"><img src="/images/work/bhive.jpg" alt="" /></a></p>
<p>At the start of this year a group of like minded people from various companies &#8216;in the business&#8217; got together and decided to do something about the migration of new talent from the midlands to rival cities such as London &amp; Manchester.</p>
<p>An idea was born. <a href="http://bhive-creative.com">B-Hive</a>.</p>
<p>The B-Hive scheme has been developed to give students from the city’s universities and colleges the opportunity to get a foot on the career ladder by winning paid work placements at some of the region’s leading companies.</p>
<p>We have just relaunched the B-Hive site ready for next years entries, it is now much bigger than before with news sections, advice, and much more.</p>
<p>If you are curious, you can still see the <a href="http://2009.bhive-creative.com/">2009 version here</a>.</p>]]></description>
    <pubDate>2009-10-20T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Miss Jones]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/10/14/miss-jones.html]]></link>
    <description><![CDATA[<p><a href="http://nataliefayejones.co.uk"><img src="/images/work/miss-jones.gif" alt="" /></a></p>
<p>This was previously <a href="http://freetofreelance.co.uk">Free to Freelance</a> but has now undergone some design changes and new content.</p>
<p>The new name and font are obvious but there is now a <a href="http://nataliefayejones.co.uk/testimonials">testimonials section</a> along with a more detailed <a href="http://nataliefayesjones.co.uk/information">information page</a>.</p>
<p>Switching to italic georgia for headings has given the site that little bit extra visual appeal and looks much closer to the new branding.</p>
<p>If you ever need any creative things (logos, company branding etc) then Miss Jones is the lady you want!</p>]]></description>
    <pubDate>2009-10-14T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Investors in Excellence]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/10/01/investorsinexcellence.html]]></link>
    <description><![CDATA[<p><img src="/images/work/investors-in-excellence.gif" alt="" /></p>
<p>Recently launched the new version on this site; with everything from client logins, google maps, payment systems there are plenty of features making this site quite extensive.</p>]]></description>
    <pubDate>2009-10-01T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[IM Group API]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/09/29/im-group-api.html]]></link>
    <description><![CDATA[<p>When One Black Bear took over the Subaru (and later Isuzu) account we went over just how bad their website was&#8230; Pretty much every bad practice you can imagine has been used on that site somewhere at some point in time. While this is still the case their is a glimmer of hope; the dealership sites.</p>
<p>IM Group asked us to take a look at the dealer websites and see what kind of package we can put together to replace the Portfolio rubbish they use now.</p>
<p>It&#8217;s not as glamourous as the main site, but a good, stable client base and an opportunity to show what can be done. I&#8217;ve covered the dealer sites themselves in a <a href="/work/2009/09/29/dealer-sites.html">separate post</a> this one is more techy and is focused on the technology that they use; the <strong>IM Group <span class="caps">API</span></strong></p>
<h3>Goals</h3>
<p>When coding the <span class="caps">API</span> I always had a few goals in mind:</p>
<ul>
	<li>K.I.S.S &#8211; Keep It Simple Stupid, a trusted old adage that&#8217;s relevant in pretty much every aspect of development, but in this case referring to the code base</li>
	<li>Easy access &#8211; it should not require anything more flashy than curl to talk to the <span class="caps">API</span></li>
	<li>Synchronising &#8211; both push &amp; pull should be supported</li>
</ul>
<p>Some areas are a bit more complicated than I would like, as access has to be limited and tracked, but on a whole I&#8217;m happy with it. Makes handling all the dealer sites much easier.</p>
<h3>Data</h3>
<p>The <span class="caps">API</span> itself sits on <code>imwww.co.uk</code> but you won&#8217;t be able to see it unless you have a valid authentication token. If you know one, you will find the <span class="caps">API</span> has data on pretty much everything Subaru does (Isuzu data isn&#8217;t in there yet). It covers</p>
<ul>
	<li>News</li>
	<li>Events</li>
	<li>Offers</li>
	<li>Cars</li>
</ul>
<p>The news, events &amp; offers are mostly just content, a few images and some dates (start, end etc). However, the car section contains lots of information. It tells you the colours every model is available in, every variation the model has, the prices, insurance details, features, dimensions, extensive range of photography and anything else you would ever want to know about a car (even how loud it is&#8230;).</p>
<h3>Contents</h3>
<p>The large amounts of data that are flying around meant that finding exact data you want could be tricky&#8230; So I made it simple by using a RESTful architecture.</p>
<p>If you want only the latest 5 news items; then just ask:</p>
<p><code>imwww.co.uk/news/limit/5</code></p>
<p>Just want a single offer you know the name of, thats easy:</p>
<p><code>imwww.co.uk/offers/details/555-campaign</code></p>
<p>Want to do something more complicated? How about paginating the results, so you want page 5, with 10 per page and everything running in reverse order.. Simple:</p>
<p><code>imwww.co.uk/events/page/5/per_page/10/order/date desc</code></p>
<p>How about fetch data for only a single model, like the impreza:</p>
<p><code>imwww.co.uk/cars/model/impreza</code></p>
<p>To much data in your results? Only need the real basics; then you need the minimal flag&#8230;</p>
<p><code>imwww.co.uk/cars/model/impreza/minimal</code></p>
<p>Instead of fetching everything, just returns the basics, like names &amp; prices (depends on what you apply the flag to of course).</p>
<h3>Formats for Everyone</h3>
<p>Are you an <span class="caps">XML</span> fiend? a <span class="caps">JSON</span> lover? A <span class="caps">PHP</span> code monkey? The <span class="caps">API</span> supports them all, just change the file extension:</p>
<ul>
	<li><span class="caps">XML</span> &#8211; .xml</li>
	<li><span class="caps">JSON</span> &#8211; .json</li>
	<li><span class="caps">SPHP</span> &#8211; .sphp</li>
	<li><span class="caps">HTML</span> &#8211; .html</li>
</ul>
<h3>Practical Use?</h3>
<p>Lots of them! At the moment the <span class="caps">API</span> is powering every new dealer website, the vehicle data on the main Subaru site, all up coming Isuzu dealer websites, dealer locators, news feeds and much more to come.</p>
<h3>Push and Pull</h3>
<p>With some of the systems mentioned above polling is of course the way to do it; as replicating databases all over the place would make things very messy very quickly. Instead services like dealership locators use pull queries to <span class="caps">API</span> urls to fetch data.</p>
<p>This isn&#8217;t really an option for something as complicated as a dealer website. How slow would a website be if everything on that page had to be fetched from an <span class="caps">API</span> call? Dealer sites make use of the push notification system.</p>
<p>If content is edited on the master <span class="caps">API</span> &#8211; say a price change on the Outback &#8211; then the <span class="caps">API</span> sends out a notification to registered sites that there has been an update.</p>
<p>The site picks up on this notification and has a look at what has changed. If the data is relevant to the site, it updates its information. Much nicer!</p>
<h3>Installing a Dealer Site</h3>
<p>As I mentioned above, the <span class="caps">API</span> only talks to registered sites. The site is registered with the <span class="caps">API</span> during its own install process; it sends off a little bit of data about itself and the <span class="caps">API</span> updates its records.</p>
<p>The rest of the install also queries the the <span class="caps">API</span>, so within a couple of minutes all the latest details for everything Subaru is setup for that dealer.</p>
<h3>Speed</h3>
<p>From nothing (not even a domain name) to a fully working (out of the box) dealer site takes about 40 mins, most of that is setting up a new branch on the repo, making google accounts (gmail, analytics, maps) and <span class="caps">DNS</span>, but thats still pretty fast!</p>
<p>The <span class="caps">API</span> itself is sitting on a small server, so to keep it going fast basic caching is used (the <span class="caps">API</span> wipes the relevant cache files on updates, of course).</p>
<p>As this is a monster of a post, I blogged about the actual dealer sites in <a href="/work/2009/09/29/dealer-sites.html">another post</a></p>]]></description>
    <pubDate>2009-09-29T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Dealer Websites]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/09/29/dealer-sites.html]]></link>
    <description><![CDATA[<p>When One Black Bear took over the Subaru account it was clear that their web presence was sub standard at best. The main site was a mess, and still is.</p>
<p>Most of their content was in <code>iframes</code> being pulled from somewhere else and every other bad practice that you can think of was pretty much in regular use.</p>
<p>While those issues have not been addressed yet, we now have the opportunity to sort out the dealers websites. Their current package (via Portfolio) is just as bad the main site.</p>
<h3>Design</h3>
<p>First thing, getting a design done &amp; approved.</p>
<p>The design was done by <a href="http://roobottom.com/">Jon Roobottom</a> and is spot on. Clean, simple and modern. Approval was rapid, the new design was a winner.</p>
<p>A few minor changes were brought up during a focus group with leading dealers from around the country.</p>
<h3>Focus for Success</h3>
<p>To make sure what we had in mind was what the dealers wanted Subaru put us in touch with some dealers and arranged a meeting.</p>
<p>We presented the new site designs, layout and ours ideas for the site. With a few minors amends, such as more offers on the home page it was warmly received.</p>
<h3>Build</h3>
<p>Build it and they will come. So I did, and so did they. You can have a look at the first dealer, Crossroads, to go live <a href="http://subaruvehicles.co.uk/">here</a></p>
<p>The site is doing well, with a couple of hundred hits per day. The great domain name does help!</p>
<p>The Crossroads site differs from the standard, such as <a href="http://slipendsubaru.co.uk/">Slip End Garages</a> but customisation is simple due to lovely GiT.</p>
<h4>GiT in Action</h4>
<p>I started with a single branch, for the base level work. Keeping everything nice and tidy with some <a href="/general/2009/10/28/version-control.html">good old version control</a> for all the designs ann common code.</p>
<p>Once that first branch was ready all other Subaru dealers get a branch for themselves. Any amends are done on their own branch, so changes to layouts images etc only effect them.</p>
<h3>Deployment</h3>
<p>Deployment of the site is easy, checkout the right branch of the project, run the automated installer and your done. Of course that excludes all the google account gubbins and <span class="caps">DNS</span> setup, but on the whole, install from nothing is fast; sub hour for out of the box site.</p>
<p>The dealer sites would be a lot more work if it wasn&#8217;t for the <a href="/work/2009/09/29/dealer-sites.html"><span class="caps">API</span> they run on</a> (I wrote that too!).</p>]]></description>
    <pubDate>2009-09-29T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[St Phillips Chambers]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/09/03/st-phillips.html]]></link>
    <description><![CDATA[<p><a href="http://www.st-philips.com/"><img src="/images/work/st-phillips-logo.png" alt="" /></a></p>
<p>Not a site I can take credit for, Ross Riley built this one, but it&#8217;s just around the corner so well worth a mention.</p>
<p>We&#8217;ve just finished and pushed live an over hauled and <a href="http://www.st-philips.com/">revamped version of their website</a>, but not on our <span class="caps">CMS</span>.</p>
<p>As this site will be maintained internally by their IT department it&#8217;s being built using activeedition instead. I&#8217;m not a fan.</p>]]></description>
    <pubDate>2009-09-03T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Isuzu]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/09/03/isuzu.html]]></link>
    <description><![CDATA[<p><a href="http://isuzu.co.uk"><img src="/images/work/isuzu.jpg" alt="" /></a></p>
<p>With wining the &#8220;digital&#8221; work for Isuzu the first thing on the list was a new website&#8230; So <a href="http://isuzu.co.uk">here it is</a></p>]]></description>
    <pubDate>2009-09-03T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Git Hub Pages...]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/09/01/github-pages.html]]></link>
    <description><![CDATA[<p>Ooo, the very cool <a href="http://github.com">github</a> that handles all your GiT repository needs has now introduced &#8216;pages&#8217;. This can be an entire repo or a single branch (called gh-pages).</p>
<p>It uses Jekyll and renders textile, markdown or good old html. For more details you can have a look at <a href="http://pages.github.com/">the official page</a> or a <a href="http://blog.envylabs.com/2009/08/publishing-a-blog-with-github-pages-and-jekyll/">really nice blog post</a> I found talking about how to use them as a blog</p>]]></description>
    <pubDate>2009-09-01T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Clarke and Strong]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/08/16/clarke-and-strong.html]]></link>
    <description><![CDATA[<p>I see dead people? No, just the Clarke and Strong website (although after all the product entry I&#8217;m not far off).</p>
<p>Clarke and Strong are a family run supplier of funeral goods and have been in the business for over 100 years!</p>
<p>The site itself was a rather morbid project to work, but some nice functionality. Body bags on a roll &#8230; really? <a href="http://clarkeandstrong.com/product/ancillary/body-bags-on-a-roll">Apparently so</a></p>
<p>I particularly like live filtering on the product <a href="http://clarkeandstrong.com/product/gowns">listing pages</a> and of course there are a couple of hidden easter eggs ;)</p>]]></description>
    <pubDate>2009-08-16T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Expanding Grid]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2009/08/02/expanding-grid.html]]></link>
    <description><![CDATA[<p>Piece of <a href='http://github.com/charlesmarshall/jQuery-Expanding-Grid/raw/master/jquery.expandinggrid.js'>jQuery</a> to create a grid system from some class items that then expand on hover and contract on hover off.</p>
<div id="example_container">

  <div class='jqitem clearfix'></div>
  <div class='jqitem clearfix'></div>
  <div class='jqitem clearfix'></div>

  <div class='jqitem clearfix'></div>
  <div class='jqitem clearfix'></div>
  <div class='jqitem clearfix'></div>

  <div class='jqitem clearfix'></div>
  <div class='jqitem clearfix'></div>
  <div class='jqitem clearfix'></div>


</div>
<script src="http://github.com/charlesmarshall/jQuery-Expanding-Grid/raw/master/jquery.expandinggrid.js" type="text/javascript" charset="utf-8"></script><script type="text/javascript" charset="utf-8">
jQuery(document).ready(function(){
  jQuery('#example_container').expandinggrid({"grid_items":"jqitem", "expand_by":2.09});
});
</script>]]></description>
    <pubDate>2009-08-02T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Tiny JS Featured in Smashing Magazine!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/06/22/tiny-js-featured-in-smashing-magazine.html]]></link>
    <description><![CDATA[<p>My pet project, <a href="http://tinyjs.com">Tiny JS</a> made it in to <a href="http://www.smashingmagazine.com/2009/06/21/50-fresh-javascript-tools-that-will-improve-your-workflow/">a recent article</a> on Smashing Magazine regarding javascript tools, resources etc!</p>
<p>Great way to start a Monday!</p>]]></description>
    <pubDate>2009-06-22T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[OS X Web Development (Revisited)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/06/06/os-x-development-revisited.html]]></link>
    <description><![CDATA[<p>Many revisions have passed since we last covered this topic, so with a fresh install on hand it&#8217;s time to refactor!</p>
<h3>MySQL</h3>
<p>For the early versions of Leopard you had to compile from source, not very pretty and can prove troublesome for people not used to that kind of thing. Well not any more! MySQL themselves have released <a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg">a package</a> for 5.1 which works nicely and has a <a href="http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html">companion guide</a> to get you set up.</p>
<p>If you are on your local machine and getting fed up of having to type a password to connect, you can also blank the password by running this command:</p>
<p><code>mysqladmin -p -u username password ''</code></p>
<p>Where username is the user account you want to blank the password for.</p>
<p>You should take a look at <a href="http://www.sequelpro.com/">Sequel Pro</a> for a nice native interface to connect and manipulate databases.</p>
<h3><span class="caps">PHP</span></h3>
<p>Although there isn&#8217;t an official release for OS X, there is however, a link hidden away on the side navigation for <a href="http://www.entropy.ch/software/macosx/php/">all in one package</a> that will take you to <a href="http://www.entropy.ch/software/macosx/php/">a guide</a> with a download link. This download is another package installer so you just click and follow instructions.</p>
<p>You may want to alter your php.ini file a little to have short tags enabled but otherwise it was spot on. The only issue with this package is making the command line version the same as the shared object used by apache. For an experienced user this is no problem, symlinks are your friends.</p>
<p>Make a backup of your current php bin file and then symlink this new one to that location, so now your path should follow the symlink to the correct version of php!</p>
<h3>Apache</h3>
<p>As we haven&#8217;t built anything from source this time we no longer need to tell apache what architecture it&#8217;s using, so no need to make any amends. If you are making sites with the same structure all the time I would say put this into your vhosts file:</p>
<p>For ease you can use a vhost declaration like:</p>
<pre>
&lt;VirtualHost *:80&gt;
    VirtualDocumentRoot /path/to/websites/%1/public
    &lt;Directory "/path/to/websites/%1/public"&gt;
      Options FollowSymLinks
          AllowOverride None
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>
<p>This way you no longer need to make a vhost per site. If only you could this with /etc/hosts file!</p>
<p>If you are getting 403 errors then make sure your directory declaration is correct and looks something like:</p>
<pre>
&lt;Directory /&gt;
    Options FollowSymLinks
    AllowOverride All
&lt;/Directory&gt;
</pre>
<h3>GiT</h3>
<p>Version control is an import part of our jobs, so we use a distributed system called git, hopefully you&#8217;ve heard of it. There is <a href="http://code.google.com/p/git-osx-installer/">now a very nice and easy package file for OS X</a> so again you can skip out all the command line stuff and just click to install it.</p>
<p>It comes with an extra script file, if you run this you can then take full advantage of software like <a href="http://gitx.frim.nl/">GitX</a> and <a href="http://code.google.com/p/git-osx-installer/wiki/OpenInGitGui">OpenItInGit</a> (a Finder plugin) to do git with a gui!</p>
<p>If you use text mate as an editor you can also get hold of a <a href="http://gitorious.org/git-tmbundle">git bundle for text mate called gitorious</a>, which is installed via git.</p>
<h3>Ruby Gems</h3>
<p>If you are using gems such as capistrano you will need to do an update as the ones in Leopard are somewhat out of date! It is very straight forward but does require using the command line:</p>
<p><code>sudo gem update --system</code></p>
<p>This will get your version of gems updated and sudo gem update will update any gems installed to the latest versions.</p>
<h3>ImageMagick</h3>
<p>If you need ImageMagick for your php framework this section&#8217;s for you. They now have a ImageMagick <a href="http://www.imagemagick.org/download/binaries/ImageMagick-universal-apple-darwin9.7.0.tar.gz">binary install for OS X Leopard</a> available. Download this and extract it to /usr/local. To allow your php scripts to execute ImageMagick you&#8217;ll need to set some environment variables for the apache process. To do this edit the file /System/Library/LaunchDaemons/org.apache.httpd.plist to add something like the following (additions highlighted):</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
  &lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;org.apache.httpd&lt;/string&gt;
    &lt;key&gt;OnDemand&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/sbin/httpd&lt;/string&gt;
        &lt;string&gt;-D&lt;/string&gt;
        &lt;string&gt;FOREGROUND&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;SHAuthorizationRight&lt;/key&gt;
    &lt;string&gt;system.preferences&lt;/string&gt;
    &lt;key&gt;EnvironmentVariables&lt;/key&gt;
    &lt;dict&gt;
      &lt;key&gt;DYLD_LIBRARY_PATH&lt;/key&gt;
      &lt;string&gt;/usr/local/ImageMagick-6.5.3/lib&lt;/string&gt;
      &lt;key&gt;MAGICK_HOME&lt;/key&gt;
      &lt;string&gt;/usr/local/ImageMagick-6.5.3&lt;/string&gt;
      &lt;key&gt;PATH&lt;/key&gt;
      &lt;string&gt;
        /usr/local/ImageMagick-6.5.3/bin:/usr/bin:/bin:/usr/sbin:/sbin
      &lt;/string&gt;
    &lt;/dict&gt;
  &lt;/dict&gt;
&lt;/plist&gt;
</pre>
<h3>The Big Bonus!</h3>
<p>Using this method means that although you&#8217;ll have to start off altering your system paths a bit, in the future whenever you do a OS X update your setup will not get wiped (with the exception of the php symlink). Much nicer than having to reinstall every time.</p>
<p><span class="caps">NOTE</span>: I originally wrote this post for the <a href="http://oneblackbear.com">One Black Bear</a> website after formatting and experimenting with new setup on my laptop. It is very handy for reference so I included it on my site as well.</p>
<p><span class="caps">EDIT</span> (Sept 30 2009): Even better! with Snow Leopard you no longer have to install a custom version of <span class="caps">PHP</span>; the built in version is up to date and comes with everything.</p>]]></description>
    <pubDate>2009-06-06T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Footy Mums]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/06/06/footy-mums.html]]></link>
    <description><![CDATA[<p><a href="http://footymums.com/"><img src="/images/work/footy-mums.jpg" alt="" /></a></p>
<p>Mums in football &#8211; this is your website (although anyone who wants to make a positive contribution is welcome too). Share your thoughts, ideas, successes and anything else with other footy mums. If you&#8217;ve a disappointment or frustration you want to share go right ahead and shout about it here!</p>]]></description>
    <pubDate>2009-06-06T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[HTML 5 - State of Play]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2009/06/02/html-5-rant.html]]></link>
    <description><![CDATA[<p>We all know <span class="caps">HTML</span> 5 is on it&#8217;s way, we all know how useful it will be. However, some people seem to think that by using the <span class="caps">HTML</span> 5 doctype, they are using <span class="caps">HTML</span> 5. This winds me up no end!</p>
<h2>Markup Dictates doctype</h2>
<p>If you are planning on using on using <code>&lt;footer&gt;</code>, <code>&lt;article&gt;</code>, <code>&lt;section&gt;</code>, <code>type='date'</code> or any of the other new parts of <span class="caps">HTML</span> 5, then yes, you are using <span class="caps">HTML</span> 5.However your site won&#8217;t be working too well in most browsers.</p>
<p>In this case I have no issue with you, your problems are more serious than semantic nit-picking. You should go back to hacking away with some javascript to make it work properly&#8230;</p>
<p><strong>My complaint is with those using essentially <span class="caps">HTML</span> 4, but with a <span class="caps">HTML</span> 5 doctype</strong>. My big question&#8230;</p>
<h3>Why?</h3>
<p>By using <span class="caps">HTML</span> 5 in this manner, you are pretty much using <span class="caps">HTML</span> 4 with a loose doc type; so why not stop pretending!</p>
<p>Lets be honest, browsers aren&#8217;t going to be dropping support for <span class="caps">HTML</span> 4, so why are you doing it?</p>
<h3>The Truth</h3>
<p>Your doing it for one of these reasons:</p>
<ul>
	<li>You want to sound &#8216;cool&#8217;, &#8216;hip&#8217; and part of the &#8216;cutting edge&#8217; in your press releases</li>
	<li>You have bought in to the hype far too much, far too soon</li>
	<li>You don&#8217;t understand the differences and simply using it because that&#8217;s what you last read about</li>
</ul>
<p>Unfortunately, if you fall in to one of those you are likely to not care about the point I&#8217;m making, which is sad.</p>
<h3>Some Exclusions do Apply</h3>
<p>Some of the new <span class="caps">HTML</span> 5 doctype is useable now; the new input types. As browsers default to <code>type='text'</code> when they don&#8217;t recognise what you mean allows new tags to work on browsers that can handle them.</p>
<p>This is simple enough for something like the for date pickers. If the browser doesn&#8217;t support <code>type='date'</code>, you can use a jQuery UI plugin instead of the browser built in one.</p>
<p>Not all of these types are so simple to degrade.. like the search input, or the url field.</p>
<p><strong>As neither IE 8 or IE 9 are going to support <span class="caps">HTML</span> 5, heres hoping for a fast release for IE 10!</strong></p>]]></description>
    <pubDate>2009-06-02T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Dealer Locator]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/05/11/subaru-dealer-locator.html]]></link>
    <description><![CDATA[<p><a href="http://maps.oneblackbear.com/subaru"><img src="/images/work/dealer-locator-1.jpg" alt="" /></a></p>
<p>Having recently completed an upgrade of the Subaru and Isuzu national website Dealer locator I thought I&#8217;d tell you a bit about it.</p>
<p>The locators, originally run off Multimap, now use the Google maps system. The project required a fast turnaround and was completed for both brands within two weeks of receiving the brief.</p>
<p>By using Google maps IM Group (Subaru UK and Isuzu UK&#8217;s parent company) has saved over &pound;20,000 and improved their service to site visitors.</p>
<p>The new system is faster, allowing for live information, filtering of sales, servicing &amp; parts dealers and the re-designed interface makes finding a dealer even simpler.</p>
<h3>Looking at the tech&#8230;.</h3>
<p>As mentioned above this new dealer locator is faster and smoother than before. Speed kills; if a page is slow to load then people are going to give up and assume it&#8217;s not working.</p>
<p>With a map system of this nature, large amounts of data are flying around the place doing everything possible to make the site slow. To keep the speed in check we use many things from boring old compression to new fangeled ajax loads, but there has to be a balance.</p>
<p>We load the primary map components and wait until the page has loaded before going and fetching all the dealer data. As a nice little visual cue an obligatory loading box appears.</p>
<p>Now all the data is in, we&#8217;re good to go! The searching is kept nice and accurate using the google search <span class="caps">API</span> on top of their map <span class="caps">API</span> to ensure a greater level accuracy. Couple this with some clever bounding calculations and an appropriate coordinate and zoom level is found to show the user some dealers and a marker of the search point.</p>
<p>To help you choose the right dealer, the list is reordered according to proximity, so your nearest dealer is on top. You can get some directions, view their used car range or read more about them right on this page.</p>
<p>The directions are pretty close to exact, with it taking you to the stored co-ordinates of the dealer you selected and with google&#8217;s system there is now a print option, so no way to get lost on the way (hopefully)!</p>
<p>If you don&#8217;t fancy a drive, the used car stock is just a click away; the same loading box appears to let you know we are checking their website, if we can get it, we then show you their details right there. This should mean that comparing what your local dealers have in stock just got a whole bunch easier.</p>
<p>When you find a dealer you like the look of you can have a quick read about them by clicking the more details.</p>
<p>This new version of the dealer locator should help users of both websites; with more features to come.</p>
<p><span class="caps">EDIT</span> (Aug 02 2009): Due to an increasing number of dealers the map is starting to chug a little bit in older javascript engines (yes, I&#8217;m looking at you IE). I will re-write the javascript to make it smarter and have a lower memory footprint, speeding up its performance.</p>]]></description>
    <pubDate>2009-05-11T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[jQuery Smart Modal]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2009/04/29/jquery-modal.html]]></link>
    <description><![CDATA[<p>With recent projects I needed a flexible modal box. Most of the ones out there are either horribly bloated or only work for images, which really sucks when you want a form inside one.</p>
<p>Easy answer, make my own&#8230; Here it is. By the way, the minimised version in under 2k with a tiny 1k stylesheet.</p>
<p>It works for images and other containing elements. Here are the examples:</p>
<h2>Show on body load&#8230;</h2>
<p>This is the really, really annoying type of modal box that loads as the page does. It also runs of <a href='#' rel='on_body_load' class='on_load_modal'>this link</a>.</p>
<div class='example'>
  <p>ON <span class="caps">BODY</span> <span class="caps">LOAD</span></p>
<div class="on_body_load hidden">
		<p>This is the really, really annoying type of modal box that loads as the page does.</p>
		<p>Yeah, I know, I hate these as well&#8230;</p>
</div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('a.on_load_modal').smart_modal();
    jQuery('a.on_load_modal').smart_modal_show();
  });
  &lt;/script&gt;
</pre>
<h2>Simple Image Modals</h2>
<p>Click on an image to get a pop up bigger version of it.</p>
<p>This is about as simple as it gets; give the anchor tag a href for the bigger version of the image and it just works.</p>
<p>With the a tag having a title attribute this is then used by the modal pop up as the title of the big image.</p>
<div class="example">
<ul class="horizontal clearfix">
		<li><a href="http://github.com/tinyjs/jquery-smart-modal/raw/master/Fort-Dunlop-1.jpg" title="Fort Dunlop 1" class="modal1"><img src="http://github.com/tinyjs/jquery-smart-modal/raw/master/Fort-Dunlop-small-1.jpg" alt='fort dunlop 1'/></a></li>
		<li><a href="http://github.com/tinyjs/jquery-smart-modal/raw/master/Fort-Dunlop-2.jpg" title="Fort Dunlop 2" class="modal1"><img src="http://github.com/tinyjs/jquery-smart-modal/raw/master/Fort-Dunlop-small-2.jpg" alt='fort dunlop 2'/></a></li>
</ul>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('a.modal1').smart_modal();
  });
  &lt;/script&gt;
</pre>
<h2>Div Modal</h2>
<p>Instead of clicking on an anchor tag, click on the div below and you get a modal box containing the same html.</p>
<div class="example">
	<div class="modal2"><p><strong>Click Me</strong></p></div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('.modal2').smart_modal();
  });
  &lt;/script&gt;
</pre>
<h2>Using the rel Attribute</h2>
<div class="example">
	<p><a href="#" rel="rel_modal_content" class="modal3">Click me</a> and instead of an image you will get the content of a hidden div with a class or id that matches the rel.</p>
<div id="rel_modal_content" class="hidden">
		<p>You can put anything in me from full on forms to just a simple bit of text.</p>
		<p><a href="#">Here is a link</a></p>
<ul>
			<li>An unordered list</li>
</ul>
</div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('.modal3').smart_modal();
  });
  &lt;/script&gt;
</pre>
<h2>Show and Hide Functions</h2>
<div class="example">
	<p><a href="#" rel="modal_class" class="modal4">Click me</a> and you will get a modal box followed some javascript alerts on show, then on close.</p>
<div class="modal_class hidden">
		<p>Yes, it is another modal popup box thingy!</p>
</div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('.modal4').smart_modal({
      show:function(){alert('This happens on show!');}, 
      hide:function(){alert('On Hide!');} 
    });
  });
  &lt;/script&gt;
</pre>
<h2>Custom Close Links</h2>
<p>The extra close link inside the modal will also close the box. This done by simply giving it a class of &#8216;sm_close&#8217; as the plugin looks for clicks on .smart_modal_close inside the overlay to close it.</p>
<div class='example'>
	<p><a href='#' class='modal5' rel='modal_hidden_1'>Click me</a> and you will get a bunch of text.</p>
<div class="modal_hidden_1 hidden">
		<p>Modal boxes for every body!</p>
		<p>Everyone should have a modal box to call their own</p>
		<p><a href='#' class='sm_close'>This Will close the box as well</a>.</p>				
</div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('.modal5').smart_modal();
  });
  &lt;/script&gt;
</pre>
<h2>More Close Links</h2>
<p>Within this text you will see another close link; this time it uses the show function to add a trigger to close the modal link.</p>
<div class='example'>
	<p><a href='#' class='modal6' rel='modal_hidden_2'>Click me</a> and you will get a bunch of text.</p>	
<div class="modal_hidden_2 hidden">
		<p>Even more example modal text&#8230; are you getting bored yet?</p>
		<p>Don&#8217;t worry, we&#8217;re getting towards the end&#8230; Honest!</p>
		<p><a href='#' class='custom_modal_close'>This will close the box as well</a>.</p>				
</div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('.modal6').smart_modal({show:function(){
  			jQuery('a.custom_modal_close').click(function(){
  				alert('You clicked a custom close link!');
  				jQuery('.modal6').smart_modal_hide();
  				return false;
  			});
  	}});
  });
  &lt;/script&gt;
</pre>
<h2>Disabling the Overlay Click to close</h2>
<p>As with all modal boxes you get a blackened background known as an &#8216;overlay&#8217;, normally clicking on that will also close the modal. But not in this example! Now you can only click on the x (or any other element with class of &#8216;modal_close&#8217;) to close it.</p>
<div class='example'>
	<p><a href='http://github.com/tinyjs/jquery-smart-modal/raw/master/Fort-Dunlop-small-2.jpg' class='modal7'>Click me</a> and you will get a tiny thumbnail of Fort Dunlop.</p>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {  
    jQuery('.modal7').smart_modal({hide_on_overlay_click:false});	
  });
  &lt;/script&gt;
</pre>
<h2>Updated</h2>
<p>If you take a look at the code you will notice that smart modal has totally changed; hopefully for the better.</p>
<p>For those of an adventurous nature there are now two new functions you can call manually &#8211; .smart_modal_hide() &amp; .smart_modal_show().</p>
<p>Once you have instantiated the link using .smart_modal() you can call either of those to show or hide it.</p>
<h2>Files</h2>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='http://github.com/tinyjs/jquery-smart-modal/zipball/master' title='zip' class='category curvy'>zip &raquo;</a></li>
</ul>
</div>
<link rel="stylesheet" href="/jquery-smart-modal/styles.css" type="text/css" media="all" charset="utf-8" />
<script type="text/javascript" src="http://github.com/tinyjs/jquery-smart-modal/raw/master/jquery.smartmodal.js"></script><script type="text/javascript">
jQuery(document).ready(function() {
	jQuery('a.on_load_modal').smart_modal();
	jQuery('a.on_load_modal').smart_modal_show();
	jQuery('a.modal1').smart_modal();
	jQuery('.modal2').smart_modal(); 
	jQuery('.modal3').smart_modal(); 
	jQuery('.modal4').smart_modal({show:function(){alert('This happens on show!');}, hide:function(){alert('On Hide!');} });
	jQuery('.modal5').smart_modal();
	jQuery('.modal6').smart_modal({show:function(){
			jQuery('a.custom_modal_close').click(function(){
				alert('You clicked a custom close link!');
				jQuery('.modal6').smart_modal_hide();
				return false;
			});
	}});	
	jQuery('.modal7').smart_modal({hide_on_overlay_click:false});	
	
});
</script>]]></description>
    <pubDate>2009-04-29T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[IE 6 Repeating Characters Bug]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/04/29/ie-6-repeating-characters-bug.html]]></link>
    <description><![CDATA[<p>Ok, so I&#8217;ve just discovered another wonderful way to trigger this bug. Apparently putting html comments inbetween floated containers makes the last character repeat! The joys of IE&#8230;.</p>]]></description>
    <pubDate>2009-04-29T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[IE 6 Bug - Repeating Characters (Revisited)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/04/28/ie-6-bug-repeating-characters-revisited.html]]></link>
    <description><![CDATA[<p>Ok, so I&#8217;ve just discovered another wonderful way to trigger this bug. Apparently putting html comments inbetween floated containers makes the last character repeat! The joys of IE&#8230;.</p>]]></description>
    <pubDate>2009-04-28T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Tiny JS]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/04/23/tiny-js.html]]></link>
    <description><![CDATA[<p><a href="http://tinyjs.com"><img src="/images/work/tinyjs.png" alt="" /></a></p>
<p>Some months back I created a very handy little site called <a href="http://tinyjs.com">tiny js</a> ; it&#8217;s all about small but powerful javascript plugins for libraries such as jQuery. I only just noticed that I didn&#8217;t blog about it on here, very bad of me!</p>
<p>Last weekend I did a nice update so all projects utilise version control and are based over at github.</p>]]></description>
    <pubDate>2009-04-23T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[jQuery Diagonal Accordion]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2009/04/19/jquery-diagonal-accordion.html]]></link>
    <description><![CDATA[<p>A while ago we got a very random design from a client; they wanted an accordion, but at 45 degrees.. Yes, that&#8217;s right..</p>
<p>It makes the visible content area tiny, and clearly restricts the size of the page so in my opinion it&#8217;s mostly pointless. However, still better than using flash!</p>
<div class='inlineform clearfix' id="diagonal_madness">
<div class="accordion">
		<p>Some really random intro copy goes in here&#8230;. </p>
		<p>Here is some more&#8230; </p>
</div>
<div class="accordion">
		<p>Filling this is not as easy as it looks&#8230; </p>
		<p><a href='#'>Here is a link to nothing..</a> It&#8217;s just here to prove that it works inside the accordion</p>
</div>
<div class="accordion">
		<p>Yeah! More random copy!</p>
		<p>I&#8217;m running out of things to put in these things&#8230; <a href="#">more!</a></p>
</div>
<div class="accordion">
		<p>What do you thing should go in here?</p>
		<p>Who knows, <a href="#">just don&#8217;t click here</a>..</p>
</div>
<div class="accordion">
		<p>I give up, this is going to be the last accordion&#8230;</p>
		<p>Honest, the very last one..</p>		
		<p>No more; <span class="caps">FIN</span></p>
</div>
</div>
<p>It does take some options, but I can&#8217;t remember what they all do, it&#8217;s been too long since I wrote it! <a href="http://github.com/tinyjs/diagonal-accordion">Have a look at the project on git hub</a>- or <a href="http://github.com/tinyjs/diagonal-accordion-/zipball/master">download the source, in a zip file</a> instead.</p>
<p>Triggering the script is easy enough:</p>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function(){
  	jQuery('#diagonal_madness').diagonalaccordion();
  });
  &lt;/script&gt;  
</pre>
<link rel="stylesheet" href="/diagonal-accordion/styles.css" type="text/css" media="all" charset="utf-8" />
<script src="http://github.com/tinyjs/diagonal-accordion-/raw/master/jquery.diagonal-accordion.js" type="text/javascript" charset="utf-8"></script><script type="text/javascript">
jQuery(document).ready(function(){
	jQuery('#diagonal_madness').diagonalaccordion();
});
</script>]]></description>
    <pubDate>2009-04-19T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[jQuery Content Scroller]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2009/04/19/jquery-content-scroller.html]]></link>
    <description><![CDATA[<p>A jQuery plugin to convert divs that normally flow underneath each other to flow next to each other with paginated controls.</p>
<p>The plugin will automatically create a set of controls that associates with the scrolling elements, letting you move between each one.</p>
<h2>Standard, Auto Generated Controls</h2>
<p>This first one uses the 5 divs as &#8216;pages&#8217; and converts them into scroller elements which react to the on click of the ul.</p>
<div id="example1">
<div id="container1" class="clearfix example">
<div class="cexample">
    	<h3>Content Page 1</h3>
</div>
<div class="cexample">
    	<h3>Content Page 2</h3>
</div>
<div class="cexample">
    	<h3>Content Page 3</h3>
</div>
<div class="cexample">
    	<h3>Content Page 4</h3>
</div>
<div class="cexample">
    	<h3>Content Page 5</h3>
</div>
</div>
</div>
<p>This one is as simple to setup as it gets:</p>
<pre>
&lt;script type="text/javascript"&gt;
jQuery(document).ready(function() {
	jQuery('#container1').contentscroller({pages:'.cexample'});
});
&lt;/script&gt;
</pre>
<p>As the plugins default setup looks for <span class="caps">DOM</span> elements with the class of &#8216;page&#8217;, in this case the example is using an alternative class. We just pass in the alternative selector and it all works.</p>
<h2>Auto Generated Controls With Hooks</h2>
<p>If you want to alter things, or trigger events when a new &#8216;page&#8217; loads or something similar there are two hooks you can use; before and after.</p>
<p>In this example I&#8217;m keeping it simple by just running an alert for both; but you can pass something to run for both.</p>
<div id="example2">
<div id="container2" class="clearfix example">
<div class="cexample">
    	<h3>Content Page 1</h3>
</div>
<div class="cexample">
    	<h3>Content Page 2</h3>
</div>
</div>
</div>
<p>Setup for that is:</p>
<pre>
&lt;script type="text/javascript"&gt;
jQuery(document).ready(function() {
	jQuery('#container2').contentscroller({pages:'.cexample',
	                                      controller:'#controls2',
	                                      before:"alert('before')",
	                                      after:"alert('after')"});
});
&lt;/script&gt;
</pre>
<p>Both the before and after values are eval&#8217;d with the javascript, this is very naughty and I really need to change that to take a normal function.</p>
<p><span class="caps">NOTE</span>: As the controls are auto generated and use a unique id, the second time we add a scroller to the page we have to force a new id. This is done by just setting the &#8216;controller&#8217; option when creating it. (I really need to fix that&#8230;)</p>
<h2>Styling</h2>
<p>The examples here use a stylesheet, which looks like:</p>
<pre>
#container1, #container2{width:100%;}
.cexample{width:100%;float:left;}
ul#controls li, ul#controls2 li{float:left;margin:0 5px 0 0;list-style-type:none;}
#example1,#example2{overflow:hidden;}
</pre>
<h3>The Files</h3>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='/jquery-content-scroller/styles.css' title='Stylesheet' class='category curvy'>Stylesheet &raquo;</a></li>
    <li class='category'><a href='http://github.com/tinyjs/content-scroller/raw/master/jquery.contentscroller.js' title='Javascript' class='category curvy'>Javascript file &raquo;</a></li>
</ul>
</div>
<link rel="stylesheet" href="/jquery-content-scroller/styles.css" type="text/css" media="all" charset="utf-8" />
<script type="text/javascript" charset="utf-8" src="http://github.com/tinyjs/content-scroller/raw/master/jquery.contentscroller.js"></script><script type="text/javascript">
jQuery(document).ready(function() {
	jQuery('#container1').contentscroller({pages:'.cexample'});
	jQuery('#container2').contentscroller({pages:'.cexample', controller:'#controls2', before:"alert('before')", after:"alert('after')"});
});
</script>]]></description>
    <pubDate>2009-04-19T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Laminate Your Website! Any Website!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/04/01/april-fools.html]]></link>
    <description><![CDATA[<p>As it is April Fools day we&#8217;ve been working on something special&#8230; <a href="http://laminatr.com">And here it is</a></p>
<p>Yes, you to can own a laminated copy of any website you want! Simply fill in the address box and click &#8216;laminate&#8217;. If you want us to print it out and send you over a copy then we can do that for you, at a small cost.</p>
<p>If you&#8217;re just being nosey then you can see what other sites have been laminated by going to the <a href="http://laminatr.com/sites">portfolio section</a></p>
<p>If the site is being slow, we&#8217;re very sorry, it turns out the site has been feature on <a href="http://www.techcrunch.com/2009/04/01/april-fools-youtube-flails-amazon-cloud-computing-in-a-blimp-3d-chrome-browsing-google-master-ai/">tech crunch</a>, <a href="http://gadgetwise.blogs.nytimes.com/2009/04/01/new-products-for-april-1st-kinda/">the new york times</a> and several others.</p>
<p>Just too add fuel to the fire for today only both my personal site, <a href="http://tinyjs.com">Tiny JS</a> and <a href="http://oneblackbear.com">One Black Bear</a> are sending all the traffic to <a href="http://laminatr.com">Laminatr</a></p>
<p>Now, what shall I do next year?</p>]]></description>
    <pubDate>2009-04-01T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Interchangeable Belt]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/03/25/loop-belts.html]]></link>
    <description><![CDATA[<p>Fancy a fashionable belt that you can change on how you feel, what your wearing or the mood your in? Well now you can have one&#8230;</p>
<p>I built a simple single page website with lots of imagery and even a how to video filmed by the creator herself.</p>
<p>The site itself uses a little bit of jQuery to do some nice transition effects.</p>]]></description>
    <pubDate>2009-03-25T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Preferred Stylesheets...]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2009/02/18/preferred-stylesheets.html]]></link>
    <description><![CDATA[<p>Recently I came across a very strange issue while converting an existing website. As I&#8217;m just porting it over to our framework no design or styling work was required, so I&#8217;d just been copying the header and footer files into our layout system when I noticed something.</p>
<p>This site was using <span class="caps">HTML</span> 4.01 and all the stylesheet links had a title attribute, this trigged an obscure issue I had never encounted before. According in the <span class="caps">HTML</span> 4 spec setting a title attribute converts the stylesheet to a preferred stylesheets and only one of these can be loaded in at any time. This meant a whole bunch of styling would disappear even though its clearly visible in firebug etc. For more information take a look at <a href="https://developer.mozilla.org/En/Correctly_Using_Titles_With_External_Stylesheets">this article</a>.</p>]]></description>
    <pubDate>2009-02-18T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Far Too Normal]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2009/02/13/far-too-normal.html]]></link>
    <description><![CDATA[<p>Recently I seem to keep stumbling across articles about the wonders of data normalisation; and they all suck. Yes thats right, I think the authors of most of these articles are idiots</p>
<p>They keep preaching about avoiding data repetition and storing things once. These 5th normal form lovers have clearly only read text books and never worked on any kind of application that has to be fast. Yes, 5th normal form means you only store the data once, but to get to it you have to go through numerous joins, from 3 upwards. Being a practical kind of person lets use the typical example of a customer and order in both 3rd and 5th normal form to show my point.</p>
<h4>Fetching Customer Name and Order Date From Order Reference:</h4>
<p><strong>5th Normal</strong> Find order reference &gt; go to join table and find order id &gt; go to order table &gt; store date &gt; go to order customer join table &gt; go to customer table &gt; store customer name.</p>
<p><strong>3rd Normal</strong> Find order reference &gt; store date &gt; go to order customer join &gt; go to customer table &gt; store customer name</p>
<p>Even in a simple example of something that any ecommerce site would do hundreds of times a day, using 5th normal form introduces several extra steps (and in that example I&#8217;m being kind, 5th normalisation could easy add a join between customers and names).</p>
<p>In the current world of computers data in the same table can be handled with great speed and efficiency providing you do the standard optimisations like adding indexes and keys on the columns; however table joins are still slow in comparison</p>
<p>In this example you would end up with an extreme amount of left joins (assuming mysql here &#8211; sorry M$ lovers but <span class="caps">MSSQL</span> is not worth the money or hassle), causing a whole bunch of extra table scanning and locking so not only slowing down this query but every other one on the same server</p>
<p>Nice idea, but in practice 5th normalised form is a wasted effort. Instead of spending hours doing that any decent programmer should be busy playing <a href="http://www.sauerbraten.org/">Sauerbraten</a> ;)</p>]]></description>
    <pubDate>2009-02-13T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Nutters]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2009/01/23/nutters.html]]></link>
    <description><![CDATA[<p>I only wish I&#8217;d managed to get a photo. While walking home from the new office last night I saw a group of people congregating around a van at the back end of Albert Street car park. Considering all the recent protests about Gaza et al it wasn&#8217;t anything special. However, when I got closer I started to hear someone preaching at the crowd; another bunch of overly zealous deity lovers that I&#8217;d have to politely turn down their literature, just what I needed on a cold, wet night</p>
<p>I was wrong, no sign of omnipotent beings at all, just a big banner which said something like &#8220;A touch from The King will cure all addictions!&#8221;&#8230; Yes, thats right, Elvis worshipers! Even worse than bible bashers!</p>
<p>I quietly sniggered to myself, kept my distance and thought to myself &#8217;Don&#8217;t Be Cruel&#8217; as &#8217;You&#8217;ll Never Walk Alone&#8217; &#8216;In the Ghetto&#8217; and I didn&#8217;t want to get attacked by that &#8216;Hard Headed Woman&#8217; with the megaphone nevermind the &#8216;Big Boss Man&#8217; as I value my &#8216;Life&#8217;.</p>]]></description>
    <pubDate>2009-01-23T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[WAA - Where Web Agencies go to Die..]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2009/01/22/waa-where-web-agencies-go-to-die.html]]></link>
    <description><![CDATA[<p>The <span class="caps">WAA</span> vultures have been circling again. In a <a href="http://thedrum.co.uk/news/2009/01/21/9404-waa-takes-on-staff-and-clients-as-twist-closes">recent press release</a> they announced new staff members; former employees of the recently insolvent Twist Communications.</p>
<p>Having never heard of them and just going by the cached version of their website it looks like a small time flash company from the middle of nowhere (at least according to the phone area code).</p>
<p>This spell of buying companies for specific clients seems to suggest <span class="caps">WAA</span> are trying bulk out their client list again after several clients leaving them. After a bout of redundancies and now speculative purchases, maybe the future isn&#8217;t so bright in Sutton Coldfield.</p>]]></description>
    <pubDate>2009-01-22T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Fleetmilne - Residential Property Experts]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/01/20/fleetmilne.html]]></link>
    <description><![CDATA[<p>At the end of last year we took over the <a href="http://fleetmilne.co.uk/">Fleet Milne</a> website.</p>
<p>Although there was no visual change the underpinnings were completely re-written onto the phpwax framework &amp; wildfire cms. While we were at it we also re ddi all the html, tidying it up and making it standards compliant.</p>
<p>As part of installing the <span class="caps">CMS</span> we developed an import module that utilises the exported data from their internal system. Unfortunately, their internal system only does an <span class="caps">FTP</span> export, so the import relies on a successful dump onto our server. From this point we read the csv file and match all records against the photos and move everything over in to our file system. After checking for errors the process finishes and then the new properties are ready to be sent out in emails.</p>
<p>When we took over the site we added an improved newsletter signup, using Campaign Monitor, we segment the data by what they are looking for and send out relevant properties.</p>
<p><span class="caps">EDIT</span> (2009 Jul 20): The site has now had a complete redesign&#8230; have a look and see what you think&#8230;</p>]]></description>
    <pubDate>2009-01-20T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Abstract Healthcare]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2009/01/20/abstract-healthcare.html]]></link>
    <description><![CDATA[<p><a href="http://abstracthealthcare.co.uk">Abstract</a> are a integrated healthcare service; which basically means they own and run some <span class="caps">NHS</span> facilities. The new site (work done on behalf of <span class="caps">TBL</span> Marketing) has large header images to show off the quality of their work and an interesting navigation. At first glance it looks the same, but it really isn&#8217;t.</p>
<p>Instead of the primary section links loading in a new page the webpage simply slides to the left or right. This effect is done with a container hiding all the pages and some clever javascript to show the correct chunk. The plugin I created for this page was inspired by the original jQuery.ScrollTo, but instead of having to pass in pixal values etc my plugin takes the strain of the math and you just need to tell it what chunk number to go to.</p>
<p>In a bid to keep it small and simple the options are very limited (as it only does one thing &#8211; like all good plugins) so in total the minimised version comes in at under 3k!</p>
<p>Abstract have some extra bits for sub page loading via ajax and nice visual effects on the image galleries.</p>]]></description>
    <pubDate>2009-01-20T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[WAA Buys Crap Web Company...]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2009/01/16/waa-buys-crap-web-company.html]]></link>
    <description><![CDATA[<p>Now I left <span class="caps">WAA</span> a while ago, but I still like to see their web people doing good work and do tend to moan at them when they don&#8217;t! Regardless of what minor layout issue, semantic faux pas or just something I think is wrong (I moan a lot).</p>
<p>I mildly berated them in a previous post regarding the appalling flash site they launched that replaced a nicely marked up (if somewhat overly pink) site. Since the relaunch of www.waa.co.uk their google site index has dropped from over 5000 pages to just over 600! All of the old content they had (mostly articles by Chris Tomlinson) has been removed, nothing new has been added. At least the people they had in web were smart enough to be using open source tech and support the open source community. Looks like that&#8217;s about to end.</p>
<p><span class="caps">WAA</span> have recently bought a new web company, <a href="http://marketingnet.com/">MarketingNet</a>. A java and .net based company. Guess all the remaining good points about WAAs web department are about to be replaced by a huge chunk of paper work, administration and bureaucracy. No longer can they claim to be agile or cutting edge when your using tech like that.</p>
<p>However, this is not the worst part about the new company. That honour goes to their own website; which doesn&#8217;t work properly and generally looks like something a first year uni student would knock up in dreamweaver. Large parts of the navigation are relative links which have then been copied and pasted in to the other pages, meaning that the home link that goes to index.html doesn&#8217;t take to the home page most of the time; when you&#8217;re in a sub section such as &#8216;about us&#8217; if your not careful you can end up going to /aboutus/aboutus/aboutus/index.html. Of course that page doesn&#8217;t exist.</p>
<p>I just hope they got a bargain basement deal on these guys as the quality of work is just plain shocking; reminds me of the early 90s before anyone web person had heard of quality control.</p>]]></description>
    <pubDate>2009-01-16T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Advertising Accuracy.. or Lack of..]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2009/01/03/advertising-accuracy-or-lack-of.html]]></link>
    <description><![CDATA[<p>Now I don&#8217;t mind a bit of artistic license when it comes to advertising, but I have my limits. Recently more TV adverts have glaringly inaccurate parts to them and are still broadcast as if they are truths. The big offenders to get my goat so far this year are the PC World sale advert and the Change4Life campaign about healthy eating.</p>
<p>Don&#8217;t get me wrong, I think raising awareness about eating properly, exercise etc is needed. Apparently 10% of parents thought jaffa cakes counted towards your daily recommended amount of fruit, how scary is that! Lack of knowledge, apathy, social groups and non stop junk food advertising probably contributed to this sorry state of affairs, but thats for another time. What annoys me in this advert is the fact they show humans killing a dinosaur! Two species separated by over 60 million years!</p>
<p>Somehow this managed to go unnoticed and has been airing regularly since the beginning of the year. Apparently <span class="caps">ASA</span> have no issue reenforcing a popular misconception</p>
<p>If that isn&#8217;t bad enough the current PC World sale advertising fails at basic math; printer for half price, really? I could of sworn half of 129.98 was 64.99, however the advert tells me it&#8217;s 59.99. The wording says half price, not less than half price. Again, shouldn&#8217;t <span class="caps">ASA</span> be pointing these things out and getting them corrected?</p>
<p>You might say that it&#8217;s only an advert, but how many people are watching that advert? What if your child / nephew / niece etc gave that answer on a math test? Would you say then it doesn&#8217;t matter then?</p>
<p>In the current social climate most children spend almost as much time in front of the tv as they spend at school, so surely the prime time viewing should at least be accurate?</p>]]></description>
    <pubDate>2009-01-03T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[jQuery Zoom]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2008/11/11/jquery-zoom.html]]></link>
    <description><![CDATA[<p>Working on a recent project I needed to be able to make a &#8216;zoom&#8217; style effect. The easiest way I could think of to do this was a simple + and &#8211; zoom bar (just like google maps) over a background image.</p>
<p>This piece of jQuery inserts a nicely styled compliant ul with li&#8217;s into the container specified (if it&#8217;s not there already) and sets some trigger events for the a tags.</p>
<p>Now when you click on the plus or minus the background image is switched out for a larger version (passed in to the declaration).</p>
<p>The more images you pass in the more bars appear in the zoom control.</p>
<p>To make it work you need to set up some css and pass in the &#8216;target_div&#8217; parameter in to the js with an array on image paths; and thats it, everything else is worked out for you.</p>
<h2>Simple Image Zoom</h2>
<p>Here is a container with 4 images, nice and simple. In this case I have already entered the ul code, so the js won&#8217;t insert it.</p>
<div class="example clearfix">
	<div id="zoom" class="zoom"><ul class="zoom_control"><li class="zoom_plus"><a class="plus" href="#"><span> </span></a></li>
			<li class="zoom_4"><a rel="zoom_4" class="zoom_level" href="#"><span> </span></a></li>
			<li class="zoom_3"><a rel="zoom_3" class="zoom_level" href="#"><span> </span></a></li>
			<li class="zoom_2"><a rel="zoom_2" class="zoom_level" href="#"><span> </span></a></li>
			<li class="zoom_1 current_zoom"><a rel="zoom_1" class="zoom_level" href="#"><span> </span></a></li>
			<li class="zoom_minus"><a class="minus" href="#"><span> </span></a></li>
</ul>
<p></div><div id="main_internal" class="main_internal"></p>
</div>
	<div class="clearfix">&nbsp;</div>
</div>
<h2>Files</h2>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='http://github.com/tinyjs/jquery-image-zoom/zipball/master' title='zip' class='category curvy'>zip &raquo;</a></li>
</ul>
</div>
<p>You can also find this project over at the main <a href="http://plugins.jquery.com">jQuery plugins</a> website.</p>
<link rel="stylesheet" href="/jquery-zoom/styles.css" type="text/css" media="all" charset="utf-8"/>
<script type="text/javascript" src="http://github.com/tinyjs/jquery-image-zoom/raw/master/jquery.zoom.js"></script><script type="text/javascript">
jQuery(document).ready(function() {
	jQuery('#zoom').zoom({target_div:"main_internal", zoom_images:new Array('http://github.com/tinyjs/jquery-image-zoom/raw/master/image_1.jpg', 'http://github.com/tinyjs/jquery-image-zoom/raw/master/image_2.jpg', 'http://github.com/tinyjs/jquery-image-zoom/raw/master/image_3.jpg', 'http://github.com/tinyjs/jquery-image-zoom/raw/master/image_4.jpg') });
});
</script>]]></description>
    <pubDate>2008-11-11T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[jQuery Resizer]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2008/11/11/jquery-resizer.html]]></link>
    <description><![CDATA[<p>Inside our current cms we utilise a jQuery resize tool for stretching out our content entry area. However, it is a bit clunky and and the large size (9k) doesn&#8217;t help matters.</p>
<p>Time to make a new one&#8230;.</p>
<h2>Simple Resizable Div</h2>
<p>If you click and drag inside the red box below it will grow until you let go.</p>
<div class="example clearfix">
	<div id="resizer"></div>	
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {
  	jQuery('#resizer').resize();
  });  
  &lt;/script&gt;
</pre>
<h2>Resizable Div With Max Limits</h2>
<p>If you click and drag inside the red box below it will grow until it reaches a max width and height.</p>
<div class="example clearfix">
	<div id="resizer_maxed"></div>	
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {
  	jQuery('#resizer_maxed').resize({x:450, y:300});
  });  
  &lt;/script&gt;
</pre>
<h2>Resizable Div With Max and Min Limits</h2>
<p>If you click and drag inside the red box below it will grow until it reaches a max width and height.</p>
<p>It will not resize below a certain amount.</p>
<div class="example clearfix">
	<div id="resizer_min_max"></div>			
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {
  	jQuery('#resizer_min_max').resize({x:450,min_width:190, y:300, min_height:90});
  });  
  &lt;/script&gt;
</pre>
<h2>Resizable Div &#8211; Turning Off A Direction</h2>
<p>By passing in false you can turn of expansion in either direction</p>
<div class="example clearfix">
<div id="resize_no_x">
		<p>Fixed width</p>
</div>
<div id="resize_no_y">
		<p>Fixed height</p>
</div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {
  	jQuery('#resize_no_x').resize({x:false});	
  	jQuery('#resize_no_y').resize({y:false});
  });  
  &lt;/script&gt;
</pre>
<h2>Resizable Div &#8211; Targets</h2>
<p>If you use a target then the resize is based on where you drag the trigger element.</p>
<div class="example clearfix">
	<div id="resizer_area"></div>
	<div id="resize_bar">&lt; ^ v &gt;</div>
</div>
<pre>
  &lt;script type="text/javascript"&gt;
  jQuery(document).ready(function() {
    jQuery('#resize_bar').resize({target:'#resizer_area'});
  });  
  &lt;/script&gt;
</pre><p></p>
<h2>Other Resizable Elements</h2>
<p>Can be used on things other then divs&#8230;</p>
<h2>Files</h2>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='http://github.com/tinyjs/jquery-resizer/zipball/master' title='zip' class='category curvy'>zip &raquo;</a></li>
</ul>
</div>
<link rel="stylesheet" href="/jquery-resizer/styles.css" type="text/css" media="all" charset="utf-8" />
<script type="text/javascript" src="http://github.com/tinyjs/jquery-resizer/raw/master/jquery.resizer.js"></script><script type="text/javascript">
jQuery(document).ready(function() {
	jQuery('#resizer').resize();
	jQuery('#resizer_maxed').resize({x:450, y:300});
	jQuery('#resizer_min_max').resize({x:450,min_width:190, y:300, min_height:90});	
	jQuery('#resize_no_x').resize({x:false});	
	jQuery('#resize_no_y').resize({y:false});		
	jQuery('#resize_bar').resize({target:'#resizer_area'});
});
</script>]]></description>
    <pubDate>2008-11-11T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[jQuery Draggable]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/jquery/2008/11/11/jquery-draggable.html]]></link>
    <description><![CDATA[<p>One of more interactive projects of late required an image to be moved around as if the user was dragging it. There was also a good chance that it would need to be combined with some other effects such as a zoom feature an image switcher.</p>
<p>Currently, most draggable image plugins use an inline image with absolute positioning and a surrounding clipping area, which in most cases is fine, but in this case it would be a real issue as the zoom plugin uses an absolute positioned container. To get around this I decided to convert the image inside the container to the background image.</p>
<p>For all those people who don&#8217;t have javascript turned on you just see a clipped image, but those with javascript can move the background image around as if they are dragging it.</p>
<h2>Simple Image Dragging</h2>
<div class="example clearfix">
	<p>Click on the div below, drag and release.</p>
<div id="draggable">
<p><img src="http://github.com/tinyjs/jquery-image-dragging/raw/master/big_image.jpg" /></p>
</div>
<p><div class="clearfix">&nbsp;</div></p>
</div>
<h2>Files</h2>
<p>All the files that are used&#8230;</p>
<div class='file_list clearfix'>
<ul class="clearfix inline">
    <li class='category'><a href='http://github.com/tinyjs/jquery-image-dragging/zipball/master' title='zip' class='category curvy'>zip &raquo;</a></li>
</ul>
</div>
<link rel="stylesheet" href="http://github.com/tinyjs/jquery-image-dragging/raw/master/draggable.css" type="text/css" media="all" charset="utf-8"/>
<script type="text/javascript" src="http://github.com/tinyjs/jquery-image-dragging/raw/master/jquery.draggable.js"></script><script type="text/javascript">
jQuery(document).ready(function() {
	jQuery('#draggable').drag();
});
</script>]]></description>
    <pubDate>2008-11-11T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Is Bigger Better? (imprezas.com)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/10/26/is-bigger-better.html]]></link>
    <description><![CDATA[<p>In the words of Jeremy Clarkson &#8220;<span class="caps">POWER</span>!&#8221;.. To celebrate the release of the new S-Series range of Impreza we made a flash microsite showing them off a bit. More torque, more grip, more speed.. All stats and pretty pictures you want can be found at <a href="http://imprezas.com">imprezas.com</a></p>]]></description>
    <pubDate>2008-10-26T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Free to Freelance]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/10/26/free-to-freelance.html]]></link>
    <description><![CDATA[<p><a href="http://freetofreelance.co.uk">A site designed to show case the work</a> and be as mininal as possible. Clean and simple with just black text and a white background in order to keep the focus on the work being shown.</p>
<p>Large images (800 &#215; 600) dominate the website with a cool little jQuery image switcher. Based on <span class="caps">PHP</span>-<span class="caps">WAX</span> and Wildfire <span class="caps">CMS</span> its smart &amp; simple to use.</p>
<p><span class="caps">EDIT</span> (Oct 14 2009): The site has now had a visual update; in return for some carrot cake, see <a href="/work/2009/10/14/miss-jones.html">Miss Jones</a> for more info.</p>
<p><span class="caps">EDIT</span> (May 20 2009): Bit of a rebrand, the sites primary domain is now <a href="http://nataliefayejones.co.uk">nataliefayejones.co.uk</a></p>]]></description>
    <pubDate>2008-10-26T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Flash - aha - Saviour of the Internet?]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/10/20/flash-aha-saviour-of-the-internet.html]]></link>
    <description><![CDATA[<p>Flash has its place; it&#8217;s great for adverts, playing movies and anything that really, really needs smooth animation, but whole websites? I think not</p>
<p>I&#8217;ve always had an issue with Flash being used in such a fashion. Yes, google can now index some of it, but only if it&#8217;s been coded properly and in a search engine friendly way. During a recent project (for the <a href="http://imprezas.com/">Impreza S microsite</a>) we had several discussions about how best to present the creative we had for this site</p>
<p>In the end flash won, but with lots of consideration towards how google et al. Firstly, not all of the site is in Flash (yey!) the navigation is <span class="caps">HTML</span> and interacts with the flash. A few other things like sitemaps help the site to be friendly. p. The reason for our decission to go with Flash is mainly due to the colour changer. Regardless of how good the ajax libraries are (jQuery in particular) they currently don&#8217;t handle image switching quite so smoothly. The final reason was the page transition; I still find it somewhat unusual and a bit disorienting, but a good effect.</p>
<p>On the whole I feel the site is nicely done (good job Sheldon!) and considering the timeline for it, it is a sterling example of how flash sites should be handled.</p>
<p>On the other hand, some flash sites worry me. Certain so called &#8216;creative&#8217; agencies who decide that just because they&#8217;re creative they need their site to be &#8216;creative&#8217; &#8211; which to them means Flash. In most of these cases you will find that the reason for the entire site being flash is something stupid like &#8216;we want our logo to be animated and interesting&#8217;</p>
<p>There are many such sites out there, you just have to look for them. When you find them ask this question: &#8216;Is that silly little logo / animated character / smooth page transition / custom font worth the issues with accessibility, maintenance, readability etc&#8217;</p>]]></description>
    <pubDate>2008-10-20T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Lisa Shepherd]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/10/18/lisa-sheperd.html]]></link>
    <description><![CDATA[<p>A new website for the Lisa Shepherd chain of salons.</p>
<p><span class="caps">EDIT</span> (Jan 01 2009): I&#8217;ve removed the link to the website as the client has changed the website and it is now of such a low standard I would never want any one to think I made it.</p>]]></description>
    <pubDate>2008-10-18T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Squeaky Clean (Supreme Hygiene)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/10/15/squeaky-clean.html]]></link>
    <description><![CDATA[<p>Just <a href="http://supremehygiene.co.uk">launched a brand spanking new site</a> for all your industrial cleaning needs. An advanced site with some clever jiggery pokery in regards to multi level categories and product tagging. Again, run on <span class="caps">PHP</span>-<span class="caps">WAX</span> and Wildfire <span class="caps">CMS</span> so even if the backend is complex the front is kept nice and simple.</p>
<p>A really nice jQuery switcher on the home page to flick between featured articles and a jQuery based estimation enquiry form ensures this site stands out from its rivals while offering improved usability.</p>]]></description>
    <pubDate>2008-10-15T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[EIC]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/09/16/eic.html]]></link>
    <description><![CDATA[<p>We just <a href="http://www.eic.co.uk">launched EICs new website</a>, just in time for the big Energy Event over at the Motorcycle Museum. At the even they also showed off the new branding created by unsuitable (<a href="http://weareunsuitable.com/news/eic-show-off-new-branding">you can see details on this here</a>).</p>]]></description>
    <pubDate>2008-09-16T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[The Shave Doctor]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/09/06/the-shave-doctor.html]]></link>
    <description><![CDATA[<p><a href="http://shavedoctor.co.uk"><img src="/images/work/shavedoctor.jpg" alt="" /></a></p>
<p><a href="http://oneblackbear.com">One Black Bear</a> have created a new site aimed at wannabe sweeney todds everywhere.</p>
<p><a href="http://shavedoctor.co.uk" title="aka Mark Sproston">The Shave Doctor</a> is a site offering courses via his shave school and also a host of associated shaving products.</p>
<p>Interested shaving experts in waiting can check availability of course dates and learn the silky smooth skills that have made The Shave Doctor the renowned expert he is today. More and more men are opting for a traditional, cut-throat shave with the warm towels and super close finish you only get with a proper barber shop shave.</p>
<p>Make a sharp beeline for <a href="http://shavedoctor.co.uk">shavedoctor.co.uk</a> and learn the art of a traditional shave.</p>]]></description>
    <pubDate>2008-09-06T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Mensgroom]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/08/13/mensgroom.html]]></link>
    <description><![CDATA[<p><a href="http://mensgroom.co.uk"><img src="/images/work/mensgroom.gif" alt="" /></a></p>
<p>Having trouble with spots? Dry, flaky skin and an aversion to sunlight? You&#8217;re in luck!</p>
<p>We&#8217;ve just let loose a top notch <a href="http://mensgroom.co.uk">ecommerce site</a> for all your male grooming needs! Not only does it stock hundreds of products but it offers a great advice section &amp; video guides.</p>
<p>We decided to try out something new with Mensgroom&#8217;s payment system. In our experience most checkout process tend to become clunky and arkward when it comes to address details; adding several new steps and more pages for you to wade though, not very friendly at all!</p>
<p><span class="caps">EDIT</span> (August 25 2009): The number of people actually going to view a product has dropped significantly while bounces on the welcome/splash page has risen to a new high&#8230; No shock there then.</p>
<p><span class="caps">EDIT</span> (June 30 2009): So far the people getting though to the real home page from the splash page is less than 50%, not good&#8230;</p>
<p><span class="caps">EDIT</span> (March 20 2009): At the clients request the is now a splash page as the first thing on the website; so it no longer looks like a shop&#8230; Wait and see how that works out.</p>]]></description>
    <pubDate>2008-08-13T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[MADE Schools]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/07/30/made-schools.html]]></link>
    <description><![CDATA[<p><a href="http://made-schools.org"><span class="caps">MADE</span></a> is the new name for <span class="caps">NAMDS</span> and is a group of 9 schools within the UK that stand for excellence in music and dance (in fact thats what <span class="caps">MADE</span> stands for &#8211; Music And Dance Excellence). They commissioned <a href="http://oneblackbear.com">One Black Bear</a> to build them a new site, and that&#8217;s what we did!</p>
<p>One of the nicest designs I&#8217;ve worked on recently, take a look at <a href="http://made-schools.org">made-schools.org</a> and see what you think.</p>]]></description>
    <pubDate>2008-07-30T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[So many OS', not enough machines..]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/06/25/so-many-os-not-enough-machines.html]]></link>
    <description><![CDATA[<p>If like me you have to test your work for the mass market (that means windows) and cater for the majority (yes, that means IE6 and 7) but you are of more discerning tastes and don&#8217;t enjoy viruses, malware and endless updates (in other words, you don&#8217;t use windows) then you probably use a Mac (yes I do!). So how do you get around the problem? Simple answer, virtualisation.</p>
<p>Basically this means that you can install a piece of software of your machine that lets you emulate another operating system. Most of the established solutions cost money, not much (around &pound;40), but still more than nothing.</p>
<p>After trying both VMware and parallels found them to be very very useful, but at the same time memory and processor hungry. For example, say I have the infamous double margin IE display bug and I&#8217;m trying to find the right container to add the display attribute to. I Have textmate open, photoshop (as I&#8217;m still working on the design), firefox, safari and VMware; switching to and from applications becomes sluggish.. There is a better way..</p>
<p><a href="http://www.virtualbox.org/">VirtualBox</a>, developed by Sun, is faster and smoother than the others I have used and has an OpenSource version! Goodbye VMware!</p>
<p>The only draw back is that the free download doesn&#8217;t have support for wireless cards on macs, but otherwise it&#8217;s brilliant. Supports lots of operating systems (almost every flavour of linux I can think of) and is very fast. Great example of this, full reboot of plain windows xp (with service pack 2) in under 1 minute&#8230;</p>]]></description>
    <pubDate>2008-06-25T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Firefox Day!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/06/16/firefox-day.html]]></link>
    <description><![CDATA[<p>Firefox, the developers best friend, is due to get a big update tomorrow&#8230; A shiny new version will be let lose on the world. Yes I do know about the release candidates, betas and alphas but they don&#8217;t really count; when was the last time your mother downloaded something like that?</p>
<p>Anyway, to mark the release they are planning to break the world record for most downloads of a single piece of software in one day. Good luck, I for one will be downloading it, lets just hope their servers can cope!</p>
<p>Take a look at <a href="http://www.spreadfirefox.com/">Spread Firefox</a> website for more details.</p>]]></description>
    <pubDate>2008-06-16T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Simple Photography (Lucas North)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/05/20/simple-photography.html]]></link>
    <description><![CDATA[<p><a href="http://lucasnorth.com">A simple site to show off all of Lucas North&#8217;s photography</a> with a simple contact form. The individual galleries utilise a jQuery plugin to allow smooth image transitions and thumbnailing.</p>]]></description>
    <pubDate>2008-05-20T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Geek in the Park 2008!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/05/20/geek-in-the-park-2008.html]]></link>
    <description><![CDATA[<p>The time is almost here for the Multipacks semi regular (hopefully will be regular, this will be the 2nd time) summer time extravaganza; <a href="http://geekinthepark.co.uk">Geek in the Park</a>!</p>
<p>As previously the event is aimed at geeks and their families with the day being split in to two; the afternoon picnic and the evening talk</p>
<p>The afternoon picnic last time was a resounding success with lots of people from all over the country coming down to point and laugh at us trying to play football&#8230; The only downside being a lost Frisbee and an almost lost ball (this time we&#8217;ll try not to play by the river, honest!). Thanks again to the rowers for rescuing the ball</p>
<p>This years evening talk is aimed at being a bit more interactive and we should have some great speakers (once its all confirmed). So keep an eye on <a href="http://geekinthepark.co.uk">the website</a> and come on over for some geek fun in the sun (hopefully!).</p>]]></description>
    <pubDate>2008-05-20T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Developing Locally in Leopard]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/05/11/developing-locally-in-leopard.html]]></link>
    <description><![CDATA[<p>Your mac is set up and ready to go, but how exactly do you go about setting Apache up in OS X Leopard these days? Well it&#8217;s it a bit more like linux now with the demise of Network Manager (I think thats what it was called, been a while since I used tiger), but its not too hard, honest!</p>
<p>Firstly decide what suffix your going to use for your local machine, be sensible and use something meaningful like .local or .dev. Dig out your apache vhost file (httpd-vhosts.conf) and set up the file.</p>
<p>You will need a line such as &#8220;NameVirtualHost *:80&#8221; to make sure any web connections are picked up. Now create you first virtual host a bit like this:</p>
<p>&lt;VirtualHost *:80&gt;<br />
&nbsp;&nbsp;&nbsp; DocumentRoot /Users/username/Sites/sitename/docroot<br />
&nbsp;&nbsp;&nbsp; ServerName mysite.local<br />
&nbsp;&nbsp;&nbsp; &lt;Directory &#8220;/Users/username/Sites/sitename/docroot&#8221;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AllowOverride All<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options All<br />
&nbsp;&nbsp;&nbsp; &lt;/Directory&gt;<br />
&lt;/VirtualHost&gt;</p>
<p>Once you have saved this file (root/admin privilleges are required) you will need to restart Apache so it reloads you config files. You can do this by starting up terminal and typing &#8220;sudo apachectl graceful&#8221; and entering the root/admin password.</p>
<p>Now type mysite.local in to your browser of choice and see what happens&#8230;. Nothing is the answer. At this point Apache knows it should be looking for a request a site called mysite.local but your machine has no idea what .local means.</p>
<p>To fix this you have to edit you /etc/hosts file (again root/admin needed) and tell it what mysite.local means. Crack open the file and add this line:</p>
<p>127.0.0.1 mysite.local.</p>
<p>Save the file and refresh your browser. Bingo, its working (asuming the directory your pointing at exists of course).</p>
<p>If your like me and your containing folder is called the same thing as the server name and you have lots and lots of sites you can save yourself some effort and make use of Apache&#8217;s VirtualDocumentRoot (bearing in mind you will have to ensure mod_vhost_alias is enabled) and set your config file to have something like this:</p>
<p>&lt;VirtualHost *:80&gt;<br />
&nbsp;&nbsp;&nbsp; VirtualDocumentRoot /Users/username/Sites/%1/docroot<br />
&nbsp;&nbsp;&nbsp; ServerName %0.local<br />
&nbsp;&nbsp;&nbsp; &lt;Directory &#8220;/Users/username/Sites/%1/docroot&#8221;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AllowOverride All<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options All<br />
&nbsp;&nbsp;&nbsp; &lt;/Directory&gt;<br />
&lt;/VirtualHost&gt;</p>]]></description>
    <pubDate>2008-05-11T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[BBC iPlayer vs UK ISPs - Network Contention]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2008/04/09/bbc-iplayer-vs-uk-isps-network-contention.html]]></link>
    <description><![CDATA[<p>This story really wound me up. ISPs attitude to its responsibilities has been a sore point for some time with me; ever since my online gaming days of Earth and Beyond, CS and the like network contention has been a sticky issue.</p>
<p>First lets go over what an <span class="caps">ISP</span> should do. When it sells you a 4mb line, you get a 4mb connection to the internet almost all the time; I can accept network outages and local hub upgrades etc. Their advertising should reflect the reality of the situation, so when it says &pound;20 per month gets you a 4mb line then thats what you should get. This is not what happens..</p>
<p>When selling you a 4mb line, you don&#8217;t get a 4mb line. What you actually get is a 4mb limited connection to a bigger line, say 100mb. When this line is quiet thats fine, you get 4mb. However, when you sell 100 4mb connections all connecting to that same 100mb pipe then you will get issues.</p>
<p>Lets say that out of those 100 people a quarter of them start to download large files; linux distros and albumns off iTunes for example, this creates a huge demand on the main 100mb line. Lets say those 25 people max out their limited connections, 25 &#215; 4 = 100&#8230; What are the other 75 people meant to do for network connections?</p>
<p>Those other 75 people are just trying to surf the net, so using say (75 &#215; 0.5mb) 37.5mb, so far that 137.5mb on a 100mb line, whops! Can someone say over selling??</p>
<p>As 137.5mb doesn&#8217;t fit in to a 100mb pipe, everyone gets slowed down; so that 4mb limit on your line just dropped to about 3mb. This is what is called network contention and it sucks!</p>
<p>Recently certain ISPs have decided that because they have oversold their main pipes in that fashion that the service causing this spike should pay towards the <span class="caps">ISP</span> upgrading their network to cope! What a joke! My favourite so far is Simon Gunter from Tiscali who claims the <span class="caps">BBC</span> should pay&nbsp;Tiscali money because they can&#8217;t cope with demand on their network!</p>
<p>Lets get this straight, the ISPs oversold their main lines, all those people heard about the iPlayer, started using it, created more then 100% traffic peaks becuse of the overselling. Then the <span class="caps">ISP</span> tells the <span class="caps">BBC</span> to cough up so it can upgrade that main line to actually be able to cope with the demand? Does that seem right to you? Sounds like an idiot to me.</p>
<p>Why can&#8217;t we just get what we pay for.. If you plan on selling 100 4mb connections, lay a 400mb main line in the first place! When I go to a supermarket and buy 4 oranges, I get 4 oranges. If I didn&#8217;t the supermarket would be in trouble. Yet these ISPs get away with it because of that fine print in the contract that mentions network contention.&nbsp;</p>
<p>I hope now with the <span class="caps">BBC</span> on the side of the gamers and geeks we can finally get rid of that network contention open ended clause and replacing with something closer to an <span class="caps">SLA</span>; where the company has to promise a certain percentage of that 4% will be available at all times. That way we can all make a more informed choice. I would much rather have a gaurented 99% of 3mb than 70% of 4mb..</p>
<p>Until this is sorted I would highly recommend everyone downloading every possible show via the iPlayer, just to ram this home to the stupid ISPs!!</p>
<p>For more a details, and less ranting, about the <a href="http://news.bbc.co.uk/1/hi/technology/7336940.stm">issue between ISPs and the <span class="caps">BBC</span> take a look at the full article here</a>.</p>]]></description>
    <pubDate>2008-04-09T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[April fools!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/04/01/april-fools.html]]></link>
    <description><![CDATA[<p>Ok, play time for all the web geeks.. Best of the best so far..</p>
<ul>
	<li>BBCs Flying Penguins!</li>
	<li><a href="http://uk.youtube.com/user/YTRickRollsYou">YouTube rick rolling everyone</a></li>
	<li>Google goes to outer space</li>
	<li>Tux makes a new friend.</li>
	<li>WoWs new hero class &#8211; <a href="http://www.worldofwarcraft.com/wrath/features/bard/bardclass.xml">The Bard</a></li>
	<li>Gmail&#8217;s <a href="http://mail.google.com/mail/help/customtime/index.html">time travelling emails</a></li>
	<li>New WoW expansion pack &#8211; <a href="http://www.worldofwarcraft.com/moltencore/">Molton Core</a></li>
	<li><a href="http://www.google.com.au/intl/en/gday/index.html">Search the future with Google Austrialia</a></li>
</ul>]]></description>
    <pubDate>2008-04-01T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[How To Setup OS X Leopard for LAMP Development]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/03/29/setup-os-x-leopard-for-lamp-development.html]]></link>
    <description><![CDATA[<p>This has now been <a href="/web/2009/06/06/os-x-development-revisited.html">replaced by a more recent article</a></p>
<p>Before we start, <span class="caps">LAMP</span> = Linux, Apache, MySQL and <span class="caps">PHP</span> and yes I know Macs aren&#8217;t Linux based, but FreeBSD is a flavour of Unix so it&#8217;s close enough!</p>
<p>Having recently received my lovely new work Macbook Pro and have been setting it up for some serious <span class="caps">PHP</span> and MySQL development. Some of these stages were seriously difficult to find and it took myself and Sheldon Els (also on his shiny new Macbook Pro) a while to figure out; so we thought we would share..</p>
<p>As both of us work with a php framework (php-wax) we have to create custom installs of php, mysql and apache; mainly because the installed version of php does not support <span class="caps">PDO</span> or <span class="caps">PEAR</span>. Of course soon as you recompile php it generates a Darwin version of the shared object that Apache uses meaning Apache has to be re compiled also.</p>
<ul>
	<li>Firstly, wipe and reinstall your version of Leopard and remove all of those extra printer drivers and languages to save yourself over 5gb.</li>
	<li>Do all of the software updates so any changes you do to the default locations are not over written by a security update.</li>
	<li>I recommend creating a src folder within your user in to keep all of your source files.</li>
	<li>Get your hands on the latest version of xcode and install it. This is needed by everything, as it has all the gcc utils required for compiling anything!</li>
</ul>
<p>While xcode is downloading from the Apple Dev Center install all your standard applications (Quicksilver, Adium, Textmate etc).</p>
<p>As mentioned above some security updates will over write files in default system locations; meaning your custom setup will be lost. This guide will try to avoid such things and install to custom locations.</p>
<p>Anyway, time to get to work so crack open a terminal window and lets begin.</p>
<h3>MySQL</h3>
<p>Download the latest stable release for your machine (please make sure you download the right version!).</p>
<p>Unpackage and change in to the new MySQL directory and then run these on your command line</p>
<ul>
	<li>./configure &#8212;prefix=/usr/local/mysql_dev &#8212;with-extra-charsets=complex &#8212;enable-thread-safe-client &#8212;enable-local-infile &#8212;enable-shared</li>
	<li>make</li>
	<li>sudo make install</li>
	<li>cd /usr/local/mysql_dev</li>
	<li>sudo ./bin/mysql_install_db &#8212;user=mysql &#8212;basedir=/usr/local/mysql_dev (make a note of the password commands needed to set a root user)</li>
	<li>sudo chown -R mysql ./var</li>
	<li>sudo /usr/local/mysql_dev/bin/mysqld_safe &amp; (this starts the mysql daemon)</li>
</ul>
<p>use the commands from above to set your root password.</p>
<p>That is MySQL setup and running, but to get it to start on boot you will need to copy the text below and save it to /Library/LaunchDaemons/com.mysql.mysqld.plistp.</p>
&lt;?xml version=&#8220;1.0&#8221; encoding=&#8220;<span class="caps">UTF</span>-8&#8221;?&gt;
&lt;!<span class="caps">DOCTYPE</span> plist <span class="caps">PUBLIC</span> &#8220;-//Apple//<span class="caps">DTD</span> <span class="caps">PLIST</span> 1.0//EN&#8221; &#8220;http://www.apple.com/DTDs/PropertyList-1.0.dtd&#8221;&gt;
&lt;plist version=&#8220;1.0&#8221;&gt;
&lt;dict&gt;
&nbsp;&nbsp;&nbsp; &lt;key&gt;KeepAlive&lt;/key&gt;
&nbsp;&nbsp;&nbsp; &lt;true/&gt;
&nbsp;&nbsp;&nbsp; &lt;key&gt;Label&lt;/key&gt;
&nbsp;&nbsp;&nbsp; &lt;string&gt;com.mysql.mysqld&lt;/string&gt;
&nbsp;&nbsp;&nbsp; &lt;key&gt;Program&lt;/key&gt;
&nbsp;&nbsp;&nbsp; &lt;string&gt;/usr/local/mysql_dev/bin/mysqld_safe&lt;/string&gt;
&nbsp;&nbsp;&nbsp; &lt;key&gt;RunAtLoad&lt;/key&gt;
&nbsp;&nbsp;&nbsp; &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;
<p>Now run these commands to get MySQL to start at boot:</p>
<p>sudo chown root /Library/LaunchDaemons/com.mysql.mysqld.plistsudo<br />
launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist</p>
<p>Also add the below line to you ~/.profile</p>
<p>export <span class="caps">PATH</span>=&#8220;/usr/local/bin:/usr/local/sbin:/usr/local/mysql_dev/bin:$<span class="caps">PATH</span>&#8221;</p>
<p>That is it! MySQL is sorted&#8230; <span class="caps">NEXT</span>!</p>
<h3><span class="caps">PHP</span></h3>
<p>Download the latest stable release in to your source folder</p>
<p>Unpackage and change in to the new php directory</p>
<ul>
	<li>./configure &#8212;prefix=/usr &#8212;without-iconv &#8212;with-mysql=/usr/local/mysql_dev &#8212;with-pdo-mysql=/usr/local/mysql_dev &#8212;with-apxs2=/usr/sbin/apxs &#8212;with-curl=/opt/local/bin/curl &#8212;with-zlib &#8212;with-bz2</li>
	<li>make</li>
	<li>sudo make install</li>
</ul>
<p>From your source unpacked directory copy the shared object:</p>
<ul>
	<li>sudo cp ./libs/libphp5.so /usr/libexec/apache2/libphp5_dev.so</li>
</ul>
<p>Check in /usr/bin for your php binary and rename it properly:</p>
<ul>
	<li>ls /usr/bin/php*</li>
	<li>sudo mv /usr/bin/php.dSYM /usr/bin/php</li>
</ul>
<p>Fix your pear install directory</p>
<p>cd /usr/lib/php<br />
sudo pear config-set php_dir /usr/lib/php</p>
<p><span class="caps">PHP</span> done and dusted&#8230; Almost finished..</p>
<h3>Apache</h3>
<p>Download the latest stable version into your source folder</p>
<p>Unpackage it and guess what, change into the httpd directory</p>
<ul>
	<li>./configure -enable-layout=Darwin -enable-mods-shared=all</li>
	<li>make</li>
	<li>sudo make install</li>
</ul>
<p>comment out the old php library load and add a new one in your /etc/apache2/httpd.conf</p>
<p>LoadModule php5_module libexec/apache2/libphp5_dev<br />
#LoadModule php5_module libexec/apache2/libphp5.so</p>
<p>enable vhosts in your /etc/apache2/httpd.conf (Include /private/etc/apache2/extra/httpd-vhosts.conf)</p>
<p>fix up your /etc/apache2/extra/httpd-vhosts.conf with appropriate vhosts.</p>
<p>add a line in your /etc/hosts for each virtual host.</p>
<p>That is everything up and running, not so hard when you know how!</p>]]></description>
    <pubDate>2008-03-29T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Retro Gaming...]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/03/28/retro-gaming.html]]></link>
    <description><![CDATA[<p>Inside every geek/nerd lies the heart of a gamer; whether its a fast paced <span class="caps">FPS</span> or an all encompassing <span class="caps">RPG</span> sprites and polygons make our strained eyes twinkle. Harking back to the good old days is becoming more popular as the simplicity is appealing.</p>
<p>While indulging a bit of nostalgia I came across a great site which has converted the legendary Arkanoid to a web game made from javascript! <a href="http://www.schillmania.com/arkanoid/arkanoid.html">Have a play here</a>.</p>]]></description>
    <pubDate>2008-03-28T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Tesla Starts Production!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2008/03/18/tesla-starts-production.html]]></link>
    <description><![CDATA[<p>At long last the Tesla all electric sports car went in to production today! Huge news for all those petrolheads with a green heart. The Roadster is based on a Lotus Elise chassis so should be a dream to drive and if the published statistics are accurate very fast, hitting 60mph in just under 4 seconds.</p>
<p>The other plus point of the Tesla is the fuel economy of 135mpg! The 2008 batch have already been sold and I&#8217;m looking forward to reading the first road test. For now take a look at the <a href="http://petrolheads.com/news/default.asp?storyId=17766">pistonheads page</a> or the <a href="http://www.teslamotors.com/">companies own website</a>.</p>]]></description>
    <pubDate>2008-03-18T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Silverstone!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/motorsport/2008/03/16/silverstone.html]]></link>
    <description><![CDATA[<p>Friday just gone I had the pleasure of going to a track at Silverstone, and on the full GP circuit!! As I&#8217;m busy watching the first grand prix of the season I&#8217;ll leave it at that.</p>]]></description>
    <pubDate>2008-03-16T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Netscape No More]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/02/29/netscape-no-more.html]]></link>
    <description><![CDATA[<p>As of the 1st of March 2008 Netscape is officially dead and buried. That date is the last day parent company <span class="caps">AOL</span> will support the browser.</p>
<p>Netscape was one of the first modern generation browsers with, at it&#8217;s peak, over 90% of people using it (in the days of 4.7!) but has recently slumped to a miniscule 0.6%. This huge swing in fortune was the decisive factor and the end of Navigator was set last year by the various boards and management at <span class="caps">AOL</span>.</p>
<p>Netscape Navigator was a very important piece of software laying down the ground rules for almost every other browser including the IE series and will go do in history.</p>
<p>In spirit it will on in the form of Firefox, Flock and various other Mozilla based browsers. The Mozillia foundation was created by former Netscape staff who were made redundant in 2003; since then they have once again had large scale success with Firefox now corning over 20% of the worlds browsers.</p>]]></description>
    <pubDate>2008-02-29T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Real Programmers]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/02/02/real-programmers.html]]></link>
    <description><![CDATA[<p><a href="http://xkcd.com/378/">xkcd.com with another cracking piece of nerd comedy</a>!</p>]]></description>
    <pubDate>2008-02-02T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[IE 6 Bug - Repeating Characters]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/02/01/ie-6-bug-repeating-characters.html]]></link>
    <description><![CDATA[<p>After coming across this really annoying bug many times I thought it was about time I made a note of it somewhere.</p>
<p>When you starting mixing floated containers with non floated containers the IE 6 only parameter hasLayout triggers to -1 causing all sorts of chaos in your layout; most notably tail characters repeating themselves. This is a big pain in the ass and is a little devil to fix.</p>
<p>To get your layout working again you have to get hasLayout back to 1. This can be done in several ways but the most successful seems to be by adding display:inline onto the containers (and sometimes the items inside) style declarations and crossing as many body parts as you can (for luck).</p>
<p>Other methods for fixing this is to set margin-right:-3px or to change which parts are floated (if your layout allows).</p>]]></description>
    <pubDate>2008-02-01T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Loading...]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/01/31/loading.html]]></link>
    <description><![CDATA[<p>Like many web developers I find myself creating more interactive pages with ajax elements and lots of imagery. When these images come from things such as flickr pools or rss feeds the load time can be dramatically increased leaving big blank sections on your page.</p>
<p>The best way to still load all your remote content in and inform the user of what is going is to use a loading image. I can never find a a decent one when I need it most, so this site I came across is great! You can select a suitable style, background colour and foreground colour and the site creates a gif for you!</p>
<p><a href="http://www.ajaxload.info/">Try it out yourself here</a>.</p>]]></description>
    <pubDate>2008-01-31T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[IE8 Stupidity]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2008/01/24/ie8-stupidity.html]]></link>
    <description><![CDATA[<p>Maybe I spoke to soon when I congratulated the IE8 development team on creating a browser capable of passing Acid2 as it now looks as though they have thrown away all their hard work be being stupid.</p>
<p>With the switch between older versions of IE they implemented a malformed doc type detector to enable what was commonly known as &#8216;quirks mode&#8217; so the site would render using the previous engine. At first look you&#8217;ve got to think that this was bad as you could end up with thousands of broken sites which relied on the old, faulty engine. And thats the point.</p>
<p>The only way to get old sites which only worked with faulty / flawed rendering engines is to make sure that when the users of the site install a new browser the site breaks. After all these users start complaining making the site work correctly suddenly appeals a lot more.</p>
<p>This is <span class="caps">NOT</span> what has happened with IE 8.</p>
<p>Instead MS and their development team decided to flout previous acceptable methods and create a meta tag to signify the site should use then newly compliant engine. So why exactly would anyone spend time and money turning their old site? As far as they are concerned the site works, who cares if its standard compliant.</p>
<p>Yes its tough being the browser that most people use and with such a bad record of adhering to standards a big switch to a compliant engine and site that was made for your old engine wont work and your stuck answering thousands of email complaints. Is this a goog enough reason&#8230; I don&#8217;t think so; grow some balls and break the sites are meant to be broken!</p>
<p>If you want to see opinions of world renowned web experts on this stupid decision, take a look at <a href="http://operawatch.com/news/2008/01/opera-mozilla-and-safari-react-to-ies-solution-for-browser-compatibility-issues.html">opera watch</a>.</p>]]></description>
    <pubDate>2008-01-24T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[MacBook Air]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2008/01/22/macbook-air.html]]></link>
    <description><![CDATA[<p>Last week Apple finally released the long awaited sub-notebook that has been rumoured for sooo long. However, it was not the tablet style that has been favoured of late in the rumours. Instead it was the ultra thin lightweight laptop.</p>
<p>On first look its pretty, sleek, looks the business and has some nice built in features. However, on closer inspection there are some issues with it. Lets start with the my main bug bear; the hard drive.</p>
<p>By default it comes with a <span class="caps">PATA</span> drive only running at 4200 rpm making slow and already a generation behind normal laptop drives. To get the 64GB solid state drive adds almost &pound;1K onto the asking price!!! I know its the largest of its kind and therefore going to be pricey but that option now puts it in the same region as a top MacBook Pro!</p>
<p>The Air comes with 2GB of <span class="caps">RAM</span>, which you cant upgrade. So I&#8217;ve just spent &pound;1200 on something that will need replacing in a year or so when the next version of PS and the like requires 3GB to do anything useful.</p>
<p>No built in ethernet port. Yeah its got wireless, but for gaming or any kind of en masse file exchange then you cant beat a good old cat5 cable.</p>
<p>No optical drive. For me thats not a particular problem as I bearly use my drive as it is, but for your standard user this is how they get programs onto their machines. As a solution you can buy a separate drive at an additional cost of course.</p>
<p>Overall I would rather save some money and buy a nicely kitted out MacBook for portability or if I was a bit flush a 15&quot; inch MacBook Pro.</p>]]></description>
    <pubDate>2008-01-22T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Dont Look Down!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2008/01/18/dont-look-down.html]]></link>
    <description><![CDATA[<p>While scanning though some reddit and digg feeds I stumbled across some photos of very dangerous roads! (seem to have lost the photos, whoops!)</p>]]></description>
    <pubDate>2008-01-18T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Spence Insurance]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2008/01/06/spence-insurance.html]]></link>
    <description><![CDATA[<p>Another insurance broker that we started way back when (approx. April 2007). This site has been though at least 3 re-designs with each one being signed off, approved, built and then client changing their minds at the last stage!</p>
<p>I only seem to have the original and current designs at hand; not sure where the second version went to but it is some what similar to the current iteration, minus the top navigation bar.</p>
<p>As this was built and populated ages ago this is running an older version of the Wildfire <span class="caps">CMS</span> but is a relatively straight forward site, nothing to complicated.</p>
<p><a href="http://spenceinsurance.co.uk/">Go have a look at their live site</a>.</p>
<p>(This site was also worked on by Ross Riley, <a href="http://www.coffeerings.co.uk/">John Walker</a> and Sheldon Els)</p>
<p><span class="caps">EDIT</span> (Oct 10 2009): Wow, I&#8217;m shocked that it hasn&#8217;t been changed again!</p>]]></description>
    <pubDate>2008-01-06T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Style Birmingham]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/12/06/style-birmingham.html]]></link>
    <description><![CDATA[<p>A recent project for work was a total redesign and rebuild of the <a href="http://stylebirmingham.co.uk">Style Birmingham website</a>. The main goal of the style is to show case Birmingham as a stylish venue on par with London and other major cities.</p>
<p>Along with an extensive list of shops inside the Birmingham city centre the site also has a large news section journaling relevant events and blog like features. The blog section (called Style Guru) contains posts from local style icons about the latest trends in the fashion world.</p>
<p>The Shops section breaks down all of the shops into primary categories such as Menswear, Womenswear, etc. From this section you can then view a list of shops.</p>
<p>When viewing the actual shop you get a decent level of information including a google map of where the shop is, some basic copy about the shop, details like phone numbers, websites and opening hours are also included along with what Brands the shop stocks.</p>
<p>Alternatively you can use The Brands section to find the brand your looking for and then view the shops that stock that brand.</p>
<p>The site has a competitions section on the front end and within the <span class="caps">CMS</span>. The <span class="caps">CMS</span> module allows the admin to create a new competition, specifying questions, start date, end dates and introduction text. As an extra feature the admin can hide the competition feed from the front page and view all entrants.</p>
<p>The gallery section (now renamed events) uses the same slideshow technology as the latest articles on the home page to display the most recent 9 photos. This initial page also shows some descriptive text which is controlled via the <span class="caps">CMS</span>. The main gallery page shows all images, paginated with an on click jqmodal box.</p>
<p>The site uses modern web standards together with cutting edge <span class="caps">AJAX</span> technics to keep the site smooth and simple.</p>
<p><span class="caps">EDIT</span> (Aug 01 2009): The site has now been redesigned by 383 project, so all of that stuff above no longer exists!</p>]]></description>
    <pubDate>2007-12-06T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Greenhill Dobbin]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/11/28/greenhill-dobbin.html]]></link>
    <description><![CDATA[<p><a href="http://greenhilldobbin.com"><img src="/images/work/greenhill-dobin.gif" alt="" /></a></p>
<p>Another <a href="http://greenhilldobbin.com">insurance broker website</a> based on one of the more recent iterations on the Wildfire <span class="caps">CMS</span>. Fairly standard with the a contact us form and google map.</p>]]></description>
    <pubDate>2007-11-28T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Telford Shopping Centre (No Longer with WAA)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/11/23/telford-shopping-centre.html]]></link>
    <description><![CDATA[<p>One of the larger sites I made for work was a new version of the <a href="http://telfordshopping.co.uk">Telford Shopping Centre website</a>. It contains many useful tools such as a store directory and an interactive map.</p>
<p>The site contains several <span class="caps">AJAX</span> enabled sections to improve the website flow and ease of use. For the most part the site uses the Moo Tools library with certain aspects such as the gallery (now disabled) using the <span class="caps">YUI</span> library instead.</p>
<p>The site also has multiple skins which are currently pink for spring, orange for autumn and blue for winter.</p>
<p>As always the site has a google sitemap, dynamic meta tags (utilising some constant values along with chunks of the page copy) and is valid xhtml strict (unless some of the dynamic content breaks it!).</p>
<p><span class="caps">EDIT</span> (Jun 11 2009): It seems the previous incarnation of the site has now also been turned off; along with pretty much all webxpress.com domains.</p>
<p><span class="caps">EDIT</span> (Sept 03 2008): My previous employer (<a href="http://www.waa.co.uk"><span class="caps">WAA</span></a>) recently lost the account for Telford Shopping Centre and the site has been completely redesigned &#8211; I&#8217;m not impressed; compare it to <a href="http://telford.webxpress.com">our version</a> and see what you think.</p>]]></description>
    <pubDate>2007-11-23T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[The Way of The Wii]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2007/11/22/the-way-of-the-wii.html]]></link>
    <description><![CDATA[<p>Good old fashioned playabilty finally strikes back. After many years of graphical improvements, interface development and soaring price tags Nintendo decided enough was enough. Instead of playing the next generation game they took a step back and realised something&#8230; Gaming should be fun</p>
<p>Where <span class="caps">SONY</span> and Microsoft went about created bigger, meaner machines with high end graphic cards and enough technology to carry such weighty tags as &#8216;home entertainment console&#8217; and &#8216;<span class="caps">THE</span> home theatre solution&#8217; Nintendo went a different way</p>
<p>Using the existing Gamecube platform Nintendo went about doing what they do best; they changed the way we played games. Instead of using clunky controllers they came up with a small tv remote style controller and then came the killer feature&#8230;</p>
<p>Your motions controller aspects of the games! The days of button bashing are over, now to beat some jumped up kid on the Wii you need some muscle in places other then your fingers. After playing 4 player Wii tennis i woke up the next day with sore arm muscles!</p>
<p>Forget the real life graphics, fun and game play wins every time!</p>]]></description>
    <pubDate>2007-11-22T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Flickr-tastic]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2007/11/18/flickrtastic.html]]></link>
    <description><![CDATA[<p>Several months ago the amazingly popular website Flickr opened up its service and functionality to the general public by means of an impressive <span class="caps">API</span>. Of course a large proportion of the internet users don&#8217;t know what an <span class="caps">API</span> is never mind feel the need to use one.</p>
<p>However, as part of the php-wax framework development I created a very basic plugin to use the Flickr <span class="caps">API</span>. You can see an example of its use on the front page of this website. Once the framework has been released and out of beta I will write a proper article about its uses with code examples.</p>]]></description>
    <pubDate>2007-11-18T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[A Search Engine to Call my Own]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2007/11/17/a-search-engine-to-call-my-own.html]]></link>
    <description><![CDATA[<p>Recently I had an unusual but intriguing question posed by a work colleague. Could I create some sort of bot to scan sites relevant to some keywords and market area specified by a client so the client could keep an eye on current events in their field. On first look I almost dismissed it, then i thought about it for a while&#8230;</p>
<p>How about a facility inside their <a href="http://wildfirecms.com"><span class="caps">CMS</span></a> which would let them list these keywords and then some how from these keywords pull back a list of appropriate websites. Then from this list (and of course allowing users to add some more of their own) search for pages containing another set of keywords and then using some statics track the rise and fall of these keywords over a set duration.</p>
<p>Not a bad idea i thought, so i looked into implementing it and came across another great utility provided by yahoo. Yes it&#8217;s another api, but this one is useful. The web search <span class="caps">REST</span> service allows anyone to query yahoo&#8217;s search engine, specifying all sorts of parameters and retrieve the results in multiple formats including serialised php and xml.</p>
<p>Great! Now all I need is the client to agree to it and I&#8217;ll be making a meta search engine.</p>]]></description>
    <pubDate>2007-11-17T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[XKCD - 1337]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2007/11/10/xkcd-1337.html]]></link>
    <description><![CDATA[<p>One of my regular online reads along with the long standing <a href="http://www.dilbert.com">Dilbert</a> is a web comic called <a href="http://xkcd.com">xkcd</a>. It&#8217;s very geeky, but lots of fun. Recently they have just produced some of the funniest issues ever in the shape of a 5 part monster about the way of the hacker.p. Anyway, the links are:<a href="http://xkcd.com/341/">Part 1</a><a href="http://xkcd.com/342/">Part 2</a><a href="http://xkcd.com/343/">Part 3</a><a href="http://xkcd.com/344/">Part 4</a><a href="http://xkcd.com/345/">Part 5</a></p>]]></description>
    <pubDate>2007-11-10T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[iPhone UK Launch]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2007/10/29/iphone-uk-launch.html]]></link>
    <description><![CDATA[<p>The time is here, the iPhone is now available in the UK! Now I might be a burgeoning Mac fan boy but even I wont pay the best part of &pound;300 for a phone regardless of how cool it is.</p>
<p>When it gets to a sensible price level (ie free or very cheap on contract like most phones) and has 3G facilities instead of <span class="caps">EDGE</span> with a larger hard drive then I will definitely have one!</p>]]></description>
    <pubDate>2007-10-29T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[It Lives!]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2007/10/16/it-lives.html]]></link>
    <description><![CDATA[<p>After many months of putting it off and getting distracted (dam WoW!) I have finally put some time in and got my new site sorted&#8230; Well, mostly</p>
<p>Lets start at the beginning; I am one of the developers working on a new php framework called <a href="http://php-wax.com">php-wax</a>. I won&#8217;t get into details in this post (please see another post &#8211; when i write it!) but basically it does what rails did for ruby. Once the framework got to a certain point we started to develop a <span class="caps">CMS</span> system to go with it to allow simple updating of content and make everyday minor updates simple.</p>
<p>This new site is an example of how flexible these can be and lots nicer then messing around trying to hack wordpress to do something new. Two big changes to the standard combination are the custom comments module and an alteration to how the content is found, allowing categories to be used in a similar fashion to the sections list</p>
<p>On a side note the home page also uses some cool javascript and php-wax&#8217;s flickr <span class="caps">API</span> (something I wrote a while back, ok for the basics not tried anything too daring with it yet) to create a slide show of my most recent photos. If this is well received I will probably use it and jmodal boxes on actual content pages</p>
<p>Anyway, where was I&#8230; The comments module is a custom module inserted into the <span class="caps">CMS</span>, hopefully I will get round to tidying it up and convert it into a plugin to make future use nice and easy.</p>
<p>That is one of the great features of php-wax, the fact you can run one simple command and do lots of great things. This ranges from installing plugins to deploying the website onto a live server. Anyway, thats enough talk about the technology of the site and time to move onto its purpose</p>
<p>As with every web developer I&#8217;m only as good as my last site, so I&#8217;ll be adding a portfolio section to showcase what I&#8217;ve been working on along with the usual sport and hobbies.</p>]]></description>
    <pubDate>2007-10-16T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Anthony Collins Extranet]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/10/13/anthony-collins-extranet.html]]></link>
    <description><![CDATA[<p>For Anthony Collins we created a fully functional extranet to allow them to create a completely unique website for each client. The site is a fairly simple affair with a javascript tree based on a ul with some nice touches like an accordion to show pages with in the section and so on.</p>
<p>In order to make the site customised for each client the entire site content is filtered by which client is logged in. In order to speed up making client ares I developed a templating system with creates a basic set of pages and documents on client creation.</p>
<p>When making the client simply select what type of client it is (local government, housing associations etc) from the template list and the appropriate set of web pages are created for the new client.</p>]]></description>
    <pubDate>2007-10-13T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Walsall Children's Services Directory]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/09/02/walsall-childrens-services-directory.html]]></link>
    <description><![CDATA[<p>A very <a href="http://walsallchildrensservices.com">unique website custom built for Walsall Council</a>. From a content point of view it has over 900 services online at the moment and more coming and users being able to submit new services to the administration team for approval.</p>
<p>When you also factor in the number of outbound links and themed sections then you can imagine just how big this site is. In order for the client to keep all of this under control the entire site is ran via an early version of the Wildfire <span class="caps">CMS</span>.</p>]]></description>
    <pubDate>2007-09-02T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Clarke Dove]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/08/19/clarke-dove.html]]></link>
    <description><![CDATA[<p>Another Willis Commercial Network broker. A straight forward <a href="http://clarkedove.co.uk"><span class="caps">CMS</span> site</a> with a contact us page (including a google map).</p>]]></description>
    <pubDate>2007-08-19T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Powell Insurance Brokers]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/07/19/powell-insurance-brokers.html]]></link>
    <description><![CDATA[<p><a href="http://www.pibl.co.uk">Another broker</a> from the Willis Commercial Network. Fairly standard Wildfire <span class="caps">CMS</span> site with a few extras. In this case the quotes shown on the right hand side of the website are randomised and they now have a special events module within the <span class="caps">CMS</span>.</p>
<p>On an event page the person can submit their details to confirm that they are coming. All people that have submitted their details are viewable within the <span class="caps">CMS</span> and can be exported in the form of a csv.</p>
<p><span class="caps">EDIT</span> (14 Oct 2009): It seems they have been bought out by another insurance group so no longer have a website!</p>]]></description>
    <pubDate>2007-07-19T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 - USA 2007 (Second win for Lewis!)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/motorsport/2007/06/17/f1-usa-2007-second-win-for-lewis.html]]></link>
    <description><![CDATA[<p><a href="http://www.formula1.com/news/headlines/2007/7/6548.html">Full review here</a></p>]]></description>
    <pubDate>2007-06-17T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 - Canada 2007 (Hamilton's First Win!)]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/motorsport/2007/06/10/f1-canada-2007-hamiltons-first-win.html]]></link>
    <description><![CDATA[<p>Rookie star Lewis Hamilton realised the dreams of a lifetime in Montreal on Sunday, storming to his first Formula 1 victory after dishing out a lesson in composure to his more experienced rivals in the most trying of conditions.</p>
<p>The British sensation withstood everything that the afternoon&#8217;s action could throw at him to take a fantastic maiden victory in just his sixth F1 race on Canada&#8217;s Circuit Gilles Villeneuve.</p>
<p>There were four safety cars periods, the difficulties of driving on an increasingly treacherous track and constant order changes behind him to deal with &#8211; but Lewis kept his head throughout to take a flawless win.</p>
<p>The wild race, which featured a horrifying accident for <span class="caps">BMW</span> Sauber driver Robert Kubica, made fellow championship Fernando Alonso and Ferrari&#8217;s Kimi Raikkonen look like the rookies.</p>
<p>But while the established stars faltered, Hamilton added the most important chapter in his F1 story so far and now leads the championship ahead of Alonso by eight points.</p>
<p>Indeed the contrasting fortunes of the two McLaren drivers were settled at the start.</p>
<p>Hamilton was slower away off the line than his team-mate and Alonso looked set to sweep around the outside of the sister MP4-22 going in to turn one.</p>
<p>But in a mistake reminiscent of his one at last month&#8217;s Spanish Grand Prix, Alonso out braked himself and was forced to cut across the grass at the turn two hairpin.</p>
<p>Crucially the mistake dropped the double world champion behind the <span class="caps">BMW</span> of Nick Heidfeld, allowing Hamilton the opportunity he needed to dictate the race from the front.</p>
<p>And that&#8217;s where he would stay, despite all that one of the most chaotic races in recent years served up.</p>
<p>By the end of lap one, the Briton was 1.5 ahead of Heidfeld, with Alonso stuck behind the German.</p>
<p>However rather than climbing all over the back of the <span class="caps">BMW</span>, the Spaniard was consistently around two seconds behind it for the opening 10 laps while his team-mate was waltzing away at the front.</p>
<p>No doubt frustrated by his predicament, on lap 15 Alonso made his second mistake at turn one, running across the grass and losing a further two seconds to his team-mate.</p>
<p>The world champion though would surely ensure he wouldn&#8217;t make the same mistake for a third time though, right?</p>
<p>Well, amazingly, it wasn&#8217;t as just three la</p>
<p>later he slid across the turn one grass again, but this time the mistake was even more costly as it allowed Massa to nip inside the McLaren and nab third place.</p>
<p>But in the next few laps the whole complexion of the race changed.</p>
<p>Hamilton pitted on lap 22 and looked set to continue on his way until his old F3 Euroseries team-mate and friend Adrian Sutil threw a spanner in the works &#8211; or rather threw his Spyker hard in to the turn four wall.</p>
<p>The incident brought out the safety car just seconds after Hamilton had rejoined, eroding his comfortable lead.</p>
<p>While Nick Heidfeld remained a threat, he soon didn&#8217;t have to worry about Alonso, who along with Nico Rosberg, made his first pit stop when their respective teams wrongly thought the pit lane was still open.</p>
<p>The pair were immediately placed under investigation by race control and were soon handed a 10s stop-go penalty &#8211; which they would serve later.</p>
<p>More drama befell Massa and Renault&#8217;s Giancarlo Fisichella when the pit lane was reopened.</p>
<p>As they made to rejoin the circuit, they jumped a red light at the exit of the pit lane &#8211; an infraction that would later see both black-flagged from the race with just 19 la</p>
<p>to go.</p>
<p>The next man along, Kubica, did obey the lights, but the Pole was soon the unfortunate passenger in a terrifying accident.</p>
<p>On lap 27, when the race went green, the <span class="caps">BMW</span> driver had enormous crash after touching the right-rear wheel of Jarno Trulli&#8217;s Toyota while heading towards the hairpin flat-out at 180mph.</p>
<p>The impact launched Kubica&#8217;s F1.07 into a massive impact with the concrete wall, before it slewed back across the track, rolled, and finally came to rest against the guardrail on the outside of the hairpin.</p>
<p>The safety car was immediately dispatched once again to allow medics to attend to the Pole and marshals the chance to clear the huge amounts of debris littering the circuit.The accident cast a menacing cloud over the afternoon, but miraculously Kubica was awake and alert when he was taken to the circuit medical centre.</p>
<p>He was airlifted to hospital and the team later confirmed that he was uninjured.</p>
<p>When the race resumed on lap 33, leader Hamilton immediately picked up from where he had left off and left Nick Heidfeld standing when the safety car pulled in to build an immediate three-second advantage.</p>
<p>But the safety car was to make two more appearances still, just to make Lewis&#8217; life a bit more difficult.</p>
<p>The first came on lap 50 after Christijan Albers became the second driver to spread orange carbon fibre debris following an off-track moment.</p>
<p>Then just six la</p>
<p>later Tonio Liuzzi, on course for a healthy haul of points for Toro Rosso, added his name alongside the likes of Michael Schumacher, Damon Hill and Jacques Villeneuve by ploughing into the infamous wall at the final turn.</p>
<p>But while Liuzzi may not be a champion yet, one man who looks set to be, maybe even this season, is Lewis Hamilton &#8211; who after what must have seemed the longest afternoon of his life crossed the line to take a magnificent first F1 victory.</p>
<p>Heidfeld, who had been the McLaren drivers&#8217; closest challenger all afternoon, picked up BMW&#8217;s best result since it bought the Sauber team at the end of 2005, with a superb second place.</p>
<p>Undoubtedly the biggest winner from the madness was Alex Wurz who from 19th on the grid ke</p>
<p>his head above the confusion to come home a remarkable third.</p>
<p>The result ended Williams&#8217; two-year podium drought and was the prefect way for the likeable Austrian to celebrate the 10-year anniversary of his F1 debut.</p>
<p>It was also a landmark day for Renault&#8217;s Heikki Kovalainen, who despite all the trails and tribulations of his weekend up until Sunday, came through from the back of the field to claim fourth place, his own F1 high so far.</p>
<p>Raikkonen was perha</p>
<p>lucky to end up fifth after a scrap</p>
<p>performance in which he never lived up to his &#8216;Iceman&#8217; nickname.</p>
<p>The Finn, whose championship challenge is slipping away by the race, touched the back of team-mate Massa at the first turn and then survived queuing behind the Brazilian while pitting under the safety car and several other misadventures.</p>
<p>Raikkonen&#8217;s four points were all Ferrari had to show from a weekend in which it once again was unable to challenge the now dominant McLarens.</p>
<p>Then to cap a quite extraordinary afternoon, Takuma Sato pulled off something that you thought you would never witness &#8211; a Super Aguri passing a McLaren on merit.</p>
<p>The McLaren was the double world champion of Fernando Alonso, no less, whose nightmare afternoon ended with a demotion to seventh place after the feisty Japanese ace out braked the Spaniard into the final chicane.</p>
<p>The final point went to Toyota&#8217;s Ralf Schumacher, who himself was a late victim of the Sato charge.</p>
<p>But the day belonged to super Lewis after what will surely be the first win of many.</p>
<p>Laziness has caught hold once agin, this is an edited report taken from <a href="http://itv.com/f1">itv</a></p>]]></description>
    <pubDate>2007-06-10T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 - Monte Carlo 2007]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/motorsport/2007/05/27/f1-monte-carlo-2007.html]]></link>
    <description><![CDATA[<p>Fernando Alonso regained the lead of the world championship beating Lewis Hamilton in a 1-2 for the McLaren team.</p>
<p>The silver cars were in a class of their own throughout, routinely lapping a second faster than the opposition and leaving Ferrari&#8217;s Felipe Massa trailing home nearly a whole lap behind in third place</p>
<p>Despite some acrobatic and at times heart-stopping driving with an oversteering car, Lewis was unable to get past Alonso</p>
<p>The fact that he looked downbeat after his fifth podium finish in as many F1 starts was a measure of just what an astoundingly good job he has done so far, and how high expectations have been raised</p>
<p>Alonso and Hamilton both got away well from the front row, the Briton crossing over to the right-hand side to cover any challenge from Massa and slotting in behind his team-mate before the first corner</p>
<p>A set of super-soft tyres propelled Nick Heidfeld off the line and the German put a muscular move on Nico Rosberg to grab fifth behind Giancarlo Fisichella&#8217;s Renault</p>
<p>All 22 cars made it round the first lap but Vitantonio Liuzzi got out of shape at Massenet at the start of lap two and buried his Toro Rosso in the barrier</p>
<p>His MP4-22 had not been handling quite to his liking and a tyre pressure adjustment at the pit stop had not cured the problem</p>
<p>By the time Alonso stopped for the second time on lap 51, he had 11 seconds in hand</p>
<p>It was too much for Hamilton to overcome, particularly since it transpired that he was pitting just two laps later although a leisurely out-lap from Alonso made it a lot closer than it might have otherwise been</p>
<p>In fact, over the next few laps Alonso allowed his lead to dwindle to as little as 0.7s</p>
<p>Did he have a problem? Or having made his statement when he needed to was he simply moderating his pace to ensure no mishaps on the way to the chequered flag?</p>
<p>Alonso relaxed his pace a little and the silver cars held station until the finish</p>
<p>After initially keeping the McLarens in sight, Massa had a lonely afternoon holding down an ever more distant third place</p>
<p>The Brazilian crossed the line one minute and nine seconds behind Alonso</p>
<p>Fisichella also ploughed his own furrow in fourth, but this result beating both <span class="caps">BMW</span> Saubers on merit was a morale-booster for the Renault squad, suggesting that the world champion team is gradually regaining lost competitiveness</p>
<p>Robert Kubica parlayed a 45-lap opening stint and a single pit stop into fifth place, leapfrogging his team-mate Heidfeld who ran a less conventional one-stop strategy with a short first stint on super-soft tyres followed by a long run to the flag</p>
<p>Alex Wurz took seventh for Williams, his first points-scoring finish since his return to grand prix racing this year</p>
<p>The Austrian fought a successful rearguard action to keep Kimi Raikkonen at bay throughout the closing stages</p>
<p>Starting from a lowly 16th after his qualifying mishap, Raikkonen made a good start to move up four places but thereafter couldn&#8217;t break free of the midfield traffic</p>
<p>Scott Speed took a worthy ninth place for Toro Rosso, capitalising on an excellent getaway and solid pace thereafter</p>
<p>The two Hondas both fell back a place from their grid berths to finish 10th (Rubens Barrichello) and 11th (Jenson Button) after the Japanese team chose an unorthodox two-stop strategy with a short final stint on super-soft tyres</p>
<p>Rosberg&#8217;s fine qualifying performance came to nothing as Williams&#8217; strategy backfired and he spent much of the race stuck behind slower cars, ultimately finishing down in 12th</p>]]></description>
    <pubDate>2007-05-27T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[House of Fraser Club]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/05/23/house-of-fraser-club.html]]></link>
    <description><![CDATA[<p>The new <a href="http://houseoffraserclub.co.uk">membership site</a> for House of Fraser was mostly made by my colleague <a href="http://www.coffeerings.co.uk">John Walker</a>, I helped with the original layout and css.</p>
<p><span class="caps">EDIT</span> (Aug 12 2009): Looks like that site has been turned off and now longer in use. Not really a shock as employers at the time (<a href="http://waa.co.uk"><span class="caps">WAA</span></a>) lost the contract.</p>]]></description>
    <pubDate>2007-05-23T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 - Spain 2007]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/motorsport/2007/05/13/f1-spain-2007.html]]></link>
    <description><![CDATA[<p>Felipe Massa denied the Barcelona crowd the result it was looking for by dominating the Spanish Grand Prix from lights to flag for his second consecutive victory &#8211; as Lewis Hamilton became Formula 1&#8217;s youngest ever championship leader</p>
<p>Massa never looked back after emerging on top from a first-corner skirmish with McLaren&#8217;s Fernando Alonso, which sent the home hero scampering across the gravel and down to fourth place &#8211; an incident he never recovered from</p>
<p>And while the world champion endured a race-long struggle, his team-mate Hamilton upstaged him for the second race running by scoring another superb second place finish</p>
<p>The result gives the 22-year-old rookie sole possession of the world championship lead after just four grands prix another extraordinary milestone</p>
<p>Polesitter Massa set the tone for his dominant display at the start by coming out on top after going wheel-to-wheel with Alonso going in to the first turn</p>
<p>Both had got away well from the front row, but it was the world champion, no doubt spurred on by his passionate fans, who looked set to take the lead as he tried to brave it round the outside of the Ferrari through turn one</p>
<p>However Massa held firm on the inside of the corner and the pair touched, forcing Alonso across the gravel and nearly into the path of his team-mate Hamilton and Raikkonen as he hurriedly rejoined the track</p>
<p>Alonso&#8217;s first corner move was a gamble that totally backfired, leaving him with a damaged car and a mountain to climb</p>
<p>He tried to pass Raikkonen on the outside at turn 10 on the next lap, but was forced to settle into fourth place</p>
<p>The first lap action had not all been at the front, as there was further chaos in the midfield</p>
<p>As Giancarlo Fisichella, Anthony Davidson and Ralf Schumacher battled at turn 10, the following Alex Wurz was unsighted and smashed his Williams into the back of Schumacher&#8217;s Toyota shattering his FW29&#8217;s front suspension and forcing him in to retirement</p>
<p>The incident also forced the Toyota driver in for an unscheduled stop a double blow for the Japanese squad after Jarno Trulli&#8217;s car had developed a fuel pump problem at the end of the formation lap</p>
<p>At the front, Massa rapidly pulled away from Hamilton &#8211; who had outdragged Raikkonen at the start &#8211; with a succession of fastest laps</p>
<p>He was six seconds clear by the end of lap 10</p>
<p>But his team-mate Raikkonen ?%u20AC%u201C who had been hovering around a second behind Hamilton for the first nine laps suddenly struck electrical problems and slowed</p>
<p>The Finn limped back to the Ferrari garage and into his first retirement of the season a huge blow to his world championship aspirations</p>
<p>Raikkonen&#8217;s demise came amid a series of retirements in the opening 10 laps</p>
<p>Red Bull&#8217;s Mark Webber (hydraulics) and Trulli had already pulled in to the garage before the right rear tyre on Scott Speed&#8217;s Toro Rosso spectacularly blew out on Catalunya&#8217;s main straight</p>
<p>Meanwhile up front Massa had pulled out a 9.5s advantage by the time of his first pit stop on lap 19</p>
<p>But for a few nervous moments all that effort looked as though it might have been in vain as an overfill on the fuel caused a flash fire on his Ferrari</p>
<p>Luckily for the Brazilian, however, the conflagration did little damage and he was able to get back on the pace at the start of his second stint</p>
<p>Massa was followed into the pits by the man who started alongside him on the front row, Alonso, but the Spaniard was now already out of the reckoning for a home victory</p>
<p>But he then gambled for a second time by opting to take on the harder compound tyres for the second stint in a bid to claw back lost ground ?%u20AC%u201C a decision that would see him fall further back from the top two and in to the clutches of the chasing pack behind</p>
<p>Within a few laps, the Spaniard was only a couple of seconds ahead of BMW&#8217;s Robert Kubica, enjoying by far his best weekend of the season, with Red Bull&#8217;s David Coulthard running close behind in fifth</p>
<p>Lewis, as he hinted to <span class="caps">ITV</span> Sport following qualifying, did indeed have more fuel on board than both his team-mate and Massa, pulling in for service three laps later than they had</p>
<p>This allowed him to close to within eight seconds of his Ferrari rival, but it proved to be a false dawn as despite the fire, Massa increased his lead further in the race&#8217;s second stint</p>
<p>By the time of the final round of stops, Massa &#8211; who again was the first of the leading runners to pit &#8211; had a virtually insurmountable 19.3s advantage in his pocket</p>
<p>Hamilton ran longer on the fuel, by four laps, and although he used the extra laps on the softer compound to claw back some ground, he still emerged from his second stop 11s adrift</p>
<p>From here Massa managed the gap to the young Briton in the final 20 laps, eventually crossing the line 6.7s ahead of F1&#8217;s youngest-ever world championship leader</p>
<p>Alonso&#8217;s lacklustre afternoon ended with a distant third, with Kubica picking up a solid five points for fourth after an impressive weekend</p>
<p>He would have had a close race with his <span class="caps">BMW</span> team-mate Nick Heidfeld had the German not been waved out of his first pit stop before his right front wheel was properly attached</p>
<p>Heidfeld had to tip-toe back around to the pits for the wheel to be secured, and later retired with gearbox failure</p>
<p>Another driver to star was Coulthard who scored his best result since his podium in last year&#8217;s Monaco GP, although the Scot had a nervy final five laps after his RB3 lost a gear</p>
<p>This allowed Nico Rosberg a shot at trying to steal fifth place for Williams, but he ran out of laps and had to settle for sixth</p>
<p>Heikki Kovalainen underlined his growing confidence with seventh and at times was even the fastest driver on the track, but his race was marred by a fuel rig problem that forced both Renaults to make additional stops</p>
<p>Probably the happiest team in the whole paddock was Super Aguri, who at the 22nd attempt finally scored its first F1 point thanks to Takuma Sato</p>
<p>Sato took advantage of a late splash-and-dash fuel stop from Fisichella to take eighth place and no doubt sent his massed ranks of Japanese supporters wild back home</p>
<p>But in contrast to the 140,000 Spaniards in the Barcelona grandstands, their own home hero had not quite delivered the result they had been looking for.</p>]]></description>
    <pubDate>2007-05-13T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Cherry Picked Insurance]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/05/06/cherry-picked-insurance.html]]></link>
    <description><![CDATA[<p>The new <a href="http://www.cherrypickedinsurance.com/">flagship website for the Willis Commercial Network</a> for the UK. This site has news, services and a comprehensive list of all of its members.</p>
<p>In the development of this website the first postcode search for the <span class="caps">PHP</span>-<span class="caps">WAX</span> framework was created and used so people can simply enter in their postcode and be shown the six nearest brokers. This functionality was converted into a plug-in for future use.</p>
<p>This site was also the first site to use a member subscription system for notifications and has the prototype models for this which since then has been generalised and integrated into the Wildfire <span class="caps">CMS</span>.</p>
<p>I worked on the initial design and phase one with my colleagues Ross Riley and <a href="http://mentalreality.co.uk">Joe Turner</a> where phase two (the integration of a quoting engine <span class="caps">API</span>) is being worked on by <a href="http://www.coffeerings.co.uk">John Walker</a>.</p>
<p><span class="caps">EDIT</span> (Sept 10 2009): From what I&#8217;ve heard phase two is now actually live! :-o</p>]]></description>
    <pubDate>2007-05-06T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 - Bahrain 2007]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/motorsport/2007/04/15/f1-bahrain-2007.html]]></link>
    <description><![CDATA[<p>Felipe Massa finally kick-started his 2007 title challenge with victory in the Bahrain Grand Prix, while Lewis Hamilton continued the dream start to his Formula 1 career with another accomplished runner-up finish.</p>
<p>Massa atoned for his schoolboy error in Malaysia with a perfectly judged performance, but he was harried for much of the afternoon by the astounding Hamilton, who edged tantalisingly closer to a maiden win.</p>
<p>The 22-year-old Briton etched his name in the F1 record books by becoming the first driver to finish on the podium in each of his first three grands prix.</p>
<p>Into the bargain, he moved into a three-way tie with Fernando Alonso and Kimi Raikkonen for the lead of the world championship.</p>
<p>Although he regained the points lead, Raikkonen was less than satisfied after finishing more than 10 seconds adrift of his winning team-mate in third place.</p>
<p><span class="caps">BMW</span> Sauber&#8217;s Nick Heidfeld broke McLaren and Ferrari&#8217;s stranglehold on the top quartet of places with another impressive drive to fourth, the highlight of which was a skilful passing manoeuvre on Alonso.</p>
<p>That left the double world champion, who was outperformed by his rookie team-mate all weekend, to settle for fifth.</p>
<p>Massa got away well from pole position, while from the dirty side of the track Hamilton found enough traction to hold second place into the first corner.</p>
<p>From the second row, Alonso outdragged Raikkonen and the Ferrari only just kept the McLaren at bay at turn one.</p>
<p>Alonso carried more momentum through the tight complex and muscled ahead on the approach to turn four to snatch third place</p>
<p>Moments later the safety car was deployed following a melee at turn four which eliminated Jenson Button&#8217;s Honda and the Toro Rosso of Scott Speed</p>
<p>At the restart Raikkonen was caught napping, crossing the line a long way behind the top three, who were in nose-to-tail formation</p>
<p>Hamilton feinted to the inside of Massa approaching turn one but thought better of any outlandish move and tucked back into line</p>
<p>These two immediately established a cushion over Alonso, who soon had the fast-closing Raikkonen filling his mirrors</p>
<p>The die was cast for the opening stint, with an increasingly large margin opening up between the Massa/Hamilton and Alonso/Raikkonen battles</p>
<p>Alonso was visibly struggling with the handling of his MP4-22, locking wheels and missing apexes with uncharacteristic frequency â%u20AC&quot; but Raikkonen was never quite able to pounce</p>
<p>As a result, Kimi found himself being chased by Heidfeld&#8217;s <span class="caps">BMW</span> Sauber, which had remained within surprisingly close range early on and was now closing in on the battle for third</p>
<p>Massa and Hamilton continued to trade fastest laps all the way up to the first pit stops, the Ferrari driver edging away on one lap only for the McLaren man to reel him in again the next</p>
<p>It was an absorbing duel, and such was Hamilton&#8217;s relentless focus that it was easy to forget it was but his third F1 start</p>
<p>Lewis was the first of the front-runners to pit and McLaren put both him and Alonso (who took on service three laps later) onto a long middle stint in a bid to turn the tables on Ferrari</p>
<p>The tactic didn&#8217;t pay off, as Massa turned up the wick on his scrubbed set of soft-compound tyres while both McLarens struggled for balance</p>
<p>Moreover, Raikkonen leapfrogged Alonso by pitting one lap later than him, which released him to hunt down second-placed Hamilton</p>
<p>With a front wing adjustment at his pit stop having cured his car&#8217;s understeer, Massa stretched his lead to 8.3s lap by lap 30, while Hamilton&#8217;s focus switched to fending off the other Ferrari of Raikkonen</p>
<p>Meanwhile Alonso&#8217;s race had really started to unravel</p>
<p>The Spaniard had his work cut out keeping the flying Heidfeld behind him and finally ceded the place when the <span class="caps">BMW</span> driver pulled off an audacious outside pass at turn four on lap 32</p>
<p>A little farther up the road, Raikkonen slowly but steadily whittled away the 5s gap to Hamilton until the pair were tied together by lap 40</p>
<p>But having handicapped him earlier, the long middle stint now worked in Lewis&#8217; favour as he was able to stay out for three more laps on a light fuel load â%u20AC&quot; thus continuing his remarkable record of leading each grand prix he has started</p>
<p>Coupled with a shorter final stop, it was enough to ensure that he retained second place, emerging from the pit lane comfortably in front of Raikkonen</p>
<p>Just as Massa&#8217;s lead seemed secure, there was another twist in this constantly fascinating race as it drew towards its climax</p>
<p>Hamilton found his McLaren was handling much better on the harder â%u20AC?%u0153prime&#8217; tyres he had taken on at his final pit stop, now free of the understeer that had bothered him in the middle stages</p>
<p>The Briton began to take substantial chunks out of Massa&#8217;s lead with each new lap, cutting it to 6.7s on lap 47 and 4.6s by lap 51</p>
<p>His progress was thwarted a little when Anthony Davidson&#8217;s Super Aguri expired in front of him and he had to navigate his way through the murky trail of oil â%u20AC&quot; but even on that lap, he trimmed the deficit by 0.2s</p>
<p>Ultimately, he ran out of laps, and Massa held on to take the chequered flag 2.3s ahead of his now regular sparring partner</p>
<p>When Hamilton put on his late spurt Raikkonen was unable to stay with him, finishing more than 8s in arrears</p>
<p>Alonso&#8217;s pace improved in the final stint and he closed back onto Heidfeld&#8217;s gearbox, but the German is one of F1&#8217;s coolest customers and was never likely to give his pursuer an opening</p>
<p>Robert Kubica could not match team-mate Heidfeld&#8217;s pace and almost alone of the 22 drivers, it seemed had a lonely time en route to sixth place and his first points of 2007</p>
<p>By rights, seventh place should have gone to David Coulthard, who drove his best race since scoring Red Bull&#8217;s first podium finish in Monaco last year</p>
<p>The Scot&#8217;s feisty charge from 21st on the grid was sadly halted by a broken driveshaft shortly after his second pit stop</p>
<p>Team-mate Mark Webber stepped into the breach, but his RB3 fell by the wayside five laps later</p>
<p>The demise of the Red Bulls promoted Jarno Trulli and Giancarlo Fisichella to the final points-paying positions</p>
<p>The Toyota driver had his hands full in the closing laps staving off his fellow Italian, who despite Renault boss Flavio Briatore&#8217;s animated exhortations over the radio was unable to find a way past.</p>]]></description>
    <pubDate>2007-04-15T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 Malaysia 2007]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/2007/04/08/f1-malaysia-2007.html]]></link>
    <description><![CDATA[<hr />
<p>layout: defaulttitle: F1 &#8211; Malaysia 2007category: motorsportkeywords:- motorsport- F1- 2007- Sepang- Malaysia- Hermann Tilke- heritage- Ferrari- Schumacher- Kimi Raikkonendescription: &#8220;Sepang was the first of the new generation of Hermann Tilke designed racetracks, and it made a big impression when it joined the Formula 1 calendar in 1999.&#8221;&#8212;-Sepang was the first of the new generation of Hermann Tilke-designed racetracks, and it made a big impression when it joined the Formula 1 calendar in 1999.With its wide expanses, sweeping corners and state-of-the-art facilities, the state-funded Malaysian circuit on the outskirts of Kuala Lumpur provided a blueprint for the many new grand prix tracks that would spring up in ever more diverse corners of the world over the next decade.It also gave an insight into the difficulties of establishing an F1 venue in a country with little motorsport heritage.But the organisers do not complain about the lack of a large and passionate crowd, instead seeing the grand prix as an excellent way to advertise Malaysia as an international tourist destination.Sepang&#8217;s first ever F1 race in &#8216;99 was its most memorable, as Michael Schumacher made a remarkable comeback after three months on the sidelines with a broken leg.He took pole position and dominated until handing victory to his title-chasing team-mate Eddie Irvine.Highlights of subsequent years included Kimi Raikkonen&#8217;s maiden win in 2003 and Jenson Button&#8217;s long-awaited first podium the following season.The circuits wide straights leading into tight corners have always prompted lively wheel-to-wheel racing &#8211; and inevitably some controversial collisions as well.</p>]]></description>
    <pubDate>2007-04-08T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Foster Leighton]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2007/04/05/foster-leighton.html]]></link>
    <description><![CDATA[<p>As part of the Willis Commercial Network we have created many broker websites and this is <a href="http://www.fosterleighton.com">another one</a>. The site is a simple Wildfire <span class="caps">CMS</span> website with a contact form and google map. On the index page the section marked as Cherry Picked News is a parsed <span class="caps">RSS</span> feed from the main Cherry Picked Site.</p>]]></description>
    <pubDate>2007-04-05T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[MS vi?]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/web/2007/03/20/ms-vi.html]]></link>
    <description><![CDATA[<p>See how things might have been if Microsoft had done vi! See <a href="http://blogs.sun.com/marigan/entry/how_the_vi_editor_would">here</a>.</p>]]></description>
    <pubDate>2007-03-20T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 Australia 2007]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/2007/03/19/f1-australia-2007.html]]></link>
    <description><![CDATA[<hr />
<p>layout: defaulttitle: F1 &#8211; Australia 2007category: motorsportkeywords:- motorsport- 2007- Ferrari- Mass- Kimi- Australiadescription: &quot;Start of a new season and Ferrari have got off to a cracking start. Not the best day for Massa (dropping to 20th after a gearbox change) but he did manage to get all the way up to 6th place and score some points. &quot;&#8212;-Start of a new season and Ferrari have got off to a cracking start. Not the best day for Massa (dropping to 20th after a gearbox change) but he did manage to get all the way up to 6th place and score some points.With a win for Kimmi the season looks good for the Ferrari faithful.Youngster Lewis Hamilton put in a sterling performance to get on the podium on his first outing into F1 and spent most of the race showing Alonso exactly why Ron Dennis has so much faith in him.Hopefully the points will keep coming for Lewis as with Button stuck in an under performing Honda he is the main British interest this season. Unfortunately that does come with all that pressure and hassle from the media; lets just hope they will leave him in peace to do this thing on the track.Other notable points: The MacLaren is still the most beautiful car on the track and this season seems to have some speed and substance to back up its looks. Wurz was almost decapitated by the under-tray of Coultards Red Bull in a daring (if slightly foolish) over taking attempt.</p>]]></description>
    <pubDate>2007-03-19T00:00:00-07:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Stunning Fully Functional 1:3 Scale Ferrari]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2007/02/05/stunning-fully-functional-13-scale-ferrari.html]]></link>
    <description><![CDATA[<p>There are few if any models in the world to rival the Ferrari 312PB built by Pierre Scerri. This 1:3 scale masterpiece is the real thing in every sense, from its operating 100cc 12-cylinder engine to the exact scale operating Ferrari gauges which are calibrated precisely to indicate rpm, oil pressure, water temperature and oil temperature.</p>
<p>Take a look at the youTube video <a href="http://www.youtube.com/watch?v=l3NVJ4pEFuY">here</a>.</p>]]></description>
    <pubDate>2007-02-05T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[New Robot Adapts to Injuries]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2007/01/24/new-robot-adapts-to-injuries.html]]></link>
    <description><![CDATA[<p>A newly designed robot can sense and recover from unexpected damages, an ability that is sure to prove handy in dangerous terrain, researchers announced today.</p>
<p>Take a look at the full story <a href="http://www.livescience.com/technology/061116_resillient_robot.html">here</a>.</p>]]></description>
    <pubDate>2007-01-24T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Linus Torvalds officially a Hero]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2007/01/16/linus-torvalds-officially-a-hero.html]]></link>
    <description><![CDATA[<p>According to <span class="caps">TIME</span> magazine, Linus Torvalds is one of the the greatest heroes of the last 60 years</p>
<p>And about time to! Take a look at the full story <a href="http://www.time.com/time/europe/hero2006/opener.html">here</a>.</p>]]></description>
    <pubDate>2007-01-16T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Flickr's Desktop Wallpaper Pool]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2007/01/14/flickrs-desktop-wallpaper-pool.html]]></link>
    <description><![CDATA[<p>Thousands of Flickr users have posted their favourite wallpaper photos. Some great ones on there that I use on my own machines!</p>
<p>Take a look <a href="http://www.flickr.com/groups/wallpapers/pool/">here</a>.</p>]]></description>
    <pubDate>2007-01-14T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Spirit Health Clubs]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2006/12/20/spirit-health-clubs.html]]></link>
    <description><![CDATA[<p><img src="/images/work/spirit-logo.gif" alt="" /></p>
<p>After a rush to get it all sorted the new <a href="http://spirit-fit.com">Spirit Health Club website</a> went live. This is running on a highly customised early version of the Wildfire <span class="caps">CMS</span> and <span class="caps">PHP</span>-<span class="caps">WAX</span> framework. The majority of the customisation relates to each club having separate admin logins with the ability to create unique pages, offers and news for their club.</p>]]></description>
    <pubDate>2006-12-20T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Bulldog Broadband]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2006/12/12/bulldog-broadband.html]]></link>
    <description><![CDATA[<p>Having endured many months of problems getting things connected and accounts activated (take a look at my earlier rant about utilities) I had become accustomed to pathetic customer services. However, Bulldog beat them all</p>
<p>Somewhere along the line the &#8216;big wigs&#8217; at Bulldog would of had to formulate a strategy for resolving customer queries. It looks like this meeting was a very short one. Their answer to everything; out source to India! Yes, thats right, another company jumping on that band wagon.</p>
<p>Due to restrictions imposed upon me by my landlord (no cable allowed:( ) I was left with very few choices for an <span class="caps">ADSL</span> provider. I opted for the best of a bad bunch, Bulldog. That is when things started to go wrong.</p>
<p>The connection took 6 weeks to be sorted, instead of the maximum of 4 stated on the website and on the letter. Strike 1!</p>
<p>Fitting day came, credit where credit is due, the engineer was early and switched on the socket nice and quickly. Now according to the letters, emails and the assurances of the fitter, the line should be active within 4 hours.</p>
<p>Five hours later, nothing. Time to call the helpline.</p>
<p>Strike 2! Useless in the extreme. With great lines like &#8220;if you want to complain about your lack of internet connection you will need to send an email to&#8230;&#8221; and &#8220;have you checked your connection status online?&#8221; it is difficult for me to comprehend how these people survive.</p>
<p>At this point I was getting somewhat annoyed, clearly those &#8216;bigwigs&#8217; who made these procedures lack some common sense. How exactly do you send an email or look at a website when they haven&#8217;t got round to pulling their collective finger out and switching on my line!</p>
<p>I called back later on in the evening before the so called &#8220;support&#8221; line closed. Strike 3 and in a big way! This time the idiot on the other end claims &#8220;if it is not on now sir, it probably wont be until monday&#8221;. Time to get the supervisor!</p>
<p>After a brief vent of some more choice points that I wanted them to fully understand in no uncertain terms (mostly arguments about them lying in their correspondence and delaying of services equating to breaches of contract) I calmed down slightly.</p>
<p>In hindsight the most worrying and down right rude part of this escapade was that not a single member of the support staff ever apologised or even showed the slightest form of remorse. Yes, I was at times slightly abrupt, but only because I was getting nowhere!</p>
<p>Maybe in the future those same &#8216;big wigs&#8217; will sit down and decide that if their customer service was better and actually helpful they might shrug off the bad image, get more customers and make money that way instead of cutting corners by giving everything to the lowest bidder.</p>
<p>At the moment, my internet connection is running well and I have no complaints about that thankfully, as I really do not relish having to speak to &#8220;support&#8221; again!</p>
<p>Rant over and out .. for now..</p>]]></description>
    <pubDate>2006-12-12T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[My Mac and I]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/general/2006/12/03/my-mac-and-i.html]]></link>
    <description><![CDATA[<p>Until recently I&#8217;d barely even looked at a Mac. I used to be under the common miss-conception that they were only any good for design and looking pretty.</p>
<p>Plying my trade using mostly Linux, Windows and the odd Unix systemI was always a fan of the stability and security of the &#8217;Nix way. On the other side the compatibility and of course the plethora of games available on Windows is a draw.</p>
<p>With OS X being based on FreeBSD there is a happy third alternative. I know this is a bit behind the times, but I&#8217;ve never quite got round to writing this before but this time I was spurred into writing this by my recent purchase. A Mac Mini!</p>
<p>I couldn&#8217;t help it, its small, perfectly formed and more powerful then my tower PC! With top class software, great compatibility and some amazing games I cant think of a reason not to own a Mac any more. Especially now you can have two buttons on your mouse!</p>
<p>The fact is I&#8217;ve now completely converted, even to the extent where I use an iMac at work and an old PowerBook for a laptop.</p>
<p>Since owning my Mac I&#8217;ve really been enjoying using text mate. A truly wonderful piece of editing software, it comes with syntax highlighting and help files for virtually every single commonly used programming language. It even includes utilities for svn!</p>
<p>I know there are some down sides to using a Mac, but they are getting fewer all the time. I am now officially a Mac Fan!</p>
<p>Now where did I put my ipod&#8230;. ;)</p>]]></description>
    <pubDate>2006-12-03T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[F1 Season Review: 2006]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/motorsport/2006/11/27/f1-season-review-2006.html]]></link>
    <description><![CDATA[<p>The many twists and turns of the 2006 F1 championship lead to an intriguing end. With the retirement of undoubtedly the greatest driver of the modern age (regardless of his misdemeanours) it would have been poetic justice if he&#8217;d gone out in style by winning an 8th title.</p>
<p>However, this was not the case. With only a few races remaining it was a very close call between Schumi and Alonso; unfortunately a rare engine failure gifted it to Alonso.</p>
<p>If you look back though the season then maybe you could point out some mistakes (by Ferrari and Michael) that cost points and possibly even the championship. But this would take away from the astounding performances and pure driving genius that he graced us with this year and during his illustrious career.</p>
<p>On several occasions &#8220;the master&#8221; shocked us with brilliant over taking, amazing grit and determination along with stunning race performances. In some cases coming from the tail end of the grid to get his car in the points!</p>
<p>Unfortunately there were some lows. One in particular might cast a shadow of disapproval over his last season, maybe even his entire career. The incident at Monte Carlo. Tactical, yes, sportsman-like, no.</p>
<p>If it had worked, it would have been great for Ferrari. But it didn&#8217;t.</p>
<p>Incidents like this occurred though out his career. That is the flaw of the champion. The desire to win at all costs, regardless of others.</p>
<p>Should we persecute him for this? No, after all he is only human and we all make mistakes. Thankfully for most of us 10 million plus people aren&#8217;t watching us when we make them.</p>
<p>Whether you love him or loath him, the sport wont be the same without him. No offence to Alonso, but he just doesn&#8217;t have the same level of notoriety or skill as Michael. Without the 7-time champion the sport no longer has that exciting figurehead that inspires the fans.</p>
<p>With the rumour mill working over time, talk is already circulating about Michael going back to Renault for one last season, maybe even creating his own team with Ross Braun (the architect of many Shumi wins). Who knows what will happen (Bernie?), but I doubt we&#8217;ve seen the last of Michael Schumacer.</p>
<p>This season wasn&#8217;t just about the title race. With new winners and sterling performances from young drivers there is hope for next season.</p>
<p>Button winning his first race has to be one of the best moments this year for British motor sport. Massa out-qualifying his team mate on more then one occasion. Kimi moving to Ferrari. Alonso going to McClaren. 2007 should be an interesting year.</p>
<p>Go Ferrari!</p>]]></description>
    <pubDate>2006-11-27T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Public Transport - The Future?]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2006/11/21/public-transport-the-future.html]]></link>
    <description><![CDATA[<p>Living in my new flat I&#8217;m in the precarious position of being near to many forms of public transport. With bus stops as far as the eye can see and just beyond that is the train station.</p>
<p>During my university days I used public transport almost exclusively to get back and forth. Most of the time it was the train, which meant using New Street.</p>
<p>With thousands of trains coming and going day in day out there are bound to be the odd delay, which is acceptable. However, when these delays are caused by miss-management and poor control systems something needs to be done.</p>
<p>For many years there has been talk about giving New Street an overhaul. In the latest bout of proposals New Street gets another set of platforms, a lofty makeover and a sparkly lick of paint.</p>
<p>While this is great for the artisans amongst us the practical side of me wonders if these improvements will be more then skin deep. Will they finally dump the cash-sucking Windows and jump onto the OpenSource bandwagon?</p>
<p>Although I&#8217;m not a regular &#8220;user&#8221;, I must admit the bus service by me is annoyingly regular (all those buses driving by really messes with my tv reception!). With some nice new touches, such as location of where the next bus is and its eta, maybe buses are the way forward?</p>
<p>Or maybe not. Even if there were massive improvements to public transport, the chances are I&#8217;d still take the car!</p>]]></description>
    <pubDate>2006-11-21T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[Powered by Useless Utilities]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/rant/2006/11/16/powered-by-useless-utilities.html]]></link>
    <description><![CDATA[<p>You&#8217;d think that in this modern age of computers, the internet,inter-connectivity and nationalised databases that finding information about a property would be merely a few mouse clicks away.</p>
<p>How wrong could I have been!</p>
<p>After providing them with the complete address (not just a guessed one mind you, but the official full address straight from Royal Mail) surely finding the property would be easy.</p>
<p>Postcode, no luck there; full address; still can&#8217;t find it. What more do they want, the longitude and latitude? Eventually after hounding the letting agent I finally got hold of the previous account number and hey presto, they found it.</p>
<p>This problem was repeated at almost every one of the utility providers I contacted. Maybe it was something I was doing, but then how did other companies find my flat straight away?</p>
<p>After a little bit of investigation I found the crux of the problem. Approximately 18 months ago the building that is now my block of flats was a field.</p>
<p>It seems that these large, national companies simply weren&#8217;t updating their information. Why is this? Budget cuts? Poor practices? Laziness? Ignorance?</p>
<p>With an ever increasing demanding for new housing this seems a worrying trend. Does this mean that every new house or block of flats won&#8217;t appear on the books of basic utility provides for over a year?</p>
<p>Maybe it was just my flat; maybe I moved in in-between them updating their databases; maybe I&#8217;m just unlucky. If not, they really need re-evaluate their business practices and update! Well, that is my rant over for this week!</p>]]></description>
    <pubDate>2006-11-16T00:00:00-08:00</pubDate>		
  </item>

  <item>
    <title><![CDATA[LP Creative Crafts]]></title>
    <link><![CDATA[http://charlesmarshall.co.uk/work/2006/09/10/lp-creative-crafts.html]]></link>
    <description><![CDATA[<p>My first venture into the world of e-commerce with RoR. An on going project that regularly changes designs and offers with all of the products and sections controlled via a bespoke admin area.</p>
<p><span class="caps">EDIT</span> (Jan 20 2008): Unfortunately the company that ran this site suffered a tragedy leading to closure and sale; this meant the website was also shut down so I have removed the links.</p>]]></description>
    <pubDate>2006-09-10T00:00:00-07:00</pubDate>		
  </item>


  </channel>
</rss>
