<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Winston{YW}</title>
	
	<link>http://www.winstonyw.com</link>
	<description>Web Development, Design, Usability and All Things Geeky</description>
	<lastBuildDate>Wed, 19 Nov 2008 15:40:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/winstonyw" type="application/rss+xml" /><feedburner:emailServiceId>winstonyw</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwinstonyw" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/winstonyw" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwinstonyw" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fwinstonyw" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwinstonyw" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fwinstonyw" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>HOWTO Compile And Install Git On Ubuntu</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/pPB3bbVfTXQ/</link>
		<comments>http://www.winstonyw.com/2008/11/19/howto-compile-and-install-git-on-ubuntu/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 15:40:23 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=213</guid>
		<description>This is a Google Notebook dump of how to compile and install Git on Ubuntu (or Linux), as my Google Notebook is cluttered with random knowledge that I picked up in my work and is in need of some organization.
Step 1: Download Dependencies
There are dependencies that&amp;#8217;s required for the install of Git. Let&amp;#8217;s get them [...]</description>
			<content:encoded><![CDATA[<p>This is a Google Notebook dump of how to compile and install Git on Ubuntu (or Linux), as my Google Notebook is cluttered with random knowledge that I picked up in my work and is in need of some organization.</p>
<h3>Step 1: Download Dependencies</h3>
<p>There are dependencies that&#8217;s required for the install of Git. Let&#8217;s get them via apt-get.</p>
<pre class="brush: bash;">
sudo apt-get build-dep git-core
</pre>
<p><strong>Note</strong>: If apt-get fails at some point to install the dependencies, update it and retry.</p>
<pre class="brush: bash;">
sudo apt-get update
</pre>
<h3>Step 2: Download Git</h3>
<p>Download the latest version of Git. I use <em>wget</em>, but it&#8217;s really up to personal preference.</p>
<pre class="brush: bash;">
wget http://kernel.org/pub/software/scm/git/git-1.6.0.4.tar.gz
</pre>
<h3>Step 3: Make and Install Git</h3>
<p>Simply execute the following commands to unpack, compile and install Git.</p>
<pre class="brush: bash;">
gunzip git-1.6.0.4.tar.gz
tar -xvf git-1.6.0.4.tar
cd git-1.6.0.4
./configure
make &amp;&amp; sudo make install
</pre>
<p>That&#8217;s all to get started with Git on your Ubuntu (or Linux) servers. Enjoy!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=aiFgyTN5"><img src="http://feeds.feedburner.com/~f/winstonyw?i=aiFgyTN5" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=M77pQbBD"><img src="http://feeds.feedburner.com/~f/winstonyw?i=M77pQbBD" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=VN0dZiRZ"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=UTpqSyRL"><img src="http://feeds.feedburner.com/~f/winstonyw?i=UTpqSyRL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=nglbDvdg"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/pPB3bbVfTXQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/11/19/howto-compile-and-install-git-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/11/19/howto-compile-and-install-git-on-ubuntu/</feedburner:origLink></item>
		<item>
		<title>jQuery Hosting With Google Ajax Libraries API</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/jc1RHeoz1eg/</link>
		<comments>http://www.winstonyw.com/2008/09/27/jquery-hosting-with-google-ajax-libraries-api/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 15:09:18 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=205</guid>
		<description>Google Ajax Libraries API which hosts a few of the common open source frameworks like jQuery (and UI), Prototype, MooTools and others was launched earlier this year, and I was excited about the performance boost which it promised.
Basically, the libraries are hosted on the Google infrastructure and common obstacles such as caching and gzipping of [...]</description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/apis/ajaxlibs/" target="_blank">Google Ajax Libraries API</a> which hosts a few of the common open source frameworks like jQuery (and UI), Prototype, MooTools and others was launched earlier this year, and I was excited about the performance boost which it promised.</p>
<p>Basically, the libraries are hosted on the Google infrastructure and common obstacles such as caching and gzipping of these Ajax libraries are handled by the Google engineers. The API is also kept up-to-date with the latest stable release of each Ajax library, and by default, serves the minified version. Of course, there&#8217;s also an option to use an uncompressed version for development purposes.</p>
<p>As my WordPress is on shared hosting, I don&#8217;t have the luxury of setting up a cache or gzipping my files, and so there&#8217;s always been a performance issue with my blog. Therefore, any form of optimization could go a long way in making my blog&#8217;s loading experience more pleasant, and so I figured that the Google Ajax Libraries API should be able to help in some way; moreover, Google has a wide <a href="http://en.wikipedia.org/wiki/Content_Delivery_Network" target="_blank">CDN</a> and their servers are fast.</p>
<p>To use Google&#8217;s Ajax Libraries API is simple, as illustrated on <a href="http://googleajaxsearchapi.blogspot.com/2008/05/speed-up-access-to-your-favorite.html" target="_blank">Google&#8217;s Ajax Search API blog</a> and <a href="http://ajaxian.com/archives/announcing-ajax-libraries-api-speed-up-your-ajax-apps-with-googles-infrastructure" target="_blank">Ajaxian</a>, and I made the switch in just 5 minutes for the jQuery framework which I am using on this blog.</p>
<p>Previously, I was including the jQuery packed script which was hosted on my domain, but now I am including the Google&#8217;s Ajax Libraries API:</p>
<pre class="brush: xml;">
&lt;!-- Previously --&gt;
&lt;!-- &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.2.6.pack.js&quot;&gt; --&gt;

&lt;!-- Google's Ajax API --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;
</pre>
<p>Why was I using the packed version? Because, I cannot do  gzip on my shared hosting and without that, the packed version is smaller in size as compared to the minified version.</p>
<p>In my other external javascript file that contains my jQuery codes, this was how it looked like:</p>
<pre class="brush: jscript;">
$(function(){
  //Line 1
  //Line 2
  //...
})
</pre>
<p>Now, I need to first load jQuery using the API which has smart versioning feature, then replace jQuery&#8217;s DOM ready function with Google&#8217;s on page load function. The internals, or codes, remain the same.</p>
<pre class="brush: jscript;">
google.load(&quot;jquery&quot;, &quot;1&quot;);
google.setOnLoadCallback(function(){
  //Line 1
  //Line 2
  //...
});
</pre>
<p>That&#8217;s it! I am done! Testing the response time via YSLOW with Firebug:</p>
<ul>
<li>jQuery on www.winstonyw.com: Average of 700ms, 31K (No gzip)</li>
<li>jQuery on Google: Average of 150ms, 16.7K (With gzip)</li>
</ul>
<p>Are you going to make the switch and improve your users&#8217; experience?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=bEyqZsJx"><img src="http://feeds.feedburner.com/~f/winstonyw?i=bEyqZsJx" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=SWYH39bZ"><img src="http://feeds.feedburner.com/~f/winstonyw?i=SWYH39bZ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=IeUoGFJ9"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=HhlXE2vZ"><img src="http://feeds.feedburner.com/~f/winstonyw?i=HhlXE2vZ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=3b22S8vg"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/jc1RHeoz1eg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/09/27/jquery-hosting-with-google-ajax-libraries-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/09/27/jquery-hosting-with-google-ajax-libraries-api/</feedburner:origLink></item>
		<item>
		<title>Exposing Your FeedBurner Feed In HTML Head Element</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/ReKDWwldQH0/</link>
		<comments>http://www.winstonyw.com/2008/09/23/exposing-your-feedburner-feed-in-html-head-element/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 15:54:09 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=198</guid>
		<description>Feed Era
We now live in the era of feeds, where most web applications you use can produce some kind of RSS/Atom feed. In turn, these feeds can be inputs to other web applications of varied uses, such as Google Reader or FriendFeed.
Blog Feed
The first application that comes to mind when we talk about feeds would [...]</description>
			<content:encoded><![CDATA[<h3>Feed Era</h3>
<p>We now live in the era of feeds, where most web applications you use can produce some kind of RSS/Atom feed. In turn, these feeds can be inputs to other web applications of varied uses, such as <a href="http://www.google.com/reader" target="_blank">Google Reader</a> or <a href="http://www.friendfeed.com" target="_blank">FriendFeed</a>.</p>
<h3>Blog Feed</h3>
<p>The first application that comes to mind when we talk about feeds would be blogs. Taking WordPress as an example, WordPress blogs produce RSS and Atom feeds. These feeds are then usually included in the HTML Head element of the blog as follows:</p>
<pre class="brush: php;">
&lt;head&gt;
  &lt;!-- Meta Tags --&gt;
  &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot;  title=&quot;RSS 2.0&quot;   href=&quot;&lt;?php bloginfo('rss2_url'); ?&gt;&quot; /&gt;
  &lt;link rel=&quot;alternate&quot; type=&quot;text/xml&quot;             title=&quot;RSS .92&quot;   href=&quot;&lt;?php bloginfo('rss_url'); ?&gt;&quot; /&gt;
  &lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;Atom 0.3&quot;  href=&quot;&lt;?php bloginfo('atom_url'); ?&gt;&quot; /&gt;
&lt;/head&gt;
</pre>
<p>Note the definition of the Link element and its significance:</p>
<blockquote><p>
Link elements with a rel value of &#8220;alternate&#8221; are used to describe an alternate representation of the content of the current web page, and these defined relationships and help your site attract and retain visitors.
</p></blockquote>
<h3>Burning Your Blog Feed</h3>
<p>However, we all know of a great service at <a href="http://www.feedburner.com" target="_blank">FeedBurner</a> that can provide you with amazing control over your vanilla feeds, and so, most of the blogs I know <strong>ADVERTISE</strong> a FeedBurner feed rather than (or alongside) the prepackaged feeds.</p>
<h3>Feed Discovery</h3>
<p>What do I mean by &#8220;ADVERTISE&#8221;? Usually, a prominent subscribe link to a FeedBurner feed can be found on blogs, but the FeedBurner feed is <strong>NOT</strong> exposed in the HTML Head element. This impedes accurate feed discovery, and readers of these blogs, if using some feed discovery application, may subscribe to one of the exposed vanilla feeds instead of the &#8220;hidden&#8221; FeedBurner feed. To the content-producer, this implies a lost of feed-viewership analytics and possibly even revenue.</p>
<h3>Experiment 1</h3>
<p>To illustrate, I use this <a href="http://blog.persistent.info/2006/05/smart-google-reader-subscribe-button.html" target="_blank">Greasemonkey script: Smart Google Reader Subscribe Button by Mihai</a> which places an unobtrusive RSS icon in the upper-right corner of the browser, allowing easy subscription to RSS feeds that are discovered on any site.</p>
<p>Suppose I include my FeedBurner feed in the HTML Head element, the script would be able to discover two feeds. However, when I exclude my FeedBurner feed from the HTML Head element, the script would only be able to discover one feed.</p>
<p><img class="clear" src="http://www.winstonyw.com/uploads/images/Exposing_Your_FeedBurner_Feed_In_HTML_Head_Element-1.jpg" alt="Feed Discovery via Greasemonkey Script" /></p>
<h3>Experiment 2</h3>
<p>For a more conclusive example, let&#8217;s try using FireFox to subscribe to a blog feed. Again, we first test with the FeedBurner feed included, then excluded from the HTML Head element.</p>
<p><img class="left clear" src="http://www.winstonyw.com/uploads/images/Exposing_Your_FeedBurner_Feed_In_HTML_Head_Element-2.jpg" alt="Feed Discovery via FireFox" /></p>
<p>As you can see, in the first setting, the FeedBurner feed was discovered and marked to be subscribed (via Google). However, in the second setting, the vanilla RSS feed was discovered, and this is definitely not what content-producers would like to see happening.</p>
<h3>Do Your Own Experiments</h3>
<p>Still skeptical? Test this out in Google Reader or even the <a href="http://www.google.com/uds/solutions/wizards/dynamicfeed.html" target="blank">Google Ajax Feed API</a> to see which feed is discovered from your blog. There are also other feed discovery services out there which you can use to test my hypothesis, but the result would probably be the same, and the reasoning similar: Only feeds that are linked, or exposed in the HTML Head element can be easily discovered.</p>
<h3>Conclusion</h3>
<p>In conclusion, we should realise the importance of facilitating feed discovery and its implications to content-indexing and traffic analytics. Remember to expose your FeedBurner feed in your WordPress blog today, like so:</p>
<pre class="brush: xml;">
&lt;head&gt;
  &lt;!-- Meta Tags --&gt;
  &lt;link rel=&quot;alternate&quot;  href=&quot;http://feeds.feedburner.com/winstonyw&quot; type=&quot;application/rss+xml&quot; title=&quot;FeedBurner RSS Feed&quot;/&gt;
&lt;/head&gt;
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=yLvfvIyo"><img src="http://feeds.feedburner.com/~f/winstonyw?i=yLvfvIyo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=Io33hGAg"><img src="http://feeds.feedburner.com/~f/winstonyw?i=Io33hGAg" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=HcHZAHIp"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=HECCZWdm"><img src="http://feeds.feedburner.com/~f/winstonyw?i=HECCZWdm" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=p5SIBNLL"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/ReKDWwldQH0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/09/23/exposing-your-feedburner-feed-in-html-head-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/09/23/exposing-your-feedburner-feed-in-html-head-element/</feedburner:origLink></item>
		<item>
		<title>My Favicon</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/LOgnO1yusDo/</link>
		<comments>http://www.winstonyw.com/2008/09/07/my-favicon/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 15:15:52 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=196</guid>
		<description>Today, I spent about an hour or so creating a (very simple) site favicon for Winston{YW}. There are a number of tutorials out there that provide easy-to-understand instructions on how to create your own site favicon, but I found the one by Jennifer most detailed.
Ideally, you should be able to see this on your URL [...]</description>
			<content:encoded><![CDATA[<p>Today, I spent about an hour or so creating a (very simple) site favicon for Winston{YW}. There are <a href="http://www.google.com/search?q=create+favicon" target="_blank">a number of tutorials out there</a> that provide easy-to-understand instructions on how to create your own site favicon, but I found <a href="http://www.photoshopsupport.com/tutorials/jennifer/favicon.html" target="_blank">the one by Jennifer</a> most detailed.</p>
<p>Ideally, you should be able to see this on your URL bar and (Firefox) tab:</p>
<p><img class="clear" src="http://www.winstonyw.com/uploads/images/My_Favicon.jpg" alt="My Favicon" /></p>
<p>I know this cannot be compared to <a href="http://www.smashingmagazine.com/2007/01/31/inspire-yourself-50-remarkable-favicons/" target="_blank">those featured by SmashingMagazine</a>, but at least it&#8217;s my own unique creation.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=SDH5oaHL"><img src="http://feeds.feedburner.com/~f/winstonyw?i=SDH5oaHL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=5wzJPk1V"><img src="http://feeds.feedburner.com/~f/winstonyw?i=5wzJPk1V" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=XvagHdTr"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=lMuJVPUi"><img src="http://feeds.feedburner.com/~f/winstonyw?i=lMuJVPUi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=zcqxjvHS"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/LOgnO1yusDo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/09/07/my-favicon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/09/07/my-favicon/</feedburner:origLink></item>
		<item>
		<title>Gmail Account Activity</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/19IJdewJOXw/</link>
		<comments>http://www.winstonyw.com/2008/09/05/gmail-account-activity/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 15:23:15 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[Daily]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=194</guid>
		<description>Today, while I was fiddling around in Gmail, I noticed something peculiar with the footer. There&amp;#8217;s an extra line which I don&amp;#8217;t ever remember seeing it, or hearing about it. Basically, it&amp;#8217;s my Gmail account activity status, and there&amp;#8217;s even a link to more details.

Clicking on the link brought me to an &amp;#8220;Account Activity&amp;#8221; page [...]</description>
			<content:encoded><![CDATA[<p>Today, while I was fiddling around in Gmail, I noticed something peculiar with the footer. There&#8217;s an extra line which I don&#8217;t ever remember seeing it, or hearing about it. Basically, it&#8217;s my Gmail account activity status, and there&#8217;s even a link to more details.</p>
<p><img class="left clear" alt="Gmail Account Activity Status" src="http://www.winstonyw.com/uploads/images/Gmail_Account_Activity-1.jpg"/></p>
<p>Clicking on the link brought me to an &#8220;Account Activity&#8221; page that provides information about my current open sessions and recent activities on my Gmail account. This allows me to audit for any unauthorized access to my Gmail account, and verify that all Gmail activities (by access type and IP) belong to me. Suppose I discover suspicious activity, I can also sign out of all other current open sessions.</p>
<p><img class="left clear" alt="Gmail Acount Activity Details Page" src="http://www.winstonyw.com/uploads/images/Gmail_Account_Activity-2.jpg"/></p>
<p>Initially, I thought I had stumbled upon a piece of breaking news. But after doing a search on Google for this feature, I found that <a href="http://gmailblog.blogspot.com/2008/07/remote-sign-out-and-info-to-help-you.html" target="_blank">Gmail Blog</a> and <a href="http://blogoscoped.com/archive/2008-07-09-n48.html" target="_blank">Blogoscoped</a> have already blogged about it in July 2008. <a href="http://mail.google.com/support/bin/answer.py?hl=en&#038;answer=45938" target="_blank">Gmail&#8217;s FAQ</a> also contains information about it. </p>
<p>Still, how many are as blind as me, and have only seen it now?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=8bZ4Q2Bv"><img src="http://feeds.feedburner.com/~f/winstonyw?i=8bZ4Q2Bv" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=TMlfgCFE"><img src="http://feeds.feedburner.com/~f/winstonyw?i=TMlfgCFE" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=wOu3Bjl8"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=ACmxl8Mo"><img src="http://feeds.feedburner.com/~f/winstonyw?i=ACmxl8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=288LleXE"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/19IJdewJOXw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/09/05/gmail-account-activity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/09/05/gmail-account-activity/</feedburner:origLink></item>
		<item>
		<title>Focus First Form Input Element with JQuery</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/HOsQew6wdCE/</link>
		<comments>http://www.winstonyw.com/2008/09/05/focus-first-form-input-element-with-jquery/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 17:22:59 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=177</guid>
		<description>A few days ago, I found a JQuery selector that can be used to select the first visible form input element on a page:

$(':input:visible:enabled:first')

This selector can further be used to focus on the first form input element on page load, as seen in the following code snippet:

$(function () {
  $(window).load(function () {
   [...]</description>
			<content:encoded><![CDATA[<p>A few days ago, I found a JQuery selector that can be used to select the first visible form input element on a page:</p>
<pre class="brush: jscript;">
$(':input:visible:enabled:first')
</pre>
<p>This selector can further be used to focus on the first form input element on page load, as seen in the following code snippet:</p>
<pre class="brush: jscript;">
$(function () {
  $(window).load(function () {
    $(':input:visible:enabled:first').focus();
  });
})
</pre>
<p>In the code snippet above, I placed the focus event call inside the load function (bounded to the window element) so that the focus event fires when the browser finishes loading all content within a document, including window, objects and images. Initially though, I had excluded the load function and had placed the focus event call within only the DOM ready function, but it failed to work.</p>
<p>This simple trick is great for usability, as the user can start filling up a form right away without any additional mouse clicks or key strokes, since the cursor would appear in the first form input element once the page has finished loading.</p>
<p>Google and Yahoo, for example, focus the user&#8217;s cursor in their search box on page load so that the user can start a search conveniently. In their industry where every search counts towards achieving their business goals, such usability enhancement, though small and subtle, can make a difference.</p>
<p>However, do note that this may only be good for pages that need to focus the user&#8217;s attention on a form&#8217;s input field, or for pages whose primary content is a form. Else, it becomes more of an annoyance to find the cursor focused on some obscure form input field on every page load.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=0X36Cgyq"><img src="http://feeds.feedburner.com/~f/winstonyw?i=0X36Cgyq" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=N3cQmNSw"><img src="http://feeds.feedburner.com/~f/winstonyw?i=N3cQmNSw" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=I5Iz8Ipy"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=p0d35doA"><img src="http://feeds.feedburner.com/~f/winstonyw?i=p0d35doA" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=92Tqn2LN"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/HOsQew6wdCE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/09/05/focus-first-form-input-element-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/09/05/focus-first-form-input-element-with-jquery/</feedburner:origLink></item>
		<item>
		<title>HOWTO Use Ruby SOAP4R</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/kGjdhx0dyt8/</link>
		<comments>http://www.winstonyw.com/2008/09/02/howto-use-ruby-soap4r/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 16:52:52 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=171</guid>
		<description>Ruby comes with an implementation of SOAP (SOAP4R), a protocol for exchanging XML-based messages, and recently, I had a chance to use this library. Having no knowledge of the SOAP4R library, I conveniently consulted the Pickaxe book which was on my table, and it presented me with an excellent overview of the library.
Now, I&amp;#8217;m going [...]</description>
			<content:encoded><![CDATA[<p>Ruby comes with an implementation of SOAP (SOAP4R), a protocol for exchanging XML-based messages, and recently, I had a chance to use this library. Having no knowledge of the SOAP4R library, I conveniently consulted the <a href="http://www.amazon.com/Programming-Ruby-Pragmatic-Programmers-Second/dp/0974514055/ref=sr_1_3_s9_rk?ie=UTF8&#038;s=books&#038;s9r=8a5801be0c14f3e7010c1b3d44870007&#038;itemPosition=3&#038;qid=1220285385&#038;sr=8-3" target="_blank">Pickaxe book</a> which was on my table, and it presented me with an excellent overview of the library.</p>
<p>Now, I&#8217;m going to document the two different approaches of connecting to a SOAP API which I have learned from the book, so that I don&#8217;t forget them easily. I recommend the Pickaxe book if you are interested in more detailed explanations.</p>
<p><a href="http://www.xurrency.com" target="_blank">Xurrency</a> is an online currency conversion service which I am using in one of my projects and <a href="http://www.xurrency.com/api" target="_blank">Xurrency&#8217;s API is based in SOAP</a>. The API has several methods exposed and I&#8217;ll only be using one of them in my examples, but the principle is the same for other method invocations.</p>
<p>The method that I&#8217;ll be using is: <em>float getValue(float $amount, string $base, string target)</em> which returns a float value for a currency conversion.</p>
<h3>First Example</h3>
<pre class="brush: ruby;">
#Require The Library
require 'soap/rpc/driver'

#Connections
endpoint = 'http://www.xurrency.com/servidor_soap.php'
proxy    = SOAP::RPC::Driver.new(endpoint)

#Add Method
proxy.add_method('getValue', 'amount', 'base', 'target')

#Call API Method and Get Exchange Rate
rate = proxy.getValue('1','usd','eur')
puts 'Rate: #{rate}'
</pre>
<p>The output:</p>
<p>sh> ruby currency.rb<br />
Rate: 0.6787</p>
<h3>Second Example</h3>
<pre class="brush: ruby;">
#Require The Library
require 'soap/wsdlDriver'

#Connections
wsdl_url = 'http://xurrency.com/api.wsdl'
proxy    = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver

#Call API Method and Get Exchange Rate
rate = proxy.getValue(1,'usd','eur')
puts 'Rate: #{rate}'
</pre>
<p>The output:</p>
<p>sh> ruby currency.rb<br />
Rate: 0.6787</p>
<p>In the first example, I created a local proxy for the Xurrency API, adds the method which I want to use, and then invokes it.</p>
<p>In the second example, I made use of a WSDL (Web Services Description Language) document available at <em>http://xurrency.com/api.wsdl</em>. This WSDL document describes the Xurrency API, and so SOAP can read this WSDL and perform dynamic discovery of the API interfaces which removes the need to add the <em>getValue</em> method explicitly.</p>
<p>To quote from the Pickaxe book, a WSDL document is:</p>
<blockquote><p>..an XML document that describes the types, methods, and access mechanisms for a Web services interface. SOAP clients can read WSDL file to create the interfaces to a server automatically..</p></blockquote>
<p>Despite the differences when connecting to the SOAP API, the underlying concept is similar for both the examples. The SOAP library creates local proxies that SOAP uses to connect to the remote server API (which is published by a SOAP server). When a method is invoked on the local proxy, the invocation is passed to the corresponding API interface on the server via XML. The server then processes the method invocation, and the returned values are passed back to the client through the proxy.</p>
<p>What I have written are just some basic concepts of using SOAP with Ruby. But it&#8217;s really simple right? For further reading, please refer to the <a href="http://www.ruby-doc.org/stdlib/libdoc/soap/rdoc/index.html" target="_blank">RubyDoc</a>, or the <a href="http://dev.ctor.org/soap4r" target="_blank">Trac</a> (which has some great examples too). </p>
<p>For a <a href="http://github.com/keita/ruby-xurrency/tree/master" target="_blank">rubygem that wraps Xurrency&#8217;s API</a>, there&#8217;s one on <a href="http://www.github.com" target="_blank">GitHub</a>, authored by Keita. Alternatively, my colleague <a href="http://www.practicalguile.com/" target="_blank">Douglas</a> has also created a <a href="http://github.com/bianster/currency-convertor/tree/master" target="_blank">simple currency converter which uses the data from Yahoo Finance</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=xE9Otqx7"><img src="http://feeds.feedburner.com/~f/winstonyw?i=xE9Otqx7" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=zOABvBEI"><img src="http://feeds.feedburner.com/~f/winstonyw?i=zOABvBEI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=O5vJAdZr"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=y8HDsKaV"><img src="http://feeds.feedburner.com/~f/winstonyw?i=y8HDsKaV" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=LzhP8Bdo"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/kGjdhx0dyt8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/09/02/howto-use-ruby-soap4r/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/09/02/howto-use-ruby-soap4r/</feedburner:origLink></item>
		<item>
		<title>DOCTYPE.. (X)HTML, Strict or Transitional?</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/rXsKt4f9OC4/</link>
		<comments>http://www.winstonyw.com/2008/08/28/doctype-xhtml-strict-or-transitional/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 15:22:30 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=167</guid>
		<description>Lately, I have been reading up on DOCTYPE and (X)HTML as I felt that my knowledge of them was limited. This post is a summary and brain-dump of my readings and is not to be taken as an exhaustive documentation on the subject of DOCTYPE and (X)HTML. Do correct me if I err in any [...]</description>
			<content:encoded><![CDATA[<p>Lately, I have been reading up on DOCTYPE and (X)HTML as I felt that my knowledge of them was limited. This post is a summary and brain-dump of my readings and is not to be taken as an exhaustive documentation on the subject of DOCTYPE and (X)HTML. Do correct me if I err in any of the stuff mentioned below.</p>
<h3>DOCTYPE</h3>
<p>A DOCTYPE, or Document Type Declaration, defines the legal structure, elements and attributes of a web page. It is declared at the very top of every web page, and is required for browsers and validators to parse and render the document consistently and correctly.</p>
<h3>HTML vs. XHTML</h3>
<p>In the process of creating a web page, we have the choice of declaring our markup to be either HTML or XHTML. However, based on my observations, web pages nowadays are mostly declared as XHTML because XHTML, being known as a reformulation of HTML in XML, is an extension and improvement over HTML.</p>
<p>To quote the current <a href="http://www.w3.org/TR/xhtml1/" target="_blank">XHTML 1.0 Recommendation</a>:</p>
<blockquote><p>The XHTML family is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content&#8217;s backward and future compatibility.</p></blockquote>
<p>As XHTML conforms to the syntax of XML, XHTML pages are required to be well-formed. By enforcing well-formed rules in our markup, XHTML is more consistent to code and easier to maintain. The following are some of the more important rules of being well-formed:</p>
<ul>
<li>elements must be properly nested</li>
<li>elements and attributes must be written in lowercase</li>
<li>non-empty elements must be closed</li>
<li>empty elements are minimized as a single element and closed with a space before the trailing slash</li>
<li>images must contain alternative text</li>
<li>markup characters: &lt;, &gt;, &amp; and &quot; are escaped</li>
</ul>
<p>Being well-formed also means that XHTML is backward-compatible and can be served as HTML, using the media type: <em>text/html</em>. In fact, web servers and server-side scripting environments (PHP, Ruby etc) use this media type for content delivery, and so by default, XHTML pages are served as HTML. </p>
<p>In addition, XHTML inherits a useful feature from XML in XML namespaces. Because of this, XHTML markup can include other markup languages like MathML, SMIL, or SVG, and thus extend the basic functionality of a web document. This is semantic flexibility that isn&#8217;t available in HTML.</p>
<p>Deciding between HTML and XHTML is the easy part, but for each declaration, there are also different flavours to choose from, such as the Strict and Transitional DOCTYPE (and Frameset DOCTYPE).</p>
<h3>Strict DOCTYPE</h3>
<p>A Strict DOCTYPE enforces the separation of structure and presentation, requiring that presentational elements are shifted from markup to CSS. Using a Strict DOCTYPE also ensures that all markup are fully standards-compliant, and would only be processed by browsers in their strictest, standards-compliant mode. Ultimately, this results in the most consistent and forward compatible interpretation of the markup.</p>
<h3>Transitional DOCTYPE</h3>
<p>A Transitional DOCTYPE is used when transiting from legacy markup to modern standards, permitting the use of some deprecated elements or attributes that were common in legacy markup. This DOCTYPE is not meant to be used permanently and all markup should aim towards implementing the Strict DOCTYPE.</p>
<h3>Differences between Strict and Transitional DOCTYPE</h3>
<p>In general, most of the differences between a Strict and Transitional DOCTYPE are related to presentational elements. Listed below are some of the differences that are more likely to cause problems when migrating from Transitional to Strict DOCTYPE.</p>
<h5>Elements not allowed with Strict DOCTYPEs:</h5>
<ul>
<li>center</li>
<li>font</li>
<li>iframe</li>
<li>strike</li>
<li>u </li>
</ul>
<h5>Attributes not allowed with Strict DOCTYPEs:</h5>
<ul>
<li>align (allowed on table elements: col, colgroup, tbody, td, tfoot, th, thead, and tr)</li>
<li>language</li>
<li>background</li>
<li>bgcolor</li>
<li>border (allowed on table)</li>
<li>height (allowed on img and object)</li>
<li>hspace</li>
<li>noshade</li>
<li>nowrap</li>
<li>target</li>
<li>text</li>
<li>link</li>
<li>vlink</li>
<li>alink</li>
<li>vspace</li>
<li>width (allowed on img, object, table, col, and colgroup)</li>
</ul>
<h3>Conclusion</h3>
<p>As most of the readings point out, we should strive to use a Strict DOCTYPE for our web quality&#8217;s sake. This is because a Strict DOCTYPE promotes the separation of presentation and structure, and results in code consistency and ease of maintenance of any website. HTML 4.01 Strict or XHTML 1.0 Strict? That would depends on our requirements and application architecture. But from a <a href="http://en.wikipedia.org/wiki/Standardista" target="_blank">Web Standardista</a>&#8217;s point of view, making sure that a Strict DOCTYPE is in use is more important than anything else.</p>
<p>Note to self: I should start to transit this blog into a Strict DOCTYPE.</p>
<h5>Resources:</h5>
<ul>
<li><a href="http://www.alistapart.com/stories/doctype/" target="_blank">Fix Your Site With the Right DOCTYPE!</a></li>
<li><a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" target="_blank">Recommended Lists of DTDs</a></li>
<li><a href="http://www.w3.org/MarkUp/2004/xhtml-faq" target="_blank">HTML and XHTML Frequently Answered Questions</a></li>
<li><a href="http://codex.wordpress.org/HTML_to_XHTML" target="_blank">HTML to XHTML</a></li>
<li><a href="http://en.wikipedia.org/wiki/XHTML" target="_blank">XHTML Wikipedia</a></li>
<li><a href="http://xhtml.com/en/xhtml/serving-xhtml-as-html/" target="_blank">Serving XHTML As HTML</a></li>
<li><a href="http://www.robertnyman.com/2005/11/02/html-or-xhtml/" target="_blank">HTML or XHTML</a></li>
<li><a href="http://24ways.org/2005/transitional-vs-strict-markup" target="_blank">Transitional vs. Strict Markup</a></li>
<li><a href="http://www.zvon.org/xxl/xhtmlReference/Output/comparison.html" target="_blank">Comparison of Strict and Transitional XHTML</a></li>
<li><a href="http://www.blackwidows.co.uk/resources/tutorials/xhtml/attribute-comparison.php" target="_blank">XHTML1.0 Element Attributes by DTD</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=qYeE8Hlu"><img src="http://feeds.feedburner.com/~f/winstonyw?i=qYeE8Hlu" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=DgjpY5vZ"><img src="http://feeds.feedburner.com/~f/winstonyw?i=DgjpY5vZ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=cfkxXXNw"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=bjIUTVCU"><img src="http://feeds.feedburner.com/~f/winstonyw?i=bjIUTVCU" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=h1mSFQlJ"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/rXsKt4f9OC4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/08/28/doctype-xhtml-strict-or-transitional/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/08/28/doctype-xhtml-strict-or-transitional/</feedburner:origLink></item>
		<item>
		<title>Create a Digg-Like Delicious Count Button With JQuery</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/HyfUU25YBrs/</link>
		<comments>http://www.winstonyw.com/2008/08/23/create-a-digg-like-delicious-count-button-with-jquery/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 15:57:22 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=161</guid>
		<description>Background
During the conceptualization stages of Winston{YW}, I was inspired by Antonio and so, I wanted my WordPress blog to have a Delicious Count Button on each post too. Ideally, this Delicious Count Button could be used to bookmark the post in Delicious, and at the same time, display the number of times the post has [...]</description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>During the conceptualization stages of Winston{YW}, I was inspired by <a href="http://woork.blogspot.com" target="_blank">Antonio</a> and so, I wanted my WordPress blog to have a Delicious Count Button on each post too. Ideally, this Delicious Count Button could be used to bookmark the post in <a href="http://www.delicious.com" target="_blank">Delicious</a>, and at the same time, display the number of times the post has been bookmarked on Delicious.</p>
<p>By referring to the <a href="http://delicious.com/help/feeds" target="_blank">new Delicious API</a>, I managed to build this Delicious Count Button with JQuery, and I even styled it to match the looks of the <a href="http://digg.com/tools/integrate" target="_blank">Digg button</a>. Now, I shall go through the process of building this Delicious Count Button for your WordPress blog. See a <a href="http://www.winstonyw.com/wp-demo/create-a-digg-like-delicious-count-button-with-jquery-demo.html" target="_blank">DEMO here</a>.</p>
<h3>Step 1: The Button Image</h3>
<p>Browse to the <a href="http://digg.com/img/digg-it-tiny-submit.gif" target="_blank">image on Digg&#8217;s website</a>. &#8220;Right Click&#8221; the image, and &#8220;Save Image As&#8221;. Place the image in your theme&#8217;s IMAGES directory.</p>
<h3>Step 2: The HTML</h3>
<p>You should be familiar with <a href="http://codex.wordpress.org/The_Loop" target="_blank">The Loop in WordPress</a>. Copy this snippet of HTML into The Loop; place it where you would like to have this Delicious Count Button.</p>
<pre class="brush: php;">
&lt;div class='post_delicious'&gt;
  &lt;span class='md5hash'&gt;&lt;?php echo md5(get_permalink()); ?&gt;&lt;/span&gt;
  &lt;a href='http://del.icio.us/post?v=4&amp;amp;noui&amp;amp;jump=close&amp;amp;url=&lt;?php the_permalink() ?&gt;&amp;amp;title=&lt;?php echo urlencode(the_title('','',FALSE)) ?&gt;' target='_blank'&gt;Del.icio.us&lt;/a&gt;
&lt;/div&gt;
</pre>
<p>This snippet of code sets up a DIV that contains a SPAN and an ANCHOR. The SPAN is where the magic occurs as the content would be replaced by a count of the number of times your post has been bookmarked on Delicious through the use of JQuery. The content in the SPAN tag is actually a MD5 hash of the permalink of the post, which is used as an unique key to query the Delicious API for details of this post. The ANCHOR is a link which contains the necessary parameters, populated by the details of each post, to submit the post to Delicious.</p>
<h3>Step 3: The CSS</h3>
<p>Copy this snippet of CSS into the CSS file, which should be styles.css for most WordPress themes. This would style the DIV which you copied in Step 2, and make it look like the Digg button.</p>
<pre class="brush: css;">
.post_delicious {
  display: block;
  background: url('images/tiny-submit.gif') no-repeat top right;
  height: 20px;
  width: 85px;
  padding: 2px 45px 0px 0;
  font-family: arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.md5hash {
  display: none;
}

.post_delicious a, .post_delicious a:visited {
  float: right;
  color: #444444;
  text-decoration: none;
}

.post_delicious a:hover {
  color: #0000000;
  text-decoration: underline;
}
</pre>
<h3>Step 4: The JQuery Package</h3>
<p>Proceed to download the <a href="http://docs.jquery.com/Release:jQuery_1.2.6" target="_blank">latest version of JQuery</a>, or use a Google-hosted version of JQuery by reading more about it on the <a href="http://code.google.com/apis/ajaxlibs/" target="_blank">Google AJAX Libraries API</a>. Insert the link to the JQuery package in the HEAD tags of your HTML.</p>
<pre class="brush: php;">
&lt;head&gt;
  &lt;!-- Misc Stuff --&gt;
  &lt;script type='text/javascript' src='&lt;directory_to&gt;/jquery-1.2.6.pack.js'&gt;&lt;/script&gt;
&lt;/head&gt;
</pre>
<h3>Step 5: The JQuery Code</h3>
<p>Copy this snippet of JQuery code. Place it either in the HEAD tags of your HTML, or at the bottom of your HTML, just before the closing HTML tag.</p>
<pre class="brush: jscript;">
&lt;script type='text/javascript'&gt;
  $(function() {

    $.each($('span.md5hash'), function () {
      var elem = $(this);
      $.ajax({ type:      'GET',
               dataType:  'jsonp',
               url:       'http://feeds.delicious.com/v2/json/urlinfo/'+$(this).html(),
               success:   function(data){
                            if (data.length &gt; 0) {
                              elem.next().prepend(data[0].total_posts + ' ');
                            }
                          }
            });
    });

  })
&lt;/script&gt;
&lt;/script&gt;
</pre>
<p>This is the MAGIC! Once your blog is loaded in a browser, this snippet of code scans for all the SPAN tags that has the class &#8220;md5hash&#8221;, and for each SPAN tag found (which should be one per post), it issues an AJAX request to the new Delicious API to obtain details of the post.</p>
<p>On the return of the AJAX request, the content in the SPAN tag (which is the MD5 hash of the permalink) is then replaced with a count of the number of times the post has been bookmarked on Delicious.</p>
<h3>Conclusion</h3>
<p>Finally, upload your changes and with that, you have successfully placed a Delicious Count Button on each of your posts! I hope you find this post useful, and do let me know in the comments if you have any questions or encounter any problems.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=kaH93szK"><img src="http://feeds.feedburner.com/~f/winstonyw?i=kaH93szK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=o2Up5P7e"><img src="http://feeds.feedburner.com/~f/winstonyw?i=o2Up5P7e" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=Q4BAieL8"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=8CUGuQpV"><img src="http://feeds.feedburner.com/~f/winstonyw?i=8CUGuQpV" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=T5PkSk49"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/HyfUU25YBrs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/08/23/create-a-digg-like-delicious-count-button-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/08/23/create-a-digg-like-delicious-count-button-with-jquery/</feedburner:origLink></item>
		<item>
		<title>A New Simple Design</title>
		<link>http://feedproxy.google.com/~r/winstonyw/~3/l5ooz3C9afQ/</link>
		<comments>http://www.winstonyw.com/2008/08/11/a-new-simple-design/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 17:50:55 +0000</pubDate>
		<dc:creator>Winston</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.winstonyw.com/?p=153</guid>
		<description>After a hiatus of nearly two years, I want to start blogging actively again. This new design is created for that purpose, as a celebration of my return to blogging. 
I have it made to be just a plain and simple blog design that&amp;#8217;s absent of many colours or other funky design elements, as I [...]</description>
			<content:encoded><![CDATA[<p>After a hiatus of nearly two years, I want to start blogging actively again. This new design is created for that purpose, as a celebration of my return to blogging. </p>
<p>I have it made to be just a plain and simple blog design that&#8217;s absent of many colours or other funky design elements, as I hope that the content would eventually be the main draw. But, I also have it optimized in several aspects to make it look aesthetically pleasing (at least to me).</p>
<p><img class="left clear" src="http://www.winstonyw.com/uploads/winstonyw_2008.jpg" alt="New Blog Design" /></p>
<p>Firstly, the main fonts are 13px at least, and there&#8217;s a line height of 1.5em between the lines to make sure that paragraphs are easily readable. Secondly, for every paragraph, the number of words per line is in the range of 12-18 words which is what I understand as the optimum number of words per line. Thirdly, I am using a grid layout that further enhances readability. Last but not least, I am using dark coloured wordings on a white background which is the safest colour combination for any blog design. You may disagree with me on all the aspects I listed above, but well, those are what I believe in.</p>
<p>Anyway, I don&#8217;t call myself a designer and this blog is a culmination of inspirations I got from a number of blogs. This list is not exhaustive, but the following are the ones that I felt had the strongest influence in my new blog design:</p>
<ul>
<li><a href="http://www.subtraction.com">Subtraction</a></li>
<li><a href="http://quotedprintable.com/pages/scribbish">Scribbish Theme</a></li>
<li><a href="http://woork.blogspot.com">Woork</a></li>
<li><a href="http://ma.tt">Matt Mellenweg</a></li>
<li><a href="http://www.chrisbrogan.com">Chris Brogan</a></li>
<li><a href="http://www.problogger.com">ProBlogger</a></li>
<li><a href="http://www.readwriteweb.com">ReadWriteWeb</a></li>
<li><a href="http://www.techcrunch.com">TechCrunch</a></li>
</ul>
<p>As of this writing, this blog design is almost complete. But I am still looking to integrate <a href="http://www.friendfeed.com/winstonyw">my FriendFeed</a> into the blog. I had a look at the <a href="http://wordpress.org/extend/plugins/friendfeed-activity-widget/">FriendFeed plugin</a>, but am not extremely fond of it. So, for now I would sit on it while I brainstorm for fresh ideas on how to do the integration.</p>
<p>That&#8217;s all I have to say about my new blog design. I hope you like it as much as I do, and I welcome feedback or suggestions!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/winstonyw?a=eSnKIsj8"><img src="http://feeds.feedburner.com/~f/winstonyw?i=eSnKIsj8" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=amf6130U"><img src="http://feeds.feedburner.com/~f/winstonyw?i=amf6130U" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=KkaGtfSQ"><img src="http://feeds.feedburner.com/~f/winstonyw?d=50" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=1wTwVDzv"><img src="http://feeds.feedburner.com/~f/winstonyw?i=1wTwVDzv" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/winstonyw?a=9G2w8rFF"><img src="http://feeds.feedburner.com/~f/winstonyw?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/winstonyw/~4/l5ooz3C9afQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.winstonyw.com/2008/08/11/a-new-simple-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.winstonyw.com/2008/08/11/a-new-simple-design/</feedburner:origLink></item>
	</channel>
</rss>
