<?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>Katipo Developers Blog &#187; random</title>
	<atom:link href="http://blog.katipo.co.nz/category/random/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.katipo.co.nz</link>
	<description></description>
	<lastBuildDate>Fri, 04 Jun 2010 02:39:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Kakama Technical Overview</title>
		<link>http://blog.katipo.co.nz/2010/06/04/kakama-technical-overview/</link>
		<comments>http://blog.katipo.co.nz/2010/06/04/kakama-technical-overview/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 02:39:27 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=122</guid>
		<description><![CDATA[I&#8217;ve just posted a technical overview of how Kakama functions. You can view it at Kakama.org
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just posted a technical overview of how Kakama functions. You can view it at <a href="http://kakama.org/en/documentation/topics/show/18-how-kakama-works-a-quick-technical-overview">Kakama.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2010/06/04/kakama-technical-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using git feature branches to make your master branch commits list concise</title>
		<link>http://blog.katipo.co.nz/2010/03/18/using-git-feature-branches-to-make-your-master-branch-commits-list-concise/</link>
		<comments>http://blog.katipo.co.nz/2010/03/18/using-git-feature-branches-to-make-your-master-branch-commits-list-concise/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 23:18:37 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[commits]]></category>
		<category><![CDATA[squash]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=112</guid>
		<description><![CDATA[When you&#8217;re starting off, it&#8217;s fairly easy to commit to the master branch. But once your application is released, you probably want to keep things stable on the master branch. So use feature branches.

You do all your work in a feature branch, then pull it into the master branch. There are numerous topics on the [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re starting off, it&#8217;s fairly easy to commit to the master branch. But once your application is released, you probably want to keep things stable on the master branch. So use feature branches.</p>
<p><span id="more-112"></span></p>
<p>You do all your work in a feature branch, then pull it into the master branch. There are numerous topics on the web for this.</p>
<p>But there is a problem with this approach. When you run `git pull origin my_branch`, you end up creating merge commits. Some get around this with `git rebase`, but then you end up rewriting commit shas. So how do you get a clean history without messing up the master branch?</p>
<p>Use `&#8211;squash`. Here is a simplified example:</p>
<pre>
<div class="codesnip-container" >git checkout -b my_branch
touch File1
git commit -a -m "File 1"
touch File2
git commit -a -m "File 2"
git push origin my_branch
git checkout master
git pull --squash origin my_branch
git commit -a -m "File 1 and 2"</div>
</pre>
<p>Note the last two steps. We use &#8211;squash to compact the feature branch commits. This leaves all changes in the other branch in an uncommitted state (which you can then do one final review on). We then go ahead and make a commit.</p>
<p>The result? One commit in master, containing all code from the feature branch.</p>
<p>Now, the caveat: If you have multiple developers who made commits on this branch, you probably want to leave the commits apart for credits sake. But if you&#8217;re the only one who&#8217;s committed, and you don&#8217;t mind squashing the history, this works great!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2010/03/18/using-git-feature-branches-to-make-your-master-branch-commits-list-concise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7 and IE8 cannot support URI&#8217;s with underscores</title>
		<link>http://blog.katipo.co.nz/2009/09/28/ie7-and-ie8-cannot-support-uris-with-underscores/</link>
		<comments>http://blog.katipo.co.nz/2009/09/28/ie7-and-ie8-cannot-support-uris-with-underscores/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 23:19:14 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=93</guid>
		<description><![CDATA[Stumbled upon this. If you&#8217;re going to make a URI (domain or sub domain) with an underscore, think twice. IE7 and IE8 do not support these URI&#8217;s when dealing with cookies.
For more details, see this blog post, detailing the symptoms.
http://blog.patrick-morgan.net/2008/09/problems-with-ie7-sessions-not-saved-in.html
]]></description>
			<content:encoded><![CDATA[<p>Stumbled upon this. If you&#8217;re going to make a URI (domain or sub domain) with an underscore, think twice. IE7 and IE8 do not support these URI&#8217;s when dealing with cookies.</p>
<p>For more details, see this blog post, detailing the symptoms.</p>
<p><a href="http://blog.patrick-morgan.net/2008/09/problems-with-ie7-sessions-not-saved-in.html">http://blog.patrick-morgan.net/2008/09/problems-with-ie7-sessions-not-saved-in.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/09/28/ie7-and-ie8-cannot-support-uris-with-underscores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Have fun testing your application with Cucumber</title>
		<link>http://blog.katipo.co.nz/2009/09/04/having-fun-testing-your-application-with-cucumber/</link>
		<comments>http://blog.katipo.co.nz/2009/09/04/having-fun-testing-your-application-with-cucumber/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 04:13:40 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=73</guid>
		<description><![CDATA[My experience with Cucumber. It's simple and has such a flexible style of feature testing, that writing tests hasn't been easier!]]></description>
			<content:encoded><![CDATA[<p>When I started on a new Ruby on Rails project at Katipo Communications, I evaluated a range of testing libraries, and decided on <a href="http://cukes.info/">Cucumber</a>. It&#8217;s simple and has a flexible style of feature testing. For more info about it, see the <a href="http://wiki.github.com/aslakhellesoy/cucumber">Cucumber Wiki Documentation</a>. In this post, I&#8217;ll detail some of my experiences with it for other developers who are considering using it.</p>
<p><span id="more-73"></span></p>
<p><strong>Experience with Cucumber</strong></p>
<p>Cucumber has been working out really well, and was very easy to get started with.</p>
<pre>
<div class="codesnip-container" >sudo gem install cucumber
cd ~/Work/app
script/generate cucumber</div>
</pre>
<p>That&#8217;ll install a new environment with the config.gem lines needed. It&#8217;ll also setup a features directory. Open that up, and start writing specs for your app. Simple!</p>
<p>Once I had all the basic step definitions for logging in, logging out, and various paths setup for login page, homepage, etc, writing new features was fairly easy, and executing them is just as easy (rake cucumber). Take for example, the following feature relating to session management.</p>
<pre>
<div class="codesnip-container" >Scenario: Login with correct details
  When I go to login
  And I fill in "Username" with "jane"
  And I fill in "Password" with "test"
  And I press "Login"
  Then I should see "Successfully logged in."</div>
</pre>
<p>Very straightforward and easy to read. And as such, the natural language of it means clients and other developers are able to see exactly what has been implemented, and that it is working as expected.</p>
<p>It&#8217;s running the entire test suite is fairly fast too (granted, it&#8217;s still quite small). I&#8217;m testing the core functionality of the new application so far, and it only takes ~40s to run all the features when using &#8216;progress&#8217; output (the  F..F..E  style output that test/unit does). The more verbose &#8216;pretty&#8217; output is nice, but quickly fills the terminal, so very easy to miss errors as they happen until the end, and also adds processing time (10s cut off when I switched to progress mode).</p>
<p>At one point in development, I had to test outgoing emails. Thankfully, Cucumber has a really great addition, called <a href="http://github.com/bmabey/email-spec">email-spec</a> by Ben Mabey. Writing a Cucumber feature for these emails was painless. Here is a snippet from one of the password reset features.</p>
<pre>
<div class="codesnip-container" >Scenario: Request Reset with correct email
  When I request a password reset for "example@example.com"
  Then I should receive an email
  When I open the email
  And I follow "Continue to reset your password" in the email
  Then I should see "Change My Password"</div>
</pre>
<p>I&#8217;ve made a few contributions to the email-spec project, which have been included in the latest release, enabled email testing for people other than yourself  ( When they open the email&#8230; Then they should see &#8230;  etc). Makes writing tests even easier.</p>
<p><strong>Other Thoughts</strong></p>
<p>I did find that you duplicate a lot when it comes to adding paths because Cucumber is framework independent. For example, if you have a &#8216;<em><strong>map.resources :events</strong></em>&#8216; Cucumber won&#8217;t provide you with paths like &#8216;the events index&#8217; or &#8216;add a new event&#8217; automatically. Would make a handy Cucumber addition though. In addition, because Cucumber uses Webrat, which has no idea how to interact with Javascript, you still need to fall back to the slow Selenium testing if you&#8217;re application relies on Javascript.</p>
<p><strong>Conclusion</strong></p>
<p>Cucumber has been really great and I&#8217;m happy to keep using it. If you&#8217;ve used Cucumber before, or are going to try it, or perhaps your didn&#8217;t like it and went with something else, let me know in the comments. I&#8217;m always happy to hear other peoples experiences.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/09/04/having-fun-testing-your-application-with-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the Most out of Your Website</title>
		<link>http://blog.katipo.co.nz/2009/08/21/getting-the-most-out-of-your-website/</link>
		<comments>http://blog.katipo.co.nz/2009/08/21/getting-the-most-out-of-your-website/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 00:02:55 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=57</guid>
		<description><![CDATA[These are some preparation notes for a panel discussion with the NZ Industry Training Federation &#8211; ITOs Marketing and Communications Network. We were asked to respond to three questions:

My website is a dog&#8217;s breakfast, my boss wants it fixed, what do I need to do/think about mys elf before I contact a company?
What are the [...]]]></description>
			<content:encoded><![CDATA[<p>These are some preparation notes for a panel discussion with the NZ Industry Training Federation &#8211; ITOs Marketing and Communications Network. We were asked to respond to three questions:</p>
<ol>
<li>My website is a dog&#8217;s breakfast, my boss wants it fixed, what do I need to do/think about mys elf before I contact a company?</li>
<li>What are the most common mistakes you see being made on organisation&#8217;s website?</li>
<li>How do you measure value for money on your website?</li>
</ol>
<p><span id="more-57"></span></p>
<h3>1. My website is a dog&#8217;s breakfast, my boss wants it fixed, what do I need to do/think about myself before I contract a company?</h3>
<p>It&#8217;s important to realise that a web development company won&#8217;t know as much about your organisation and website as you do.</p>
<ul>
<li>You need to be the expert on your website.</li>
<li>To get the result you want, you will need to fill them in with all the information they will need.
<ul>
<li>This is the brief for the project.</li>
</ul>
</li>
<li>A good brief will stop wasted effort and money from people going down the wrong track and ensure you get the result you need.</li>
</ul>
<p>High level questions you should be able to answer are about how you define your website. These include:</p>
<ul>
<li>What is the purpose of the website?
<ul>
<li>Why have we got a website in the first place?</li>
</ul>
</li>
<li>What do we hope to develop with our internet presence? For example,
<ul>
<li>Customer or client education</li>
<li>Internal communication</li>
<li>Information gathering</li>
<li>Information dissemination</li>
<li>Sales</li>
</ul>
</li>
<li>Who is our target audience?
<ul>
<li>What do we want them to get from the website?</li>
<li>What do we want to get from them?</li>
</ul>
</li>
<li>What image do we want to portray on the Internet?
<ul>
<li>Do we have corporate branding standards which need to be complied with?</li>
</ul>
</li>
<li>Who owns the website?
<ul>
<li>Which person in the organisation is responsible for ensuring the website is up to date and loved.</li>
</ul>
</li>
</ul>
<p>Then on to fixing the dog&#8217;s breakfast.</p>
<ul>
<li>What is the scope of the project?
<ul>
<li>What exactly does your boss mean by fixing the dog&#8217;s breakfast?</li>
<li>Does the boss want a total website redevelopment along with a new design or some changes made to the existing site?</li>
</ul>
</li>
<li>What are the goals of this project?
<ul>
<li>e.g., to fix the dog&#8217; s breakfast so we get less complaints about the site and more registrations for courses.</li>
</ul>
</li>
<li>What kind of budget have you got?</li>
<li>What outcome will make this project successful?
<ul>
<li>This should be the goal for the project</li>
</ul>
</li>
<li>How will we measure success?
<ul>
<li>More sales</li>
<li>more email inquiries</li>
<li>more site visits</li>
<li>less complaints</li>
</ul>
</li>
</ul>
<p>You should be able to determine the measures of success against the website&#8217;s broad purpose and the goals for this project.</p>
<p>Armed with this information you will be able to give a brief to the contractor which lead to an excellent outcome.</p>
<h3>2. What are the most common mistakes you see being made on organisation&#8217;s website?</h3>
<p>Out of date content.</p>
<ul>
<li>This is often a	symptom of no company ownership of the site.</li>
<li>Because no-one 	owns it, no-one has the responsibility of keeping it up to date.</li>
</ul>
<p>Broken links</p>
<p>It&#8217;s hard to find information on the site</p>
<ul>
<li>Poor navigation
<ul>
<li>Links aren&#8217;t obvious</li>
<li>I include flash menus and some dropdown navigation systems in this.</li>
</ul>
</li>
<li>Poor search engine results
<ul>
<li>page titles, meta information</li>
</ul>
</li>
<li>Hard to read content
<ul>
<li>Overly wordy and long pages.
<ul>
<li>People don&#8217;t read, they scan.</li>
<li>So 7 plus or minus 2 words for sentences, get to the point quickly.
<ul>
<li>Use bullets</li>
<li>Use white space</li>
</ul>
</li>
</ul>
</li>
<li>Headings should summarise the page</li>
</ul>
</li>
</ul>
<p>Slow loading pages.</p>
<ul>
<li>pointless animations</li>
<li>flash</li>
</ul>
<h3>3. How do you measure value for money on your website?</h3>
<p>How do I measure if my website project gave me value for money?</p>
<p>This is the ROI or &#8220;Return on investment&#8221;. It should be directly related to how you have defined the site&#8217;s purpose and objectives.</p>
<p>With the purpose and objectives for the site in mind, you can set up measures of how your website meets it&#8217;s goals. For example, if a goal for a website change was to have increased number of applicants for a course, you could measure the number of applications made on-line. Of course, the number of new applicants may be greater than that because some people will be attracted to the course by the information on the website and apply for the course in person, over the phone or by snail mail</p>
<p>Easily measurable items to assess ROI:</p>
<ul>
<li>Sales &#8211; $
<ul>
<li>If you&#8217;re doing online sales</li>
</ul>
</li>
<li>Leads – for sales or services
<ul>
<li>emails,	contacts</li>
</ul>
</li>
<li>Conversions &#8211; how many people visit your site and do something
<ul>
<li>you	want people to join, participate in a survey, recommend your site or simply subscribe to your email newsletter?</li>
</ul>
</li>
</ul>
<p>From your website logs you can get indirect measures such as:</p>
<ul>
<li>Usability
<ul>
<li>How usable is your site to your visitors
<ul>
<li>From your website logs you can get information on
<ul>
<li>returning visitors</li>
<li>page views per visit</li>
<li>time on page</li>
<li>time on site</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>SEO
<ul>
<li>How much does Google love your site?
<ul>
<li>is it visiting regularly?</li>
<li>how many pages is it spidering</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>And finally:</p>
<ul>
<li>Social Media
<ul>
<li>What your users like and what they actually say about you.</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/08/21/getting-the-most-out-of-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Rails logger available in code normally outside of logger scope</title>
		<link>http://blog.katipo.co.nz/2009/01/24/make-rails-logger-available-in-code-normally-outside-of-logger-scope/</link>
		<comments>http://blog.katipo.co.nz/2009/01/24/make-rails-logger-available-in-code-normally-outside-of-logger-scope/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 23:19:40 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=55</guid>
		<description><![CDATA[Here&#8217;s a quick one.  Say you are debugging a bit of code in a plugin that doesn&#8217;t fall under the Rails app you are working on&#8217;s ActiveSupport context and thus &#8220;logger.debug&#8221; is not available to you.
You could write up your own logging mechanism, with or without using the Logger gem.  However, if what [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick one.  Say you are debugging a bit of code in a plugin that doesn&#8217;t fall under the Rails app you are working on&#8217;s ActiveSupport context and thus &#8220;logger.debug&#8221; is not available to you.</p>
<p>You could write up your own logging mechanism, with or without using the Logger gem.  However, if what you are working on is run by the Rails app and thus has the apps global constants available, you could simply tie it into the existing logger object in the Rails app like so in your file:</p>
<div class="codesnip-container" >logger = RAILS_DEFAULT_LOGGER</div>
<p>Then you can use logger.debug, logger.info, etc. to your heart&#8217;s content.  One caveat, if you are working on a gem or a something more general that won&#8217;t necessarily always be run in the context of Rails, then you will want to pull your use of logger out before distributing your code.  Otherwise you add a dependency on Rails that you may not intend.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/01/24/make-rails-logger-available-in-code-normally-outside-of-logger-scope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Gist commands to emacs</title>
		<link>http://blog.katipo.co.nz/2009/01/15/adding-gist-commands-to-emacs/</link>
		<comments>http://blog.katipo.co.nz/2009/01/15/adding-gist-commands-to-emacs/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 20:26:22 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=54</guid>
		<description><![CDATA[You have to give Logical Awesome credit for how much work they do to integrate GitHub&#8217;s services with tools that developers use.
The Gist service is a good example.  First they added command line support for it, then they simultaneously added in-editor support in Textmate, vim, and my own personal favorite emacs.  The blog [...]]]></description>
			<content:encoded><![CDATA[<p>You have to give <a href="http://logicalawesome.com/">Logical Awesome</a> credit for how much work they do to integrate <a href="http://github.com/">GitHub&#8217;s</a> services with tools that developers use.</p>
<p>The <a href="http://gist.github.com/">Gist</a> service is a good example.  First they added command line support for it, then they simultaneously added in-editor support in <a href="http://github.com/blog/233-gist-support-for-textmate">Textmate</a>, <a href="http://github.com/mattn/gist-vim">vim</a>, and my own personal favorite <a href="http://github.com/defunkt/gist.el/tree/master">emacs</a>.  The blog post announcing gist support in emacs and vim is <a href="http://github.com/blog/234-gist-vim-and-gist-el">here</a>.</p>
<p>So how do you add the gist support to emacs?  </p>
<p>First, you&#8217;ll need an account on github.com and have set up your ~/.gitconfig as outlined in <a href="http://github.com/blog/180-local-github-config">here</a>.</p>
<p>Then download or clone the gist.el file from <a href="http://github.com/defunkt/gist.el">http://github.com/defunkt/gist.el</a>, copy only the gist.el file from that repository to someplace in your <a href="http://www.emacswiki.org/emacs/LoadPath">emacs load path</a> (in my case /Users/walter/Library/Preferences/Aquamacs Emacs/ because I use <a href="http://aquamacs.org/">Aquamacs</a> on a Mac), and add a line to your ~/.emacs file or in my case /Users/walter/Library/Preferences/Aquamacs Emacs/Preferences.el that looks like this:</p>
<div class="codesnip-container" >(require &#8216;gist)</div>
<p>Then you have to either restart your emacs program or do M-x load-library and answer prompt with gist for the new gist commands to be available.</p>
<p>Now you have M-x commands like these:</p>
<dl>
<dt>gist-view-gist</dt>
<dd>view gists after they&#8217;re posted</dd>
<dt>gist-region</dt>
<dd>Post the current region as a new paste at gist.github.com<br />
Copies the URL into the kill ring.</dd>
<dt>gist-region-private</dt>
<dd>Post the current region as a new private paste at gist.github.com<br />
Copies the URL into the kill ring.</dd>
<dt>gist-buffer</dt>
<dd>Post the current buffer as a new paste at gist.github.com.<br />
Copies the URL into the kill ring.</dd>
<dt>gist-buffer-private</dt>
<dd>Post the current buffer as a new private paste at gist.github.com.<br />
Copies the URL into the kill ring.</dd>
<dt>gist-region-or-buffer</dt>
<dd>Post either the current region, or if mark is not set, the current buffer as a new paste at gist.github.com<br />
Copies the URL into the kill ring.</dd>
<dt>gist-region-or-buffer-private</dt>
<dd>you can probably guess&#8230;</dd>
<dt>gist-fetch</dt>
<dd>Given an gist id, fetches a Gist and inserts it into a new buffer<br />
If the Gist already exists in a buffer, switches to it.</dd>
</dl>
<p>Very useful stuff for collaboration, but without leaving your editor.</p>
<p>Enjoy,<br />
Walter</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/01/15/adding-gist-commands-to-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Colour Contrast in Web pages</title>
		<link>http://blog.katipo.co.nz/2008/10/03/testing-colour-contrast-in-web-pages/</link>
		<comments>http://blog.katipo.co.nz/2008/10/03/testing-colour-contrast-in-web-pages/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 23:08:32 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=52</guid>
		<description><![CDATA[One commonly overlooked aspect of website accessibility is the contrast ratio between foreground and background colours.
White poor contrast can cause readability issues for well-sighted visitors, it can be even more of a problem for those visitors with a visual impairment.
Because of this, The New Zealand Government Web Standards and Requirements v 1.0 and W3C&#8217;s Techniques [...]]]></description>
			<content:encoded><![CDATA[<p>One commonly overlooked aspect of website accessibility is the contrast ratio between foreground and background colours.</p>
<p>White poor contrast can cause readability issues for well-sighted visitors, it can be even more of a problem for those visitors with a visual impairment.</p>
<p>Because of this, The New Zealand Government Web Standards and Requirements v 1.0 and W3C&#8217;s Techniques for Web Content Accessibility Guidelines v 1.0 both contain standards requiring content have sufficient contrast between foreground and background colours.</p>
<p>For example, The New Zealand Government Standards state:</p>
<blockquote><p>&#8220;Ensure that foreground and background colour combinations provide sufficient contrast for navigation, text and informational elements when viewed by someone having colour deficits or when viewed on a black and white screen.&#8221;</p></blockquote>
<p>Continue below for details on how to test for adequate colour contrast in your design or web pages.</p>
<p><span id="more-52"></span></p>
<h3>Specific Standards</h3>
<p>While the wording of the New Zealand Government standard is quite broad, the W3C and HP have more specific guidelines which we can use to measure the effectiveness of the contrast on a website or graphic.</p>
<p>The suggested way to measuring for sufficient contrast is done by measuring the colour brightness difference and colour difference. We then compare the figures from these tests to the suggested thresholds.</p>
<p>The <a href="http://www.w3.org/TR/AERT#color">W3C draft standard</a> says that the colour brightness difference should be 125, and the colour difference should be 500.</p>
<p><a href="http://www.hp.com/hpinfo/abouthp/accessibility/webaccessibility/color_tool.html">HP recommends</a> thresholds of 125 and 400, respectively.</p>
<h3>Tools for Testing</h3>
<p><a href="http://www.visionaustralia.org.au/info.aspx?page=628">Vision Australia&#8217;s Colour Contrast Analyser for Web Pages</a> is highly recommended, however only works on Microsoft Windows.</p>
<p>There is a tool available for the Mac called <a href="http://www.paciellogroup.com/resources/contrast-analyser.html#macdownload">Color Contrast Analyzer.app</a>. This is probably the best known alternative to the Vision Australia tool.</p>
<h3>How to test on the Mac</h3>
<ol>
<li>Install the Color Contrast Analyzer application (see the link above).</li>
<li>Identify areas of possible colour contrast problems.
<p>Look at your design or site and try to see where colour contrast problems might occur. Normally these are in graphics or headings, especially where coloured text is used on top of a coloured background. Because most content on websites is normally black text on a white background, it should be reasonably easy to identify where problems might occur.</p>
</li>
<li>Open Color Contrast Analyzer.app. You&#8217;ll want to keep the Color Contrast Checker application in the foreground with the design or website you want to test in the background so you can select colours from it.</li>
<li>Select the colour widget next to &#8220;Colour select:&#8221; for foreground, and a colour picker box will appear.</li>
<li>Click on the magnifying glass icon in the colour picker box and then select the foreground colour you want to test with from the design or website you&#8217;re testing.</li>
<li>Repeat for the background colour. In the case of gradient backgrounds, select the colour very close to the foreground text/colour you&#8217;re testing, but obviously not in the shadow or anti-aliased edge of the shape of text.</li>
</ol>
<p>The test result will appear in the box in the bottom of the Colour Contrast Analyzer application.</p>
<p>The standard that you want to achieve is the W3C&#8217;s 500/125 standard. However, this can be difficult to achieve at times so some web developers and designers have decided that HP&#8217;s 400/125 standard is acceptable.</p>
<p>If there turns out to be a colour contrast problem in your design, you will need to improve the colour selection you&#8217;re using and re-test.</p>
<h3>Caveats</h3>
<p>The colour test and recommended limits suggested by the W3C and HP are in some ways limited. For instance, it is possible to create unreadable contrast combinations that do exceed the minimum limits. So, we suggest using the standards to check possible problematic contrast situations, but you still use common sense to identify and eliminate contrast situations that may not necessary be identified in the test</p>
<h3>More Information</h3>
<p>The standard from the New Zealand Government Web Standards v.1.0 &#8211; <a href="http://webstandards.govt.nz/index.php/Standard:2.2_Contrast_between_foreground_and_background_colours">http://webstandards.govt.nz/index.php/Standard:2.2_Contrast_between_foreground_and_background_colours</a></p>
<p>Lighthouse International&#8217;s article &#8220;Effective Color Contrast&#8221; &#8211; <a href="http://www.lighthouse.org/accessibility/effective-color-contrast/">http://www.lighthouse.org/accessibility/effective-color-contrast/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2008/10/03/testing-colour-contrast-in-web-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Collecting a list of current MySQL index in a database</title>
		<link>http://blog.katipo.co.nz/2008/09/11/collecting-a-list-of-current-mysql-index-in-a-database/</link>
		<comments>http://blog.katipo.co.nz/2008/09/11/collecting-a-list-of-current-mysql-index-in-a-database/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 02:45:52 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=51</guid>
		<description><![CDATA[In MySQL, there is an easy way to get all index of a particular table.
SHOW INDEX FROM table_name;
But what if you want to list all index&#8217;s from all tables in a database so you can find out what you have and where you&#8217;re missing some? If you have 20 or more tables it&#8217;ll get tiring [...]]]></description>
			<content:encoded><![CDATA[<p>In MySQL, there is an easy way to get all index of a particular table.</p>
<blockquote><p>SHOW INDEX FROM table_name;</p></blockquote>
<p>But what if you want to list all index&#8217;s from all tables in a database so you can find out what you have and where you&#8217;re missing some? If you have 20 or more tables it&#8217;ll get tiring after a while running the SHOW INDEX command on each.</p>
<p>Thankfully, the information is stored in another table MySQL uses called information_schema. You can get a list of all the index&#8217;s, along with the table name and field names, by running the following (change &#8220;your_database&#8221;).</p>
<blockquote><p>SELECT table_name, column_name, index_name FROM information_schema.statistics WHERE index_name != &#8216;primary&#8217; and table_schema = &#8216;your_database&#8217;;</p></blockquote>
<p>That&#8217;s it. A list of what table, what field, and the name that each index applied to. Happy indexing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2008/09/11/collecting-a-list-of-current-mysql-index-in-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merging in single commits with Git</title>
		<link>http://blog.katipo.co.nz/2008/09/01/merging-in-single-commits-with-git/</link>
		<comments>http://blog.katipo.co.nz/2008/09/01/merging-in-single-commits-with-git/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 03:26:52 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=49</guid>
		<description><![CDATA[Sometimes it&#8217;s useful to merge in a single commit from another branch. For instance, you may want to merge a single, important bug fix from your Git master branch into a stable release branch.
You can do this using Git&#8217;s cherry-pick command.
# Merge in a single commit.
#The -n option tells Git to not commit when it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s useful to merge in a single commit from another branch. For instance, you may want to merge a single, important bug fix from your Git master branch into a stable release branch.</p>
<p>You can do this using Git&#8217;s cherry-pick command.</p>
<div class="codesnip-container" ># Merge in a single commit.<br />
#The -n option tells Git to not commit when it&#8217;s finished the merge.<br />
# This allows us to review and commit the changes with our own message later.<br />
# The default commit message is very ambiguous.<br />
$ git cherry-pick -n [The commit's SHA-1 Hash]</p>
<p># Review the changes<br />
$ git diff &#8211;cached</p>
<p># Commit the changes after reviewed them<br />
# ..with a nice, human written commit message that makes sense.<br />
$ git commit -a -m &#8220;Your commit message (some SHA-1 Hash as a reference)&#8221;</p></div>
<p>All done! You can then push your changes to your remote repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2008/09/01/merging-in-single-commits-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
