<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CoffeePowered &#187; Development</title>
	<atom:link href="http://coffeepowered.co.uk/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffeepowered.co.uk</link>
	<description>The online ramblings of Paul Stanton</description>
	<lastBuildDate>Mon, 09 Jan 2012 08:36:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OAuth Consumer in CakePHP 2.0.5</title>
		<link>http://coffeepowered.co.uk/2012/01/oauth-consumer-in-cakephp-2-0-5/</link>
		<comments>http://coffeepowered.co.uk/2012/01/oauth-consumer-in-cakephp-2-0-5/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 08:35:50 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=728</guid>
		<description><![CDATA[Getting the CakePHP OAuth Consumer to work in CakePHP 2.0.5]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to note some tweaks I had to make to Daniel Hofstetter&#8217;s awesome <a href="http://code.42dh.com/oauth/">OAuth consumer component for CakePHP</a> to get it running in CakePHP 2.0.5</p>
<p>The cakephp_2.0-dev branch was throwing the following error for me when trying to use the Twitter OAuth API.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Consumer twitter_consumer.php not found!</div></td></tr></tbody></table></div>
<p>The relevant changes are available in my <a href="https://github.com/Stanton/oauth-consumer-component/tree/cakephp_2.0.5" title="Github">cakephp_2.0.5 branch on Github</a>.</p>
<h3>Changelog</h3>
<p><i>
<ul>
<li>Rename directories to match new conventions.</li>
<li>Change createConsumer method to use $className rather than $fileName to fix &#8216;Consumer twitter_consumer.php not found!&#8217; exception.</li>
<li>Use App::uses instead of App::import to fix &#8216;Fatal error: Class &#8216;HttpSocket&#8217; not found…&#8217; error.</li>
</ul>
<p></i></p>
<h3>Get the code</h3>
<p><a href="https://github.com/Stanton/oauth-consumer-component/tree/cakephp_2.0.5" title="https://github.com/Stanton/oauth-consumer-component/tree/cakephp_2.0.5">https://github.com/Stanton/oauth-consumer-component/tree/cakephp_2.0.5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2012/01/oauth-consumer-in-cakephp-2-0-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smarter images in Jadu CMS</title>
		<link>http://coffeepowered.co.uk/2011/09/smarter-images-in-jadu-cms/</link>
		<comments>http://coffeepowered.co.uk/2011/09/smarter-images-in-jadu-cms/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 18:17:35 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Jadu]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=665</guid>
		<description><![CDATA[An exploration into low impact development within a CMS, building lightweight functionality to improve how we use imagery within web pages that can be replaced as and when the platform evolves.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been looking at ways to enhance certain content types that we deliver through <a href="http://jadu.net">Jadu CMS</a>, my focus at the moment has been through the use of images within content, whether that be News, Events, Documents or Homepages. This started with a re-alignment of the news section on the <a href="http://www.leeds.ac.uk">University of Leeds&#8217; corporate website</a>.</p>
<h3>Multiple image sizes</h3>
<p>We&#8217;ve traditionally been hampered by the fact that Jadu doesn&#8217;t yet have the ability to generate multiple image sizes from a single base image so if I wanted to have a large document level image, and a smaller thumbnail within a list view, I&#8217;d either have to resize with CSS which results in degraded image quality in some browsers, or have the editors upload multiple versions of each image to the CMS and figure some way to switch between these programatically. Neither of these options were desirable, so we built an image helper that, instead of inserting the <img alt="" /> element directly into the front end script, we pass the image name to the helper, along with the desired attributes such as a specific height and/or width, the helper then resizes the native image, and caches it for future use.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">print</span> imageGenerator<span style="color: #009900;">&#40;</span><span style="color: #000088;">$imageURL</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'alt'</span> <span style="color: #339933;">=&gt;</span> getImageProperty<span style="color: #009900;">&#40;</span><span style="color: #000088;">$imageURL</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'altText'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'contentimage'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'width'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">340</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Take the <a href="http://www.leeds.ac.uk/news/30292/press_releases">UoL Press Releases news section</a>, for example, we can now elegantly deliver multiple image sizes depending on our needs, without either the bandwidth overhead of resizing large images, or the administration headache of managing multiple images within the CMS, and the image helper can be used anywhere in our front end templates.</p>
<blockquote><p>we can now elegantly deliver multiple image sizes depending on our needs, without either the bandwidth overhead of resizing large images, or the administration headache of managing multiple images within the CMS</p></blockquote>
<p style="text-align: center;"><a href="http://coffeepowered.co.uk/wp-content/uploads/2011/09/Screen-Shot-2011-09-02-at-18.48.53.png"><img class="size-full wp-image-694 aligncenter" style="border-style: initial; border-color: initial; border-width: 0px;" title="Screen Shot 2011-09-02 at 18.48.53" src="http://coffeepowered.co.uk/wp-content/uploads/2011/09/Screen-Shot-2011-09-02-at-18.48.53.png" alt="" width="520" height="236" /></a></p>
<h3>Image attribution</h3>
<p>The next issue I&#8217;ve been looking into recently is that of image attribution, again, Jadu doesn&#8217;t currently have any options within the multimedia gallery module to attach attribution data to multimedia items. If the UoL wants to use a Creative Commons licensed image, there&#8217;s no way, other than adding the attribution data into the body content. I figured there was a better way to do this.</p>
<p>The Multimedia Module within Jadu is the central place to manage all types of multimedia content, for this example I&#8217;ll focus on images. One of the core concepts of a CMS is that an image only needs to exist once, but can then be included in any other piece of content. The multimedia manager is a relatively recent addition to Jadu CMS, and as such, provides the bare minimum of features required so I needed to find a way to link attribution data to an image without modifying the core CMS code.</p>
<h3>Enter machine tags</h3>
<p>As we can apply tags to each image, this was a perfect place to use machine tags &#8211; a piece of text which contains machine-readable semantic information &#8211; to include the relevant licensing information. Machine tags are composed of three parts; a namespace, a predicate, and a value. For example:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">license:creativecommons=&quot;© 2009 Greg Grossmeier, used under a Creative <br />
Commons Attribution-ShareAlike license: <br />
http://creativecommons.org/licenses/by-sa/3.0/&quot;</div></td></tr></tbody></table></div>
<p>Initially, I hit a brick wall in that the &#8216;tag&#8217; column within the JaduMultimediaTags table was limited to varchar(50), a sensible default for most english word based tags but kills the chance of using machine tags which are typically longer. Frustrated, <a href="http://twitter.com/#!/stanton/status/108904319063048193">I moaned a bit on Twitter</a>, and within minutes had an email from <a href="http://twitter.com/ap49">@ap49</a> at Jadu asking what they could do to help, and later that night they&#8217;d modified the Jadu trunk to change the tag column to varchar(255) which is much more useful, for me at least!</p>
<p>So, armed with our enlarged tag column, I set about writing a function which would parse an images&#8217; tags for our license machine tag, extract the relevant components, and spit out some meaningful markup to the browser which we could style as needed. You can <a href="https://gist.github.com/599db38634c9ba2418d0">get the Image License function from GitHub</a>, in case it&#8217;s of use to anyone.</p>
<p>For the University of Leeds&#8217; corporate site, I wanted to include a small copyright, or creative commons symbol in the corner of the image, which would then expand to show the license detail when hovered over. I chose to use CSS for the hover animations rather than javascript and I&#8217;m quite pleased with the result. Modern browsers get a nicely animated transition and older browsers simply display the information on hover. The license function can be extended to provide the data in different formats depending on the content&#8217;s needs. For a homage widget like the one below, a subtle copyright icon works well, for images, illustrations or figures within a document we may prefer to list all of the attribution data at the foot of the document in a list of references.</p>
<p>Here&#8217;s the attribution implemented on our document image component:<br />
<video src="http://coffeepowered.co.uk/wp-content/uploads/2011/09/attribution.flv.video_.mp4" controls="controls"></video></p>
<h3>Low impact development</h3>
<p>Working in this way, we&#8217;re able to extend the functionality of the CMS without modifying the core product (which would complicate our upgrade cycle) because we&#8217;re making the assumption that these features will eventually be provided natively within the CMS. These functions enhance how we manage and use images, yet are lightweight enough to be stripped out and replaced by native functions if and when they become available.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2011/09/smarter-images-in-jadu-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://coffeepowered.co.uk/wp-content/uploads/2011/09/attribution.flv.video_.mp4" length="211086" type="video/mp4" />
		</item>
		<item>
		<title>Building a &#8216;killer coursefinder&#8217;</title>
		<link>http://coffeepowered.co.uk/2011/06/building-a-killer-coursefinder/</link>
		<comments>http://coffeepowered.co.uk/2011/06/building-a-killer-coursefinder/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 07:39:06 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Coursefinder]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[coursefinder]]></category>
		<category><![CDATA[jadu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=610</guid>
		<description><![CDATA[The video from the presentation I delivered at the CISG and Online Information conferences covering the University of Leeds' Course Finder, how and why it was developed, and ultimately, what I think we should be doing to make it truly a 'killer' service.]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/24728688?title=0&amp;byline=0&amp;portrait=0" width="560" height="315" frameborder="0"></iframe>
<p><a href="http://vimeo.com/24728688">Killer Course Finder</a> from <a href="http://vimeo.com/jadu">Jadu</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>This is a presentation I delivered at <a href="https://www.ucisa.ac.uk/en/groups/cisg/Events/2010/cisg2010.aspx">CISG 2010</a> in Brighton, and <a href="http://www.online-information.co.uk/online2010/conference.html">Online Information 2010</a> in London late last year. This was my first foray into public speaking and I had an absolute blast and received some great feedback from the attendees. This session covers Coursefinder, probably the project I&#8217;m personally most proud of, and is about 50% what&#8217;s been done so far, and 50% what I&#8217;d love to do next. (I do go on a bit of a rant at 16 minutes in).</p>
<blockquote><p>A university course finder is a phenomenally important tool, the internet makes it possible for a prospective student to evaluate courses from an array of Universities from the comfort of their bedroom, perhaps without ordering a printed prospectus<br />&hellip;perhaps without putting on trousers</p></blockquote>
<p>Big thanks to the guys and girls at <a href="http://www.jadu.net">Jadu </a>for the speaking opportunity and for producing the video.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2011/06/building-a-killer-coursefinder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working to a structured development process</title>
		<link>http://coffeepowered.co.uk/2011/01/working-to-a-structured-development-process/</link>
		<comments>http://coffeepowered.co.uk/2011/01/working-to-a-structured-development-process/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 16:15:25 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Project Management]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=570</guid>
		<description><![CDATA[You might work on small projects or large scale developments, you might be the only person involved or you might work with many others, regardless of your situation, having a structured development process is essential.
I work for the University of Leeds as a generalist designer/developer, a recent project of mine has been upgrading our institutional [...]]]></description>
			<content:encoded><![CDATA[<p>You might work on small projects or large scale developments, you might be the only person involved or you might work with many others, regardless of your situation, having a structured development process is essential.</p>
<p>I work for the University of Leeds as a generalist designer/developer, a recent project of mine has been upgrading our institutional Content Management System to the latest version of the software, a task which had an extremely tight timescale which was met by using a structured development process.</p>
<h3>My toolbox</h3>
<p>So let’s set the scene, I work within the Central IT Services’ Web Team and am the technical lead for the University of Leeds’ corporate website (www.leeds.ac.uk), this site runs on top of the Jadu Content Management System and was launched in September 2009. We have just performed a major upgrade of the core Jadu CMS which was turned around in a very short space of time, and it’s this upgrade project which is the basis for this post.</p>
<div id="attachment_576" class="wp-caption aligncenter" style="width: 310px"><a href="http://coffeepowered.co.uk/wp-content/uploads/2011/01/University-of-Leeds1.jpg"><img class="size-medium wp-image-576  " title="University-of-Leeds" src="http://coffeepowered.co.uk/wp-content/uploads/2011/01/University-of-Leeds1-300x239.jpg" alt="" width="300" height="239" /></a><p class="wp-caption-text">University of Leeds (www.leeds.ac.uk)</p></div>
<p>For those of you wanting to know which apps and tools I use, here’s a quick rundown:</p>
<ul>
<li>iMac 21.5″ 3.2GHz Intel Core i3</li>
<li><a href="http://macromates.com/">Textmate</a></li>
<li>Terminal</li>
<li><a href="http://www.mamp.info/en/index.html">MAMP</a> (local Apache/MySQL server)</li>
<li><a href="http://www.sequelpro.com/>Sequel Pro</a> (MySQL OSX user interface)</li>
<li><a href="http://git-scm.com/>GIT</a> (Version Control System)</li>
<li><a href="http://trac.edgewall.org/">Trac</a> (Project Management and Issue Tracking)</li>
</ul>
<h3>Project management tools</h3>
<p>There are a whole host of tools available which will allow you to manage your project, both free and paid-for. Within the Web Team, we use the Open Source ‘Trac’ Project, Trac may not be the prettiest piece of software ever written, but it’s extremely flexible through a plug-in architecture and being open source, we’ve moulded it to fit our exact needs as a team. The key features we use are issue tracking, milestones and source code management.</p>
<blockquote><p>“There are a whole host of tools available which will allow you to manage your project, both free and paid-for.”</p></blockquote>
<p>As well as using Trac internally within our team we have opened up access to a couple of teams within the institution who work with us on the corporate project. The Central Communications team (Comms), for example, have the ability to assign and manage tickets, see the commit history and timeline and read the wiki, but don’t have access to the source code repositories or source browsing facility through Trac.</p>
<h3>local &gt; staging &gt; production (aka develop &gt; debug &gt; deploy)</h3>
<p>There are three separate environments which I use to develop for leeds.ac.uk. Firstly, all of the code I write is done on a local server which runs a complete standalone version of the code and database. This allows me to mess around as much as I want without any risk to the live site and database which runs on the production server where the live version of leeds.ac.uk lives.</p>
<p>In between my local development server and the production server is the ’staging’ server, this is an identical environment to the production server (even running on the same physical hardware) and is accessed through a private URL. By running this staging server I can deploy code for the team to test, confident that this is identical to how the site will operate once deployed to the production server.</p>
<p>The deployment is handled through the GIT version control system which is tied to our Trac system where we maintain a central source code repository (even though it’s not strictly needed with GIT, we still maintain a central repo for ‘disaster planning’), code is pushed from Local to Trac, then from Trac to Staging and ultimately from Trac to Live.</p>
<h3>How it all tied together</h3>
<p>During the upgrade project I worked with our internal project co-ordinator and the Comms team to define a set of milestone dates for the project, such as ‘testing’, ‘pre-launch’, ‘launch’ and ‘post launch’.</p>
<p>We knew the date the site had to launch by was concrete, so worked backwards from there, with the pre-launch milestone set to the start of the week of launch, this contained any issues and tasks that needed to be completed before we could possibly go-live (such as a last minute content-freeze and migration from the currently live site to the upgraded site). Finally, the post-launch milestone allowed me to keep any tasks that weren’t directly related to the launch to be processed afterwards.</p>
<blockquote><p>“We knew the date the site had to launch by was concrete,<br />
so worked backwards from there”</p></blockquote>
<p>We had a thorough round of testing in the weeks running up to launch, the task of testing was performed by Comms who were testing against a ‘release candidate’ build on the Staging server. They worked for a week going through every single page on the Release Candidate build and logged tickets for any bugs, whether they be for differences in layout or differences in content. This is a critical step and their eagle eyes spotted a wide range of issues, from missing/out of date content, to the fact that the breadcrumb trail was 2 pixels further to the right than it should be.</p>
<p>These issues were all classified against a simple priority scale:</p>
<ol>
<li>Blocker (the site can’t possibly go live until this is fixed)</li>
<li>Critical (if this isn’t fixed, people may die)</li>
<li>Major (it’s a big problem, but no-one’s going to die)</li>
<li>Minor (this needs fixing at some point)</li>
<li>Trivial (no-one would probably notice except us)</li>
</ol>
<blockquote><p>“a &#8216;critical&#8217; issue may be seen as one which would cause the institution to cause severe confusion or lose money”</p></blockquote>
<p>If you were to take into account the business considerations, a &#8216;critical&#8217; issue may be seen as one which would cause the institution to cause severe confusion or lose money (such as printing an incorrect emergency phone number). Not all content is created equal, so a content difference on the Press Releases page might be classed as ‘Major’ while a page buried in the bowels of the site with a spelling error might be classed as ‘Minor’ or ‘Trivial’. It’s worth sitting down with the people who are going to be creating most of your tickets and defining what your priorities are to make sure that everything is not logged as high-priority to try and get them finished quicker.</p>
<p>(Based on this project I may move to remove the Blocker priority, as nearly all critical issues could be considered blockers)</p>
<p>I left the team alone for a week to perform their testing, only stepping in to fix any Blocker/Critical issues which would hamper their testing efforts and being on hand to answer any questions they had, after they were satisfied the entire site had been tested, their access to staging was revoked while I worked through all of the tickets assigned to the ‘Testing’ milestone. This process took 3 days for a couple of hundred issues, once the reported issue had been resolved the ticket was re-assigned to the owner for them to recheck the issue, and for them to close the ticket if it was fixed, or fail if it was still present.</p>
<h3>Make your tools work for you</h3>
<p>I am lucky to work with some extremely talented people, including a colleague who installed and maintains our Trac instance and implements some of the weird and wonderful ideas we have to make it more useful for us. One of the most used tweaks was to use the post-receive hooks of GIT to allow us to modify tickets based on the commit message.</p>
<p>For example, I accept Ticket #356 which requires a code change to resolve. I make the required change to the code and commit this to my local repository with the following command:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">git commit <span style="color: #339933;">-</span>m <span style="color: #0000ff;">&quot;Fixes #356 - bug was caused by ... and fixed by ...&quot;</span></div></td></tr></tbody></table></div>
<p>When I next push my changes to Trac, the post-receive hook recognises the ‘Fixes #356′ part of the commit message, adds a comment to the ticket linking to the specific changeset and diff showing exactly what changed, and sets the ticket to ‘testing’ status, which then fires off an email to the ticket owner prompting them to test the fix and close the ticket if it’s resolved.</p>
<p>I also communicated the progress of the project with the testing team by highlighting which version of the code the staging server was currently running:</p>
<div id="attachment_580" class="wp-caption aligncenter" style="width: 580px"><a href="http://coffeepowered.co.uk/wp-content/uploads/2011/01/1H94dp.Screen+shot+2010-09-09+at+16-06-00.jpg"><img class="size-full wp-image-580 " title="1H94dp.Screen+shot+2010-09-09+at+16-06-00" src="http://coffeepowered.co.uk/wp-content/uploads/2011/01/1H94dp.Screen+shot+2010-09-09+at+16-06-00.jpg" alt="" width="570" height="96" /></a><p class="wp-caption-text">Code version</p></div>
<p>This linked through to a summary changelog, which gave an outline of what had changed from version to version, clicking through would list precisely what had changed in the code and which tickets were fixed:</p>
<div id="attachment_582" class="wp-caption aligncenter" style="width: 580px"><a href="http://coffeepowered.co.uk/wp-content/uploads/2011/01/1H974d.Screen+shot+2010-09-09+at+16-06-41.jpg"><img src="http://coffeepowered.co.uk/wp-content/uploads/2011/01/1H974d.Screen+shot+2010-09-09+at+16-06-41.jpg" alt="" title="1H974d.Screen+shot+2010-09-09+at+16-06-41" width="570" height="155" class="size-full wp-image-582" /></a><p class="wp-caption-text">Trac changelog</p></div>
<p>We projected the Trac roadmap screen in our office with an auto-refresh which let us watch the testing milestone gradually reach 100% completion as the Comms team signed off the fixed tickets (I’m a sucker for visualising the size and progress of the task). All of this communication regarding the process of the project was passive, it was only available if and when anyone needed to see it.</p>
<div id="attachment_583" class="wp-caption aligncenter" style="width: 580px"><a href="http://coffeepowered.co.uk/wp-content/uploads/2011/01/700px_1283849005_1.jpg"><img class="size-full wp-image-583" title="700px_1283849005_1" src="http://coffeepowered.co.uk/wp-content/uploads/2011/01/700px_1283849005_1.jpg" alt="" width="570" height="428" /></a><p class="wp-caption-text">Projection of project progress</p></div>
<h3>In conclusion</h3>
<p>It doesn’t matter what tools or software you use as long as you’re able to make them fit around the way you work. If a piece of software gets in the way of how you work then you should seriously consider either changing it, or (if possible) changing the way it works to better suit your needs. If you’re working with other people on a project, communication is essential. By keeping everyone involved up-to date you can reduce the amount of time needed for meetings and reach that magical milestone, getting sign off.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2011/01/working-to-a-structured-development-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP&#8217;s alternate syntaxes</title>
		<link>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/</link>
		<comments>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 08:00:57 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[control structures]]></category>
		<category><![CDATA[elseif]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=348</guid>
		<description><![CDATA[If you&#8217;ve ever worked with PHP you&#8217;ll be more than familiar with the use of if/elseif/else conditional statements, these statements often become large and unweildy, especially when HTML is mixed in with PHP, causing a problems with code readability. There are a couple of alternate ways to write these statements which can improve your code.
if..endif [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever worked with PHP you&#8217;ll be more than familiar with the use of if/elseif/else conditional statements, these statements often become large and unweildy, especially when HTML is mixed in with PHP, causing a problems with code readability. There are a couple of alternate ways to write these statements which can improve your code.</p>
<h3>if..endif syntax</h3>
<p>We&#8217;ll start with a simple example of a &#8216;regular&#8217; statement which includes a foreach and an if statement which is extremely common among PHP scripts.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Result1'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Result2'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Now, just for funzies, let&#8217;s make this a tiny bit more complex and mix in some HTML markup in there for good measure, just like you&#8217;d see in, say, a WordPress template where we&#8217;re jumping back and forth between HTML and PHP mode.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result1&lt;/p&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?</span> &nbsp;<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result2&lt;/p&gt; <br />
<span style="color: #000000; font-weight: bold;">&lt;?</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>See the closing braces on lines 9 &#038; 10? With a relatively small example like this you can scan back through the code to see wether they close the if or the elseif. Now imagine a much larger statement, the only way to find out what the closing brace actually closes is to either pay attention to the tab levels (providing the tab levels have been maintained properly), or to read back through the whole statement and match them up. There is an alternate syntax which makes life a little easier. </p>
<h4>Alternate syntax</h4>
<p>By using the alternate if..elseif syntax we can replace those closing braces with something a little more useful.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result1&lt;/p&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?</span> &nbsp;<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result2&lt;/p&gt; <br />
<span style="color: #000000; font-weight: bold;">&lt;?</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>This alternate syntax is expecially useful when mixing PHP and HTML and works for <strong>if/while/for</strong> control structures.</p>
<h3>Ternary operator</h3>
<p>For simple evaluations you can use the ternary operator which is a slimline version of an if/else statement, for example, the following statement which pluralises a string based on an integer variable.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'comment'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$comments</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h4>Alternate syntax</h4>
<p>Using the ternary operator this can be condensed to a single line:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'comment'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$comments</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h3>Have a try!</h3>
<p>By learning and adopting these alternate syntaxes you will ensure that your code remains readable and maintainable, especially if you&#8217;re writing code to be used by other people. Give them a try!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quick and dirty dropdown pagination in CakePHP</title>
		<link>http://coffeepowered.co.uk/2009/10/quick-and-dirty-dropdown-pagination-in-cakephp/</link>
		<comments>http://coffeepowered.co.uk/2009/10/quick-and-dirty-dropdown-pagination-in-cakephp/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 08:49:46 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[cake]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[homeofmuppets]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[moblog]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=147</guid>
		<description><![CDATA[I&#8217;ve been slowly rebuilding my Moblog application using the CakePHP framework over the past year when I have the time and motivation. Over the past few evenings I&#8217;ve been refining a small element of my Moblog site which has started to dramatically increase user interaction with the site and allow old content to bubble back [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been slowly rebuilding my <a href="http://homeofmuppets.com/moblogs">Moblog</a> application using the CakePHP framework over the past year when I have the time and motivation. Over the past few evenings I&#8217;ve been refining a small element of my Moblog site which has started to dramatically increase user interaction with the site and allow old content to bubble back up to the top.</p>
<p>The Cake <a href="http://book.cakephp.org/view/656/Methods">paginator helper</a> works fine if you&#8217;re using basic anchor links to trigger sort options, but I wanted to use a dropdown select element so that the user can choose how to order the moblogs.</p>
<p>So I know this is most likely a horrible solution to the problem and certainly not very &#8216;cakey&#8217;, but it&#8217;s quick, dirty, and it works for what I need it to do.</p>
<p>In the view we need a valid form element, even though the javascript hijacks the onChange event and doesn&#8217;t actually post the result. At the moment this does mean that this doesn&#8217;t work without javascript but I plan on improving this soon by only using $paginator->sort links in the view, and replacing them with the form completely in javascript.</p>
<p>in the view:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?=</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">create</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Moblog'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'action'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'index'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'controller'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'moblogs'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'get'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'div'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
<span style="color: #000000; font-weight: bold;">&lt;?=</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">input</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'order'</span><span style="color: #339933;">,</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'sort:'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'options'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'modified'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'recent activity'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'date added'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'commented'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'last commented'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'moblog_comment_count'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'most commented'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'rand()'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'random'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'selected'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'order'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'div'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #990000;">end</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'go'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>In the jQuery we take whichever value was selected on change, build the relevant &#8216;paginator compatible&#8217; url which the helper will use to return the required data on page load and then redirect the browser.</p>
<p>jQuery:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#MoblogOrder'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">change</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> <span style="color: #3366CC;">'/moblogs/index'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">switch</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#MoblogOrder option:selected'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'modified'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'/page:1/sort:modified/direction:desc/'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'id'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'/page:1/sort:id/direction:desc/'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'commented'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'/page:1/sort:commented/direction:desc/'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'moblog_comment_count'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'/page:1/sort:moblog_comment_count/direction:desc/'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'rand()'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'/page:1/order:rand()/'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">default</span> <span style="color: #339933;">:</span> url <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'/page:1/sort:modified/direction:desc/'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; window.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> url<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>In this particular example, I&#8217;m using a random order also, which needs to be an &#8216;order&#8217; param instead of a &#8216;sort&#8217;, so in the controller I&#8217;m checking which params are being used, and setting a consistant order variable which is used in the view to maintain the selected state of the select element.</p>
<p>in the index method in the controller</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> index<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'named'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sort'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'order'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'named'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sort'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'named'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'order'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'order'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'named'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'order'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'order'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'modified'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>If any Cake ninjas are reading this and have any suggestions, or better methods, please do leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2009/10/quick-and-dirty-dropdown-pagination-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deliciously Timed Tweets</title>
		<link>http://coffeepowered.co.uk/2009/09/deliciously-timed-tweets/</link>
		<comments>http://coffeepowered.co.uk/2009/09/deliciously-timed-tweets/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:52:02 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=132</guid>
		<description><![CDATA[What is it?
Deliciously Timed Tweets (or DTT for short) is a collection of API&#8217;s which allow you to bookmark links in Delicious, and then automatically tweet them at a specified time interval.
What&#8217;s the point?
Delicious does already allow you to tweet your bookmarked links, the only problem is that this can result in Twitter spam if [...]]]></description>
			<content:encoded><![CDATA[<h3>What is it?</h3>
<p>Deliciously Timed Tweets (or DTT for short) is a collection of API&#8217;s which allow you to bookmark links in <a href="http://delicious.com">Delicious</a>, and then automatically tweet them at a specified time interval.</p>
<h3>What&#8217;s the point?</h3>
<p>Delicious does already allow you to tweet your bookmarked links, the only problem is that this can result in Twitter spam if you bookmark lots of links in quick succession. DTT queues up your recent bookmarks, and allows you to specify a rate (say, every 60 minutes) for them to be tweeted at.</p>
<p>DTT powers the <a href="http://twitter.com/boaglinks">@boaglinks</a> twitter feed.</p>
<h3>What do I need?</h3>
<ul>
<li>PHP 4+ with cURL support</li>
<li>MySQL</li>
<li>Access to <a id="Requirements" href="http://en.wikipedia.org/wiki/Cron">cron</a></li>
<li>A <a rel="nofollow" href="http://del.icio.us/">Delicious</a> account and some bookmarks.</li>
</ul>
<h3>How do I get it?</h3>
<p><strong>Git :</strong> git clone http://coffeepowered.co.uk/labs/dtt/.git</p>
<p><strong>Zip :</strong> <a href="http://coffeepowered.co.uk/labs/dtt/dtt.zip">http://coffeepowered.co.uk/labs/dtt/dtt.zip</a></p>
<p><strong>Tar :</strong> <a href="http://coffeepowered.co.uk/labs/dtt/dtt.tar">http://coffeepowered.co.uk/labs/dtt/dtt.tar</a></p>
<h3>How do I install it?</h3>
<ol>
<li>Grab the source from any of the locations above and extract/upload it to a location on your own server</li>
<li>Modify config.php with your own details</li>
<li>CHMOD install.php to 755</li>
<li>Visit the install.php file in your browser (http://yoursite.com/path/to/file/install.php)</li>
</ol>
<p>The default setting is for DTT to sync with delicious every hour, and new bookmarks will be tweeted out at a an rate of 1 per hour.</p>
<h3>Support?</h3>
<p>Officially, this is provided &#8220;as is&#8221; and is an unsupported script, however I&#8217;ll endeavour to provide support for anyone who does have problems but I can&#8217;t promise anything!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2009/09/deliciously-timed-tweets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Printable logos</title>
		<link>http://coffeepowered.co.uk/2009/08/printable-logos/</link>
		<comments>http://coffeepowered.co.uk/2009/08/printable-logos/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 18:33:57 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=50</guid>
		<description><![CDATA[This is one of those tips where I think &#8220;surely everyone knows this already?&#8221; but it&#8217;s a solution to a problem that I found which was quite neat and I&#8217;ll use all the time from now on.
When it comes to embedding a company logo into a page, quite often the logo won&#8217;t be suitable for [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of those tips where I think &#8220;surely everyone knows this already?&#8221; but it&#8217;s a solution to a problem that I found which was quite neat and I&#8217;ll use all the time from now on.</p>
<p>When it comes to embedding a company logo into a page, quite often the logo won&#8217;t be suitable for print. For example, the website may be dark and the logo might be light and while this works fine when the site is viewed on-screen, it can look out of place when used in a print stylesheet or if the site is viewed with CSS disabled.</p>
<p>While building the new University of Leeds corporate website we got to the stage where we needed to build our print stylesheet, the page header has a white logo on a dark background.</p>
<p>Originally, the logo was inserted into the design using a standard CSS image-replacement technique:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.leeds.ac.uk&quot;</span>&gt;</span>University of Leeds<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#logo</span> a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">logo_black.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">53px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">184px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<div id="attachment_59" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-59" title="University of Leeds header" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/University-of-Leeds_1249982729324.png" alt="Light logo on dark header" width="500" height="272" /><p class="wp-caption-text">Light logo on dark header</p></div>
<p>When you&#8217;re using a CSS image replacement, the image doesn&#8217;t exist in the markup, it&#8217;s applied as a background image and only the h2 text is displayed. We toyed with the idea of using the same image replacement technique in our print.css, replacing the logo with the black-on-white variant. This quickly fell on it&#8217;s arse, as most browsers are set by default to not print background images as seen below.</p>
<div id="attachment_72" class="wp-caption aligncenter" style="width: 209px"><img class="size-full wp-image-72" title="University of Leeds - no logo - no css" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/universityofleeds_nologo_nocss.png" alt="Image replacement with CSS disabled" width="199" height="319" /><p class="wp-caption-text">Image replacement with CSS disabled</p></div>
<h3>Putting the image back into the markup</h3>
<p>In order to get around this, we decided to stop using image replacement and go back to having the image in the markup. Initially I was curious as to the effect of this from an SEO standpoint and had a quick chat with an <a href="http://thehodge.co.uk">SEO friend</a> about the disadvantage of not having our corporate logo as a heading. He pointed out that there would be no disadvantage to us as we&#8217;re not trying to rank on the &#8216;University of Leeds&#8217; as a keyword and that as it&#8217;s mentioned everywhere else in the thousands of pages we manage, it&#8217;s not going to make a difference. (Your mileage may vary and this might not be suitable for everyone)</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo_black.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;University of Leeds logo&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></td></tr></tbody></table></div>
<h3>Doing it bass-ackwards</h3>
<p>Once we&#8217;d put the image back into the markup, it showed up as expected in our print stylesheet, however our white-on-black logo wasn&#8217;t really suited.</p>
<div id="attachment_63" class="wp-caption aligncenter" style="width: 209px"><img class="size-full wp-image-63" title="University of Leeds - CSS disabled" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/universityofleeds_dark_nocss1.png" alt="Same logo with CSS disabled" width="199" height="320" /><p class="wp-caption-text">Same logo with CSS disabled</p></div>
<p>We already knew that we couldn&#8217;t use CSS to replace this with the black-on-white logo in our print.css, so we decided to do it the other way round. Rather than the have the white-on-black logo as default, we changed to having the black-on white as the default meaning that our no-css and print.css got the correct logo. We used a &#8220;hidden&#8221; class so we could hide the default image and a CSS overlay on the anchor tag to bring back our white-on-black logo to fit in with the rest of the design.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.leeds.ac.uk&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo_white.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;University of Leeds logo&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#logo</span> a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">logo_black.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
.<span style="color: #993333;">hidden</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<div id="attachment_59" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-59" title="University of Leeds header" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/University-of-Leeds_1249982729324.png" alt="Light logo on dark header" width="500" height="272" /><p class="wp-caption-text">CSS enabled</p></div>
<div id="attachment_61" class="wp-caption aligncenter" style="width: 209px"><img class="size-full wp-image-61" title="University of Leeds - No CSS" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/universityofleeds_nocss.png" alt="Black on white logo" width="199" height="320" /><p class="wp-caption-text">CSS disabled / print stylesheet</p></div>
<h3>Conclusion</h3>
<p>Because most browsers disable background images when printing by default, you need to be aware that any important images that are using image-replacement techniques may not work. Working around these limitations is possible with a bit of planning.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2009/08/printable-logos/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Meaningful milestones</title>
		<link>http://coffeepowered.co.uk/2009/08/meaningful-milestones/</link>
		<comments>http://coffeepowered.co.uk/2009/08/meaningful-milestones/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 08:13:36 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[project management]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=16</guid>
		<description><![CDATA[For the past 12 months I&#8217;ve been working exclusively on the same project, if you follow me on Twitter (and if you don&#8217;t, you really should) you might have heard me refer to it as Überproject as it&#8217;s without doubt the biggest project I&#8217;ve ever been involved with in my career so far.
It&#8217;s handover time [...]]]></description>
			<content:encoded><![CDATA[<p>For the past 12 months I&#8217;ve been working exclusively on the same project, if you <a href="http://twitter.com/stanton" target="_blank">follow me on Twitter</a> (and if you don&#8217;t, you really should) you might have heard me refer to it as <em>Überproject</em> as it&#8217;s without doubt the biggest project I&#8217;ve ever been involved with in my career so far.</p>
<p>It&#8217;s handover time for Überproject and as we&#8217;re wrapping up our development I&#8217;ve been taking stock of the last 12 months and thinking along the lines of &#8220;If we had to do this all over again, what would we do differently?&#8221; aka &#8220;What gave us grief, and how can we avoid doing it again&#8221;.</p>
<h3>Meaningful milestones</h3>
<p>One particular aspect of Überproject was a large section of bespoke functionality which was, in effect, a project within a project which I&#8217;ll refer to as #up1 for the purposes of this blog (It&#8217;s not gone public yet, so I can&#8217;t name it specifically).</p>
<p>Early on, we attached two milestones to key stages in the project, a <strong>testing</strong> milestone, and a <strong>go-live</strong> milestone.</p>
<p>The <strong>testing</strong> milestone was defined as a date when functionality was to be delivered to our development environment ready to be put through it&#8217;s paces where any bugs would be logged as tickets in <a href="http://trac.edgewall.org/">Trac</a> (our project management / source control platform) and we would then work through any outstanding tickets before the <strong>go-live</strong> milestone date.</p>
<p>#up1 was given milestones consistent with the rest of the project with a couple of months between testing and go-live, the development of the back end was going well and the front end development would be taken care of later with the rest of the front-end build (which had it&#8217;s own milestone).</p>
<p>About a week before the testing milestone was due for #up1 I was hit with a bombshell. The definition of &#8216;testing&#8217; in this instance meant that the back-end had to be fully functional and production-ready for the end-users to start populating the module with data. This meant that the back-end should have entered testing weeks ago and had bugs ironed out before the end-users ever got close. The back-end needed be go-live ready.</p>
<p>Fortunately, a week&#8217;s worth of frantic coding meant that I got #up1 fully functional before the users were allowed in and this was only done on a limited basis, users were aware that we were still in development and we turned the situation to our favour by deputizing them as bug testers by asking for and encouraging feedback.</p>
<h3>The moral of the story?</h3>
<p>Going forward, we will need to be absolutely clear of what&#8217;s expected to be delivered at each milestone and avoiding vague terms like &#8216;testing&#8217;, as we&#8217;ve seen, the definition of testing can vary wildly between different aspects of the same project.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2009/08/meaningful-milestones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

