<?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>Davs Rants and Random Thoughts</title>
	<atom:link href="http://blog.davglass.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.davglass.com</link>
	<description></description>
	<lastBuildDate>Wed, 18 Nov 2009 06:30:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Test post from Droid</title>
		<link>http://blog.davglass.com/2009/11/test-post-from-droid/</link>
		<comments>http://blog.davglass.com/2009/11/test-post-from-droid/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 06:30:20 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/2009/11/test-post-from-droid/</guid>
		<description><![CDATA[Just testing the wp2go app on my new Droid. So far I am really impressed with it. I spent a little more time browsing the Android Market this evening &#038; ended up installing over 20 free applications. I&#8217;ll be purchasing a Twitter client soon, but I need to test the dozen or so free ones [...]]]></description>
			<content:encoded><![CDATA[<p>Just testing the wp2go app on my new Droid. So far I am really impressed with it. I spent a little more time browsing the Android Market this evening &#038; ended up installing over 20 free applications. I&#8217;ll be purchasing a Twitter client soon, but I need to test the dozen or so free ones first. </p>
<p>It&#8217;s taking a little getting used to, but I think I&#8217;m going to like the Droid. It&#8217;s not as &#8220;polished&#8221; &#038; &#8220;pretty&#8221; as the iPhone, but it&#8217;s a geek phone. Since I&#8217;m a Linux guy at heart, this is a good fit. </p>
<p>I&#8217;ll post more as I start using it more. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/11/test-post-from-droid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI 3 Gallery &#8211; Hidden Features</title>
		<link>http://blog.davglass.com/2009/11/yui-3-gallery-hidden-features/</link>
		<comments>http://blog.davglass.com/2009/11/yui-3-gallery-hidden-features/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 19:55:35 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/?p=225</guid>
		<description><![CDATA[Today the YUI Team announced the little project I have been working on for the last couple of months. The YUI 3 Gallery.
So I figured I would write a little post to show a few of the &#8220;hidden&#8221; features of the Gallery and how you can use them.
JS Lint:
Every module that we push to the [...]]]></description>
			<content:encoded><![CDATA[<p>Today the <a href="http://www.yuiblog.com/blog/2009/11/04/introducing-the-yui-3-gallery/">YUI Team announced</a> the little project I have been working on for the last couple of months. The <a href="http://yuilibrary.com/gallery/">YUI 3 Gallery</a>.</p>
<p>So I figured I would write a little post to show a few of the <em>&#8220;hidden&#8221;</em> features of the Gallery and how you can use them.</p>
<p><strong>JS Lint:</strong><br />
Every module that we push to the CDN has to go through our build system that uses the <a href="http://yuilibrary.com/projects/builder/">YUI Builder Tool</a>. The Builder concatenates files, then compresses them with <a href="http://developer.yahoo.com/yui/compressor/">YUICompressor</a> and runs <a href="http://jslint.org/">JSLint</a> on them a couple of times. We include this output on every build, so you as the end-user can see that output and use it to determine if you want to use the module in your application. If you look at my <a href="http://yuilibrary.com/gallery/show/yql">YQL Module</a> and click the link for the <a href="http://yuilibrary.com/gallery/buildtag/yql/gallery-2009.10.27">Build Tag</a> <em>(Which is the stamp we give each CDN push)</em>, you will see the code that is required to load this module on your page. Just below that you can see a link called &#8220;[Show Build Output]&#8220;. Clicking that link will show you the raw output generated by the build system.</p>
<p><strong>Loader</strong><br />
Some people have asked why they have to include the config in their <code>YUI</code> instance, to make a Gallery item work.</p>
<p><img src="http://img.skitch.com/20091104-kuxd7ccxfndd6yte5jyj9m9k9y.jpg" alt="Code Snippet" /></p>
<p>The short answer is: <em>We didn&#8217;t want to release a YUI 3.0.1 just to add a couple of lines to one file.</em><br />
The longer answer is: When we release YUI 3.1.0, this will be built into the <code>Loader</code> module. And it will be done for you automatically. Since the files are hosted on the CDN, but are not in the same directory as the YUI files are, we had to modify <code>Loader</code> to know about Gallery modules and make it smart enough to change directories to use the CDN.</p>
<p>However, I have built an API into the Gallery to help with this.</p>
<p><img src="http://img.skitch.com/20091104-quse8jssfmu1j43e6mr74c23b2.jpg" alt="Loader Code" /></p>
<p><a href="http://davglass.github.com/gallery/loader/">This example</a> shows how you can load a single js file from YUILibrary.com and plug it into your <code>YUI</code> instance and have access to all the gallery modules that are currently on the CDN.</p>
<p><strong>API</strong><br />
The Gallery was designed with a pretty robust API exposed to help developers and users get the most out of the data inside the Gallery.<br />
Here is the list of valid API endpoints:</p>
<ul>
<li><a href="http://yuilibrary.com/gallery/api/loader">http://yuilibrary.com/gallery/api/loader</a></li>
<li><a href="http://yuilibrary.com/gallery/api/user/davglass">http://yuilibrary.com/gallery/api/user/davglass</a> <em>(works for any username)</em></li>
<li><a href="http://yuilibrary.com/gallery/api/show/yql">http://yuilibrary.com/gallery/api/show/yql</a> <em>(works for any module name)</em></li>
<li><a href="http://yuilibrary.com/gallery/api/random">http://yuilibrary.com/gallery/api/random</a></li>
<li><a href="http://yuilibrary.com/gallery/api/oncdn">http://yuilibrary.com/gallery/api/oncdn</a></li>
<li><a href="http://yuilibrary.com/gallery/api/featured">http://yuilibrary.com/gallery/api/featured</a></li>
<li><a href="http://yuilibrary.com/gallery/api/popular">http://yuilibrary.com/gallery/api/popular</a></li>
</ul>
<p><strong>Command Line</strong><br />
Last, but not least, my <code>yui-git</code> command line tool has support for the Gallery now.<br />
You can query all the items in the Pending CDN Queue and check them out into a branch to test them before they are on the CDN.</p>
<p>That&#8217;s about it for now, hope you all enjoy the new Gallery &#038; I hope to see lots of new modules in there soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/11/yui-3-gallery-hidden-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitHub @ Yahoo! &#8211; YUI Theater scoop!</title>
		<link>http://blog.davglass.com/2009/08/github-yahoo-yui-theater-scoop/</link>
		<comments>http://blog.davglass.com/2009/08/github-yahoo-yui-theater-scoop/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 21:57:42 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/?p=214</guid>
		<description><![CDATA[A few weeks ago, the awesome GitHub crew (Chris, Tom &#038; Scott) dropped by Yahoo! to give a tech talk. They talk about Git, GitHub, Social Coding and more. And you get to see the video before it hits YUI Theater!!

]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, the awesome <a href="http://github.com">GitHub</a> crew (<a href="http://github.com/defunkt">Chris</a>, <a href="http://github.com/mojombo">Tom</a> &#038; <a href="http://github.com/schacon">Scott</a>) dropped by Yahoo! to give a tech talk. They talk about Git, GitHub, Social Coding and more. And you get to see the video before it hits YUI Theater!!</p>
<div style=" width: 640; height=360;margin:2em;">
<object width="640" height="360" allowFullScreen="true"><param name="movie" value="http://cosmos.bcst.yahoo.com/up/ypp/default/player.swf"></param><param name="flashVars" value="vid=15004396&#038;autoPlay=0&#038;thumbnailUrl=http://yuiblog.com/assets/prestonwerner-github-20090810-104435.jpg"</param><param name="wmode" value="transparent"></param>
 <embed width="640" height="360" allowFullScreen="true" src="http://cosmos.bcst.yahoo.com/up/ypp/default/player.swf" type="application/x-shockwave-flash" flashvars="vid=15004396&#038;autoPlay=0&#038;thumbnailUrl=http://yuiblog.com/assets/prestonwerner-github-20090810-104435.jpg"></embed></object>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/08/github-yahoo-yui-theater-scoop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First YUI3 Example posted</title>
		<link>http://blog.davglass.com/2009/07/first-yui3-example-posted/</link>
		<comments>http://blog.davglass.com/2009/07/first-yui3-example-posted/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 04:41:48 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/2009/07/first-yui3-example-posted/</guid>
		<description><![CDATA[I just posted my first YUI3 example:
http://blog.davglass.com/files/yui3/greasemonkey/
I also started a GitHub project for them too:
http://github.com/davglass/yui3-examples
]]></description>
			<content:encoded><![CDATA[<p>I just posted my first <a href="http://developer.yahoo.com/yui/3/">YUI3</a> example:<br />
<a href="http://blog.davglass.com/files/yui3/greasemonkey/">http://blog.davglass.com/files/yui3/greasemonkey/</a></p>
<p>I also started a GitHub project for them too:<br />
<a href="http://github.com/davglass/yui3-examples">http://github.com/davglass/yui3-examples</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/07/first-yui3-example-posted/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3 Years Ago&#8230;</title>
		<link>http://blog.davglass.com/2009/07/3-years-ago/</link>
		<comments>http://blog.davglass.com/2009/07/3-years-ago/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 14:09:23 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/?p=196</guid>
		<description><![CDATA[Three years ago today, I posted my first YUI example to the ydn-javascript list.
Here is the message:

#first_code { border: 1px solid black; background-color: #ccc; margin: 1em; padding: 1em;  }

You can use a simple addListener like so:

YAHOO.util.Event.addListener([HTMLObject], 'contextmenu', CallBackFunction);

You can see a working example here:

http://blog.davglass.com/files/yahoo/index.html

FYI, I am also using the YAHOO.namespace in the example.
The link [...]]]></description>
			<content:encoded><![CDATA[<p>Three years ago today, I posted my first <a href="http://developer.yahoo.com">YUI</a> example to the <a href="http://tech.groups.yahoo.com/group/ydn-javascript">ydn-javascript</a> list.</p>
<p>Here is the <a href="http://tech.groups.yahoo.com/group/ydn-javascript/message/3206">message</a>:</p>
<style>
#first_code { border: 1px solid black; background-color: #ccc; margin: 1em; padding: 1em;  }
</style>
<pre id="first_code">You can use a simple addListener like so:

YAHOO.util.Event.addListener([HTMLObject], 'contextmenu', CallBackFunction);

You can see a working example here:

http://blog.davglass.com/files/yahoo/index.html

FYI, I am also using the YAHOO.namespace in the example.</pre>
<p>The <a href="http://blog.davglass.com/files/yahoo/index.html">link to that code still works</a> <img src='http://blog.davglass.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>After reading a few of the old posts I thought I would do a little data collection &#038; here&#8217;s what I came up with. In the last 3 years:</p>
<ul>
<li>17,747 lines of YUI code w/comments</li>
<li>2,130 posts to ydn-javascript</li>
<li>432 public bugs fixed</li>
<li>222 posts to the new <a href="http://yuilibrary.com/forum/">YUILibrary.com</a> forum</li>
<li><a href="http://blog.davglass.com/2006/06/yui-code-samples/">211 public examples</a></li>
<li>15 talks</li>
<li><a href="http://developer.yahoo.com/yui/editor/">1 Video</a></li>
</ul>
<p>Wow, it&#8217;s been an awesome 3 years.. Here&#8217;s to 3 more with YUI 3 !!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/07/3-years-ago/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yahoo Open Hack London</title>
		<link>http://blog.davglass.com/2009/05/yahoo-open-hack-london/</link>
		<comments>http://blog.davglass.com/2009/05/yahoo-open-hack-london/#comments</comments>
		<pubDate>Mon, 11 May 2009 07:05:26 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[hackday]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/2009/05/yahoo-open-hack-london/</guid>
		<description><![CDATA[

Yahoo Open Hack London 57
Originally uploaded by Jinho.Jung.


Yahoo Open Hack London 67
Originally uploaded by Jinho.Jung.
This weekend I had the privilege of attending the second Open Hack Day in London. This year I was a presenter instead of just there for user support. I have to say that it was an awesome event and I can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 10px; margin-bottom: 10px;"><a title="photo sharing" href="http://www.flickr.com/photos/phploveme/3514598799/"><img style="border: solid 2px #000000;" src="http://farm4.static.flickr.com/3349/3514598799_809fdb90fe_m.jpg" alt="" /></a></p>
<p><span style="font-size: 0.9em; margin-top: 0px;"><br />
<a href="http://www.flickr.com/photos/phploveme/3514598799/">Yahoo Open Hack London 57</a></span></p>
<p>Originally uploaded by <a href="http://www.flickr.com/people/phploveme/">Jinho.Jung</a>.</div>
<div style="float: right; margin-left: 10px; margin-bottom: 10px;"><a title="photo sharing" href="http://www.flickr.com/photos/phploveme/3515408702/"><img style="border: solid 2px #000000;" src="http://farm4.static.flickr.com/3315/3515408702_43e2de7f67_m.jpg" alt="" /></a></p>
<p><span style="font-size: 0.9em; margin-top: 0px;"><br />
<a href="http://www.flickr.com/photos/phploveme/3515408702/">Yahoo Open Hack London 67</a></span></p>
<p>Originally uploaded by <a href="http://www.flickr.com/people/phploveme/">Jinho.Jung</a>.</div>
<p>This weekend I had the privilege of attending the second Open Hack Day in London. This year I was a presenter instead of just there for user support. I have to say that it was an awesome event and I can&#8217;t wait to do it again.</p>
<p>I&#8217;ve uploaded the slides from my talk to <a href="http://www.slideshare.net/davglass/yui-3/">SlideShare</a> and posted the <a href="http://blog.davglass.com/files/openhackday/openhackday/code/photos/">code example here</a>.</p>
<p>I have to mention that one of the best parts was the band: <a title="http://pornophonique.de/" href="http://pornophonique.de/">pornophonique.de</a>. They are a German duo that plays a guitar and a GameBoy. It&#8217;s a pretty sweet sound and so far I really like coding to it <img src='http://blog.davglass.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>There are tons of pics available from the event, so browse on over to <a href="http://www.flickr.com/search/?q=openhacklondon&amp;m=tags">flickr and check them out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/05/yahoo-open-hack-london/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Git helper for YUI Contributors v2</title>
		<link>http://blog.davglass.com/2009/04/git-helper-for-yui-contributors-v2/</link>
		<comments>http://blog.davglass.com/2009/04/git-helper-for-yui-contributors-v2/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 17:09:30 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/?p=186</guid>
		<description><![CDATA[Last night I upgraded the git yui tool to version 2.
This new version adds in support for the new YUILibrary.com ticket tracker API.
Here are a couple of screen shots:



More information is available on the YUI-Git Wiki page.
]]></description>
			<content:encoded><![CDATA[<p>Last night I upgraded the <code>git yui</code> tool to version 2.</p>
<p>This new version adds in support for the new <a href="http://yuilibrary.com">YUILibrary.com</a> ticket tracker API.</p>
<p>Here are a couple of screen shots:</p>
<div><a href="http://davglass.github.com/yui-git/shots/mytickets.png"><img class="alignleft" title="My Tickets" src="http://davglass.github.com/yui-git/shots/mytickets.png" alt="" width="372" height="91" /></a></div>
<div><a href="http://davglass.github.com/yui-git/shots/ticket.png"><img class="alignnone" title="View a Ticket" src="http://davglass.github.com/yui-git/shots/ticket.png" alt="" width="358" height="158" /></a></div>
<div><a href="http://davglass.github.com/yui-git/shots/comment.png"><img class="alignnone" title="Comment on a Ticket" src="http://davglass.github.com/yui-git/shots/comment.png" alt="" width="356" height="52" /></a></div>
<p>More information is available on the <a href="http://wiki.github.com/davglass/yui-git">YUI-Git Wiki</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/04/git-helper-for-yui-contributors-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git helper for YUI Contributors v1</title>
		<link>http://blog.davglass.com/2009/04/git-helper-for-yui-contributors-v1/</link>
		<comments>http://blog.davglass.com/2009/04/git-helper-for-yui-contributors-v1/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 22:37:59 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/?p=171</guid>
		<description><![CDATA[Last week I started working on a little helper utility to aid YUI Contributors with GitHub and git.
Currently it is quite usable and ready for people to start using and providing some feedback.
The full source is available on GitHub: http://github.com/davglass/yui-git/
This helper app is an addition to the already awesome git porcelain (meaning pretty, not brittle). [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I started working on a little helper utility to aid <a href="http://developer.yahoo.com/yui/community/">YUI Contributors</a> with <a href="http://github.com/">GitHub</a> and git.</p>
<p>Currently it is quite usable and ready for people to start using and providing some feedback.</p>
<p>The full source is available on GitHub: <a href="http://github.com/davglass/yui-git/" target="_blank">http://github.com/davglass/yui-git/</a></p>
<p>This helper app is an addition to the already awesome git porcelain (meaning pretty, not brittle). When you place the <code>git-yui</code> file in your path, you will now have access to the <code>git yui</code> set of sub commands.</p>
<p>The commands that are currently supported are:</p>
<ul>
<li><code>git yui up</code></li>
<li><code>git yui merge</code></li>
<li><code>git yui sync</code></li>
<li><code>git yui build</code></li>
<li><code>git yui docs</code></li>
<li><code>git yui lint</code></li>
<li><code>git yui network</code></li>
<li><code>git yui pullrequest</code></li>
<li><code>git yui commits</code></li>
<li><code>git yui create</code></li>
<li><code>git yui log</code></li>
</ul>
<p>The above commands are explained in full here:<a href="http://wiki.github.com/davglass/yui-git"> http://wiki.github.com/davglass/yui-git</a></p>
<p>Each of these commands are specific to YUI projects (yui2, yui3, yuidoc, builder). Some are only for yui2 and yui3: docs/build.</p>
<p>Hopefully these tools will help when contributing code.</p>
<p>Let me know what everyone thinks and please feel free to ask for feature requests <img src='http://blog.davglass.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/04/git-helper-for-yui-contributors-v1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>My take on Browser Sniffing vs Object Detection</title>
		<link>http://blog.davglass.com/2009/01/browser-sniffing-vs-object-detection/</link>
		<comments>http://blog.davglass.com/2009/01/browser-sniffing-vs-object-detection/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 04:32:50 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/?p=138</guid>
		<description><![CDATA[Some people are really hard core about object detection and others depend totally on browser detection. Personally, I think both sides are right. To me, it&#8217;s the same argument as what language to write your code in. You use what you need to get the job done, period. I&#8217;m not claiming one is better than [...]]]></description>
			<content:encoded><![CDATA[<p>Some people are really hard core about object detection and others depend totally on browser detection. Personally, I think both sides are right. To me, it&#8217;s the same argument as what language to write your code in. You use what you need to get the job done, period. I&#8217;m not claiming one is better than the other, I&#8217;m just stating that they are both useful when used properly.</p>
<p>The first thing people say about User Agent sniffing is, &#8220;<em>I can change the User Agent of my browser and things break.</em>&#8220;. Well my answer is, &#8220;<em>And I care why?</em>&#8220;. I think that if you go through the trouble of changing the User Agent string on your browser, then you should not be surprised that things break. In fact, you should be expecting it. That would be like me changing the information on my license plates and then telling the officer: &#8220;<em>You should have checked the VIN instead of the license plate, I didn&#8217;t like what it said so I changed it</em>&#8220;. <strong>It&#8217;s a stupid argument, get over it already!</strong></p>
<p>As for the object detection crew, you also need to do things right. If you are going to detect object&#8217;s make sure that you are doing it correctly. Here&#8217;s looking at you: <strong>document.all</strong>.</p>
<p>While developing the <a href="http://developer.yahoo.com/yui/editor">YUI Rich Text Editor</a> I learned that browser sniffing is, in deed, quite needed. Now, YUI does browser sniffing a little different. We try to detect the different rendering engines, so there is no firefox, mozilla, safari or chrome. It&#8217;s gecko, webkit, ie, etc.. The main reason that sniffing is needed in the Editor is because of the <strong>execCommand</strong> method. All of the A-Grade browsers support the method. The method is there to detect, but they all don&#8217;t do the same thing when executed. So how am I to tell what I am supposed to do? I have to rely on sniffing in order to make the browsers behave the way I want them to.</p>
<p>Let&#8217;s look at a another example. The method <strong>getBoundingClientRect</strong> was introduced in FireFox 3 and Opera 9.5 to match what was formerly an Interet Explorer only option. Now using object detection you would have done this:</p>
<p><script src="http://gist.github.com/51682.js"></script></p>
<p>Now what about the few cases where Internet Explorer reports position off by 2 pixels? How are you going to deal with that? Browser sniffing, like this?  </p>
<p><script src="http://gist.github.com/51679.js"></script></p>
<p>Not to forget you object detecting guys, I have seen others do things like this (snagged from <a href="http://www.nczonline.net/blog/2008/02/04/getting-element-dimensions-a-follow-up/">Mr. Zakas</a>, who i quote &#8220;<em>I [Nicholas] have to say right off the bat that hate this solution</em>&#8220;):</p>
<p><script src="http://gist.github.com/51683.js"></script></p>
<p>In my opinion, isn&#8217;t this the same thing as browser sniffing? Aren&#8217;t you checking something that you know is unique about a particular browser and leveraging it? Doesn&#8217;t that also qualify as browser sniffing? If you are looking for some flaw in a browser to determine a course of action, wouldn&#8217;t it be easier to just read the User Agent and work from there? You can process that info one time and use it everywhere.</p>
<p>Now to be perfectly clear, I am not saying one is better than the other. I am simply stating that there are uses for both, just like there are uses for both PHP and Python, VIM and Emacs, Gnome and KDE, Harley and Honda, Mac and Linux (Windows doesn&#8217;t count to me). You use what you need to get the job done. As with everything else make sure you make the right choice for the right job <img src='http://blog.davglass.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2009/01/browser-sniffing-vs-object-detection/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Server Move Complete</title>
		<link>http://blog.davglass.com/2008/11/server-move-complete/</link>
		<comments>http://blog.davglass.com/2008/11/server-move-complete/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 22:15:54 +0000</pubDate>
		<dc:creator>Dav Glass</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://blog.davglass.com/?p=136</guid>
		<description><![CDATA[If you are seeing this post, then the server move is complete  
Now that the server move is done, all my examples are now being pulled from GitHub.
So if you want to add any or update any go right ahead  
]]></description>
			<content:encoded><![CDATA[<p>If you are seeing this post, then the server move is complete <img src='http://blog.davglass.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Now that the server move is done, all my examples are now being pulled from GitHub.</p>
<p>So if you want to add any or update any go right ahead <img src='http://blog.davglass.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davglass.com/2008/11/server-move-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.051 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-13 09:48:33 -->
<!-- Compression = gzip -->