<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" version="2.0">
  <channel>
    <title>HickoryTech</title>
    <link>http://tech.hickorywind.org/articles.rss</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The Geekier Side of Twang</description>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Hickorytech" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Silencing Rails 2.2 "gem has no specification" messages</title>
      <description>&lt;p&gt;Since upgrading to Rails 2.2, you might be seeing lots of messages like this:&lt;/p&gt;

&lt;pre&gt;
config.gem: Unpacked gem blah-1.0.0 in vendor/gems 
has no specification file. Run 'rake gems:refresh_specs' to fix this.
&lt;/pre&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;Running 'rake gems:refresh_specs" takes care of most of these, and  upgrading any remaining gems will usually take care of the rest.  But it seems like most of the projects I'm on still have one or three home-grown, really old, or really odd gems that just don't have specs.  I should write specs for these, I know.  So I let Rails complain... but...&lt;/p&gt;

&lt;p&gt;But now, months later, I'm realizing there are just a few gems I'm never going to upgrade.  And I'm seeing these messages... A LOT.  Every time I run a test in TextMate.  Every time I run tests from rake.  Every time I run almost any rake task, period.  It's driving me MAD!&lt;/p&gt;

&lt;p&gt;So, if you've been a good boy or girl and taken care of most your gems, and a few are still hanging around, here's the magic to make those messages go away:&lt;/p&gt;

&lt;p&gt;In your config/environment.rb file:&lt;/p&gt;

&lt;pre&gt;
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

# Add this line at your own risk!  
Rails::VendorGemSourceIndex.silence_spec_warnings = true

Rails::Initializer.run do |config|
&lt;/pre&gt;</description>
      <pubDate>Mon, 02 Feb 2009 18:14:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b8d82ce5-a14c-4f44-ba02-a80de2d51d24</guid>
      <comments>http://tech.hickorywind.org/articles/2009/02/02/silencing-rails-2-2-gem-has-no-specification-messages#comments</comments>
      <category>ruby</category>
      <category>rubygems</category>
      <category>rails</category>
      <category>hack</category>
      <category>config</category>
      <link>http://tech.hickorywind.org/articles/2009/02/02/silencing-rails-2-2-gem-has-no-specification-messages</link>
    </item>
    <item>
      <title>JavaScript Testing with Screw.Unit</title>
      <description>&lt;p&gt;I've been quietly hacking away on integrating three great tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://github.com/nkallen/screw-unit"&gt;Screw.Unit&lt;/a&gt;, a wonderful RSpec-like JavaScript testing framework&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/jeresig/env-js"&gt;env.js&lt;/a&gt;, a wonderful fake JavaScript DOM implementation&lt;/li&gt;
&lt;li&gt;Ruby on Rails plugins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What does that get me?  Voila!  &lt;a href="http://github.com/relevance/javascript_testing"&gt;Easy headless and in-browser testing of my unobtrusive JavaScript!&lt;/a&gt;   (For more information on Screw.Unit, I also created a &lt;a href="http://groups.google.com/group/screw-unit"&gt;mailing list&lt;/a&gt; with the original authors' permission.)&lt;/p&gt;</description>
      <pubDate>Sat, 31 Jan 2009 14:42:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:06771725-a6df-4d83-aea6-a0fb4a4a1902</guid>
      <comments>http://tech.hickorywind.org/articles/2009/01/31/javascript-testing-with-screw-unit#comments</comments>
      <category>screw.unit</category>
      <category>javascript</category>
      <category>bdd</category>
      <category>tdd</category>
      <category>env.js</category>
      <category>rails</category>
      <category>plugin</category>
      <category>testing</category>
      <link>http://tech.hickorywind.org/articles/2009/01/31/javascript-testing-with-screw-unit</link>
    </item>
    <item>
      <title>Turning off text selection in Javascript</title>
      <description>&lt;p&gt;Say you're doing some drag or drag-and-drop operation in Javascript, and you notice that wherever the user drags, the underlying text or other elements are being highlighted.  This can obscure what the user is doing, and it just generally feels "wrong."  How do you turn that off?&lt;/p&gt;

&lt;p&gt;Here's two quick techniques, one for Firefox and another for Internet Explorer &amp;amp; Safari.  (Actually, this is IE7.  I haven't tested in IE6.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Firefox&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one is a CSS fix.  Just add the following to your stylesheet and then add the "no-selection" class to whatever you're going to drag over.&lt;/p&gt;

&lt;pre&gt;
.no-selection {  -moz-user-select: none; }
&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Internet Explorer &amp;amp; Safari&lt;/strong&gt;
We have to use Javascript for this one.  Call disable when you start your drag behavior, and then re-enable when the drag is complete.  Note that calling this function will disable &lt;em&gt;all&lt;/em&gt; text selection until you re-enable, so be careful.&lt;/p&gt;

&lt;pre&gt;
// This works for Safari &amp; IE7, and it is safely ignored in Firefox.  You'll have 
// to add a "-moz-user-select:none;" to whatever you don't want selected in Firefox.
function enableDocumentSelection(enable) {
  if(enable) {
    document.onselectstart = _original_onselectstart;
  }
  else {
    _original_onselectstart = document.onselectstart;
    document.onselectstart = function() { return false; }
  }
}
&lt;/pre&gt;</description>
      <pubDate>Fri, 24 Oct 2008 15:39:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:ca69e773-ba72-4b59-bab8-365cb71829fb</guid>
      <comments>http://tech.hickorywind.org/articles/2008/10/24/turning-off-text-selection-in-javascript#comments</comments>
      <category>javascript</category>
      <link>http://tech.hickorywind.org/articles/2008/10/24/turning-off-text-selection-in-javascript</link>
    </item>
    <item>
      <title>Great Lakes Ruby Bash</title>
      <description>&lt;p&gt;I'm flying to Ann Arbor, Michigan later today to give my "Usability on Rails" talk at the &lt;a href="http://www.greatlakesrubybash.org/"&gt;Great Lakes Ruby Bash&lt;/a&gt; tomorrow.  If you're attending, please drop me a note (as I don't know a soul that'll be there).  I'll also be hanging out on IRC in #glrb and #midwest.rb.  I'm hoping to meet some new friends and convince some geeks of the wonderful ways of "teh us4b1l1t13z"!&lt;/p&gt;</description>
      <pubDate>Fri, 10 Oct 2008 10:07:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:4d3d7d41-488a-426b-849c-8d85bc93de88</guid>
      <comments>http://tech.hickorywind.org/articles/2008/10/10/great-lakes-ruby-bash#comments</comments>
      <category>conference</category>
      <category>great</category>
      <category>lakes</category>
      <category>ruby</category>
      <category>bash</category>
      <category>usability</category>
      <category>on</category>
      <category>rails</category>
      <link>http://tech.hickorywind.org/articles/2008/10/10/great-lakes-ruby-bash</link>
    </item>
    <item>
      <title>Stop iPhoto from launching while syncing iPhone</title>
      <description>&lt;ul&gt;
&lt;li&gt;Connect your iPhone and let it sync.  &lt;/li&gt;
&lt;li&gt;Before you disconnect, run the "Image Capture" utility. It lives in your computer's "Applications" directory.  &lt;/li&gt;
&lt;li&gt;Go to the menu, click "Image Capture", then "Preferences".&lt;/li&gt;
&lt;li&gt;On the "Image Capture Preferences" window, change the "When a camera is connected, open:" setting to "No application".&lt;/li&gt;
&lt;li&gt;Close the "Image Capture" application.&lt;/li&gt;
&lt;li&gt;Voila!  No more iPhoto launching automatically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, be aware that this will stop iPhoto from launching when you connect &lt;strong&gt;any&lt;/strong&gt; digital camera.  If you want to pull photos from a camera, you'll have to manually launch iPhoto and hit the "import" button.  Snatch!&lt;/p&gt;</description>
      <pubDate>Thu, 04 Sep 2008 09:37:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:a6bb06a1-15f6-401d-a0bb-85384dfc3bd6</guid>
      <comments>http://tech.hickorywind.org/articles/2008/09/04/stop-iphoto-from-launching-while-syncing-iphone#comments</comments>
      <category>iphone</category>
      <category>tips</category>
      <category>iphoto</category>
      <link>http://tech.hickorywind.org/articles/2008/09/04/stop-iphoto-from-launching-while-syncing-iphone</link>
    </item>
    <item>
      <title>Always Pass a Block When Using alias_method_chain</title>
      <description>&lt;p&gt;If you're using Rails' alias_method_chain mechanism, please make sure that your new method always takes a block and passes that block up the chain, even if you don't need the block yourself.  Consider this being a good "alias_method_chain" neighbor.  Here's why -- if you don't, no one who comes along behind you can add a block to the chain.  You've effectively "block-blocked" them.  &lt;/p&gt;

&lt;p&gt;Here's an example.  I wanted to add some functionality to Rails' error_messages_for method.  Specifically, I wanted to be able to pass a block to it that implemented a tiny DSL for massaging the errors output before passing them up the chain to the normal error_messages_for functionality.  I implemented this by adding an alias_method_chain layer on top of the error_messages_for.&lt;/p&gt;

&lt;p&gt;In my tests this worked fine, but when I put it in my actual Rails project, the method just stopped working.  It took me a while to find that another developer on the project was also alias_method_chaining the error_messages_for, but was not taking a block, and thus not passing it up the chain.  In effect, he was dropping my block on the floor.  No good.&lt;/p&gt;

&lt;p&gt;So here's the template you should follow when creating an alias_method_chain:&lt;/p&gt;

&lt;pre&gt;
def method_with_something_cool(arg1, arg2, &amp;block)
  ... your custom pre-chain code ...

  method_without_something_cool(arg1, arg2, &amp;block)

  ... your custom post-chain code ...
end

alias_method_chain :method, :something_cool
&lt;/pre&gt;

&lt;p&gt;Call the old method with a block &lt;strong&gt;even if the old method never took a block&lt;/strong&gt;!  Don't be a cock-blocker!  Err.... block-blocker!&lt;/p&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:00:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:b7983483-4910-4947-9c16-7a99de371fe0</guid>
      <comments>http://tech.hickorywind.org/articles/2008/08/29/always-pass-a-block-when-using-alias_method_chain#comments</comments>
      <category>ruby</category>
      <category>rails</category>
      <category>alias_method_chain</category>
      <category>blocks</category>
      <link>http://tech.hickorywind.org/articles/2008/08/29/always-pass-a-block-when-using-alias_method_chain</link>
    </item>
    <item>
      <title>Tips for rsyncing MP3s from Linux to FAT32 USB external hard-drive</title>
      <description>&lt;p&gt;Here are some important lessons I learned about accurately copying MP3s (or really any kind of file) from a Linux ext3 filesystem to an external USB hard-drive using FAT32.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When mounting the USB hard drive, be sure to &lt;strong&gt;use iocharset=utf8 in your mount options&lt;/strong&gt;.  (To be safest, I put this in my /etc/fstab so I won't forget it.)  Otherwise you will have problems creating directories or files that have European or Asian characters in their names.  I had some real problems with all the Mexican, Celtic, and Yako Kanno albums I own.  Rsync will just flat out refuse to create them without this option.  (And forget the Icelandic heavy metal.  It's right out.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Similarly, when mounting, you might want to &lt;strong&gt;include the "shortname=mixed" mount option&lt;/strong&gt; too.  Although I personally didn't have a big problem with this, several posts I read online mentioned that rsync might try to upload a file multiple times.  The issue is that since FAT32 stores both a short-name (remember the 8.3 names?) and a long-name, the filesystem can get confused occasionally.  Again, I didn't see this myself.  I used the option, though, with no trouble.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lastly, don't use the standard "rsync -a" (archive) flag.  It tries to maintain user and group ownership, and FAT32 doesn't support either so you get a lot of "chown NO PERMISSION" errors, etc.  Basically, you're making rsync do more work than it has to.  Similarly, the "-a" option also tries to preserve symlinks which FAT32 doesn't support.  I'm not really sure what would happen in that case, probably more warnings.  Instead &lt;strong&gt;use "rsync -rt" to recurse through each subdirectory and to maintain the file's last modified time&lt;/strong&gt;.  That's about all FAT32 will let you do!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hope this helps!  Keep rockin'!&lt;/p&gt;</description>
      <pubDate>Sun, 20 Jul 2008 20:22:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:286250ad-98a3-4012-8617-478be42fc56b</guid>
      <comments>http://tech.hickorywind.org/articles/2008/07/20/tips-for-rsyncing-mp3s-from-linux-to-fat32-usb-external-hard-drive#comments</comments>
      <category>rsync</category>
      <category>mp3</category>
      <category>utf8</category>
      <category>backup</category>
      <category>usb</category>
      <category>external</category>
      <category>fat32</category>
      <category>linux</category>
      <link>http://tech.hickorywind.org/articles/2008/07/20/tips-for-rsyncing-mp3s-from-linux-to-fat32-usb-external-hard-drive</link>
    </item>
    <item>
      <title>Larry vs. the Git Rebase Merge Conflict</title>
      <description>&lt;p&gt;While doing a "git svn rebase", if you have merge conflicts here are some things to remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;While doing a rebase, if anything bad happens, you end up on a "(no-branch)" branch.&lt;/li&gt;
&lt;li&gt;When doing a "git status", you'll see a ".dotest" file in your working directory.  Just ignore it.&lt;/li&gt;
&lt;li&gt;If you want to bail, do a "git rebase --abort".  (Note there is no "git svn rebase --abort".)&lt;/li&gt;
&lt;li&gt;Fix the merge conflict file manually, then do a "git add [file]".&lt;/li&gt;
&lt;li&gt;Next do a "git rebase --continue".  (Note there's no "svn" version of this either.)&lt;/li&gt;
&lt;li&gt;If it complains about "did you forget to call 'git add'?", then evidently your edit turned the conflict into a no-op change.  Do a "git rebase --skip" to skip it. (Very weird, but true.)&lt;/li&gt;
&lt;li&gt;Rinse and repeat until the lather is gone, your scalp silky smooth, and the rebase is complete.  At any time you can "git rebase --abort" to bail.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What happened to me?  Well, I didn't realize what was going on, continued to work on the "not a branch" branch, commited changes, even dcommited changes back to Subversion.  It was ugly, but not insurmountable.  A buddy clued me into the "not a branch" situation, I was able to get back to my real branch and resurrect my code.  It took a few "git rebase --continue" commands, and a tense moment around a "git rebase --skip", but now everything's hunky dory.&lt;/p&gt;

&lt;p&gt;This &lt;a href="http://kerneltrap.org/mailarchive/git/2007/10/31/373985"&gt;very odd email&lt;/a&gt; really helped me a lot.  You might be interested at some point.&lt;/p&gt;</description>
      <pubDate>Tue, 10 Jun 2008 08:30:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:bdece0c0-d3f7-4385-b4c2-485952ccfe4d</guid>
      <comments>http://tech.hickorywind.org/articles/2008/06/10/larry-vs-the-git-rebase-merge-conflict#comments</comments>
      <category>git</category>
      <link>http://tech.hickorywind.org/articles/2008/06/10/larry-vs-the-git-rebase-merge-conflict</link>
    </item>
    <item>
      <title>Relevance @ RailsConf 2008</title>
      <description>&lt;p&gt;Today I'm attending my first &lt;a href="http://en.oreilly.com/rails2008"&gt;RailsConf&lt;/a&gt; and coincidentally my first conference as a &lt;a href="http://www.thinkrelevance.com/"&gt;Relevance&lt;/a&gt; employee.  Let me tell you, Relevance does conferences differently than anywhere else I've worked.  I'll argue that they do them &lt;em&gt;right&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;First off, we put 80% of the company on one plane yesterday. (Hmm, okay, maybe that was a little scary.)  We took up several rows on the plane, and we definitely made an impression on the passengers and staff.  Several rows of geeks all sitting with MacBook Pros passing airplane power cords up and down the rows was a sight to see!  Much hacking got done, for sure.&lt;/p&gt;

&lt;p&gt;Secondly, pretty much the entire company is giving a tutorial together later this afternoon.  Technically, the talk is being given by the company's founders, Stu Halloway and Justin Gehtland, and two of the principals, &lt;a href="http://robsanheim.com"&gt;Rob Sanheim&lt;/a&gt; and &lt;a href="http://jasonrudolph.com/blog/"&gt;Jason Rudolph&lt;/a&gt;, but in reality we're all pitching in.  The session itself is a bit different -- it's a hands-on walk-through of how to approach a Ruby open source project and contribute.  It's metric-tool heavy and really gives your average Ruby/Rails programmer a firm grasp of how to take a four hour coding session and turn it into useful patches for a real open source project.  It's one of the most innovative and interesting tutorials I've seen in my several years as an open source guy, and I'm proud to be a part of it.&lt;/p&gt;

&lt;p&gt;I hope y'all will stop by our tutorial today if you're in the conference.  If you can't make it, be sure to stop one of the Relevance guys to say hello.  You'll see us in our "think relevance" t-shirts all up and down the halls.  Relevance is &lt;em&gt;all-in&lt;/em&gt; at RailsConf.&lt;/p&gt;</description>
      <pubDate>Thu, 29 May 2008 11:43:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:8bdbeee5-8c19-4be7-9450-91212263c9cc</guid>
      <comments>http://tech.hickorywind.org/articles/2008/05/29/relevance-railsconf-2008#comments</comments>
      <link>http://tech.hickorywind.org/articles/2008/05/29/relevance-railsconf-2008</link>
    </item>
    <item>
      <title>Content-Length (Mostly) Does Not Matter: The Reverse Bob Barker Rule</title>
      <description>&lt;p&gt;Your webapp user needs to download a file, but you don't know the exact size of this file ahead of time.  So what do you send as the content-length?  Is an incorrect content-length okay?  Do you even need a content-length?  The Internet is pretty silent on the subject.&lt;/p&gt;

&lt;p&gt;For example, my webapp users want to download several files as one zip file, but I don't want to create the zip file ahead of time just to know the content-length.  I'd rather create the zip file on the fly and stream it to the user a chunk at a time, as it's created.  This saves me time, process memory, code to clean up temporary zip files, etc.  However, the problem here is -- how big will this zip file be?  What do I send as the content-length?&lt;/p&gt;

&lt;p&gt;More importantly, what does content length really do?  Is it important?  What happens if you don't set it?&lt;/p&gt;

&lt;h3&gt;Effects of Content Length&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The web browser will NOT read more bytes than the content-length value. If you accidentally set your content-length too low, the download is halted prematurely and the downloaded file will most likely be corrupt. &lt;strong&gt;Do NOT set it too low.&lt;/strong&gt;  This is the only case where content-length can really hurt you.&lt;/li&gt;
&lt;li&gt;If the content-length is set the web browser will show a progress bar while downloading.  This is a very important usability feature for medium and large files, and you really want it.  You want your user to know how far along they are, so they don't cancel the download and start it over,  or worse just abandon your site.&lt;/li&gt;
&lt;li&gt;If the content-length is not set, then the user gets an "Unknown Size" message while downloading, and they won't get a progress bar.  Avoid this if possible, but it is sometimes okay for very small files that get downloaded so fast the user won't care they didn't see a progress bar.  (Still, you want to avoid this.)&lt;/li&gt;
&lt;li&gt;If you set the content-length to zero (usually only by accident), then your web browser will usually gleefully say they downloaded the file successfully, and save a zero-length empty file.  &lt;strong&gt;Do not set the content length to zero.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;The Reverse Bob Barker Rule&lt;/h3&gt;

&lt;p&gt;That first effect is the most important:  Don't set the content-length too low, or your users will suffer corrupted files. So this brings us to the &lt;em&gt;reverse-Bob-Barker rule&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;&lt;strong&gt;"Get as close to the real content-length as possible without going UNDER."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Why Not Go WAY Over?&lt;/h3&gt;

&lt;p&gt;Okay, so we know not to go under, but why not just go way over?  Why not, for example, just double our estimated size?  Well, nothing terrible will happen.  The browser will keep trying to read content, and when the server says "no more," the browser will safely finish the file and say done, even if it thought there was more content coming.&lt;/p&gt;

&lt;p&gt;The only negative is that you want the user to get the best download experience possible.  So if you guessed your content-length to be 100 MB, but the real download is actually 50 MB, the user will see a progress bar showing they are 50% of the way done, with probably another minute to download, and then suddenly the browser goes from 50% to 100%, from one minute left to &lt;em&gt;done&lt;/em&gt;!  The user will be confused.  &lt;/p&gt;

&lt;p&gt;We call this the "Goldilocks Effect" in usability.  In this case, the porridge was too hot -- the user will be left wondering why the download dramatically sped up at the last minute.  Did the file download successfully?  Did the download really fail but the browser didn't tell us?  Although nothing bad &lt;em&gt;actually&lt;/em&gt; happened, the user is still left with a sense of unease.  We definitely want to avoid this.&lt;/p&gt;

&lt;h3&gt;How Close is Close Enough?&lt;/h3&gt;

&lt;p&gt;So, all this boils down to:  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you don't know the exact content-length ahead of time, determine a good cheating algorithm and pad for safety.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But how much padding do you need?  How much is enough?  What's too much?  My experience is this: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aim for a padding of 1%.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's my scale:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Padding over 10% is so inaccurate that the user won't believe the progress bar.  "We jumped from 90% to done immediately?  Is this thing broken? Is my file corrupt?"&lt;/li&gt;
&lt;li&gt;Padding of between 3% to 10% is less fantastic, but still pretty bad.&lt;/li&gt;
&lt;li&gt;Padding of between 1% and 3% is the best you can expect in most cases.  Depending on the size of the file, the download percentage usually jumps in 2-5% increments anyway.  This is only unacceptable for the largest of files, where web browsers are showing download percentages in 1% increments.  (And even there this is sometimes the best you can do.)&lt;/li&gt;
&lt;li&gt;Padding under 1% is a bit dangerous unless you have a lot of confidence in your guessing algorithm.  Remember, the only way to &lt;em&gt;really&lt;/em&gt; lose here is to guess under the real content-length.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So this brings us to 1% padding.  In most cases, this should be fairly easy to predict, and the web browser will show a 99% to 100% download progress, which is what the user wants to see anyway.&lt;/p&gt;

&lt;h3&gt;Where Does This Work?&lt;/h3&gt;

&lt;p&gt;I've tested this "extra content-length" technique on the following platforms, all with success:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Internet Explorer 6 on Windows XP (on VMWare on my Mac)&lt;/li&gt;
&lt;li&gt;Internet Explorer 7 on Windows XP (on VMWare on my Mac)&lt;/li&gt;
&lt;li&gt;Firefox 2 on Macintosh&lt;/li&gt;
&lt;li&gt;Firefox 3 RC1 on Macintosh&lt;/li&gt;
&lt;li&gt;Safari 3.1.1&lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>Fri, 23 May 2008 11:30:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:be170240-4007-4a10-a77e-774f1d8e1e9f</guid>
      <comments>http://tech.hickorywind.org/articles/2008/05/23/content-length-mostly-does-not-matter-the-reverse-bob-barker-rule#comments</comments>
      <link>http://tech.hickorywind.org/articles/2008/05/23/content-length-mostly-does-not-matter-the-reverse-bob-barker-rule</link>
    </item>
  </channel>
</rss>
