Web

Dear Amazon,


Recommendation FAIL: because I own an Ove’ Glove

Amazon recommends...colon!

Clearing Safari's cache of HTML5 local storage


One of the few things that Safari 5 does not give you a way to avoid or clear is HTML5 local storage. This is separate from the setting for HTML5 local database storage, and deleting it is necessary not only for avoiding things like the new evercookies that sites are starting to use (such as polldaddy), but also sites like meebo who use it to store large chunks of custom Javascript locally.

Fortunately, there’s nothing obscure about how it’s stored, and the method for stopping a particular site from ever using it again is easy.

To clear out the local storage, exit Safari and run:

rm -rf ~/Library/Safari/LocalStorage/http*

(don’t delete everything, since Safari Extensions store their settings here as well)

To prevent a particular site from using local storage ever again (say, samy.pl, home of and test site for evercookies), exit Safari and run these two commands:

cp /dev/null ~/Library/Safari/LocalStorage/http_samy.pl_0.localstorage
chmod 0 ~/Library/Safari/LocalStorage/http_samy.pl_0.localstorage

To see what a site is storing on your machine (all on one line):

sqlite3 ~/Library/Safari/LocalStorage/http_samy.pl_0.localstorage
    "select * from ItemTable"

The best solution would be a small script to whitelist the few domains you’re willing to allow persistent storage from, and nuke the rest whenever they show up. Safari caches these Sqlite databases in memory during a session, so you need to restart the browser to really clear them.

My several-times-a-week routine is now:

  1. Reset Safari menu (clear history, reset top sites, remove webpage preview images, empty the cache, clear the downloads window, remove saved names and passwords, remove all other autofill form text, close all safari windows).
  2. Exit Safari.
  3. Clear all non-whitelisted cookies with a custom script.
  4. Clear all non-whitelisted local storage with a custom script.
  5. (all Flash local storage was already permanently disabled, which has only ever broken one site's functionality (Indiemapper))

Note that it’s also easy to change the data sites are stuffing into local storage. The results could be whimsical or malicious, depending on how intelligent the web developer was.

On a related note, the HTML5 local database storage is in ~/Library/Safari/Databases, if you’ve allowed any sites to use it. I keep it turned off, myself.

Web 2.0++


The folks at 10gen asked me if I’d be interested in submitting a proposal for a session on MongoDB at the upcoming Web 2.0 Expo in San Francisco. Sadly, they suggested this less than two weeks before the deadline, leaving me little time to record a sample video of my legendary public-speaking skills.

[note: last displayed in Nineteen-Ninety-Something to an auditorium full of HP engineers who wanted a from-the-trenches report on implementing SAP]

I certainly have the gear to make a quick video, and I could have knocked something decent together over the weekend, but the more I thought about it, the more I realized that while I wanted to talk about their product, I really didn’t want to be in front of a room full of bleeding-edge fucktard web developers. A while back, I said:

"All contract web developers are bling-happy assclowns with no concept of revision control or release management, who think 1,000 is a large number."

Upon reflection, I think this doesn’t go far enough. More and more, I see web sites that abuse the functional value of “web 2.0” technologies to put lipstick on a pig and rent her out for bacon-scented gang-bangs. Usability? Accessibility? Searchability? Standard navigation methods? “Fuck that, let’s break the rules and show everyone how cool we are! Tweet me if you’re in!”

I simply couldn’t imagine a web conference in San Francisco not being full of people I’d rather punch than talk to, all extreme and agile and oblivious, like the many who add layer upon layer of caching to compensate for their shoddy Rails code. For them, and others like them, I propose a new label, to properly reflect their approach to design and implementation:

Web.Twee

Earth, point and click


Spent a little while tinkering with Maxmind’s GeoLite City geolocation database and Indiemapper‘s Flash-based GIS mapping tool. I’d prefer to render the base map myself, using the free Natural Earth shapefiles, but after deciding to use the Winkel Tripel projection with the Perl bindings for the Proj.4 library (for which the appropriate incantation appears to be “+proj=wintri +lon_0=90w +x_0=16396891.17 +y_0=10018754.17”), I ran out of idle-hacking energy when Asia wrapped around the edges. Something to do with urgent calls from a panicked customer-service manager whose migration plan had suddenly turned into a bad ending from Oregon Trail.

Anyway, despite the horrible performance, excessive memory usage, and utterly crap UI of a Flash app, Indiemapper is quite useful, and for people who frequently generate maps with less than, say, 10,000 data points per layer, it’s probably worth the monthly subscription fee. It’s definitely worth the free 30-day demo.

Data points of no particular significance, rendered with Indiemapper.com

Below, I’ve added a close-up of the US, to answer Steven’s question (note: it took less than a minute to login to Indiemapper, load my previously-saved map, change the projection to Mercator, zoom in on the US, and export a new PNG; it’s a lot more comfortable with countries than with planets):

more...

Adventures in the Amazon


As I sometimes do in idle moments, I have once again plunged into the depths of Amazon’s recommendation system and returned with rare and precious gems.

Because I purchased The Key To Kanji: A Visual History of 1100 Characters, I might like the Wii game A Boy and His Blob.

Because I rated Combos Pizzeria Pretzel, 7-Ounce Packages (highly, I might add), I am almost certainly interested in purchasing Dixon Ticonderoga RediSharp PLUS, Fine Point Permanent Marker.

Because I rated VMWare Fusion 3 (again, quite highly), I am sure to enjoy MP3s of the album It’s Never Been Like That by the band Phoenix.

Because I added the 14x25-inch size of 3M Filtrete 1900 MPR, 6-Pack, Ultimate Allergen Reduction furnace filters to my cart, I not only desire a copy of Precalculus: Graphical, Numerical, Algebraic, but also Grade 1 Subtraction (Kumon Math Workbooks).

And then comes the prize…

more...

Zombie domains


It used to be that when domains expired, they were either redirected to some scam product site or overpriced “you can buy this domain” page, depending on their pagerank.

Now they’re turned into ad sites that look exactly like the original site, graphics and all. So, for instance, what was once the promotional site for the US release of Kino’s Journey is now a bunch of links to online “pharmacies” hidden behind the original text and graphics, and the domain itself is now registered in Costa Rica by a Russian.

Lt. Smash’s blog went the same way a while ago. It looks like his old site, but it’s just spam, with the HTML and images scraped from some archive. I’ve run into others, enough that I’m now wary of all my old bookmarks that still seem to work.

(…and which Apple now uses for auto-completion when typing URLs in Safari 5, one more reason that’s a really stupid feature…)

Dear Cnet,


If you’re going to redirect people from versiontracker.com now that you’ve closed it down and replaced it with a less-useful site, could you at least redirect them to a similar page? Honestly, how hard is it to forward versiontracker.com/macosx to download.cnet.com/mac?

[Update: ah, it seems they did a very narrow redirect with an exact string match, without checking for all the common variations saved in bookmarks, including trailing slashes, index pages, etc. The exact example above now works, but some of the other variations still don’t.]

Dear Amazon,


Wow, these new pencils are versatile! But I think maybe I don’t want to hang out with the sort of people who buy them…

Stuff pencil-lovers like
More stuff pencil-lovers like

Actually, I’m not terribly excited by the new Sharpie Liquid Mechanical Pencils. Unless you apply a lot more pressure than you would with a standard pencil or gel-ink pen, they don’t work well when held at more than a very slight angle.

“Need a clue, take a clue,
 got a clue, leave a clue”