<?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>PatCavit.com &#187; Work</title>
	<atom:link href="http://patcavit.com/category/work/feed/" rel="self" type="application/rss+xml" />
	<link>http://patcavit.com</link>
	<description>I &#60;3 Programming</description>
	<lastBuildDate>Fri, 02 Jul 2010 19:19:24 +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>YUI 3 Loader &amp; Aggregated Files</title>
		<link>http://patcavit.com/2010/06/01/yui-3-loader-aggregated-files/</link>
		<comments>http://patcavit.com/2010/06/01/yui-3-loader-aggregated-files/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 19:15:07 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://patcavit.com/?p=269</guid>
		<description><![CDATA[With the launch of the ArenaNet Blog I&#8217;ve been working a lot with YUI3 since it is the JS framework that powers all the interactivity on the site. The other great thing it does is provide a Loader that can pull in JS files on-demand as defined by a configuration object you pass to it. [...]]]></description>
			<content:encoded><![CDATA[<p>With the launch of the <a title="ArenaNet Blog" href="http://www.arena.net/blog/">ArenaNet Blog</a> I&#8217;ve been working a lot with <a href="http://developer.yahoo.com/yui/3/">YUI3</a> since it is the JS framework that powers all the interactivity on the site. The other great thing it does is provide a Loader that can pull in JS files on-demand as defined by a configuration object you pass to it. Loader has the capability to roll up multiple requests into a single file using a CDN but the functionality to do the same without using a CDN appears to be broken. Adam Moore from the YUI team &amp; I have been discussing the issue on <a href="http://yuilibrary.com/projects/yui3/ticket/2528823">YUI&#8217;s bug tracker</a> without a resolution yet.</p>
<p>Since I need to keep moving on this stuff I&#8217;ve had to devise my own solution to the issue I&#8217;m experiencing. For background, we use Apache Ant to create a &#8220;Deploy&#8221; version of the WordPress theme on the blog. This process runs through CSS/JS &amp; renames files, <a href="http://yuilibrary.com/projects/yuicompressor/">compresses them</a>, updates references, does <a href="http://github.com/nzakas/cssembed">DataURI stuff</a>, etc. It&#8217;s pretty nice and allows for easily deploying a very optimized site without making development a nightmare. As part of that I&#8217;ve had it roll up two JS files that are always requested together into one file to avoid making an extra HTTP request. Unfortunately when I tried a simple replace of the previous filenames with the new aggregate file&#8217;s name YUI 3&#8242;s Loader was loading the file twice.</p>
<p>So until I can get a working version of what Adam has suggested here&#8217;s how I&#8217;ve set up the build system to allow for replacing individual modules in development mode with a single aggregate file for deploying.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="co1">//DEV CONFIG</span>
YUI_config <span class="sy0">=</span> <span class="br0">&#123;</span>
    <span class="co1">//yes this is a little gross but sadly it's necessary to make loader work how we want w/ ant</span>
    <span class="co2">/* dev */</span> ignore <span class="sy0">:</span> <span class="br0">&#91;</span> <span class="st0">&quot;sidebar-rollup&quot;</span> <span class="br0">&#93;</span><span class="sy0">,</span> <span class="co1">//dev */</span>
    <span class="coMULTI">/* live ignore : [ &quot;chiclet&quot;, &quot;slider-plugin&quot; ], //live */</span>
    groups <span class="sy0">:</span> <span class="br0">&#123;</span>
        anet <span class="sy0">:</span> <span class="br0">&#123;</span>
            combine <span class="sy0">:</span> <span class="kw2">false</span><span class="sy0">,</span>
            base <span class="sy0">:</span> <span class="st0">&quot;/blog/wp-content/themes/arenanet/js/lib/&quot;</span><span class="sy0">,</span>
            modules <span class="sy0">:</span> <span class="br0">&#123;</span>
                <span class="st0">&quot;chiclet&quot;</span> <span class="sy0">:</span> <span class="br0">&#123;</span>
                    path <span class="sy0">:</span> <span class="st0">&quot;chiclet.js&quot;</span><span class="sy0">,</span>
                    skinnable<span class="sy0">:</span> <span class="kw2">false</span><span class="sy0">,</span>
                    requires <span class="sy0">:</span> <span class="br0">&#91;</span> <span class="st0">&quot;base&quot;</span><span class="sy0">,</span> <span class="st0">&quot;widget&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-base&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-easing&quot;</span><span class="sy0">,</span> <span class="st0">&quot;sidebar-rollup&quot;</span> <span class="br0">&#93;</span>
                <span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
                <span class="st0">&quot;slider-plugin&quot;</span> <span class="sy0">:</span> <span class="br0">&#123;</span>
                    path <span class="sy0">:</span> <span class="st0">&quot;slider.js&quot;</span><span class="sy0">,</span>
                    requires <span class="sy0">:</span> <span class="br0">&#91;</span><span class="st0">&quot;plugin&quot;</span><span class="sy0">,</span> <span class="st0">&quot;node&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-base&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-easing&quot;</span><span class="sy0">,</span> <span class="st0">&quot;sidebar-rollup&quot;</span> <span class="br0">&#93;</span>
                <span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
                <span class="st0">&quot;gallery-lightbox&quot;</span> <span class="sy0">:</span> <span class="br0">&#123;</span>
                    path <span class="sy0">:</span> <span class="st0">&quot;lightbox.js&quot;</span><span class="sy0">,</span>
                    requires <span class="sy0">:</span> <span class="br0">&#91;</span><span class="st0">&quot;base&quot;</span><span class="sy0">,</span> <span class="st0">&quot;node&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-base&quot;</span><span class="sy0">,</span> <span class="st0">&quot;selector-css3&quot;</span><span class="br0">&#93;</span>
                <span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
                <span class="st0">&quot;scroller-plugin&quot;</span> <span class="sy0">:</span> <span class="br0">&#123;</span>
                    path <span class="sy0">:</span> <span class="st0">&quot;scroll.js&quot;</span><span class="sy0">,</span>
                    requires <span class="sy0">:</span> <span class="br0">&#91;</span><span class="st0">&quot;plugin&quot;</span><span class="sy0">,</span> <span class="st0">&quot;node&quot;</span><span class="sy0">,</span> <span class="st0">&quot;selector-css3&quot;</span><span class="sy0">,</span> <span class="st0">&quot;event-delegate&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-base&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-scroll&quot;</span><span class="sy0">,</span> <span class="st0">&quot;anim-easing&quot;</span><span class="br0">&#93;</span>
                <span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
                <span class="st0">&quot;social-counts&quot;</span> <span class="sy0">:</span> <span class="br0">&#123;</span>
                    path <span class="sy0">:</span> <span class="st0">&quot;social.js&quot;</span><span class="sy0">,</span>
                    requires <span class="sy0">:</span> <span class="br0">&#91;</span> <span class="st0">&quot;gallery-yql&quot;</span><span class="sy0">,</span> <span class="st0">&quot;node&quot;</span> <span class="br0">&#93;</span>
                <span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
                <span class="st0">&quot;sidebar-rollup&quot;</span> <span class="sy0">:</span> <span class="br0">&#123;</span>
                    path <span class="sy0">:</span> <span class="st0">&quot;sidebar.js&quot;</span>
                <span class="br0">&#125;</span>
            <span class="br0">&#125;</span>
        <span class="br0">&#125;</span>
    <span class="br0">&#125;</span>
<span class="br0">&#125;</span><span class="sy0">;</span></pre></div></div>

<p>which is modified by the Ant build script to</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="co1">//DEPLOY MODE</span>
YUI_config <span class="sy0">=</span> <span class="br0">&#123;</span>
    <span class="co1">//yes this is a little gross but sadly it's necessary to make loader work how we want w/ ant</span>
    <span class="coMULTI">/* dev  ignore : [ &quot;sidebar-rollup&quot; ], //dev */</span>
    <span class="co2">/* live */</span> ignore <span class="sy0">:</span> <span class="br0">&#91;</span> <span class="st0">&quot;chiclet&quot;</span><span class="sy0">,</span> <span class="st0">&quot;slider-plugin&quot;</span> <span class="br0">&#93;</span><span class="sy0">,</span> <span class="co1">//live */</span>
    groups <span class="sy0">:</span> <span class="br0">&#123;</span>
        anet <span class="sy0">:</span> <span class="br0">&#123;</span>
            <span class="co1">//omitted for brevity, see above code block because this doesn't change between them</span>
            <span class="br0">&#125;</span>
        <span class="br0">&#125;</span>
    <span class="br0">&#125;</span>
<span class="br0">&#125;</span><span class="sy0">;</span></pre></div></div>

<p>The comments get stripped out during compression so it doesn&#8217;t look quite so gnarly when sent to end-users. It&#8217;s also pretty easy to do as an Ant task, all it takes is this</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span class="sc-1">&lt;!-- update references to old js files to new concatted file --&gt;</span>
<span class="sc3"><span class="re1">&lt;replace</span> <span class="re0">file</span>=<span class="st0">&quot;${js.dir}/loader.js&quot;</span> <span class="re0">token</span>=<span class="st0">&quot;/* dev */&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/* dev &quot;</span> <span class="re0">summary</span>=<span class="st0">&quot;yes&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;replace</span> <span class="re0">file</span>=<span class="st0">&quot;${js.dir}/loader.js&quot;</span> <span class="re0">token</span>=<span class="st0">&quot;/* live &quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/* live */&quot;</span> <span class="re0">summary</span>=<span class="st0">&quot;yes&quot;</span> <span class="re2">/&gt;</span></span></pre></div></div>

<p>to do the switch. Later in my custom loader script those two modules are used with</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">YUI<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="kw2">use</span><span class="br0">&#40;</span><span class="st0">&quot;node&quot;</span><span class="sy0">,</span> <span class="st0">&quot;event-base&quot;</span><span class="sy0">,</span> <span class="st0">&quot;imageloader&quot;</span><span class="sy0">,</span> <span class="st0">&quot;selector-css3&quot;</span><span class="sy0">,</span> <span class="st0">&quot;chiclet&quot;</span><span class="sy0">,</span> <span class="st0">&quot;slider-plugin&quot;</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>Y<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Code goes here...</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>which will always make sure that both the &#8220;Chiclet&#8221; and &#8220;Slider-Plugin&#8221; modules are available. In dev mode it will request chiclet.js &amp; slider.js versus just asking for sidebar.js when deployed.</p>
<p>Does anybody have a better way of doing this? I think Adam&#8217;s version is nicer looking in the config but I&#8217;m not sure how it will work if a) the rollup file doesn&#8217;t exist or b) you don&#8217;t want to use the rollup except in production. I guess you could always just do something similar to what I&#8217;m doing now to configure it. That all assumes that the issues with it not actually loading the module get figured out, because if the modules aren&#8217;t added to the Y instance what&#8217;s the point?</p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2010/06/01/yui-3-loader-aggregated-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arena.net</title>
		<link>http://patcavit.com/2009/09/18/arena-net/</link>
		<comments>http://patcavit.com/2009/09/18/arena-net/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:36:22 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://patcavit.com/?p=234</guid>
		<description><![CDATA[While I don&#8217;t work on the team responsible for the Arena.net site I help out all over the company wherever I can. When it was decided that the old site needed to be updated I got the call. After some discussions around what exactly the site should encompass it came down to wanting to have [...]]]></description>
			<content:encoded><![CDATA[<p>While I don&#8217;t work on the team responsible for the <a href="http://arena.net">Arena.net</a> site I help out all over the company wherever I can. When it was decided that the old site needed to be updated I got the call. After some discussions around what exactly the site should encompass it came down to wanting to have the site be an aggregator of updates by arena.net on various different services.</p>
<p>Here&#8217;s the rundown:</p>
<ul>
<li><a href="http://twitter.com/arenanet/">Twitter</a></li>
<li><a href="http://www.guildwars.com/events/newsarchive/default.php">GuildWars.com News</a></li>
<li><a href="http://www.flickr.com/photos/arenanet/">Flickr</a></li>
<li><a href="http://us.ncsoft.com/en/jobs/arenanet.html">NCSoft Jobs page</a></li>
<li><a href="http://us.ncsoft.com/en/news/press-releases/index.html">Press Releases</a></li>
</ul>
<p>I certainly wasn&#8217;t looking forward to building parsers for the multiple different feed types that entails, but <a href="http://developer.yahoo.com/yql">YQL</a> came along and saved the day again. I only had to do simple things manually like make sure that Twitter links &amp; @username replies were properly wrappped in &lt;a&gt; tags. To keep from bashing on YQL every time the page is loaded it stores the transformed results of the updates for an hour in a local APC cache. This provided the best of both worlds and made caching super-easy.</p>
<p>The site itself was built using <a href="http://developer.yahoo.com/yui/grids/">YUI grids</a>, <a href="http://developer.yahoo.com/yui/3/">YUI 3b1</a>, and <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/">DD_belatedPNG</a> to solve transparent PNG issues in IE6. It&#8217;s also using my favorite new PHP framework, <a href="http://github.com/bastos/nicedog/">Nice Dog</a>. It&#8217;s a nano framework (about 100 lines) that is more of a VC than MVC. For a site like Arena.net it&#8217;s perfect as there&#8217;s no need for models. I could&#8217;ve plugged in an ORM to make it the full stack but when getting all your data is as simple as</p>
<p><code>apc_fetch($key);</code></p>
<p>the need to build a &#8220;proper&#8221; MVC site kinda isn&#8217;t there any longer.</p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2009/09/18/arena-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmer&#8217;s Notepad and JSLint</title>
		<link>http://patcavit.com/2008/02/05/programmers-notepad-and-jslint/</link>
		<comments>http://patcavit.com/2008/02/05/programmers-notepad-and-jslint/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 21:39:15 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[text editors]]></category>

		<guid isPermaLink="false">http://patcavit.com/2008/02/05/programmers-notepad-and-jslint/</guid>
		<description><![CDATA[I&#8217;ve been using Programmer&#8217;s Notepad for some time now as my go-to text editor for code. It&#8217;s simple to use and really robust and over all just a really great tool. As the Javascript I write has gotten more and more complicated, I&#8217;ve found myself often hitting up Douglas Crockford&#8217;s JS Lint to sanity check [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://pnotepad.org">Programmer&#8217;s Notepad</a> for some time now as my go-to text editor for code.  It&#8217;s simple to use and really robust and over all just a really great tool.  As the Javascript I write has gotten more and more complicated, I&#8217;ve found myself often hitting up Douglas Crockford&#8217;s <a href="http://jslint.com">JS Lint</a> to sanity check what I&#8217;m doing.  When I found out that Textmate offered JSLint integration via a bundle I have to say I was pretty jealous.</p>
<p>Then I stumbled across a post from Simon Steele, the developer of Programmer&#8217;s Notepad.</p>
<p><a href="http://untidy.net/blog/2007/08/21/tools-i-rely-on-those-i-use-from-pn/">Tools I Rely On &#8211; Those I Use From PN</a></p>
<p>So now I knew that you could use JSLint from within Programmer&#8217;s Notepad, and had a starting point in the link he provides to the Windows Scripting Host compatible version.  I began stumbling around the tools menu in <abbr title="Programmer's Notepad">PN</abbr>, trying to figure out how to get the jslint.js file I had downloaded to be usable as a tool.  I figured it out with some help from Simon on the <abbr title="Programmer's Notepad">PN</abbr> forums, <a href="http://pnotepad.org/forums/topic/310?replies=3">Issues with using JSLint as a tool</a>.</p>
<p>With that in place, I was able to get JSLint working as a easily-called tool within <abbr title="Programmer's Notepad">PN</abbr>.  With a simple keystroke I can sanity check my JS for all sorts of nasty behaviors, it&#8217;s totally awesome.  Here&#8217;s a quick walkthrough I wrote up after mentioning this on a <span class="yshortcuts" id="lw_1202247375_1">Yahoo</span>! internal mailing list and getting a question about it.</p>
<ol>
<li> Downloaded the WSH version of JSLint from <a href="http://jslint.com/wsh/index.html">http://jslint.com/wsh/index.html</a> and copied it into a tools subdirectory in the Programmer&#8217;s Notepad directory (just for ease of referencing).</li>
<li> Added a new tool for Javascript files:<br />
Tools -&gt; Add Tools -&gt; Scheme: Javascript -&gt; Add</li>
<li> Settings are as follows:<br />
<img src="http://tivac.com/upload/images/pBFuiEQ_jslint_in_pn.png" alt="JSLint Settings" /></li>
</ol>
<p>Those settings allow for double-clicking the JSLint output line and having <abbr title="Programmer's Notepad">PN</abbr> jump to it, which is really handy.  Unfortunately it stops after every error and always complains about a null character at the end of files, but those are minor annoyances.  It works really well and is pretty quick to get started, which I appreciate.</p>
<p>I&#8217;d love to get it so that it&#8217;ll run JSLint every time I save a .js file, but I don&#8217;t think <abbr title="Programmer's Notepad">PN</abbr> supports that for tools yet.  Something to ask about on their forums, I suppose.</p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2008/02/05/programmers-notepad-and-jslint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Work Work Work</title>
		<link>http://patcavit.com/2008/01/18/work-work-work/</link>
		<comments>http://patcavit.com/2008/01/18/work-work-work/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 01:18:28 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://patcavit.com/2008/01/18/work-work-work/</guid>
		<description><![CDATA[I am insanely busy with work stuff, but we&#8217;re in the home stretch and that&#8217;s really exciting. I will share more about what I&#8217;ve been doing soon!]]></description>
			<content:encoded><![CDATA[<p>I am insanely busy with work stuff, but we&#8217;re in the home stretch and that&#8217;s really exciting.  I will share more about what I&#8217;ve been doing soon!</p>
<p><!-- ckey="497061A9" --></p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2008/01/18/work-work-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript, ActiveX and IFrames</title>
		<link>http://patcavit.com/2007/07/13/javascript-activex-and-iframes/</link>
		<comments>http://patcavit.com/2007/07/13/javascript-activex-and-iframes/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 17:23:37 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://patcavit.com/2007/07/13/javascript-activex-and-iframes/</guid>
		<description><![CDATA[Been working on a project that involves getting some JS to interact with an ActiveX control and then have that work with an IFrame for asynchronous uploading.  It&#8217;s been interesting, at least.  Getting the AX object into the page so that my JS could actually reference its methods was the first hurdle.  After a day [...]]]></description>
			<content:encoded><![CDATA[<p>Been working on a project that involves getting some JS to interact with an ActiveX control and then have that work with an IFrame for asynchronous uploading.  It&#8217;s been interesting, at least.  Getting the AX object into the page so that my JS could actually reference its methods was the first hurdle.  After a day of banging my head against the wall I stumbled onto a site that recommended using innerHTML to write it out.  Wonder of wonders, it worked great.</p>
<p>I started building up the JS scaffolding  around that and promptly ran into another issue.  While the ActiveX object is thinking it calls a predetermined callback method in the JS to give status updates.  Unfortunately, you can&#8217;t declare this callback until the object is in the page.  This means dynamically inserting a new JS file in the initialization after dynamically inserting the ActiveX object.  That&#8217;s a lot of dynamic inserting and it makes me a bit nervous but it works fine in IE and since we&#8217;re using ActiveX that&#8217;s all I have to test!</p>
<p>The next step is getting asynchronous uploading using an IFrame working.  This is being complicated by most tutorials that cover this technique being old as dirt.  We&#8217;re talking 2002 old as dirt here, before AJAX was anything more than a cleaning product.  &#8220;Script Remoting&#8221; is not what I want to do (I have XMLHTTPRequest for that, thank god) but that&#8217;s what most of these tutorial focus on.  It makes parsing out the useful info needlessly complex and it&#8217;s really driving me up the wall.</p>
<p>Having a a good time at JumpCut though. <img src='http://patcavit.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2007/07/13/javascript-activex-and-iframes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI is so awesome even Google uses it</title>
		<link>http://patcavit.com/2007/04/05/yui-is-so-awesome-even-google-uses-it/</link>
		<comments>http://patcavit.com/2007/04/05/yui-is-so-awesome-even-google-uses-it/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 23:39:01 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://patcavit.com/2007/04/05/yui-is-so-awesome-even-google-uses-it/</guid>
		<description><![CDATA[I was linked by a friend to a very interesting article by Zach Leatherman about the CSS used on Google&#8217;s customizable homepage, http://google.com/ig/. Turns out, they&#8217;re using the YUI grids component to space everything out on the page. That&#8217;d normally be fine, but the terms of the BSD license for the YUI modules requires that [...]]]></description>
			<content:encoded><![CDATA[<p>I was linked by a friend to a very interesting article by <a href="http://www.zachleat.com/" title="Zach Leatherman's Site" target="_blank">Zach Leatherman</a> about the CSS used on Google&#8217;s customizable homepage, <a href="http://google.com/ig/">http://google.com/ig/</a>.</p>
<p>Turns out, they&#8217;re using the YUI grids component to space everything out on the page.  That&#8217;d normally be fine, but the terms of the BSD license for the YUI modules requires that you leave in the copyright notice.  Google didn&#8217;t do this, so technically they are stealing the code.  Tsk tsk.</p>
<p>Here is Zach&#8217;s much more in-depth article: <a href="http://www.zachleat.com/web/2007/04/05/google-using-yui-grids-css/" target="_blank">Google Using YUI Grids CSS</a></p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2007/04/05/yui-is-so-awesome-even-google-uses-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Once more, for old times&#8217; sake</title>
		<link>http://patcavit.com/2007/03/16/once-more-for-old-times-sake/</link>
		<comments>http://patcavit.com/2007/03/16/once-more-for-old-times-sake/#comments</comments>
		<pubDate>Fri, 16 Mar 2007 19:49:09 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://patcavit.com/2007/03/16/once-more-for-old-times-sake/</guid>
		<description><![CDATA[Since I&#8217;m not doing any real Restek work any more I decided to resurrect the CVS Pie Graph that I wrote ages ago. It broke during the transition to the new DB class that uses PDO. Fortunately, it&#8217;s a pretty simple query so getting it running again wasn&#8217;t difficult. We still store CVS checkin stats [...]]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m not doing any real Restek work any more I decided to resurrect the CVS Pie Graph that I wrote ages ago.  It broke during the transition to the new DB class that uses PDO.  Fortunately, it&#8217;s a pretty simple query so getting it running again wasn&#8217;t difficult.  We still store CVS checkin stats so the data is reasonably up to date as well.</p>
<p><img src="http://tivac.com/upload/images/pcGzAA5_pie.png" /></p>
<p>Somehow I&#8217;m still leading Gordon but we all know that won&#8217;t last.  He&#8217;s a monster even with being farmed out to HITS part-time. Kian&#8217;s apparently taken himself out of the running by making the script ignore all his checkins.  Seems to me he just doesn&#8217;t like losing. <img src='http://patcavit.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>More than anything this just reminds me of how long I&#8217;ve been doing this, it&#8217;s definitely time I let somebody else take their hack at it.  I&#8217;m really curious to see what new apps come out as well as where the old ones are taken.  It&#8217;s harder nowadays to justify a wide-ranging rewrite to Deb but I bet if someone really clever comes along it could be arranged.  Things have settled out and become a lot more stable during my time at Restek but there&#8217;s always room for improvement in these kind of things.</p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2007/03/16/once-more-for-old-times-sake/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I can talk about what I did last summer</title>
		<link>http://patcavit.com/2007/03/08/i-can-talk-about-what-i-did-last-summer/</link>
		<comments>http://patcavit.com/2007/03/08/i-can-talk-about-what-i-did-last-summer/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 00:34:03 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://patcavit.com/2007/03/08/i-can-talk-about-what-i-did-last-summer/</guid>
		<description><![CDATA[Last summer I got an amazing opportunity to intern at Yahoo! for 3 months. It was a really cool experience and I learned a ton while working on a project that at the time I could not talk about. As it turns out, that project has finally gone public beta and I can talk about [...]]]></description>
			<content:encoded><![CDATA[<p>Last summer I got an amazing opportunity to intern at Yahoo! for 3 months.  It was a really cool experience and I learned a ton while working on a project that at the time I could not talk about.  As it turns out, that project has finally gone public beta and I can talk about it (at least so far as it exists and stuff I guess).</p>
<p><a href="http://www.techcrunch.com/2007/03/08/all-new-my-yahoo/">All New My Yahoo</a></p>
<p><a href="http://patcavit.com/wp-content/uploads/2007/03/myyahoo.png" onclick="return false;" title="Direct link to file"><img src="http://patcavit.com/wp-content/uploads/2007/03/myyahoo.thumbnail.png" alt="All New My Yahoo!" height="88" width="171" /></a></p>
<p>I worked on the team that made that, albeit in a earlier and less polished form.  It&#8217;s hard to tell what of my code survived since according to my old manager they had to throw out a lot of the old designs.  However, the weather widget still looks like the same one I wrote with some moderate refactoring.  That was cool to see as I&#8217;m pretty proud of that weather widget.  The &#8220;Set My Yahoo! as your Home Page&#8221; link is still there and appears to still work the same way.  I can&#8217;t say for sure on any of this because untangling jsmin&#8217;d javascript is no fun.</p>
<p>The new beta can be accessed by going to <a href="http://cm.my.yahoo.com/upgrade">http://cm.my.yahoo.com/upgrade</a> and I have to say I like it quite a bit.  The inclusion of the big ad on the right is too bad but with AdBlock I never see it so it&#8217;s a non-issue for me.  The team has done a really amazing job on this in the 6 months I&#8217;ve been gone, a lot of the early designs have been polished until they practically shine.  It&#8217;s definitely still feeling the performance blues but I have no doubt that they&#8217;ll get it running smoothly before launch.</p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2007/03/08/i-can-talk-about-what-i-did-last-summer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How do you prove you&#8217;re a human?</title>
		<link>http://patcavit.com/2007/03/08/how-do-you-prove-youre-a-human/</link>
		<comments>http://patcavit.com/2007/03/08/how-do-you-prove-youre-a-human/#comments</comments>
		<pubDate>Thu, 08 Mar 2007 08:53:07 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://patcavit.com/2007/03/08/how-do-you-prove-youre-a-human/</guid>
		<description><![CDATA[This is a pretty serious problem, and currently CAPTCHAs are used on a lot of sites. I know I&#8217;m not alone in really hating most CAPTCHAs: they&#8217;re hard to understand, it&#8217;s an annoying step to have to take, and I never know whether to enter it in upper or lower case. Nothing I run has [...]]]></description>
			<content:encoded><![CDATA[<p>This is a pretty serious problem, and currently CAPTCHAs are used on a lot of sites.  I know I&#8217;m not alone in really hating most CAPTCHAs: they&#8217;re hard to understand, it&#8217;s an annoying step to have to take, and I never know whether to enter it in upper or lower case.  Nothing I run has had any spammer issues, mostly due to a lack of anything interesting for spammers on my sites.</p>
<p>If I had to try and prove signups were from people though, I&#8217;d be damn tempted to use Microsoft Research&#8217;s recently announced <a href="http://research.microsoft.com/asirra/">Asirra Project</a>.  It&#8217;s a lot like <a href="http://www.kittenauth.com/">KittenAuth</a> only they&#8217;ve got a DB of 2 million pet images and add about 10k new ones each day.  Definitely an interesting approach.  If cute animals aren&#8217;t your thing maybe you would prefer <a href="http://www.hotcaptcha.com/">Hot Captcha</a> which Asirra cites as inspiration.  They went with animals for a couple of good reasons, hotness is relative and pictures could be offensive.</p>
<p>All interesting attempts at solving a very complex problem: how does a machine generate something that a machine cannot recognize, but a human can?</p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2007/03/08/how-do-you-prove-youre-a-human/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implementation Showdown: Y! BBAuth vs OpenID</title>
		<link>http://patcavit.com/2007/03/01/implementation-showdown-y-bbauth-vs-openid/</link>
		<comments>http://patcavit.com/2007/03/01/implementation-showdown-y-bbauth-vs-openid/#comments</comments>
		<pubDate>Fri, 02 Mar 2007 01:45:17 +0000</pubDate>
		<dc:creator>Pat Cavit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tivac.com Projects]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://patcavit.com/2007/03/01/implementation-showdown-y-bbauth-vs-openid/</guid>
		<description><![CDATA[As some of you may have noticed I was really excited when Yahoo! released their BBAuth tool right before their Open HackDay (My post about BBAuth). It seemed like a great idea, as tons of people already have Y! accounts. Little did I know that BBAuth wasn&#8217;t really a good solution as a single sign-on [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may have noticed I was really excited when Yahoo! released their <a href="http://developer.yahoo.com/auth/">BBAuth</a> tool right before their <a href="http://hackday.org/">Open HackDay</a> (<a href="http://patcavit.com/2007/01/10/yahoo-bbauth-tinkering/">My post about BBAuth</a>).  It seemed like a great idea, as tons of people already have Y! accounts.  Little did I know that BBAuth wasn&#8217;t really a good solution as a single sign-on utility.  It sounds silly for me to say that especially when the <a href="http://developer.yahoo.com/auth/">Official BBAuth Site</a> says &#8220;BBAuth also offers a Single Sign-On (SSO) facility so that existing Yahoo! users can use your services without having to complete yet another registration process.&#8221;  In the real world when I implemented Y! BBAuth as a SSO provider I ran into some issues.</p>
<p>First though, a quick overview of how BBAuth works.  You set up an entry in the BBAuth DB for whatever site/webapp you&#8217;re going to use it with, providing some general info like contact details and the endpoint for when a user has successfully logged-in.  Once that&#8217;s done you get a shared secret and an application ID.  These are used in all future calls to hash info so that it&#8217;s reasonably secure and can&#8217;t be easily snooped along the wire.  A special login URL is crafted that points the user to Y!&#8217;s login page, and once they enter their Y! credentials they are asked to give permission to whatever site for the info that has been requested.  Once they agree they are redirected back to the site along with some encrypted info depending on what the site had asked for.</p>
<p>BBAuth works just fine, but even if you don&#8217;t ask for any Y! info your users still have to go through and agree to allow the site to use their info.  My problem is then that <strong>I don&#8217;t want the user&#8217;s info</strong>.  When I set up my site to use BBAuth I even told Y! that I didn&#8217;t want to use any info.  All I want is Yahoo!&#8217;s promise that the user is a real Y! user and some sort of unique hash that my system can use.  I&#8217;ll get the info I need for whatever app I&#8217;m running at the time, but none of what I do would be asking for Y! Photos info.  I&#8217;m not saving any login credentials via cookies or anything, I just want a simple login mechanism that I don&#8217;t have to maintain.  Clicking through one page doesn&#8217;t sound so bad until you realize that every time the user logs in they have to go through it.  That&#8217;s pretty annoying and makes the jump to a Y! login page even more jarring.</p>
<p>There&#8217;s a post on the ydn-auth group by Jeremy Zawodny (<a href="http://tech.groups.yahoo.com/group/ydn-auth/message/43">Jeremy&#8217;s Post</a>) that addresses this issue and says that this functionality is apparently a special case for BBAuth.  Seems a little odd but I suppose that they were more concentrated on the usage cases for sharing a user&#8217;s Y! info with a 3rd party site.  So they know about it and are looking into it, but until then I can&#8217;t really say I&#8217;m pleased with the actual implementation of BBAuth as a SSO provider.</p>
<p>After implementing BBAuth and being disappointed with the SSO performance, I began looking into other solutions.  I really didn&#8217;t want to require users to sign up for yet another account because everyone hates that.  It seems like there&#8217;s been a lot of buzz lately around <a href="http://openid.net/">OpenID</a> (<a href="http://technorati.com/search/openid">Technorati stats for &#8220;OpenID&#8221;</a>).  I figured I should at least give it a shot considering the large surge of interest behind it.  First I had to figure out how OpenID actually worked.</p>
<p>Short Version: instead of a login that is some clever play on your name (Tivac lol) or something you identify yourself using a URI that links back to an identity provider.  The identity provider stores your details and provides password authentication, so that when you visit an OpenID-enabled site you enter in your identifying URI and get bumped to your identity provider.  You log in there, specify what details the site should be able to see from your profile, and then say &#8220;Ok&#8221; and get sent back. Note that this is what it&#8217;s like using <a href="https://www.myopenid.com/">MyOpenID.com</a> because I was too lazy to set up my own half-assed identity provider.</p>
<p>So, how does OpenID work as a SSO provider?  From a user&#8217;s point of view it&#8217;s pretty dead-simple.  Looking at it as a developer adding it to an existing property proved to be considerably more work than I expected.  I used the <a href="http://www.openidenabled.com/openid/libraries/php">JanRain OpenID Library</a> for PHP when working to get OpenID logins enabled on my testing site.  Now I know the title of the article doesn&#8217;t say I&#8217;m comparing the libraries I used for each, but it&#8217;s still interesting to look at the differing amounts of code required for BBAuth and OpenID implementation in a fairly typical hosting environment.</p>
<p>The first thing that struck me as kind of odd was that I needed to move two folders totaling 33 files onto my shared path.  I had forgotten that OpenID uses <a href="http://en.wikipedia.org/wiki/Yadis">Yadis</a> (Wikipedia page linked because the homepage at <a href="http://yadis.org">yadis.org</a> has been vandalized) as part of the protocol.  I didn&#8217;t realize that I&#8217;d need to be installing classes to support Yadis as well as OpenID.  Once I had gotten all those files copied into the proper places and confirmed they were on my shared path it was time to look at the examples provided.</p>
<p>OpenID provides a decent example setup for both consumer and server roles, where consumer is providing the SSO login and server is actually running your own identity server.  I only want to run a consumer right now, so I used just those files.  After getting the form setup and trying it out I discovered that my PHP install has no big integer math library installed.  This necessitates running in &#8220;Dumb Mode&#8221; which according to the documentation means my login form is more susceptible to relay attacks.  Great.</p>
<p>After defining a new constant telling OpenID to run in dumb mode I was able to be successfully bounced out to my Identity Provider, sign in, and be bounced back to my site.</p>
<p>Avoiding any in-depth analysis of the security between the two as I&#8217;m not qualified to comment, which did I prefer implementing and using? That&#8217;s not actually an easy question to answer.  BBAuth was certainly much smaller in terms of code required.  It also has the advantage of using Yahoo!&#8217;s login system, it&#8217;s not exactly scientific but I don&#8217;t know anyone who doesn&#8217;t have a Y! account.  So BBAuth has a huge built-in userbase right there.  Both services require bumping the user out to a 3rd party login page so that&#8217;s a draw.  I knew it was part of how both worked going in and it isn&#8217;t an issue for me in this case.  Implementing OpenID had some bumps but thanks to the distributed nature of the project I don&#8217;t need to go sign my web application up anywhere.  If I want to shift around page names I don&#8217;t have to remember to go update any entries in a Y! database anywhere.  Any OpenID Identity Provider worth their salt will also provide a mechanism to say &#8220;Always Allow this site&#8221; which is something that BBAuth currently lacks.</p>
<p>In the end I wasn&#8217;t able to come up with a conclusive win on either one.  BBAuth has that annoying extra page every visit but tons of people have Y! accounts.  Implementation was also pretty quick and easy.  OpenID took more work but with a decent Identity Provider will only require one page not on my site.  It&#8217;s also got the whole distributed thing going for it.  As it stands now I&#8217;ve implemented both and users can just choose their favorite.  I&#8217;d prefer to just offer one but I don&#8217;t think there is one that offers a compelling enough featureset over the other to go with a single one yet. Going with both gives me flexibility and an excuse to keep playing with both of them.</p>
]]></content:encoded>
			<wfw:commentRss>http://patcavit.com/2007/03/01/implementation-showdown-y-bbauth-vs-openid/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
