<?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>Simon Whatley &#187; JavaScript</title>
	<atom:link href="http://www.simonwhatley.co.uk/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Wed, 02 Nov 2011 09:28:34 +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>3 Free eBooks on jQuery</title>
		<link>http://www.simonwhatley.co.uk/3-free-ebooks-on-jquery</link>
		<comments>http://www.simonwhatley.co.uk/3-free-ebooks-on-jquery#comments</comments>
		<pubDate>Tue, 19 Jul 2011 21:33:15 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=4489</guid>
		<description><![CDATA[jQuery, a JavaScript library, is definitely something worth knowing. Here are some resources to help you learn and master it.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2011/07/jquery_logo-300x73.png" alt="" title="jQuery" width="300" height="73" class="aligncenter size-medium wp-image-4495" /></p>
<p>jQuery, a JavaScript library, is definitely something worth knowing. Here are some resources to help you learn and master it.</p>
<ul>
<li><a href="http://jqfundamentals.com/book/index.html" title="jQuery Fundamentals" target="_blank" rel="nofollow">jQuery Fundamentals</a> by <a href="http://www.rebeccamurphey.com/" title="Rebecca Murphey" target="_blank" rel="nofollow">Rebecca Murphey</a>, with contributions from <a href="http://james.padolsey.com/" title="James Padolsey" target="_blank" rel="nofollow">James Padolsey</a>, <a href="http://paulirish.com/" title="Paul Irish" target="_blank" rel="nofollow">Paul Irish</a> and others, is a free e-book available in <abbr title="HyperText Markup Language">HTML</abbr>. It includes an overview of JavaScript as its first chapter, to help developers get up to speed.</li>
<li><a href="http://addyosmani.com/blog/essentialjsdesignpatterns/" title="Essential JavaScript &#038; jQuery Design Patterns" target="_blank" rel="nofollow">Essential JavaScript &#038; jQuery Design Patterns</a> by <a href="http://addyosmani.com/blog/" title="Addy Osmani" target="_blank" rel="nofollow">Addy Osmani</a> is a free e-book of design patterns for those who already know jQuery but want to take their skills to the next level.</li>
<li><a href="http://docs.jquery.com/Main_Page" title="Official jQuery Documentation" target="_blank" rel="nofollow">Official jQuery Documentation</a></li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/3-free-ebooks-on-jquery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run Two Versions of Firefox on Mac OSX</title>
		<link>http://www.simonwhatley.co.uk/run-two-versions-of-firefox-on-mac-osx</link>
		<comments>http://www.simonwhatley.co.uk/run-two-versions-of-firefox-on-mac-osx#comments</comments>
		<pubDate>Wed, 30 Mar 2011 09:03:52 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Firefox 4]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3958</guid>
		<description><![CDATA[Last week Firefox 4.0 was released to the world. Web developers everywhere celebrated with delight, the new browser. Well, almost! The browser comes packed with a super-fast JavaScript engine called J&#228;gerMonkey, improved support for HTML5 and CSS3 and a bunch of new interface updates.]]></description>
			<content:encoded><![CDATA[<p>Last week Firefox 4.0 was released to the world. Web developers everywhere celebrated with delight, the new browser. Well, almost!  The browser comes packed with a <a href="http://www.mozilla.com/en-US/firefox/4.0/releasenotes/" title="Firefox 4.0 release notes" target="_blank" rel="nofollow">super-fast JavaScript engine called J&auml;gerMonkey, improved support for HTML5 and CSS3 and a bunch of new interface updates</a>. But don’t get too excited just yet! It&#8217;s still a good idea to keep that old version of Firefox around for testing; we can’t assume everyone has upgraded to Firefox 4. So, to run both Firefox 3.6 and Firefox 4.0 on the same machine, just follow these simple steps:</p>
<ol>
<li>Open up your Applications folder and find your old version of Firefox.</li>
<li>Right click -> Get Info.</li>
<li>Rename to &#8220;Firefox36.app&#8221;.</li>
<li>Download Firefox 4.0 and install as normal.</li>
</ol>
<p>Voil&agrave;! You now have more than one Firefox browser to play with.</p>
<p>That was really simple huh? If someone knows how to do this on the Windows and Linux side, I would love to hear how.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/run-two-versions-of-firefox-on-mac-osx/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using Google-Hosted JavaScript Libraries with WordPress</title>
		<link>http://www.simonwhatley.co.uk/using-google-hosted-javascript-libraries-with-wordpress</link>
		<comments>http://www.simonwhatley.co.uk/using-google-hosted-javascript-libraries-with-wordpress#comments</comments>
		<pubDate>Tue, 13 Apr 2010 15:00:19 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3474</guid>
		<description><![CDATA[With the announcement that Google will be including page loading times as part of it’s SERPs ranking algorithm, it has become increasingly important to optimise your use of 3rd-party libraries such as jQuery.]]></description>
			<content:encoded><![CDATA[<p>With the announcement that Google will be including page loading times as part of it&#8217;s <abbr title="Search Engine Results Pages">SERP</abbr>s ranking algorithm, it has become increasingly important to optimise your use of 3rd-party libraries such as <a href="http://jquery.com" title="jQuery JavaScript Library" target="_blank" rel="nofollow">jQuery</a>.</p>
<p>If you want &#8212; and this is the default setting for WordPress, themes and plugins &#8212; you can just download jQuery, put it on your server and link to it from your <code>header.php</code> file in the <code>&lt;head&gt;</code> section.</p>
<p>However, it is better to use the proper <code>wp_register_script()</code> function, which can be achieved in your <code>functions.php</code> file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   wp_deregister_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
   wp_register_script<span style="color: #009900;">&#40;</span>
   	<span style="color: #0000ff;">'jquery'</span><span style="color: #339933;">,</span>
   	<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
   	<span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
   	<span style="color: #0000ff;">'1.4.2'</span>
   <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
   wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The reason we use the <code>wp_register_script()</code> is to ensure that WordPress and its themes and plugins are aware that the script has been loaded and therefore not to load an additional copy.</p>
<p>I have also used the <code>is_admin()</code> function to prevent conflict and therefore errors, in the WordPress administrator.</p>
<p>Of course, this method is not only restricted to jQuery, you can do the same for other popular JavaScript frameworks such as <a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" title="Google-hosted Mootools">Mootools</a>.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Further information on the wp_enqueue_script can be found on the <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" title="WordPress Codex - Function Reference/wp enqueue script" target="_blank" rel="nofollow">WordPress Codex</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/using-google-hosted-javascript-libraries-with-wordpress/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Announces Plans to Offer a Google Analytics Opt-Out</title>
		<link>http://www.simonwhatley.co.uk/google-announces-plans-to-offer-a-google-analytics-opt-out</link>
		<comments>http://www.simonwhatley.co.uk/google-announces-plans-to-offer-a-google-analytics-opt-out#comments</comments>
		<pubDate>Fri, 19 Mar 2010 11:06:49 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[advertising businesses]]></category>
		<category><![CDATA[advertising revenues]]></category>
		<category><![CDATA[analytics solution]]></category>
		<category><![CDATA[europe]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Omniture]]></category>
		<category><![CDATA[online privacy]]></category>
		<category><![CDATA[site owners]]></category>
		<category><![CDATA[United States]]></category>
		<category><![CDATA[Web analytics]]></category>
		<category><![CDATA[web analytics solution]]></category>
		<category><![CDATA[Webtrends]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3303</guid>
		<description><![CDATA[On 18th March Google announced that it had been developing opt-out functionality for its Analytics product, seemingly in response to growing unease with United States and European regulators.]]></description>
			<content:encoded><![CDATA[<p>Yesterday Google announced that it had been developing opt-out functionality for its Analytics product, seemingly in response to growing unease with United States and European regulators.</p>
<blockquote><p>As an enterprise-class web analytics solution, Google Analytics not only provides site owners with information on their website traffic and marketing effectiveness, it also does so with high regard for protecting user data privacy. Over the past year, we have been exploring ways to offer users more choice on how their data is collected by Google Analytics. We concluded that the best approach would be to develop a global browser based plug-in to allow users to opt out of being tracked by Google Analytics. Our engineers are now hard at work finalizing and testing this opt-out functionality. We look forward to make it globally available to our users in the coming weeks.</p></blockquote>
<p>This was an unexpected move, but possibly a very smart one by Google, which aspires to turn its Analytics product into an &#8220;enterprise-class web analytics solution.&#8221; Many analysts will see the creation of a browser plugin to opt-out of Analytics counterintuitive. Rationalising web analytics is already hard enough, but if you now need to factor in a proportion of people who may have opted-out, it will create a minefield of doubt. Furthermore, if people are able to opt-out of Google Analytics, will enterprises want to use it as an analytics solution?</p>
<p>It is safe to assume that Google do not want to kill one of their key products, which sits neatly between their search and advertising businesses. Indeed Google aren&#8217;t the first to create and opt-out, with Omniture and Webtrends having already created a cookie-based solution.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>So why shouldn&#8217;t you be too worried about Google&#8217;s plugin?</p>
<ul>
<li><strong>Opt-out does not signal a death knell for data gathering</strong>. Although some people will undoubtedly be concerned about tracking and therefore download the plugin, the vast majority of users will not. Furthermore, it is the trends in analytics that are important rather than absolute numbers. Analysts will simply need to study, manage and quantify the resulting bias. Such issues are analagous with a user deleting cookies or disabling JavaScript in their browser.</li>
<li><strong>Good privacy management reinforces trust</strong> in a brand that has been under attack over the amount of data it collects on its users. This in turn will drive long-term acceptance of Google products and enhance its earning potential. As mentioned at the beginning of this article, this move shows good faith to regulators and sets the stage for Google Analytics to operate safely within the containts of more stringent privacy regulations in the United States and more importantly Europe. If Google Analytics is allowed to operate freely on this basis, it may boost usage and advertising revenues, which in turn will maintain it as an important product for Google.</li>
<li><strong>Opt-in customers are better customers</strong> because they provide an accurate picture of how they use your website and therefore are key in helping you improve the user experience. Focusing your efforts on those who are willing to be measured may enhance the achievement of site goals.</li>
</ul>
<p>How should you prepare for the launch of the plugin?</p>
<ul>
<li>Benchmark your data (traffic, visitors etc) before and after the release of the opt-out plugin. That way, you will be able to determine the potential bias between the figures and adjust the reports accordingly.</li>
<li>Understand how to accommodate the opt-out bias in your reports and determine which reports may need recalibration.</li>
<li>Understand how the change in your Google Analytics metrics may compare to or impact upon 3rd party metrics, for example those used to calculate advertising revenue.</li>
<li>Determine whether announcing the possibility of your users opting out will enhance the trust of your website, with the view to potentially alerting to your users that they have such an opportunity.</li>
<ul>
<p>This move by Google is likely to set the trend amongst Analytics providers since online privacy is a major issue. Most modern browsers include an &#8220;incognito&#8221; setting, which allows for private browsing, therefore it stands to reason that the analytics providers will follow Google&#8217;s lead, even if it is only a cynical attempt to reassure users and maintain market share.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/google-announces-plans-to-offer-a-google-analytics-opt-out/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinking Mobile? If You Build It, They Will Come</title>
		<link>http://www.simonwhatley.co.uk/thinking-mobile-if-you-build-it-they-will-come</link>
		<comments>http://www.simonwhatley.co.uk/thinking-mobile-if-you-build-it-they-will-come#comments</comments>
		<pubDate>Thu, 04 Feb 2010 14:35:59 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Appcelerator]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Apple iPhone]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Brushes]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[ebay]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[HIG]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[human interface guidelines]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[IPhone OS]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Mobile operating system]]></category>
		<category><![CDATA[Multi-touch]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Ovi Store]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[Qik]]></category>
		<category><![CDATA[RedLaser]]></category>
		<category><![CDATA[Rim]]></category>
		<category><![CDATA[RjDj]]></category>
		<category><![CDATA[Smartphones]]></category>
		<category><![CDATA[StreetCar]]></category>
		<category><![CDATA[Symbian]]></category>
		<category><![CDATA[The Guardian]]></category>
		<category><![CDATA[User interface]]></category>
		<category><![CDATA[web-based application]]></category>
		<category><![CDATA[WebOS]]></category>
		<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=2232</guid>
		<description><![CDATA[Smartphone applications are predicted to overtake the desktop software market. So who will win the multi-billion-pound [dollar] application economy, and what are the new rules?]]></description>
			<content:encoded><![CDATA[<p>Smartphone applications are predicted to overtake the desktop software market. So who will win the multi-billion-pound [dollar] application economy, and what are the new rules?</p>
<p>In January 2010, Apple announced to great fanfare that they had recently sold their 3 billionth iPhone application. Of course not all these applications are paid-for, but with a 30% levy taken on each and every paid-for application, Apple are taking a significant share of the revenue from the application pie. However, as a distribution channel, the AppStore is second to none, whilst <a href="http://metrics.admob.com/2010/01/mobile-browsing-trends-from-quantcast/" title="Mobile Browsing Trends from Quantcast" target="_blank" rel="nofollow">the iPhone uptake is staggering</a>, with a majority share of the smartphone market in many regions of the world. There is a significant opportunity for any developer to make a huge return on investment, assuming the idea is a winning one.</p>
<p>iPhone, Android, Windows Mobile, Blackberry, Nokia and now the larger form factor iPad and Kindle support the idea of applications, or will do in the near future. So what do you need to do to design and build your first application?</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<ol>
<li><strong>Familiarise yourself with the rules</strong><br />
Whether you&#8217;re going to build applications for the <a href="http://developer.apple.com/iphone/" title="Apple iPhone Developer Centre" target="_blank" rel="nofollow">iPhone OS</a>, <a href="http://developer.android.com/" title="Android Developer Resources"  target="_blank" rel="nofollow">Android OS</a> or any other of the mobile platforms, you will need to familiarise yourself with how each operating system does things. Smartphone development is different from the development we are accustomed with on the Web. Reading the user interface guidelines for each platform will go a long way to developing your first application. Smartphones are personal devices and know where you are almost all the time through <abbr title="Global Positioning System">GPS</abbr>. They have rotation detectors, compasses and multitouch screens with gestural interfaces. Only once you know what is possible with each smartphone platform can you begin to design your application.</li>
<li><strong>Brainstorm the issues</strong><br />
This is the creative part of your application development process. You have a basic idea, but you need to take it forward into something that has features and benefits. Will the application be paid-for or free? Will it provide a service or be a marketing channel? Will it be standalone or link closely with other online presences and networks? Smartphone applications, unlike <em>ordinary</em> websites, invariably need to actually do something. There is an element of artificial intelligence at play, whereby the phone can actually know where it is in the world and it&#8217;s orientation, whilst the user interface is remarkably different from that of simply a mouse and keyboard. Smartphone applications can&#8217;t simply be flat catalogues, they need to do something and do it well. Whether this is booking and accessing a car as with <a href="http://itunes.apple.com/gb/app/streetcar/id335331332" title="Apple AppStore: StreetCar" target="_blank" rel="nofollow">StreetCar</a>, buying something from <a href="http://itunes.apple.com/gb/app/ebay-mobile/id282614216" title="Apple AppStore: eBay" target="_blank" rel="nofollow">eBay</a>, paying with <a href="http://itunes.apple.com/gb/app/paypal/id283646709" title="Apple AppStore: PayPal" target="_blank" rel="nofollow">PayPal</a>, creating music with <a href="http://itunes.apple.com/gb/app/rjdj/id290626964" title="Apple AppStore: RjDj" target="_blank" rel="nofollow">RjDj</a>, drawing pictures with <a href="http://itunes.apple.com/gb/app/brushes/id288230264" title="Apple AppStore: Brushes" target="_blank" rel="nofollow">Brushes</a>, price comparison with <a href="http://itunes.apple.com/gb/app/redlaser/id312720263" title="Apple AppStore: RedLaser" target="_blank" rel="nofollow">RedLaser</a>, reading the latest news from <a href="http://itunes.apple.com/gb/app/the-guardian/id340425655" title="Apple AppStore: The Guardian" target="_blank" rel="nofollow">the Guardian</a>, video casting with <a href="http://itunes.apple.com/gb/app/qik-for-3gs/id302767821" title="Apple AppStore: Qik" target="_blank" rel="nofollow">Qik</a> or planning your journey with <a href="http://itunes.apple.com/gb/app/london-tube-deluxe/id300139358" title="Apple AppStore: Tube Deluxe" target="_blank" rel="nofollow">Tube Deluxe</a> your app needs to be compelling.</li>
<li><strong>Create a prototype</strong><br />
You have your compelling idea; create a proof-of-concept prototype. This prototype is used to test some or many aspects of the intended design without attempting to exactly simulate the visual appearance, content or intended interactions. Such prototypes can be used to &#8220;prove&#8221; out a potential design approach such as range of motion, mechanics, sensors, architecture, etc. Making paper prototypes, for example, is a great way to test the application rather than creating low or high fidelity wireframes and <em>hoping for the best</em>. Doing this also provides a perfect opportunity for people around you &#8212; friends, colleagues and family members &#8212; to try out the prototype with little fuss. Only once you&#8217;re happy with the design should you begin any form of coding.</li>
<li><strong>Submit early</strong><br />
You have your application working. You have conducted a number of usability tests and all is looking great. It&#8217;s time to submit it to the appropriate application store. Apple has its <a href="http://www.apple.com/iphone/apps-for-iphone/" title="Apple AppStore" target="_blank" rel="nofollow">AppStore</a>, Android its <a href="http://www.android.com/market/" title="Android Market" target="_blank" rel="nofollow">Market Place</a>, Nokia its <a href="https://store.ovi.com" title="Nokia Ovi Store" target="_blank" rel="nofollow">Ovi Store</a> and so on. Each store has its own nuiances, but if you&#8217;re considering an iPhone application, Apple has been know to <em>drag its feet</em> when approving applications for release. Apple has a <a href="http://news.cnet.com/8301-13579_3-10315328-37.html" title="CNet: Apple sheds light on App Store approval process" target="_blank" rel="nofollow">much discussed approval process</a>, with the possibility of rejection commonplace. Don&#8217;t make plans that depend on Apple. It is better to silently release the application, rather than creating a huge fanfare.</li>
<li><strong>Iterate often</strong><br />
Once your application has been launched your work is nowhere near over, indeed it has just begun! As you gain more and more users, improvements will suggest themselves not only from within your team, but more often, from your users. Here is where you go back to stage two and start brainstorming again. Version 2 may include bug fixes, but also major feature updates. For the latter, your brainstorming will decide what is most important for the next iteration. When your next iteration is complete, the AppStore, for example, makes upgrades far easier to achieve than for normal desktop software.</li>
</ol>
<p>If you&#8217;re planning an application that could disrupt one of the smartphones capabilities, such as <a href="http://www.google.com/mobile/voice/" title="Google Voice for Mobile" target="_blank" rel="nofollow">Google Voice for the iPhone</a>, it may be worth considering whether building an application specifically for that particular operating system is worthwhile. Google Voice was neither approved nor rejected by Apple for the iPhone, but has now been replaced by a fully featured <abbr title="HyperText Markup Language">HTML</abbr>5 web-based application; circumventing the Apple approval process. Of course this now means that the same web-based application can be used for not just the iPhone, but other smartphones.</p>
<p>Now go forth and build it!</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><strong>Resources</strong></p>
<p>Smartphone User Interface Guidelines:</p>
<ul>
<li><a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html" target="_blank" rel="nofollow">Apple iPhone Human Interface Guidelines (HIG)</a></li>
<li><a href="http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html" target="_blank" rel="nofollow">Apple iPhone Application Programming Guide</a></li>
<li><a href="http://developer.android.com/guide/practices/ui_guidelines/index.html" target="_blank" rel="nofollow">Android User Interface Guidelines</a></li>
<li><a href="http://binarysheep.com/AndroidCode/AndroidHIG.pdf" target="_blank" rel="nofollow">Android Human Interface Guidelines (adapted from Apple)</a></li>
<li><a href="http://www.forum.nokia.com/Tools_Docs_and_Code/Documentation/Usability/UI_Style_and_Visual_Guidelines.xhtml" target="_blank" rel="nofollow">Nokia User Interface Style and Visual Guidelines</a></li>
<li><a href="http://developer.palm.com/index.php?option=com_content&#038;view=article&#038;id=1606" target="_blank" rel="nofollow">Palm User Interface Guidelines</a></li>
<li><a href="http://docs.blackberry.com/en/developers/deliverables/6625/Screens_373681_11.jsp" target="_blank" rel="nofollow">RIM Blackberry User Interface Guidelines</a></li>
</ul>
<p>Application Development Frameworks:</p>
<ul>
<li><a href="http://phonegap.com/" title="PhoneGap: An open source development tool for building iPhone, Android, Blackberry and other mobile apps with JavaScript" target="_blank" rel="nofollow">PhoneGap</a> an open source development tool for building iPhone, Android, Blackberry and other mobile apps with JavaScript</li>
<li><a href="http://www.appcelerator.com/" title="Appcelerator: Mobile development platform for javascript developers" target="_blank" rel="nofollow">Appcelerator</a> a mobile development platform for javascript developers</li>
</ul>
<p>Mobile Web Application Frameworks:</p>
<ul>
<li><a href="http://www.jqtouch.com/" title="jQTouch: A jQuery plugin for mobile development" target="_blank" rel="nofollow">jQTouch</a> a jQuery plugin for mobile development</li>
<li><a href="http://code.google.com/p/iui/" title="iUI: iPhone User Interface Framework" target="_blank" rel="nofollow">iUI</a> an iPhone/iPod Touch user interface framework</li>
</ul>
<p>Other:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Mobile_development" title="Wikipedia: Mobile Development" target="_blank" rel="nofollow">Wikipedia article on Mobile Development</a></li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/thinking-mobile-if-you-build-it-they-will-come/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Configure Apache to GZip Your Components</title>
		<link>http://www.simonwhatley.co.uk/how-to-configure-apache-to-gzip-your-components</link>
		<comments>http://www.simonwhatley.co.uk/how-to-configure-apache-to-gzip-your-components#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:26:38 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DEFLATE]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Yahoo]]></category>
		<category><![CDATA[ZIP]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=2332</guid>
		<description><![CDATA[Compressing your Web components will help speed up your Website. The majority of your visitors will benefit as most all Web browsers support GZip compression. You’ll want to compress all text, which includes HTML, CSS, JavaScript, XML, JSON, etc.]]></description>
			<content:encoded><![CDATA[<p>Compressing your Web components will help speed up your Website.  The majority of your visitors will benefit as most all Web browsers support <abbr title="GNU zip">GZip</abbr> compression.  You’ll want to compress all text, which includes <abbr title="HyperText Markup Language">HTML</abbr>, <abbr title="Cascading Style Sheets">CSS</abbr>, JavaScript, <abbr title="eXtensible Markup Language">XML</abbr>, <abbr title="JavaScript Object Notation">JSON</abbr>, etc.</p>
<p>Apache 2.x uses <code>mod_deflate</code>. Much like <a href="/how-to-set-an-expires-header-in-apache" title="setting expires headers">setting expires headers</a>, this will save you bandwidth and server load, because it allows output from your server to be compressed before being sent to the client over the network.</p>
<p>The deflate module is not compiled by default and must be enabled in the Apache <em>httpd.conf</em> file. Make sure the following is present and uncommented (remove preceding the #):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">LoadModule deflate_module modules/mod_deflate.so</pre></div></div>

<p>To set <abbr title="GNU zip">GZip</abbr> compression, simply add the following to the <virtualHost> section of your Apache <em>vhost</em> configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html</pre></div></div>

<p>Alternatively you can add it to your <em>htaccess</em> file in an <code>&lt;ifModule mod_deflate.c&gt;&lt;/ifModule&gt;</code> block.</p>
<p>All you really need is the first line. The <code>BrowserMatch </code>lines are there to handle issues with older browsers such as Internet Explorer 5.</p>
<p>You can read all about <abbr title="GNU zip">GZip</abbr> by reading Yahoo!’s <a href="http://developer.yahoo.com/performance/rules.html#gzip" title="Yahoo! Best Practices for Speeding Up Your Web Site Guide" target="_blank" rel="nofollow">Best Practices for Speeding Up Your Web Site</a> guide.</p>
<p>Alternatively, read the <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" title="Apache mod_deflate documentation" target="_blank" rel="nofollow">Apache mod_deflate documentation</a>.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/how-to-configure-apache-to-gzip-your-components/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache Ant Best Practices</title>
		<link>http://www.simonwhatley.co.uk/apache-ant-best-practices</link>
		<comments>http://www.simonwhatley.co.uk/apache-ant-best-practices#comments</comments>
		<pubDate>Mon, 10 Aug 2009 09:12:40 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[automated build]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[build scripts]]></category>
		<category><![CDATA[immediate processing]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[local development server]]></category>
		<category><![CDATA[similar build tool]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[The Definitive Guide]]></category>
		<category><![CDATA[user acceptance testing server]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1831</guid>
		<description><![CDATA[Before Ant, building and deploying web applications required a series of scripts or manual processes, which often led to mistakes. Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects. However, that doesn’t mean it is restricted to Java projects. I use Ant increasingly for all my web development projects as it is an integral part of Eclipse, my IDE of choice. It makes building applications and releasing them across different servers far more efficient and less problematic.]]></description>
			<content:encoded><![CDATA[<p>Before Ant, building and deploying web applications required a series of scripts or manual processes, which often led to mistakes.</p>
<p>Apache <a href="http://ant.apache.org" title="Apache Ant" target="_blank" rel="nofollow">Ant</a> is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects. However, that doesn&#8217;t mean it is restricted to Java projects. I use Ant increasingly for all my web development projects as it is an integral part of <a href="http://eclipse.org" title="Eclipse" target="_blank" rel="nofollow">Eclipse</a>, my <abbr title="Integrated Development Environment">IDE</abbr> of choice. It makes building applications and releasing them across different servers far more efficient and less problematic.</p>
<p>When I start a new project, after creating the folder structure, I create the Ant build file. Ant defines the build process and must be used by every developer working on the project. All of the tips in this article assume that the Ant build file is extremely important, must be written with care, and maintained in version control and re-factored periodically, when the project dependencies change.</p>
<p>Ant uses <abbr title="eXtensible Markup Language">XML</abbr> to describe the build process and its dependencies. By default the <abbr title="eXtensible Markup Language">XML</abbr> file is named <code>build.xml</code>. This makes it really simple for you setup and edit different build processes. However, since Ant is relatively simple to set up, you need to follow a common set of best practices. Some of these best practices were inspired by mistakes made on previous projects, or ideas passed on to me by other developers.</p>
<h3>Automate absolutely everything</h3>
<p>Ant is a powerful tool. If you choose to use it, get it to do absolutely everything. Ant can integrate with your source control databases such as Subversion (<abbr title="Subversion">SVN</abbr>), run <abbr title="Structured Query Language">SQL</abbr> scripts, change file permissions, send files across <abbr title="File Transfer Protocol">FTP</abbr>, zip and un-zip files, and many more tasks besides these.</p>
<h3>If you use Ant, only use Ant</h3>
<p>Use Ant as a common baseline. Regardless of what <abbr title="Integrated Development Environment">IDE</abbr> you use to develop your applications, set up an Ant build file that <strong>all</strong> team members use. The <code>build.xml</code> file is the one true build script. Make a rule that everyone should perform a successful Ant build before code is checked into version control. This will ensure that code will always build from the same build file.</p>
<h3>Follow consistent conventions</h3>
<p>Ant expects your build file to be called <code>build.xml</code> and the build&#8217;s properties file <code>build.properties</code>. These files should also be in the root directory of your project. Other than an insane desire to change convention and confuse other team members, don&#8217;t change this convention. Another less-well-known convention is to prefix all internal commands with a hyphen (-). It has the advantage that it is not possible to invoke targets that follow this naming convention, from the command line.</p>
<p>Spend time formatting the build file. Since <abbr title="eXtensible Markup Language">XML</abbr> is quite verbose, use tabs and line breaks to make the file readable to the human eye. Ant itself doesn&#8217;t care if the file looks pretty, but you can bet that you and your team will.</p>
<p>Pick meaningful, human-readable names for targets and properties. For example <em>dir.reports</em> is better than simple <em>rpt</em>. The specific naming convention is not important, beyond being meaningful to your organisation. For example, I use the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">deploy.local
deploy.dev
deploy.test
deploy.live
-build
-clean
-concatenate
-minify
-prepare</pre></div></div>

<p>The <em>-concatenate</em> and <em>-minify</em> commands are specific to web projects, the later using the Yahoo compressor library to minify <abbr ttile="Cascading Stylesheets">CSS</abbr> and JavaScript files.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Provide a clean target</h3>
<p>Every build file should include a target that removes all generated files and directories, bringing everything back to its original pristine state. All files remaining after the clean should be those found in version control.</p>
<p>An example clean command could be as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Deletes all generated files and directories&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${dir.build}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${dir.dist}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>Use build files for all stages of the development process (development, staging and production)</h3>
<p>Ant standardises your build and release cycle. Therefore use it for all stages of the development process. Use it for releasing code to your local development server, your staging or user acceptance testing server and your production server. The different deployments can obviously differ slightly based upon the needs, i.e. your production build need not include the creation of dummy data, but may include a call to source control.</p>
<h3>Make build files self-contained</h3>
<p>A build file that relies on external dependencies is one that will be difficult to configure or has the potential to cause problems. If your build depends on additional tools, put them in your source control repository. I generally include a <em>lib</em> for all dependencies in my project root. This folder includes such files as the <a href="http://developer.yahoo.com/yui/compressor/" title="Yahoo Compressor" target="_blank" rel="nofollow">Yahoo Compressor</a> or <a href="http://www.jslint.com" title="JSLint" target="_blank" rel="nofollow">JSLint</a>.</p>
<h3>Prefer a single build file</h3>
<p>It is possible to split the build up into several small build files, each of which is responsible for a small proportion of the overall build. This isn&#8217;t always the best idea! Breaking the build often makes it harder to comprehend the whole process. It is better not to over-engineer the project and keep to a single, well formatted build file.</p>
<p>If your project is split into different build files, there should always be a master build file, found in the root directory of the project, even if it only delegates actual work to subordinate builds.</p>
<h3>Put the build.xml file in the project&#8217;s root directory</h3>
<p>The Ant build file can reside anywhere in the project tree, but conceptually it makes sense to put the file in the project root. This keeps things clean, simple and somewhat obvious to new members to the project. Having a build file in the top-level directory also makes it conceptually easy to see how relative paths point to different directories in the project tree.</p>
<p>When the <code>build.xml</code> file is in the top-level directory, you can compile code from the command line without the need to change the working directory.</p>
<h3>Modularise your project</h3>
<p>Arrange your project into coherent self-contain modules.</p>
<p>The following shows how I typically arrange my project files.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root directory]
	/docs
	/lib
	/src
build.properties
build.xml
task.properties</pre></div></div>

<p> The <em>docs</em> folder contains project documentation, the <em>lib</em> folder contains libraries specific to the project and required by Ant (generally this is a link to repository containing a number of utility JAR files, such as those for <abbr title="Subversion">SVN</abbr> and <abbr title="File Transfer Protocol">FTP</abbr>). Finally, the <em>src</em> folder contains the actual project files.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Use version control</h3>
<p>It is important to use version control for your entire project. The build file is an important artefact that needs to be versioned along with the source code of the project. When you tag a build for release, the build file should also be included. If you then need to roll back to a previous release, you will be able to build the code based upon the build file used for that particular release (after all, build files develop along with changes to the source code).</p>
<p>Third-party <abbr title="Java Archive">JAR</abbr> and executable files should also be maintained in your local version control. This makes it possible to recreate previous releases, after all third-party libraries are likely to develop and change as frequently as your own code. If you want or need to take advantage of these changes, it is necessary to version control the older versions.</p>
<p>Avoid including build output in version control. Provided that you use version control correctly, you will be able to recreate these files at a later date.</p>
<h3>Include comments in the build file (self-documenting)</h3>
<p>Make the build file self-documenting. Adding target descriptions is one way to achieve this. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Deletes all generated files and directories&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div></div>

<p>Internal targets should not include description attributes. Internal targets may include targets that perform immediate processing, such as file concatenation or minifying.</p>
<p>Another way to include help in the build file is the <code>echo</code> tag. You can put any amount of comment between these tags and the information is printed to screen. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Deletes all generated files and directories&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Cleaning project...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Deleting build directory...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${dir.build}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Deleting dist directory...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${dir.dist}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>Summary</h3>
<p>By using Ant and creating and maintaining build scripts for a project, the reliance on ad-hoc manual procedures for compiling and creating websites is removed. Using a defined process with Ant, or similar build tool, removes errors across the entire project, whilst allowing teams to develop code more efficiently.</p>
<h3>References</h3>
<p>Holzner, Steve (2005). Ant: The Definitive Guide, 2nd Edition, O&#8217;Reilly, ISBN 978-0-596-00609-9.</p>
<p>Apache Ant &#8211; <a href="http://ant.apache.org" title="Apache Ant" target="_blank" rel="nofollow">http://ant.apache.org</a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/apache-ant-best-practices/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing Twitter Usernames, Hashtags and URLs with ColdFusion</title>
		<link>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-coldfusion</link>
		<comments>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-coldfusion#comments</comments>
		<pubDate>Fri, 01 May 2009 11:24:07 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[GPS logger]]></category>
		<category><![CDATA[Holux M-241 GPS Receiver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[New Brunswick]]></category>
		<category><![CDATA[online resource]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1907</guid>
		<description><![CDATA[Some time ago, well almost a year ago actually, I posted an article called Parsing Twitter Usernames, Hashtags and URLs with JavaScript. From that article, it became immediately apparent that this was an issue many people were confronting and one that required an answer. Now, belatedly, it is the turn of ColdFusion to get the Twitter love.]]></description>
			<content:encoded><![CDATA[<p>Some time ago, well almost a year ago actually, I posted an article called <a href="/parsing-twitter-usernames-hashtags-and-urls-with-javascript">Parsing Twitter Usernames, Hashtags and URLs with JavaScript</a>. From that article, it became immediately apparent that this was an issue many people were confronting and one that required an answer. Now, belatedly, it is the turn of ColdFusion to get the Twitter love.</p>
<p>Compared to JavaScript it is far easier to parse the <abbr title="Univeral Resource Locator">URL</abbr>s, Usernames and Hashtags in a tweet using ColdFusion and minor amendments to the regular expressions used in the JavaScript code.</p>
<p>Below is an example tweet that I&#8217;ll use for this post.</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #009900;">&quot;Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call @fordie. http://bit.ly/2RsAu ##holux ##gpslogger&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span></pre></div></div>

<p><abbr title="Nota bene (please note)">NB</abbr>. For the purpose of this test, I need to double-hash the hashtags to prevent ColdFusion throwing an error.</p>
<h3>Parsing URLs as Links to the resource</h3>
<p>We can simply demonstrate the parsing of the link with the following code in the body of the page:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #800080;">REReplace</span><span style="color: #000000;">&#40;</span>myTweet,<span style="color: #009900;">'([A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&amp;amp;\?\/.=]+)'</span>,<span style="color: #009900;">'&lt;a href=&quot;\1&quot;&gt;</span></span>\1<span style="color: #333333;"><span style="color: #800000;">&lt;</span><span style="color: #0000ff;">/</span>a<span style="color: #0000ff;">&gt;</span></span>','ALL') /&gt;</pre></div></div>

<p><abbr title="Nota bene (please note)">NB</abbr>. The <code>\1</code> is a back reference to part of the regular expression match. A backreference stores the part of the string matched by the part of the regular expression inside the parentheses. This means you can reuse it inside the regular expression, or afterwards as I am doing in each of these examples.</p>
<p>The resultant HTML generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call @fordie. &lt;a href=&quot;http://bit.ly/2RsAu&quot;&gt;http://bit.ly/2RsAu&lt;/a&gt; #holux #gpslogger</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Parsing Usernames as Links to Twitter</h3>
<p>Following on from the <abbr title="Universal Resource Locator">URL</abbr> example above, we can apply a similar methodology to Twitter usernames since they can also be <abbr title="Universal Resource Locator">URL</abbr>s to their associated Twitter page.</p>
<p>We can simply demonstrate this with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #800080;">REReplace</span><span style="color: #000000;">&#40;</span>myTweet,<span style="color: #009900;">'[@]+([A-Za-z0-9-_]+)'</span>,<span style="color: #009900;">'&lt;a href=&quot;http://twitter.com/\1&quot; rel=&quot;nofollow&quot;&gt;</span></span>@\1<span style="color: #333333;"><span style="color: #800000;">&lt;</span><span style="color: #0000ff;">/</span>a<span style="color: #0000ff;">&gt;</span></span>','ALL') /&gt;</pre></div></div>

<p>The regular expression in this case finds all instances of <code>@username</code>. The Twitter <abbr title="Universal Resource Locator">URL</abbr> is then applied to the username.</p>
<p>The resultant HTML generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call &lt;a href=&quot;http://twitter.com/fordie&quot; rel=&quot;nofollow&quot;&gt;@fordie&lt;/a&gt;. http://bit.ly/2RsAu #holux #gpslogger</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Parsing Hashtags as Links to Twitter’s Search</h3>
<p>Finally, Twitter also allows user’s to create Hastags within their posts. Hashtags are a community-driven convention for adding additional context and metadata to your tweets. Like regular <abbr title="Universal Resource Locator">URL</abbr>s and usernames, Hastags can been parsed as a <abbr title="Universal Resource Locator">URL</abbr> to an online resource, in this case, Twitter’s search.</p>
<p>We can simply demonstrate this with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #800080;">REReplace</span><span style="color: #000000;">&#40;</span>myTweet,<span style="color: #009900;">'[##]+([A-Za-z0-9-_]+)'</span>,<span style="color: #009900;">'&lt;a href=&quot;http://search.twitter.com/search?q=%23\1&quot; rel=&quot;nofollow&quot;&gt;</span></span><span style="color: #0000ff;">##</span>\1<span style="color: #333333;"><span style="color: #800000;">&lt;</span><span style="color: #0000ff;">/</span>a<span style="color: #0000ff;">&gt;</span></span>','ALL') /&gt;</pre></div></div>

<p>The regular expression in this case finds all instances of <code>#hashtag</code>. The Twitter Search <abbr title="Universal Resource Locator">URL</abbr> is then applied to the hashtag.</p>
<p>The resultant HTML generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call @fordie. http://bit.ly/2RsAu &lt;a href=&quot;http://search.twitter.com/search?q=%23holux&quot; rel=&quot;nofollow&quot;&gt;#holux&lt;/a&gt; &lt;a href=&quot;http://search.twitter.com/search?q=%23ipslogger&quot; rel=&quot;nofollow&quot;&gt;#gpslogger&lt;/a&gt;</pre></div></div>

<h3>All in one</h3>
<p>So, putting all the regular expressions together, you would end up with the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call &lt;a href=&quot;http://twitter.com/fordie&quot; rel=&quot;nofollow&quot;&gt;@fordie&lt;/a&gt;. &lt;a href=&quot;http://bit.ly/2RsAu&quot;&gt;http://bit.ly/2RsAu&lt;/a&gt; &lt;a href=&quot;http://search.twitter.com/search?q=%23holux&quot; rel=&quot;nofollow&quot;&gt;#holux&lt;/a&gt; &lt;a href=&quot;http://search.twitter.com/search?q=%23gpslogger&quot; rel=&quot;nofollow&quot;&gt;#ipslogger&lt;/a&gt;</pre></div></div>

<p>Which translates as the more useful tweet:</p>
<p>Woot! I&#8217;ve just taken receipt of my Holux M-241 GPS logger. Good call <a href="http://twitter.com/fordie" rel="nofollow">@fordie</a>. <a href="http://bit.ly/2RsAu">http://bit.ly/2RsAu</a> <a href="http://search.twitter.com/search?q=%23holux" rel="nofollow">#holux</a> <a href="http://search.twitter.com/search?q=%23gpslogger" rel="nofollow">#gpslogger</a></p>
<h3>Where to take it next</h3>
<p>Wrap these code snippets up into <a href="/examples/twitter/twitterise/twitterise.txt">a simple twitterise function</a> could be a good starter for ten. Following that, we could also create a simple Twitter feed reader, but I&#8217;ll leave that up to you to develop.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-coldfusion/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My Work Philosophy</title>
		<link>http://www.simonwhatley.co.uk/my-work-philosophy</link>
		<comments>http://www.simonwhatley.co.uk/my-work-philosophy#comments</comments>
		<pubDate>Thu, 05 Mar 2009 15:29:19 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Strategy]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Asides]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Dev Opera]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Freelancing]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Code]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[web community]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[Yahoo]]></category>
		<category><![CDATA[zen]]></category>
		<category><![CDATA[Zoho]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1833</guid>
		<description><![CDATA[Okay, so many of the points below aren’t purely my philosophy, but ideas and principles I have picked up along the way throughout my [development] career. Some relate to the UNIX philosophy, or even the Zen of Python, but wherever they’re from, they can be applied to many other domains.]]></description>
			<content:encoded><![CDATA[<p>Okay, so many of the points below aren&#8217;t purely my philosophy, but ideas and principles I have picked up along the way throughout my [development] career. Some relate to the <a href="http://en.wikipedia.org/wiki/Unix_philosophy" title="Wikipedia: UNIX Philosophy" target="_blank" rel="nofollow">UNIX philosophy</a>, or even the <a href="http://www.python.org/dev/peps/pep-0020/" title="Zen of Python" target="_blank" rel="nofollow">Zen of Python</a>, but wherever they&#8217;re from, they can be applied to many other domains.</p>
<ul>
<li><strong>Don&#8217;t reinvent the wheel unless you really have to</strong>. Borrow code and ideas from elsewhere whenever it makes sense. The web community it great at sharing, just look at the various JavaScript libraries, the huge quantities of <abbr title="Application Programming Interface">API</abbr>s or indeed the major players&#8217; developer areas: <a href="http://code.google.com" title="Google Code" target="_blank" rel="nofollow">Google Code</a>, <a href="http://developer.yahoo.com" title="Yahoo! Developer Network" target="_blank" rel="nofollow">Yahoo! Developer Network</a>, <a href="https://developer.mozilla.org" title="Mozilla Developer Center" target="_blank" rel="nofollow">Mozilla Developer Center</a>, <a href="http://www.adobe.com/devnet/" title="Adobe Developer Connection" target="_blank" rel="nofollow">Adobe Developer Connection</a> and <a href="http://dev.opera.com" title="Dev Opera" target="_blank" rel="nofollow">Dev Opera</a> to name five I regularly refer to.</li>
<li><q><strong>Things should be as simple as possible, but no simpler</strong></q> (Einstein). This idea is really born out of and emphasised by <a href="http://gettingreal.37signals.com/" title="37Signals' Getting Real" target="_blank" rel="nofollow">37Signals&#8217; Getting Real book</a>. Commonly, 90% of people using an application only use 10% of it&#8217;s functionality. The key therefore is to find what people use most often and only build that functionality. If there is a requirement to add more, then sobeit. This can also apply to the code-level, the essence here being a balance between over- and under-engineering something.</li>
<li><strong>Do one thing well</strong> (The <q>UNIX philosophy</q>). It is better to do one thing well, than several second-rate. This could be at the code level &#8212; think encapsulation, coupling and cohesion &#8212; or indeed at the application level &#8212; you&#8217;re never going to beat Microsoft Word, but Google and Zoho have developed compelling alternatives, but with far less features. </li>
<li><strong>Don&#8217;t fret too much about performance</strong> &#8212; understand how to write efficient code and plan to optimise later if or when needed.</li>
<li><strong>Don&#8217;t try for perfection</strong> because <q>good enough</q> is often just that. This of course is a matter for conjecture. If I were working on a personal project, I may be more stringent on perfection than say, for a client&#8217;s application. This doesn&#8217;t mean to say the client&#8217;s application would be any worse, but rather it is a question of dotting-the-is and crossing-the-ts. It also depends on your perspective and what gains can be made by aiming for <q>perfection</q>.</li>
<li>(Hence) <strong>it&#8217;s okay to cut corners sometimes</strong>, only if you can do it right later. I rarely adhere to this! It makes sense to do it right the first time, since <q>bodge-jobs</q> often come back to haunt you and result in double the effort!</li>
<li><strong>Don&#8217;t fight it; go with the flow</strong>. This is somewhat clich&eacute;d, but the essence behind this is try to avoid getting stressed out. This isn&#8217;t always easy to achieve, but taking a step back from a situation and avoiding politics is important.</li>
</ul>
<p>I often strive for perfection, which isn&#8217;t an entirely clever pursuit since it is almost impossible to achieve. However, in a realm of imperfection, the principles above have helped me to achieve a modicum of decent code throughout the years. They may also resonate and provide inspiration for you.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/my-work-philosophy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmer’s Dozen &#8211; Programming Best Practices</title>
		<link>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices</link>
		<comments>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices#comments</comments>
		<pubDate>Tue, 03 Mar 2009 11:23:46 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[fuzzy logic]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[object orientated]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1826</guid>
		<description><![CDATA[Take control of your code with these programming best practices from Kevlin Henney. At JAOO Aarhus 2008 Kevlin used a trash can, vampires, a train wreck, whiskey and much more to make you understand and remember his 13 constructive points (a programmer’s dozen) about programming and code smells.]]></description>
			<content:encoded><![CDATA[<p>Take control of your code with these programming best practices from Kevlin Henney. At <abbr title="Java and object-oriented software engineering">JAOO</abbr> Aarhus 2008 Kevlin used a trash can, vampires, a train wreck, whiskey and much more to make you understand and remember his 13 constructive points (a programmer’s dozen) about programming and code smells.</p>
<p>The 13 points made by Kevlin were:</p>
<ul>
<li>0. Prefer code to comments.</li>
<li>1. Follow a consistent form.</li>
<li>2. Employ the contract metaphor.</li>
<li>3. Express independent ideas independently.</li>
<li>4. Encapsulate.</li>
<li>5. Parameterize from above.</li>
<li>6. Restrict mutability of state.</li>
<li>7. Favor symmetry over asymmetry.</li>
<li>8. Sharpen fuzzy logic.</li>
<li>9. Go with the flow.</li>
<li>10. Let code decide.</li>
<li>11. Omit needless code.</li>
<li>12. Unify duplicate code.</li>
</ul>
<p>You can see a <a href="http://blog.jaoo.dk/2009/01/19/programmers-dozen-programming-best-practices/" title="Programmer’s Dozen - Programming Best Practices" target="_blank" rel="nofollow">video of Kevlin&#8217;s presentation</a> on the <a href="http://jaoo.dk/" title="JAOO" target="_blank" rel="nofollow">JAOO website</a>.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

