<?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>Francis Shanahan[.com] &#187; Featured</title>
	<atom:link href="http://francisshanahan.com/index.php/category/featured/feed/" rel="self" type="application/rss+xml" />
	<link>http://francisshanahan.com</link>
	<description>Thoughts on technology from a citizen scientist</description>
	<lastBuildDate>Sun, 25 Jul 2010 00:23:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Create CSS Rules from an HTML5 Canvas</title>
		<link>http://francisshanahan.com/index.php/2010/create-css-rules-from-an-html5-canvas/</link>
		<comments>http://francisshanahan.com/index.php/2010/create-css-rules-from-an-html5-canvas/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 00:23:32 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Cool & Future Tech]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2687</guid>
		<description><![CDATA[Here I show how you can re-use your Canvas images as CSS backgrounds using another interesting feature coming in HTML5. You'll need a browser supporting CSS3 and Canvas, Chrome, Opera, Safari or Firefox will do. ]]></description>
			<content:encoded><![CDATA[<p>This thing caught me off guard but then I tried it, it worked so here it is: You&#8217;ll need a browser supporting CSS3 and Canvas for this post to make any sense. I tested with Chrome &amp; Firefox.</p>
<p>What&#8217;s the difference between the two blocks below?<br />
Answer: One&#8217;s a canvas and the other are div tags.<br />
<canvas id="canvas" width="120" height="120"></canvas></p>
<div id="box">
<div style="-webkit-transform: rotate(-10deg); -moz-transform: rotate(-10deg); transform: rotate(-10deg);">Hello</div>
<div style="-webkit-transform: rotate(15deg); -moz-transform: rotate(15deg); transform: rotate(15deg);">Canvas</div>
<div style="-webkit-transform: rotate(-4deg); -moz-transform: rotate(-4deg); transform: rotate(-4deg);">World</div>
<div style="-webkit-transform: rotate(8deg); -moz-transform: rotate(8deg); transform: rotate(8deg);">Que pasa?</div>
</div>
<p><script src="/js/dynamiccss.js" type="text/javascript">
</script><br />
<br/><br/><br/><br/><br/><br />
This might not seem that interesting at first so here&#8217;s the interesting bit: The Div&#8217;s background is actually taken from the Canvas. There&#8217;s only one Canvas on the page so how&#8217;s that working?<br />
Answer: A CSS class is dynamically created with its background set to the base64 output of the Canvas!</p>
<p>Yes, you can get the base64 encoding of any canvas element using canvas.toDataURL().</p>
<pre class="brush: javascript">
var base64 = canvas.toDataURL(&quot;image/png&quot;);
</pre>
<p>This was news to me but the connection was that the base64 data can then be used in a new CSS rule to with the data being the background, just like you&#8217;d do with a tiny image.</p>
<p>* Side note: It&#8217;s common to base64 encode images and directly embed them into the CSS file provided they are small enough. Base64 encoding is typically 33% larger than the binary data but you save the HTTP request. If you Sprite your images into one big file it&#8217;s less of a savings. Again, all things in engineering are a balance/compromise so do what makes sense for your situation. </p>
<pre class="brush: javascript">
var newClass = &quot;.newClass{  background:url(&quot;+base64+&quot;);} &quot;;
$(&quot;&lt;style type=&#039;text/css&#039;&gt;&quot;+size + newClass + &quot;&lt;/style&gt;&quot;).appendTo(&quot;head&quot;);
</pre>
<p>I then rotated the divs with CSS3 just for kicks. </p>
<pre class="brush: javascript">
&lt;div style=&quot;-webkit-transform: rotate(-10deg); -moz-transform: rotate(-10deg); transform: rotate(-10deg);&quot;&gt;Hello&lt;/div&gt;
</pre>
<p>Here&#8217;s the relevant code all in one piece: </p>
<pre class="brush: javascript">

// grab the data
var base64 = canvas.toDataURL(&quot;image/png&quot;);

var newClass = &quot;.newClass{  background:url(&quot;+base64+&quot;);} &quot;;

$(&quot;&lt;style type=&#039;text/css&#039;&gt;&quot; + newClass +&quot;&lt;/style&gt;&quot;).appendTo(&quot;head&quot;);

$(&#039;#box div&#039;).addClass(&quot;newClass&quot;);
</pre>
<p>So why would you ever do this? I suppose you might do this to avoid creating a lot of smaller canvas tags. I haven&#8217;t checked but I&#8217;d wager the overhead for a canvas is higher than that of a CSS rule. You can create one canvas image and then use it all over the place with CSS. </p>
<p>You could implement rounded corners with this but it&#8217;s probably the most complex way of doing rounded corners ever so wouldn&#8217;t recommend it there either. </p>
<p>One possible use of this is to take a copy of an image as it&#8217;s being built. E.g. Canvas images are bitmaps and there&#8217;s no &#8220;undo&#8221;. Unlike SVG, they don&#8217;t modify the DOM so you can&#8217;t add and remove elements of the image. Imagine a graph built using Canvas, if the user modifies the graph it might be useful to take a copy of it before the modification. You could do this by dumping the base64 data and displaying as a CSS image, rather than creating a 2nd canvas element. I&#8217;m reaching here but you get the idea. </p>
<p>I&#8217;m not sure this will ever have a practical application. For now it&#8217;s just an interesting tech experiment and another example of the cool stuff possible with HTML5. </p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/create-css-rules-from-an-html5-canvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Identicon5 &#8211; Identicons using HTML5 Canvas &amp; JQuery</title>
		<link>http://francisshanahan.com/index.php/2010/html5-identicons-using-canvas-jquery-plugin/</link>
		<comments>http://francisshanahan.com/index.php/2010/html5-identicons-using-canvas-jquery-plugin/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 22:30:31 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Cool & Future Tech]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2656</guid>
		<description><![CDATA[What do you get when you combine Digital Identity, MD5 Hashes, the Canvas element, JQuery and Quilting? Answer: My first JQuery plugin &#8211; &#8220;Identicon5&#8243; for want of a better name.
Identicon5 is a JQuery plugin that takes an MD5 hash and  converts it to a unique image. It&#8217;s called Identicon5 since it works  through the HTML5 Canvas element.
Working Demo is here: http://francisshanahan.com/identicon5/test.html
Project page is here: http://francisshanahan.com/index.php/identicon5
JQuery Plugin page is here: http://plugins.jquery.com/project/identicon5
Identicons provide a nice visual representation of a user&#8217;s identity,  that&#8217;s unique to that user, without divulging any ...]]></description>
			<content:encoded><![CDATA[<p>What do you get when you combine Digital Identity, MD5 Hashes, the Canvas element, JQuery and Quilting? Answer: My first JQuery plugin &#8211; &#8220;Identicon5&#8243; for want of a better name.</p>
<p><strong>Identicon5</strong> is a JQuery plugin that takes an MD5 hash and  converts it to a unique image. It&#8217;s called Identicon5 since it works  through the HTML5 Canvas element.</p>
<p><strong>Working Demo is here: </strong><a href="http://francisshanahan.com/identicon5/test.html" target="_blank">http://francisshanahan.com/identicon5/test.html</a></p>
<p>Project page is here: <a href="http://francisshanahan.com/index.php/identicon5" target="_blank">http://francisshanahan.com/index.php/identicon5</a></p>
<p>JQuery Plugin page is here: <a href="http://plugins.jquery.com/project/identicon5" target="_blank">http://plugins.jquery.com/project/identicon5</a></p>
<p>Identicons provide a nice visual representation of a user&#8217;s identity,  that&#8217;s unique to that user, without divulging any private information. You&#8217;ve probably seen them in use on many social websites e.g. <a href="http://stackoverflow.com/" target="_blank">http://stackoverflow.com</a></p>
<p>Identicons are the little geometrical profile images for certain users. Normally Gravatar.com serves up an image based off the MD5 hash of your email address. If you&#8217;ve defined a profile image it&#8217;ll serve that but if not it&#8217;ll show your Identicon, this blog itself is Gravatar enabled as are most WordPress installations.</p>
<p>EXCERPT from Wikipedia</p>
<blockquote><p>An Identicon is a visual representation of a hash value, usually of the IP address, serving to identify a user of a computer system. The original Identicon is a 9-block graphic, which has been extended to other graphic forms by third parties some of whom have used MD5 instead of the IP address as the identifier. In summary, an Identicon is a privacy protecting derivative of each user&#8217;s IP address built into a 9-block image and displayed next the user&#8217;s name.</p>
<p>A visual representation is thought to be easier to compare than one which uses only numbers and more importantly, it maintains the person&#8217;s privacy.</p>
<p>The Identicon graphic is unique since it&#8217;s based on the users IP, but it is not possible to recover the IP by looking at the Identicon.</p></blockquote>
<p>If you have page with a lot of Users listed, either because there are a lot of contributors on the thread, you might end up with a lot of Identicon image links. Each image is small, about 1kb and carries an HTTP connection as additional overhead. This isn&#8217;t really a big problem given today&#8217;s bandwidth on the Desktop but on my Droid it becomes an issue. Besides, with HTML5 we can do better.</p>
<p>Identicon5 takes the same MD5 hash value and draws the image dynamically using a Canvas element within the browser. This eliminates the HTTP call and saves you 1kb per profile image. If Canvas is not supported it&#8217;ll degrade into a standard img tag linking to Gravatar.</p>
<p>How does Quilting enter into it? Don Parks came up with the notion of using small tiles, arranged in a 3&#215;3 grid per Identicon. The process uses a selection of smaller shapes in each 3&#215;3 grid square and either rotates it or colors it depending on the input value. This is essentially how quilts have been made for hundreds of years.</p>
<p>I&#8217;m sure this won&#8217;t be the most popular jQuery plugin ever but the idea of applying newer technologies such as HTML5 Canvas to solve a problem that would traditionally have been fixed with a network call was very interesting to me so just had to hack it together.</p>
<p>This is a very tangible example of how HTML5 will make the web more scalable.</p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/html5-identicons-using-canvas-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Input Types in HTML5</title>
		<link>http://francisshanahan.com/index.php/2010/html5-form-input-type/</link>
		<comments>http://francisshanahan.com/index.php/2010/html5-form-input-type/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 15:28:32 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Cool & Future Tech]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2642</guid>
		<description><![CDATA[I&#8217;ve recently been doing a lot of digging into quote/unquote &#8220;newer&#8221; browser capabilities, some of which are very cool. I will share what I&#8217;ve discovered as I go.
As always I&#8217;m using a little &#8220;test project&#8221; as my sandbox, this is a real-world website that&#8217;ll use all these features and I&#8217;ll share that when it&#8217;s done.  So far I&#8217;m using oAuth/Twitter integration, ASP.NET MVC/JQuery as a basic stack and am adding in HTML5 and CSS3 features. The resulting site will not be pretty but the point for me is always to ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been doing a lot of digging into quote/unquote &#8220;newer&#8221; browser capabilities, some of which are very cool. I will share what I&#8217;ve discovered as I go.</p>
<p>As always I&#8217;m using a little &#8220;test project&#8221; as my sandbox, this is a real-world website that&#8217;ll use all these features and I&#8217;ll share that when it&#8217;s done.  So far I&#8217;m using oAuth/Twitter integration, ASP.NET MVC/JQuery as a basic stack and am adding in HTML5 and CSS3 features. The resulting site will not be pretty but the point for me is always to get more exposure than having just read the brochure.</p>
<p>This time around the topic is form controls.</p>
<p>I hate forms, they are so boring and my luddite brain can never seem to figure out how to lay them out properly. There is nothing interesting about forms, what could HTML5 possibly bring to the equation?</p>
<p>I was pleasantly surprised; HTML5 under &#8220;Web Forms 2.0&#8243; adds a bunch of new form input types. In HTML4 you have</p>
<pre class="brush: javascript">

&lt;input type=&quot;text&quot; id=&quot;someText&quot; /&gt;
</pre>
<p>In HTML5 you can actually specify the type with a bit more semantics, e.g. &#8220;tel&#8221; for telephone or &#8220;number&#8221; for integers and the browser will apply some basic masking to the field.</p>
<p>Number and Date types are fairly typical but I was surprised how specific these get, e.g. &#8220;type=color&#8221;, &#8220;type=url&#8221; and &#8220;type=search&#8221;.</p>
<p>Another interesting one is &#8220;type=range&#8221; which allows a text field to be accessed via a little slider control. Before I would&#8217;ve had to implement something like a JQueryUI Slider, now the browser will handle this for me natively. Here&#8217;s an example:</p>
<div id="_mcePaste">
<pre class="brush: javascript">&lt;/div&gt;
&lt;div&gt;&lt;input type=&quot;range&quot; min=&quot;10&quot; max=&quot;90&quot; /&gt;&lt;/div&gt;
&lt;div id=&quot;_mcePaste&quot;&gt;</pre>
</div>
<input type="range" />
<p>In addition to new input types there are also new attributes which will further reduce the amount of client-side javascript needed for forms. E.g. the  &#8220;required&#8221; and &#8220;autofocus&#8221; attributes do as their names imply. This is where CSS3 comes in with its pseudo-classes. E.g. input fields now have a pseudoclass called &#8220;valid&#8221; and &#8220;invalid&#8221;.  I can style these like this:</p>
<pre class="brush: javascript">

input:valid {
background-color: red;
}

input:invalid {
background-color: red;
}
</pre>
<p>When a field tagged with &#8220;required&#8221; but it&#8217;s empty, the browser *should* assign this pseudo-class and render it accordingly. Hey, that&#8217;s saving me some more boiler-plate Javascript.</p>
<p>Some interesting ones though are &#8220;min&#8221; and &#8220;max&#8221;, e.g. when applied to a &#8220;type=number&#8221; or &#8220;range&#8221; will determine the limiting values for the control. Excellent.</p>
<p>I&#8217;ve looked at the spec ( <a href="http://www.whatwg.org/specs/web-apps/current-work/">http://www.whatwg.org/specs/web-apps/current-work/</a> ) and do have some questions still such as how to localize things like the telephone field masks? I&#8217;m sure we&#8217;ll see some more on this in the future.</p>
<p>Besides simpler coding, these new semantics should also improve accessibility. Things like JAWS can now distinguish required fields from the DOM and determine that field A is an email vs field B being a search box.</p>
<p>This is all fairly new so the specifics of what each browser does will likely flex a bit until fully bedded down, most of these don&#8217;t do anything (yet). At least the markup is there now and I&#8217;m liking where this is headed.</p>
<p>Here&#8217;s a simple test page I came across for reference: <a href="http://miketaylr.com/code/input-type-attr.html" target="_blank">http://miketaylr.com/code/input-type-attr.html</a></p>
<p>As always you can check with <a href="http://caniuse.com" target="_blank">http://caniuse.com</a> for a detailed rundown of who&#8217;s supporting what.  (Opera&#8217;s had this stuff for quite a while now).</p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/html5-form-input-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Canvas vs SVG</title>
		<link>http://francisshanahan.com/index.php/2010/html5-canvas-vs-svg/</link>
		<comments>http://francisshanahan.com/index.php/2010/html5-canvas-vs-svg/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 16:18:52 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Cool & Future Tech]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2637</guid>
		<description><![CDATA[What is the new Canvas tag in HTML5 all about? And why would I use it over SVG (scalable vector graphics)? I took a look and here's what I found out...]]></description>
			<content:encoded><![CDATA[<p>What is the new Canvas tag in HTML5 all about? And why would I use it over SVG (scalable vector graphics)? I took a look and here&#8217;s what I found out:</p>
<p>SVG as we know has been around a few years although has not really found a firm foothold in the world of web development. I  didn&#8217;t realize but even IE6 supports SVG.  So why the slow adoption?</p>
<p>It seems the standard for SVG took a long time to get settled and performance is not great.  SVG is based on vectors so they zoom/scale really well without any pixelation. On the downside they manipulate the DOM so the browser&#8217;s memory and CPU requirements can become quite large.  What&#8217;s nice is you can save to SVG path format from a lot of drawing applications such as Illustrator.</p>
<p>The &lt;canvas&gt; tag is new in HTML5 and essentially is a bitmap that&#8217;s procedurally manipulated using javascript. It doesn&#8217;t create new elements in the DOM and is relatively faster than SVG as a result.  Graphics don&#8217;t zoom or scale as in SVG but I suppose you could simulate this behaviour since the image is procedural (built from instructions).</p>
<p>Boris Smus has a nice post comparing the performance of each : <a href="http://www.borismus.com/canvas-vs-svg-performance/" target="_blank">http://www.borismus.com/canvas-vs-svg-performance/</a></p>
<p>There are libraries to help you with each implementation, here&#8217;s a couple I found whilst researching graphs:</p>
<ul>
<li>RaphaelJS for SVG (recently acquired by Sencha (<a href="http://www.sencha.com" target="_blank">www.sencha.com</a>) formerly ExtJS.com) and</li>
<li>RGraph.net for &lt;canvas&gt; (<a href="http://www.rgraph.net" target="_blank">www.rgraph.net</a>)</li>
</ul>
<p>So, which one to use? As always it depends on the need. I&#8217;m looking to replace OpenFlashChart currently with rGraph.net and give it a whirl. Flash is too heavy and slow for my simple graphing needs and I want to be buzzword compatible. SVG paths are a little funky, especially if I&#8217;m going to be manipulating them dynamically so I&#8217;ll go the HTML5 route.</p>
<p>Check with <a href="http://caniuse.com" target="_blank">http://caniuse.com</a> for browser compatibility and degrade with <a href="http://www.modernizr.com/" target="_blank">http://modernizr.com</a> to tick the least number of users off.</p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/html5-canvas-vs-svg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting the WordPress Arthemia Theme to HTML5</title>
		<link>http://francisshanahan.com/index.php/2010/wordpress-arthemia-theme-html5/</link>
		<comments>http://francisshanahan.com/index.php/2010/wordpress-arthemia-theme-html5/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 02:49:10 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Cool & Future Tech]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2618</guid>
		<description><![CDATA[The other day I converted the current WordPress theme of this site from XHTML Transitional 1.0 to HTML5. It was fairly easy so here&#8217;s what I did.
An XHTML 1.0 transitional website was a great place to start. I used the trusty w3c validator located at http://validator.w3.com.
First thing was to get the Doctype fixed up: I changed
&#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&#62;
to
&#60;!DOCTYPE html&#62;
and bingo, we&#8217;re recognized as HTML5 instead of XHTML. Not compliant yet though. I removed the profile attribute from my head tag as so:
&#60;head profile=&#8221;http://gmpg.org/xfn/11&#8243;&#62; which wasn&#8217;t ...]]></description>
			<content:encoded><![CDATA[<p>The other day I converted the current WordPress theme of this site from XHTML Transitional 1.0 to HTML5. It was fairly easy so here&#8217;s what I did.</p>
<p>An XHTML 1.0 transitional website was a great place to start. I used the trusty w3c validator located at <a href="http://validator.w3.com" target="_blank">http://validator.w3.com</a>.</p>
<p>First thing was to get the Doctype fixed up: I changed</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>to</p>
<p>&lt;!DOCTYPE html&gt;</p>
<p>and bingo, we&#8217;re recognized as HTML5 instead of XHTML. Not compliant yet though. I removed the profile attribute from my head tag as so:</p>
<p>&lt;head profile=&#8221;http://gmpg.org/xfn/11&#8243;&gt; which wasn&#8217;t serving any purpose anyway so it became</p>
<p>&lt;head&gt;</p>
<p>Removed a stray &lt;/link&gt; tag from the header, added an alt tag where there was one missing, removed px from all width and height attributes and removed a frameborder tag (obsolete).</p>
<p>That completed the HTML5 cleanup. At this point the site validated but was not actually using any tags.</p>
<p>Next up adding some HTML5 semantic tags: I added the &lt;header&gt; and &lt;nav&gt; tags in the appropriate places, defined a &lt;section role=&#8221;main&#8221;&gt; tag for the main area of the page. Slapped in some &lt;article&gt; and &lt;header&gt; tags. The only one worth mentioned was the &lt;time&gt; tag which took a different format from the datetime I was using so it&#8217;s:</p>
<p>&lt;time datetime=&#8221;&lt;?php the_time(&#8216;Y-m-d&#8217;) ?&gt;&#8221;&gt;&lt;/time&gt;</p>
<p>And lastly added a &lt;footer&gt; tag. In terms of the theme I touched header.php, footer.php, index.php and single.php. Easy stuff and now I&#8217;m fully geeked out on HTML5.</p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/wordpress-arthemia-theme-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arvixe &gt; Webhost4life</title>
		<link>http://francisshanahan.com/index.php/2010/arvixe-webhost4life/</link>
		<comments>http://francisshanahan.com/index.php/2010/arvixe-webhost4life/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 01:18:51 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2625</guid>
		<description><![CDATA[By the time you read this the site will have moved to a new hosting provider (Arvixe.com).
Webhost4life was a good host for many years but something changed recently. The site was moved to a new platform without warning.
It was ported to new servers, which I&#8217;m guessing are virtual. My SSL certificate disappeared in the process. My site worked slower&#8230;MUCH slower and was out of service numerous times. Not only that but the configuration changed. The new platform doesn&#8217;t support .NET 4.0 or the .NET Wildcard mapping in IIS. Support switched ...]]></description>
			<content:encoded><![CDATA[<p>By the time you read this the site will have moved to a new hosting provider (Arvixe.com).</p>
<p>Webhost4life was a good host for many years but something changed recently. The site was moved to a new platform without warning.</p>
<p>It was ported to new servers, which I&#8217;m guessing are virtual. My SSL certificate disappeared in the process. My site worked slower&#8230;MUCH slower and was out of service numerous times. Not only that but the configuration changed. The new platform doesn&#8217;t support .NET 4.0 or the .NET Wildcard mapping in IIS. Support switched to a &#8220;premium&#8221; service which had to be paid for. All tickets I opened were answered only after 1-2 hours and even then only with a stock response of &#8220;we apologize and your issue has been routed to a specialist&#8221;. With service like that I don&#8217;t need &#8216;em.</p>
<p>Here&#8217;s hoping Arvixe is better and so far so good.</p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/arvixe-webhost4life/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rich Clients, Smartphones and a Roadmap for HTML5</title>
		<link>http://francisshanahan.com/index.php/2010/a-roadmap-for-html5/</link>
		<comments>http://francisshanahan.com/index.php/2010/a-roadmap-for-html5/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:26:51 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[General Computing]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2597</guid>
		<description><![CDATA[As technology rambles on, we see an ever increase in the richness of client-side web-hosted applications. Web applications need to move beyond RIA and into fully fledged applications which are downloaded like a web page but have more and more thick-client-like behaviour such as client-side storage. 
Yeah, yeah, we&#8217;ve heard this all before but the big question is when is it going to happen and how? 
The technology that&#8217;ll power this is undoubtedly HTML5. 
Looking at the desktop market-share we see that

Firefox &#8211; 31.26%
Internet Explorer 8 &#8211; 25.23%
Internet Explorer 6 ...]]></description>
			<content:encoded><![CDATA[<p>As technology rambles on, we see an ever increase in the richness of client-side web-hosted applications. Web applications need to move beyond RIA and into fully fledged applications which are downloaded like a web page but have more and more thick-client-like behaviour such as client-side storage. </p>
<p>Yeah, yeah, we&#8217;ve heard this all before but the big question is when is it going to happen and how? </p>
<p>The technology that&#8217;ll power this is undoubtedly HTML5. </p>
<p>Looking at the desktop market-share we see that</p>
<ol>
<li>Firefox &#8211; 31.26%</li>
<li>Internet Explorer 8 &#8211; 25.23%</li>
<li>Internet Explorer 6 &#8211; 18.11%</li>
<li>Internet Explorer 7 &#8211; 12.59%</li>
<li>Chrome &#8211; 7.72%</li>
<li>Safari &#8211; 5.15%</li>
<li>Opera &#8211; 1.98%</li>
</ol>
<p>Reference &#8211; http://en.wikipedia.org/wiki/Usage_share_of_web_browsers</p>
<p>If you want to know the HTML5 story you must look at the rendering engine used by these browsers. </p>
<p>All browsers render web pages through the use of a &#8220;rendering engine&#8221;, this is what how the HTML, CSS is interpreted and turned into a visualization of the page. Current rendering engines are WebKit (Safari, Chrome), Gecko(Seamonkey, Firefox) and Trident (Internet Explorer) with some other outliers.</p>
<p>Wikipedia details how well the rendering engines compare in terms of HTML5 support [<a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML5)">LINK</a>] and we find that WebKit is leading the pack. </p>
<p>Webkit-powered browsers have the least market share on the desktop (right now) but the highest market share on mobile devices. In fact in February RIM made indications that it was planning to move the Blackberry to a WebKit powered device. </p>
<p>According to NPD [<a href="http://www.businesswire.com/portal/site/home/permalink/?ndmViewId=news_view&#038;newsId=20100510005773&#038;newsLang=en">link</a>]:</p>
<blockquote><p>&#8220;Currently, BlackBerry leads the pack with 36% of market share of smartphones with Android following closely with 28% and iPhone chugging along at 21% for the 2010 sales&#8221;</p></blockquote>
<p>Add that the recent introduction of the iPad which no doubt uses Webkit in some form for its browser and you have the perfect storm of WebKit support on smartphones (excluding other mobile devices such as traditional cell phones which don&#8217;t really factor into this discussion). </p>
<p>Consequently It seems Smartphones/Pads will be among some of the first devices to really support HTML5. Smartphone user base grew at somewhere between 10-20% in 2009 and by 2011 50% of all phones sold are expected to be smartphones. Clearly there is huge demand for this technology. Even today, my Dolphin Browser running on android is scoring a &#8220;144 out of a possible 300&#8243; for HTML5 support whereas IE8 on Windows 7 scores a pitiful &#8220;27&#8243;. </p>
<p>What does this mean in terms of IT? Well HTML5 fills a lot of gaps. Better browser APIs, more advanced media playback, offline storage, vector graphics support, intra-browser communication and better markup. </p>
<p>If you&#8217;re looking at making a presentation-tier investment then JavaScript, CSS and HTML 5 remain your best choices. I expect Flash to continue to hold court in certain areas but with an ever-greater spotlight being shone on security I&#8217;d expect a drop off of some kind. I really don&#8217;t see the point of AIR anymore and any future needs for vector graphics can be directed to the HTML5 standard. Silverlight? JavaFX? Well who&#8217;s to say but right now I could not justify an investment in these technologies by any stretch of the imagination. </p>
<p>It&#8217;s a good time to be a developer; Javascript, CSS and HTML skills will be ever more in demand, dev tools in the area will become first-class citizens and who knows, we may even see some decent code-coverage tools for the client-side. </p>
<p>You can check your browser&#8217;s support at <a href="http://html5test.com/">http://html5test.com/</a>.</p>
<p>The image on this post is a capture of the SVG Tiger, typically used as a test case for vector graphics support (similar to the OpenGL Mandril). You can find an actual vector-rendering of same using an HTML5 capable browser and Raphael here [<a href="http://raphaeljs.com/tiger.html">LINK</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/a-roadmap-for-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kirigami and Origami</title>
		<link>http://francisshanahan.com/index.php/2010/kirigami-and-origami/</link>
		<comments>http://francisshanahan.com/index.php/2010/kirigami-and-origami/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 19:01:04 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Life & Introspection]]></category>
		<category><![CDATA[Things I've Made]]></category>
		<category><![CDATA[kirigami]]></category>
		<category><![CDATA[origami]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2542</guid>
		<description><![CDATA[File this under “do try this at home”. Since Christmas I have been occasionally practicing Origami which has been a lot of fun. Origami, particularly unit-origami as you might think has some fairly strong roots in geometry and some exquisite forms can be produced with some surprisingly complex folds. Probably the best example of this is the Bisected Cube folded from a single sheet, the bisection is covered exactly by a 2nd sheet of paper folded into a perfect hexagon.
This past weekend I tried my hand at Kirigami. Kirigami is ...]]></description>
			<content:encoded><![CDATA[<p>File this under “do try this at home”. Since Christmas I have been occasionally practicing Origami which has been a lot of fun. Origami, particularly unit-origami as you might think has some fairly strong roots in geometry and some exquisite forms can be produced with some surprisingly complex folds. Probably the best example of this is the Bisected Cube folded from a single sheet, the bisection is covered exactly by a 2nd sheet of paper folded into a perfect hexagon.</p>
<p>This past weekend I tried my hand at Kirigami. Kirigami is like Origami but cutting is allowed. Typically take one sheet of paper but you can combine multiple pieces as in unit-Origami.</p>
<p>This a cheap past-time and a lot of fun. I recommend a good cutting board, a fresh Xacto, some graph paper and plenty of quiet. I was going to publish up the patterns for these but I think that’d spoil it for the reader.</p>
<p>Here are some photos of the pieces I’ve cut and models I’ve folded. I find the animals far more challenging but not as mathematical or as satisfying.</p>
<p><embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="600" height="400" flashvars="host=picasaweb.google.com&#038;hl=en_US&#038;feat=flashalbum&#038;RGB=0x000000&#038;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Ffrancisshanahan%2Falbumid%2F5479013890130554033%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/kirigami-and-origami/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Sanity Test</title>
		<link>http://francisshanahan.com/index.php/2010/a-sanity-test/</link>
		<comments>http://francisshanahan.com/index.php/2010/a-sanity-test/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 22:23:22 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Life & Introspection]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2521</guid>
		<description><![CDATA[Are you out of your mind? Meaning are you mad? Or insane? and to what degree? Seriously, how would you know? 
Consider the tool you&#8217;d be using to determine the answer could potentially be skewing the results, e.g. your mind if insane may not give the right answer. 
So the question is relative. You need a frame of reference. An objective third party perhaps, such as a psychologist or psychiatrist. A neurologist could verify the physical construction of your brain but that will fall short in validating how the mind ...]]></description>
			<content:encoded><![CDATA[<p>Are you out of your mind? Meaning are you mad? Or insane? and to what degree? Seriously, how would you know? </p>
<p>Consider the tool you&#8217;d be using to determine the answer could potentially be skewing the results, e.g. your mind if insane may not give the right answer. </p>
<p>So the question is relative. You need a frame of reference. An objective third party perhaps, such as a psychologist or psychiatrist. A neurologist could verify the physical construction of your brain but that will fall short in validating how the mind executes. </p>
<p>And what does it <em>mean</em> to be sane? Again, a relative question. </p>
<p>I once postulated that sanity is a spectrum, that we are all insane, only to differing degrees. For some reason my sister took great offense to this. For whatever reason this was not a realization she was comfortable with. Perhaps the notion challenged a set of beliefs she had long held. </p>
<p>Typically we refer to someone as sane if they are of sound and reasonable mind. On that basis I would argue that almost the entire world is insane since almost all of us have some part of our lives which are purely 100% irrational. </p>
<p>Personally I used to think that if I found a penny, picked it up, spat on it (my grandmother added that part), then put the spit-laden copper disc in my pocket that I would be blessed with good luck. What a nut job? </p>
<p>Some people believe that eating meat, especially pork, on a particular day of the week will somehow anger the trans-dimensional being that created the entire universe, 93-billion light years across. 93 billion light years and yet there is a special place for pigs. Amazing. </p>
<p>Others believe that you can effect the salinity (salty-ness) of your body just by thinking about it [<a href="http://factonista.org/2008/08/27/a-christian-critique-of-scientology/">Link</a>]. Sort of a mind-over-kidney power. Incredible.</p>
<p>Members of the Flat Earth Society believe well that the Earth is a flat disc: [<a href="http://en.wikipedia.org/wiki/Flat_Earth_Society">Link</a>]. You and I might think that&#8217;s a parody, but unfortunately no, these people exist and are very dedicated folks indeed. </p>
<p>What do all these examples have in common? A lack of rationality. The lack of deductive reasoning, evidence based judgment and thinking in life &#8220;technically&#8221; leads to&#8230;insanity and unfortunately in extreme cases severe harm [<a href="http://whatstheharm.net">http://whatstheharm.net</a>]</p>
<p>There aren&#8217;t that many definitions but according to Wikipedia, Alfred Korzybski [<a href="http://en.wikipedia.org/wiki/Alfred_Korzybski">link</a>] put forth that a person is sane if their actions match what is going on in the world around them. Personally I don&#8217;t think this helps since it assumes a sort of cultural sanity which the individual is falling in line with. </p>
<p>A Sane person is expected to make rational decisions. Rational decisions might be classified as those based not on sensory input but on deductive reasoning, &#8220;logic&#8221; as Mr Spock might say. </p>
<p>Do the actions I take match what is going on around me? Sometimes. But is that worth striving for? History is full of folks who buck the trend, from Salvadore Dali to Oskar Schindler. Perhaps these are all mad? or maybe a thin line between madness and genius. </p>
<p>Consider the case of the recent mummies unearthed after 500 years atop a volcano in northwestern Argentina: [<a href="http://channel.nationalgeographic.com/series/explorer/4084/Overview">LINK</a>]. </p>
<p>Here were three children as young as six years old, who trekked for days to the top of this volcano. There they were ritually murdered, as a sacrifice to the mountain in the hopes it would bring good weather and prosperity to the region. Imagine the thoughts through their minds as they walked for days to the top of the hill. Imagine their parents grief. This all made sense in terms of the rules of the day. </p>
<p>I wonder 500 years ago, did anyone ever pause to consider the rationale behind this act. Did anyone ever question &#8220;wait a minute, how do I know this will work?&#8221;. Did anyone ever ask &#8220;where&#8217;s the evidence that the volcano god wants me to do this&#8221;? Or were they acting purely on faith in what could be considered an act of madness? </p>
<p>The children would have likely have been selected months prior for this &#8220;honor&#8221;. The idea must have stemmed from a single individual. Someone, at some point in that tribe raised their hand and said &#8220;we need to kill a child in order to save the harvest&#8221;. And everyone went along with it. </p>
<p>I&#8217;m naive but it would have been quite useful to have an absolute test for sanity, or just a test for rational thinking. When the witch doctor first suggested sacrifice, he could have been run through the test, failed, and tragedy avoided. </p>
<p>It&#8217;s doubtful we will ever develop a test for sanity. 500 years later, much of what we do day-to-day is devoid of rational, evidence based thinking. What have we learned? </p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/a-sanity-test/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Simple Example of Deferred Binding in GWT</title>
		<link>http://francisshanahan.com/index.php/2010/a-simple-example-of-deferred-binding-in-gwt/</link>
		<comments>http://francisshanahan.com/index.php/2010/a-simple-example-of-deferred-binding-in-gwt/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 04:51:23 +0000</pubDate>
		<dc:creator>Francis</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[deferred binding]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://francisshanahan.com/?p=2486</guid>
		<description><![CDATA[Deferred Binding in GWT lets you swap classes at compile time and have GWT generate the result into JavaScript as if you&#8217;d coded it that way from the start. Sort of like reflection but at compile time instead of runtime. It&#8217;s a bit of nonsense to allow extension of GWT beyond what the native compiler can do. 
As a side-note, GWT&#8217;s big value add is that it generates JavaScript off of Java. It also does some things during compilation which will speed up the JavaScript it produces de-virtualizing methods and ...]]></description>
			<content:encoded><![CDATA[<p>Deferred Binding in GWT lets you swap classes at compile time and have GWT generate the result into JavaScript as if you&#8217;d coded it that way from the start. Sort of like reflection but at compile time instead of runtime. It&#8217;s a bit of nonsense to allow extension of GWT beyond what the native compiler can do. </p>
<p>As a side-note, GWT&#8217;s big value add is that it generates JavaScript off of Java. It also does some things during compilation which will speed up the JavaScript it produces de-virtualizing methods and so forth. We used to do this back in the day with C, unwinding loops, in-lining assembly code and so on. GWT does similar stuff to shave milliseconds off processing time. However, it&#8217;s questionable since GWT&#8217;s flagship application: Google Wave has a resource profile that weighs in at a whopping 3MB and looks like this: </p>
<p><a href="http://francisshanahan.com/wp-content/uploads/2010/04/wave.PNG"><img src="http://francisshanahan.com/wp-content/uploads/2010/04/wave.PNG" width="550"/></a></p>
<p>The first thing you need is an interface, this has to go in your client package from what I can tell: </p>
<p>Human.java: </p>
<pre class="brush: java">
package com.crap.crapGWT.client;

public interface Human {
   void WhatAmI();
}
</pre>
<p>Then you need a couple of classes that implement this interface: </p>
<p>Woman.java: </p>
<pre class="brush: java">
package com.crap.crapGWT.client;

import com.google.gwt.user.client.Window;

public class Woman implements Human {
	public void WhatAmI() {
		Window.alert(&quot;I&#039;m a lady&quot;);
 	}
}
</pre>
<p>and </p>
<p>Man.java: </p>
<pre class="brush: java">
package com.crap.crapGWT.client;

import com.google.gwt.user.client.Window;

public class Man implements Human {
	public void WhatAmI() {
		Window.alert(&quot;I&#039;m a dude&quot;);
 	}
}
</pre>
<p>In onModuleLoad() add the following: </p>
<pre class="brush: java">
Human myHuman = (Human)GWT.create(Human.class);
myHuman.WhatAmI();
</pre>
<p>Then you define some properties, you can put the following in your main module XML file OR you can put it in its own file. If you do the latter you must inherit that XML file in the main module. </p>
<pre class="brush: xml">
&lt;define-property name=&quot;human&quot; values=&quot;man,woman&quot; /&gt;
	&lt;property-provider name=&quot;human&quot;&gt;
&lt;![CDATA[
     return __gwt_getMetaProperty(&quot;human&quot;);
]]&gt;
&lt;/property-provider&gt;
</pre>
<p>Believe it or not the above is actually JavaScript! (wasn&#8217;t this what we wanted to avoid by adopting GWT?) </p>
<p>Then in your main XML module put the rules by which the classes are swapped out. E.g. below, if you find a human property set to &#8220;man&#8221; replace this with the Man class. </p>
<pre class="brush: xml">
&lt;replace-with class=&quot;com.crap.crapGWT.client.Man&quot;&gt;
	&lt;when-type-is class=&quot;com.crap.crapGWT.client.Human&quot; /&gt;
	&lt;when-property-is name=&quot;human&quot; value=&quot;man&quot; /&gt;
&lt;/replace-with&gt;

&lt;replace-with class=&quot;com.crap.crapGWT.client.Woman&quot;&gt;
	&lt;when-type-is class=&quot;com.crap.crapGWT.client.Human&quot; /&gt;
	&lt;when-property-is name=&quot;human&quot; value=&quot;woman&quot; /&gt;
&lt;/replace-with&gt;
</pre>
<p>And finally add in the actual property itself in the HTML file in your WAR. </p>
<pre class="brush: xml">
&lt;meta name=&#039;gwt:module&#039; content=&#039;js/gwt=com.crap.crapGWT.client.Human&#039;/&gt;
&lt;meta name=&#039;gwt:property&#039; content=&#039;human=woman&#039;/&gt;
</pre>
<p>If everything goes well you should get a popup saying &#8220;I&#8217;m a lady&#8221;. </p>
<p>If you have trouble, go back and check everything, particularly the class namespaces. If all looks well yet you still can&#8217;t get it to work, restart Eclipse (*yes* I&#8217;m not kidding). </p>
<p>Then finally change the property to a &#8220;man&#8221; and you&#8217;ll get a different message. </p>
<pre class="brush: xml">
&lt;meta name=&#039;gwt:property&#039; content=&#039;human=man&#039;/&gt;
</pre>
<p>You can try this also: </p>
<pre class="brush: java">
if (myHuman instanceof Human) Window.alert(&quot;myHuman is a Human&quot;);
if (myHuman instanceof Man) Window.alert(&quot;myHuman is a Man&quot;);
if (myHuman instanceof Woman) Window.alert(&quot;myHuman is a Woman&quot;);
</pre>
<p>So that&#8217;s Deferred Binding. </p>
]]></content:encoded>
			<wfw:commentRss>http://francisshanahan.com/index.php/2010/a-simple-example-of-deferred-binding-in-gwt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
