Anecdotal Ephemera

This post is a basically random list of things that have happened over the years; it will grow over time.


My freshman year of college, we had three bins in the halls of our dorm—“Trash”, “Recycle” and “Styrofoam”. I diligently sorted everything for disposal and fumed that my dorm mates were constantly throwing out their Styrofoam cafeteria containers in the trash, or throwing trash into the Styrofoam bin. I often ended up pulling trash out of the Styrofoam bin, or pulling Styrofoam containers from the Trash bin, dumping their contents, and putting them in the Styrofoam bin where they belonged.

At the end of the year, I was procrastinating while cleaning up my room for moving out and I leafed through the fifty page student handbook for the first time. A small note in the middle mentioned “Styrofoam recycling was not cost-effective and the program was canceled [five years ago]. Please use Styrofoam bins to dispose of normal trash.”


Over the last week of 2001, I was driving cross country to Seattle and ran out of clean t-shirts. I stopped at Target and bought the cheapest clearance shirt they had, a University of Iowa Athletics “Hawkeyes” t-shirt; it was $5.

Over the intervening 16 years, I’ve received more comments on this shirt than anything else I own. Oftentimes, it takes me a moment to realize that the guy across the street shouting “Go Hawks!” is talking to me.


Over a decade ago, I read Jay Leno’s memoir Leading with My Chin. Two anecdotes stood out.

The first was that, even as a kid, Leno was really into cars. So when his parents bought a new car, they let him pick the engine. So that’s how the family ended up with a station wagon equipped with a V8 Police Pursuit Package.

The second was that Leno once went to D.C. to buy a motorcycle from an old collector; the old guy only wanted to deal in cash, so Leno had ten grand or something in hundreds. He’s waiting in his hotel before going to meet the guy when he gets a call. The president (Clinton, I think) heard he was in town and wonders if he’d like to come over and meet at the White House. So Leno is about to go when he realizes that he’s got all this cash and he really doesn’t want to leave it behind. So he straps it to his body and goes over to meet the President in the West Wing. Naturally, when he’s getting screened for entry, the metal detectors go off and the Secret Service pats him down. They unbutton his shirt, see thousands of dollars in cash taped to his body, and before he can sputter out an explanation they tell him to “Go right in, Mr. Leno.”

Optimize PNGs using PngDistill

Unfortunately, many PNG image generators opt for minimum compression time, failing to achieve maximum compression. Even worse, the most popular PNG generation tools often include huge amounts of unnecessary metadata that can bloat images by thousands of percent!

Fiddler now includes PngDistill, a simple tool that removes unnecessary metadata chunks and recompresses PNG image data streams using the Zopfli compression engine. Zopfli-based recompression often shaves 10% or more from the size of PNG files. You can access the PngDistill tool from the context menu of Fiddler’s ImageView inspector:

Automation

While it is well-integrated into Fiddler, PngDistill, which is installed to C:\program files (x86)\Fiddler2\Tools folder, only requires PngDistill.exe (a .NET application) and zopfli.exe to run; you can use these tools without using Fiddler.

To run PngDistill against an entire local folder of images, you can do so from the command prompt:

   for /f "delims=|" %f in ('dir /b *.png') do PngDistill "%f" replace

This script runs PngDistill on every image in the current folder, replacing any image for which the distillation process saved bytes. You can then update the images on your server with the optimized images.

Running PngDistill.exe without any arguments will show the usage instructions:

image

Notes

  • The “Minify-then-compress” Best Practice applies to PNGs. While large fields of empty pixels compress really well, the browser must decompress those fields back into memory. So, if you’re building a sprite image with all of your site’s icons, don’t leave a huge empty area in it.
  • More advanced optimizations for PNG files are available using filters, color depth reduction, etc. PngDistill does not undertake these optimizations as its goal is to be 100% safe for automation, with no possibility of a user-visible change in the pixels of the image.
  • PngDistill partially supports .ICO files. Icon files may contain embedded PNGs; when run on a .ICO, PngDistill will extract the PNGs and save them externally; you will need to rebuild the .ICO file with the new PNG file(s).

-Eric

Meaningless Legalese

The folks @Wired would like to remind you that viewing their website in any browser violates of their terms-of-use.

wired tou

All web browsers cache content, by-design. And I’m pretty sure that “reading” is one just one of many ways that the material might be “otherwise used.”

For an otherwise forward-looking publication, seeing this garbage on the homepage is a depressing failure.

-E