<?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>Michael Fox</title>
	<atom:link href="http://www.michaelfox.name/feed" rel="self" type="application/rss+xml" />
	<link>http://www.michaelfox.name</link>
	<description>The personal blog of Michael Fox, a web developer at Rare Bird Inc.</description>
	<lastBuildDate>Fri, 19 Feb 2010 21:13:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Restoring Missing or Empty Environment Variables in PHP 5.3 for TextMate Commands</title>
		<link>http://www.michaelfox.name/missing-empty-environment-variables-php-textmate-commands</link>
		<comments>http://www.michaelfox.name/missing-empty-environment-variables-php-textmate-commands#comments</comments>
		<pubDate>Fri, 19 Feb 2010 20:39:05 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://www.michaelfox.name/?p=102</guid>
		<description><![CDATA[I am a big fan of TextMate and I am still learning to leverage its features, even after using it for over two years. I have started writing more &#8220;commands&#8221; to speed up my development process. I love that I can write commands in PHP that run locally on my Mac, and I still have [...]]]></description>
			<content:encoded><![CDATA[<p>I am a big fan of TextMate and I am still learning to leverage its features, even after using it for over two years. I have started writing more &#8220;commands&#8221; to speed up my development process. I love that I can write commands in PHP that run locally on my Mac, and I still have access to all of the environment variables that TextMate passes such as the current line&#8217;s value or the document type and name.</p>
<h2>The Problem</h2>
<p>I recently upgraded to Snow Leopard, and as a result, upgraded to PHP 5.3 on my local development machine. I have been really impressed with the new features of 5.3, and I am happy it came packed with my OS X install. However, I noticed that a few of my commands had stopped functioning correctly.</p>
<p>I hadn&#8217;t had a chance to investigate the problem, but when I sat down to write a new command the other day, I figured it out. The $_ENV variable is an empty array on a default Snow Leopard install. When running PHP from the command line, this global variable holds all of the data about the environment PHP is running in. It&#8217;s also how TextMate injects it&#8217;s variables into the PHP script.</p>
<p><span id="more-102"></span></p>
<h2>The Solution</h2>
<p>Fortunately, it&#8217;s a very easy problem to solve.</p>
<h3 class="step"><span>1.</span> Open your php.ini file</h3>
<pre class="brush: shell; light: true;">mate /etc/php.ini</pre>
<h3 class="step"><span>2.</span> Find the directive for <code class="inline">variables_order</code>.</h3>
<p>The ini file describes this setting:</p>
<blockquote><p>This directive determines which super global arrays are registered when PHP starts up. [...] G,P,C,E &amp; S are abbreviations for the following respective super globals: GET, POST, COOKIE, ENV and SERVER.</p></blockquote>
<p><a rel="no-follow" href="http://php.net/variables-order">You can read more about the variables_order directive in the php manual</a></p>
<p>Although the ini claims that the default value is <code class="inline">EGPCS</code>, my default ini has <code class="inline">GPCS</code></p>
<h3 class="step"><span>3. Add an &#8220;E&#8221; to the beginning of the directive.</span></h3>
<pre class="brush: shell; light: true;">variables_order = "EGPCS"</pre>
<p>Save and close the file. Your PHP Textmate commands and any other scripts running from the command line should now have the properly populated $_ENV values.</p>
<h2>Additional Resources on using PHP for TextMate Commands</h2>
<ul>
<li>David Walsh Blog <a href="http://davidwalsh.name/textmate-php">Create Commands in TextMate Using PHP</a></li>
<li>Stuart Colville <a href="http://muffinresearch.co.uk/archives/2007/03/19/using-php-cli-for-textmate-commands/">Using PHP CLI for TextMate commands</a></li>
<li>Ciarán Walsh&#8217;s Blog <a href="http://ciaranwal.sh/2008/04/04/textmate-tip-using-php-for-commands">TextMate Tip – Using PHP for Commands</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/missing-empty-environment-variables-php-textmate-commands/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Round to the Nearest Half in Php</title>
		<link>http://www.michaelfox.name/round-nearest-half-php</link>
		<comments>http://www.michaelfox.name/round-nearest-half-php#comments</comments>
		<pubDate>Tue, 05 Jan 2010 01:14:26 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[rounding]]></category>
		<category><![CDATA[snippets]]></category>

		<guid isPermaLink="false">http://michaelfox.name/?p=82</guid>
		<description><![CDATA[Sometimes, you want to round a number, but you want the nearest half instead of a full number. For example, if you have an average rating, and you want to display a star graphic representing the number of stars. In the interest of simplicity, you would like to show only full or half stars (3.5 [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you want to round a number, but you want the nearest half instead of a full number. For example, if you have an average rating, and you want to display a star graphic representing the number of stars. In the interest of simplicity, you would like to show only full or half stars (3.5 stars instead of 3.43 stars). Here is a very simple example of how to do this in php.</p>
<pre class="brush: php">&lt;?php
$average = 3.43;
$round_to = 0.5; // you can change this to any increment you like
$rounded = round($average / $round_to) * $round_to;
</pre>
<p>The variable &#8220;$rounded&#8221; is now set to 3.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/round-nearest-half-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling Pngcrush on Mac OS X Snow Leopard</title>
		<link>http://www.michaelfox.name/compiling-pngcrush-on-mac-os-x-snow-leopard</link>
		<comments>http://www.michaelfox.name/compiling-pngcrush-on-mac-os-x-snow-leopard#comments</comments>
		<pubDate>Tue, 29 Sep 2009 23:07:00 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[png]]></category>

		<guid isPermaLink="false">http://wp.sidewalksoffox.com/wordpress/?p=10</guid>
		<description><![CDATA[Pngcrush is a command line tool that processes png files through several algorithms (read "magics"), optimizing the png without quality loss. Here is how you can install it from source on snow leopard.]]></description>
			<content:encoded><![CDATA[<p>Pngcrush is a command line tool that processes png files through several algorithms (read &#8220;magics&#8221;), optimizing the png without quality loss. Here is how you can install it from source on snow leopard.<span id="more-10"></span></p>
<ol class="table-of-contents">
<li><a href="#download-pngcrush">Download Pngcrush</a></li>
<li><a href="#extract-the-source-code">Extract the Source Code</a></li>
<li><a href="#compile-pngcrush">Compile Pngcrush</a></li>
<li><a href="#using-pngcrush">Using Pngcrush</a></li>
</ol>
<h2><a name="download-pngcrush"></a>Download Pngcrush</h2>
<p>Download <a title="Pngcrush" rel="no-follow" href="http://pmt.sourceforge.net/pngcrush/">Pngcrush</a> (Direct <a title="Download Pngcrush" rel="no-follow" href="http://sourceforge.net/projects/pmt/files/pngcrush/00-1.7.2/pngcrush-1.7.2.tar.gz/download">Download Link</a>)</p>
<p>I save source files into ~/src/</p>
<h2 id="extract-the-source-code">Extract the Source Code</h2>
<p>Open terminal and run these commands to extract the source code.</p>
<pre class="brush: bash; light: true;">	cd ~/src
	tar -xvzf pngcrush-1.7.2.tar.gz
	cd pngcrush-1.7.2
</pre>
<h2 id="compile-pngcrush">Compile Pngcrush</h2>
<p>While in the pngcrush-1.7.2 folder, run these commands to compile it.</p>
<pre class="brush: bash; light: true;">	make
	sudo mv pngcrush /usr/local/bin/
</pre>
<p>The make command compiles the code. I move the executable to /usr/local/bin/ in as <a title="Using /usr/local" href="http://hivelogic.com/articles/using_usr_local/">suggested by Dan Benjamin</a>. It does not matter where you move the compiled executable, but I recommend that you put it in a place within your environment&#8217;s path.</p>
<h2 id="using-pngcrush">Using Pngcrush</h2>
<p>To crush a png file, run this command on the shell.</p>
<pre class="brush: bash; light: true;">	pngcrush -reduce -brute source.png destination.png
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/compiling-pngcrush-on-mac-os-x-snow-leopard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Links Directly to Content Sections Inside Search Result Snippets</title>
		<link>http://www.michaelfox.name/google-links-directly-to-content-sections-inside-search-result-snippets</link>
		<comments>http://www.michaelfox.name/google-links-directly-to-content-sections-inside-search-result-snippets#comments</comments>
		<pubDate>Sat, 26 Sep 2009 00:27:00 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://wp.sidewalksoffox.com/wordpress/?p=9</guid>
		<description><![CDATA[Google announced that they have added a new feature to search results. The brief summary in a result may contain links to specific sections of content on the page. This helps get a user directly to the most relevant content faster. For example, if I search for &#8220;jquery tabs&#8221;, one of my results looks like [...]]]></description>
			<content:encoded><![CDATA[<p>Google <a title="Jump to the information you want right from the search snippets" href="http://googleblog.blogspot.com/2009/09/jump-to-information-you-want-right-from.html">announced</a> that they have added a new feature to search results. The brief summary in a result may contain links to specific sections of content on the page. This helps get a user directly to the most relevant content faster. For example, if I search for &#8220;jquery tabs&#8221;, one of my results looks like this:</p>
<p class="full-image-block ssNonEditable"><span><a rel="attachment wp-att-54" href="http://www.michaelfox.name/google-links-directly-to-content-sections-inside-search-result-snippets/google-results-with-content-links"><img class="size-full wp-image-54" title="Google Results with Content Links" src="http://img.michaelfox.name/wordpress/wp-content/uploads/google-results-with-content-links.png" alt="Screenshot of Google Results with Content Links" width="567" height="134" /></a></span></p>
<p>Clicking &#8220;How To&#8230;&#8221; would take me directly to this portion of the page (<a title="jQuery Tabs - How To section" href="http://docs.jquery.com/UI/Tabs#How_to...">http://docs.jquery.com/UI/Tabs#How_to&#8230;</a>) instead of the top of the page (<a title="jQuery Tabs - Documentation" href="http://docs.jquery.com/UI/Tabs">http://docs.jquery.com/UI/Tabs</a>). I think that I will enjoy this feature quite a bit, and since <a title="Usability findings from smashing magazine" href="http://www.smashingmagazine.com/2009/09/24/10-useful-usability-findings-and-guidelines/">most users do not scroll</a>, this should get some dusty content a little bit of fresh attention.<span id="more-9"></span></p>
<h2><a name="how-i-imagine-it-works"></a>How I imagine It Works</h2>
<p><span class="full-image-float-right ssNonEditable"><span><img class="size-full wp-image-55 alignright" title="Imaginary Google Employee" src="http://img.michaelfox.name/wordpress/wp-content/uploads/kid-on-computer.jpg" alt="" width="250" height="167" /></span></span>I imagine that google installed an application on all of the computers in their daycare centers. The app rewards the toddlers with ice cream and candy for clicking all the &#8220;big words&#8221; on a page. All the while they track the clicks using a super-secret internal version of analytics, using the data to serve content to us with a better experience. Next time you see a first grader, let them know you appreciate it.</p>
<h2><a name="how-it-actually-works"></a>How it Actually Works</h2>
<p>According to the offical <a title="Using named anchors to identify sections on your pages" href="http://googlewebmastercentral.blogspot.com/2009/09/using-named-anchors-to-identify.html">google webmaster&#8217;s blog</a>, google is simply scanning the page for anchor tags in section headings. Sometimes things really are as simple as they seem. The good news is, it should be pretty easy to clean up your site and increase your chances of getting these links in your search results. In fact, you may already be there&#8230; or at least close.</p>
<h2><a name="how-to-increase-the-chance-your-google-search-results-snippets-will-include-content-links"></a>How to Increase the Chance Your Google Search Results Snippets Will Include Content Links</h2>
<p>Break up the content of your page into sections, giving each section a heading tag (h2 or h3, etc). Inside the sub-header tags, add an anchor.</p>
<pre class="brush: xml; light: true;">&lt;h2&gt;&lt;a name="how-i-imagine-it-works" /&gt;How I imagine It Works&lt;/h2&gt;</pre>
<pre class="brush: xml; light: true;">&lt;h2&gt;&lt;a name="how-it-actually-works" /&gt;How It Actually Works&lt;/h2&gt;
</pre>
<p>You should also link to these anchors somewhere on the page, in a table of contents fashion.</p>
<p>As with anything google, nothing is a guarantee. Fortunately, this is something we should all probably be doing anyway. It makes it much more convenient to link to specific content when you want to share something. For example, the smashing magazine article I linked to above (&#8220;most users do not scroll&#8221;) has no anchor tags, and if you click it, you&#8217;ll have to scroll down and find the section that I was referencing.</p>
<h2><a name="a-php-function-to-automatically-generate-anchors-within-your-subheads"></a>A PHP Function to Automatically Generate Anchors Within Your Subheads</h2>
<pre class="brush: php;">
/**
 * generate a subhead with an anchor tag
 *
 *  Usage:
 *    echo subhead(&quot;How it Actually Works&quot;);
 *  Prints:
 *    &lt;h2 id=&quot;how-it-actually-works&quot;&gt;How it Actually Works&lt;/h2&gt;
 *
 * @param string $name
 * @return string
 */
function subhead($name) {
	$anchor_name = strtolower(str_replace(&#39; &#39;, &#39;-&#39;, $name));
	return &quot;&lt;h2 id=\&quot;$anchor_name\&quot;&gt;$name&lt;/h2&gt;&quot;;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/google-links-directly-to-content-sections-inside-search-result-snippets/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Pixelation from Scaled Images in IE</title>
		<link>http://www.michaelfox.name/fixing-pixelation-from-scaled-images-in-ie</link>
		<comments>http://www.michaelfox.name/fixing-pixelation-from-scaled-images-in-ie#comments</comments>
		<pubDate>Tue, 22 Sep 2009 04:23:00 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://wp.sidewalksoffox.com/wordpress/?p=8</guid>
		<description><![CDATA[A project I worked on recently called for a carousel with five images of different sizes &#8212; somewhat like a &#8220;light&#8221; coverflow. I ended up building it with basic &#60;img&#62; tags that get scaled by javascript which modified the width attribute.
 
One of the problems that I ran in to involved the loss of quality [...]]]></description>
			<content:encoded><![CDATA[<p>A project I worked on recently called for a carousel with five images of different sizes &#8212; somewhat like a &#8220;light&#8221; coverflow. I ended up building it with basic &lt;img&gt; tags that get scaled by javascript which modified the width attribute.</p>
<p style="text-align: center;"><span class="full-image-block ssNonEditable"><span> </span></span></p>
<div id="attachment_66" class="wp-caption aligncenter" style="width: 590px"><img class="size-full wp-image-66 " title="Cover Slider Layout" src="http://img.michaelfox.name/wordpress/wp-content/uploads/cover-slider-layout.png" alt="Cover Slider Layout Prototype" width="580" height="214" /><p class="wp-caption-text">Cover Slider Layout</p></div>
<p>One of the problems that I ran in to involved the loss of quality from Internet Explorer 6 and 7 when the browser renders the image at a smaller dimension than the file.</p>
<p style="text-align: center;"><span class="full-image-block ssNonEditable"><span> </span></span></p>
<div id="attachment_67" class="wp-caption aligncenter" style="width: 579px"><img class="size-full wp-image-67 " title="IE Scaled Image" src="http://img.michaelfox.name/wordpress/wp-content/uploads/ie-scaled-imaged.jpg" alt="Wired Cover scaled in IE" width="569" height="316" /><p class="wp-caption-text">An image scaled in internet explorer.</p></div>
<p style="text-align: left;">This project was for a site that still has a substantial amount of visitors using IE6 (and IE7&#8217;s scaling abilities are not much better than 6). So I needed to come up with a way to correct the image scaling. A short google later, I found <a title="Ethan Marcotte" href="http://unstoppablerobotninja.com/about/">Ethan Marcotte</a>&#8217;s blog post <a title="Fluid Images on Unstoppable Robot Ninja" href="http://unstoppablerobotninja.com/entry/fluid-images/">Fluid Images</a> [via <a title="Unstoppable Robot Ninja" href="http://unstoppablerobotninja.com/about/">Unstoppable Robot Ninja</a>] and a <a title="On UI Quality (The Little Things): Client-side Image Resizing" href="http://code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/">post on flickr&#8217;s developer blog</a>.<span id="more-8"></span></p>
<p style="text-align: left;">It turns out that the Microsoft AlphaImageLoader used to support transparent pngs in IE6 will also cause the browser to use a better engine to render scale.</p>
<p style="text-align: left;">Here is how I fixed scaled images for IE6:</p>
<pre class="brush: js">// apply AlphaImageLoader in IE6 for better image scaling
var broswerVersion=navigator.appVersion;
if(broswerVersion.indexOf('MSIE 6') &gt;= 0) {
    $('.cover_slider .images img').each(function() {
        var imgSrc = $(this).attr('src');
        this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"   imgSrc   "', sizingMethod='scale')";
        this.src = '/images/misc/spacer.gif';
    });
}</pre>
<p style="text-align: left;">You use the src from the image in the AlphaImageLoader call, and then replace the src with a transparent &#8220;spacer&#8221; gif. It&#8217;s not perfect, but it is definitely much better.</p>
<p style="text-align: left;">IE7 is even easier. It can be fixed with a simple MS specific CSS class.</p>
<pre class="brush: css; light: true;">.cover_slider img {    -ms-interpolation-mode:bicubic;}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/fixing-pixelation-from-scaled-images-in-ie/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google&#8217;s Custom Search Engine: Unsung Hero of Search Tools</title>
		<link>http://www.michaelfox.name/googles-custom-search-engine-unsung-hero-of-search-tools</link>
		<comments>http://www.michaelfox.name/googles-custom-search-engine-unsung-hero-of-search-tools#comments</comments>
		<pubDate>Wed, 29 Jul 2009 16:46:00 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://wp.sidewalksoffox.com/wordpress/?p=7</guid>
		<description><![CDATA[Sometimes you want to search for something, but only within a specific set of sites. For example, Smashing Magazine recently posted a list of 45+ Excellent Code Snippet Resources and Repositories. Occasionally, I find myself opening several tabs to search through a few of my favorite sites from this list in hopes that someone else [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to search for something, but only within a specific set of sites. For example, Smashing Magazine recently posted a list of <a title="45+ Excellent Code Snippet Resources and Repositories" href="http://www.smashingmagazine.com/2009/07/21/45-excellent-code-snippet-resources-and-repositories/">45+ Excellent Code Snippet Resources and Repositories</a>. Occasionally, I find myself opening several tabs to search through a few of my favorite sites from this list in hopes that someone else has already figured out the best way to do something; so I decided to make a custom search engine.</p>
<p>Google provides an easy to use tool for building a &#8220;customized search engine&#8221; that only searches the sites you specify. Google Custom Search may not receive a lot of hype around the internet, but it is a very simple, yet powerful resource.<span id="more-7"></span></p>
<p>To get started, visit <a title="Google's Custom Search Engine Home" href="http://www.google.com/cse">http://www.google.com/cse</a> and click &#8220;Create a Custom Search Engine.&#8221; The form is pretty self-explanitory &#8212; just enter the list of sites that you want to search.</p>
<p>Here is the list I created:</p>
<pre class="brush: plain; light: true;">snipplr.com/*
*.smipple.net/*
tipster.carsonified.com/*
snipt.net/*
snippets.dzone.com/*
*.koders.com/*
codesnippets.joyent.com/*
*.bytemycode.com/
refactormycode.com/*
*.naslu.com/*
codecodex.com/wiki/*
*.jonasjohn.de/snippets/*
github.com/*
*.codase.com/*
*.google.com/codesearch/*
*.snipiti.com/*
codekeep.net/*
snippetsmania.com/*
devsnippets.com/*
*.refactory.org/*
*.code-sucks.com/code/*
*.phpsnips.com/*
*.phpclasses.org/*
wiki.greasespot.net/Code_snippets/*
*.stackoverflow.com/*
</pre>
<p>Once created, there are several more advanced options &#8212; annotations, styling, custom logos, etc.</p>
<p>If you want to see what the result looks like, you can see the <a title="Code Snippet Custom Search Engine" href="http://www.google.com/coop/cse?cx=006849743663034701000:vcyfrskdmuy">Code Snippet search engine</a> I created, or jump straight into creating your own and let me know what you come up with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/googles-custom-search-engine-unsung-hero-of-search-tools/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 jQuery Plugins You Should Use on Every Website</title>
		<link>http://www.michaelfox.name/7-jquery-plugins-you-should-use-on-every-website</link>
		<comments>http://www.michaelfox.name/7-jquery-plugins-you-should-use-on-every-website#comments</comments>
		<pubDate>Tue, 14 Jul 2009 03:38:00 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[textarea]]></category>
		<category><![CDATA[tooltip]]></category>
		<category><![CDATA[zebra]]></category>

		<guid isPermaLink="false">http://wp.sidewalksoffox.com/wordpress/?p=6</guid>
		<description><![CDATA[David Walsh recently posted a solid list of 7 MooTools Plugins You Should Use on Every Website. Many of his posts use jQuery, but since this one focused on MooTools, I thought I would put up a list of some jQuery plugins that perform similar tasks. This is not a jQuery vs MooTools post &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p><a title="David Walsh's Blog" href="http://davidwalsh.name/">David Walsh</a> recently posted a solid list of <a href="http://davidwalsh.name/7-mootools-plugins">7 MooTools Plugins You Should Use on Every Website</a>. Many of his posts use jQuery, but since this one focused on MooTools, I thought I would put up a list of some jQuery plugins that perform similar tasks. This is not a jQuery vs MooTools post &#8212; just a list for sites that already use jQuery.<span id="more-6"></span></p>
<h2>1. autoResize</h2>
<p>David makes the case that all textareas should be resizable, and I would have to agree. When text expands past the boundries of a textarea, autoResize will modify the size of the textarea, allowing the user to see all of the content in the box.</p>
<div class="boxlink homepage">
<p><a href="http://james.padolsey.com/javascript/jquery-plugin-autoresize/">jQuery autoResize homepage</a></p>
</div>
<h2>2. Custom Checkboxes with jQuery</h2>
<p>Though less of a requirement, better looking checkboxes can make a big impact on user experience. The following tutorial shows you how to implement customized checkboxes (and radio controls).</p>
<p><a href="http://www.hieu.co.uk/blog/index.php/2009/07/09/customize-html-control-with-jquery-checkbox-radio/">Customize HTML control with jQuery (Checkbox + Radio)</a></p>
<h2>3. FancyBox</h2>
<p>Lightbox components are a slick and convenient addition to many sites. You can use the jQuery UI dialog features to create a lightbox, but FancyBox is a cleaner solution designed specifically for use as a lightbox.</p>
<p><a href="http://fancy.klade.lv/">jQuery FancyBox homepage</a></p>
<h2>4. asmSelect</h2>
<p>A jQuery alternative to David&#8217;s quickboxes was not easily found. Instead, I offer you a plugin that improves upon the &#8220;select multiple&#8221; control of the browser.</p>
<p><a href="http://code.google.com/p/jquery-asmselect/">jQuery asmSelect homepage</a></p>
<h2>5. ScrollTo</h2>
<p>This plugin allows you to cleanly scroll to a location on the page.</p>
<p><a href="http://demos.flesler.com/jquery/scrollTo/">jQuery ScrollTo homepage</a></p>
<h2>6. qTip</h2>
<p>qTip is the full-featured tooltip solution. It includes just about anything you could ever want to do with a tooltip, including media/complex content inside the tooltip, arrows, positioning, and more.</p>
<p><a href="http://craigsworks.com/projects/qtip/">jQuery qTip homepage</a></p>
<h2>7. Zebra Tables</h2>
<p>I am sure that there is an excellent plugin out there that will do this for you, but it seems just as easy to do it yourself.</p>
<p>Setup your styles:</p>
<pre><code class="css">table.zebra tr.odd { background-color: #CCCCCC;}table.zebra tr.hover { background-color: #99FF99;}table.zebra tr.selected { background-color: #9999FF;}</code></pre>
<p>after document.ready():</p>
<pre><code class="js">$('table.zebra') // add a class of 'odd' to all the odd rows .find('tr:odd').addClass('odd').end() // add a class of 'even' to all the even rows .find('tr:even').addClass('even').end() .find('tr') // when a row is clicked, give it a class of 'selected' .click(function() { $(this).toggleClass('selected'); }) // when a row is hovered over, give it a class of 'hover' .hover( // over function() { $(this).addClass('hover'); }, // mouse-out function() { $(this).removeClass('hover'); } )</code>        <code class="js">.end();</code></pre>
<p><a href="/demos/zebra_tables">jQuery Zebra Striping Demo</a></p>
<p>Thanks to David Walsh for the great post and set of tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/7-jquery-plugins-you-should-use-on-every-website/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fever &#8211; My New Favorite RSS Reader</title>
		<link>http://www.michaelfox.name/fever-my-new-favorite-rss-reader</link>
		<comments>http://www.michaelfox.name/fever-my-new-favorite-rss-reader#comments</comments>
		<pubDate>Sun, 12 Jul 2009 04:46:00 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[syndication]]></category>

		<guid isPermaLink="false">http://wp.sidewalksoffox.com/wordpress/?p=5</guid>
		<description><![CDATA[I was reading through my RSS feeds a few weeks ago and I came across a few posts referencing Shaun Inman&#8217;s Fever app. I use google reader, but I often try alternatives. NetNewsWire is very powerful and Times looks clean, but neither of them worked for me as well as Google Reader. I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading through my RSS feeds a few weeks ago and I came across a few posts referencing <a href="http://www.shauninman.com/blog">Shaun Inman</a>&#8217;s <a href="http://feedafever.com/">Fever</a> app. I use google reader, but I often try alternatives. <a href="http://www.newsgator.com/individuals/netnewswire/default.aspx">NetNewsWire</a> is very powerful and <a href="http://www.acrylicapps.com/times/">Times</a> looks clean, but neither of them worked for me as well as Google Reader. I decided to take the chance on fever and I haven&#8217;t looked back since.<span id="more-5"></span></p>
<p>Fever allows you to set feeds as &#8220;sparks.&#8221; A spark is a feed that you do not actually read every post for, but it seeds the list of &#8220;Hot&#8221; posts. Any hyperlinks within a spark gets tracked and added to the links in your normal subscriptions. The pages that are linked to the most bubble up to the top of the &#8220;Hot&#8221; list. This means that all the misc feeds that would occasionally have great posts have a proper place now. I don&#8217;t have to filter through posts on my own, they naturally make their way to the top. You can also do some fun stuff like subscribing to the &#8220;popular&#8221; feed for delicious keywords of your choosing, and mark them as sparks to catch what people are bookmarking as well as blogging about.</p>
<p><img class="alignnone size-large wp-image-52" title="Screenshot of Fever RSS Reader" src="http://img.michaelfox.name/wordpress/wp-content/uploads/feverscreenshot-620x206.png" alt="Fever Screenshot" width="620" height="206" /></p>
<p>The interface is really slick. It hides item counts by default (google reader was always 1000+ anyway). The iPhone interface works really well (better than google reader, which occasionally freezes up and resets).</p>
<p>My only complaint is that there is no &#8220;Share&#8221; feature. You can save items, but you can&#8217;t generate a feed of items to share with friends. As a solution, I decided to start using my Tumblr account (<a href="http://michaelfox.tumblr.com">http://michaelfox.tumblr.com</a>) for sharing items. All of my activity is on FriendFeed (<a href="http://friendfeed.com/michaelfox">http://friendfeed.com/michaelfox</a>), but I feel like that is too much&#8230; I want a way to share only items that I think others might find interesting.</p>
<p>If you are interested in what I find, you can subscribe to <a href="http://michaelfox.tumblr.com">my tumblr mini-blog</a> at <a href="http://michaelfox.tumblr.com/rss">http://michaelfox.tumblr.com/rss</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/fever-my-new-favorite-rss-reader/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Selenium as a Development Tool</title>
		<link>http://www.michaelfox.name/using-selenium-as-a-development-tool</link>
		<comments>http://www.michaelfox.name/using-selenium-as-a-development-tool#comments</comments>
		<pubDate>Thu, 12 Feb 2009 07:03:00 +0000</pubDate>
		<dc:creator>Michael Fox</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[macros]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[quality assurance]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://wp.sidewalksoffox.com/wordpress/?p=4</guid>
		<description><![CDATA[Selenium is a set of tools for web based unit testing. With a full implementation it has many advanced features, but the smaller and lighter IDE runs inside firefox. Using this arm of the suite by itself can serve as a convenient tool during actual development.
The first thing to do is download Selenium from http://seleniumhq.org/download/. [...]]]></description>
			<content:encoded><![CDATA[<p>Selenium is a set of tools for web based unit testing. With a full implementation it has many advanced features, but the smaller and lighter IDE runs inside firefox. Using this arm of the suite by itself can serve as a convenient tool during actual development.<span id="more-4"></span></p>
<p>The first thing to do is download Selenium from <a title="Selenium Download" href="http://seleniumhq.org/download/">http://seleniumhq.org/download/</a>. All that you will need for our purposes is the &#8220;IDE&#8221; &#8212; although I would encourage you to browse around <a title="SeleniumHQ" href="http://seleniumhq.org/">http://seleniumhq.org/</a> if you are interested in using Selenium as a testing tool as well.</p>
<div id="attachment_74" class="wp-caption aligncenter" style="width: 487px"><a href="http://seleniumhq.org/download/"><img class="size-full wp-image-74" title="Download Selenium" src="http://img.michaelfox.name/wordpress/wp-content/uploads/selenium-for-development-download.png" alt="screenshot of selenium download site" width="477" height="231" /></a><p class="wp-caption-text">Download Selenium IDE</p></div>
<p>Suppose you are working on an account sign-up page but your form validation code is tripping up somewhere. Normally, you might tweak your code and try re-posting your form. Then you would make additional changes and continue this process over and over. Selenium will remove the menial portion of this process and allow you to focus on troubleshooting.</p>
<p>Load your page that contains the form and go to <em>Tools &gt;&gt; Selenium IDE</em> in Firefox. You might notice that the record button is already active in the widget that loads. Fill out your form as you normally would, including submitting it &#8212; and then stop the recording in Selenium.</p>
<p><img class="aligncenter size-full wp-image-77" title="Selenium IDE - Basic Controls" src="http://img.michaelfox.name/wordpress/wp-content/uploads/selenium-for-development-selenium.png" alt="screenshot of selenium IDE" width="657" height="688" /></p>
<p><span class="full-image-block ssNonEditable"><span> </span></span><img src="file:///Users/michaelfox/Desktop/selenium-for-development-form.png" alt="" /></p>
<p>Go ahead and make your tweaks to your form processing, but when it is time to see if your changes were effective, don&#8217;t bother filling out the form &#8212; just click the &#8220;Play entire test suite&#8221; button in Selenium. It will load the correct page (if you weren&#8217;t already there) fill out the form exactly as you had before and submit it.</p>
<p><img class="aligncenter size-full wp-image-75" title="Filled out form for selenium testing" src="http://img.michaelfox.name/wordpress/wp-content/uploads/selenium-for-development-form.png" alt="screenshot of a filled out form" width="401" height="345" /></p>
<p><span class="full-image-block ssNonEditable"><span> </span></span></p>
<p>The really nice thing here is that once you have Selenium installed, you are not taking any additional steps to set up this tool, you would have to submit the form at least once manually anyway. If you decide that you want to alter some of the data before submitting the form, simply click the last command in the window and hit delete. Now your form will fill up without submitting &#8212; you can change the appropriate fields and click submit yourself. Or create a whole new test case so that you can come back to this one later.</p>
<p>Tests can be saved, if you think they will serve a purpose later &#8212; I am hoping to use this tool to insure that changes I am making do not break previous functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfox.name/using-selenium-as-a-development-tool/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
