October 2010

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...

eXtreme Calligraphy


Featuring the star of Bushido Sixteen , it’s Shodou Girls!!.

Shodou Girls DVD cover

Popular young actress Riko Narumi often goes for a serious, intense look; fortunately her face hasn’t frozen that way, and she often looks quite cuddly. Working hard this year, too, with two TV dramas, three movies, a photobook, and several ad campaigns. According to her official site, she’s also still involved with the School of Lock! (not a typo or Engrish) radio show.

(no idea if she’s any good; Amazon Japan just recommended her to me because I bought the most recent Sukeban Deka film)

Coolest video set ever


“Hey, can I borrow your battleship for a few hours? And a really big fog machine?”. Tsuyoshi Nagabuchi, performing the closing song of the film Otoko-tachi no Yamato.

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

Recettear, still going strong


Finally unlocked Griff, which gave me access to The Lapis Ruins. Also, a revelation: this game is what you’d get if you put a 7-11 and Seven of Seven in a blender and set it to “puree”.

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.

Dear Microsoft,


Why is Windows 7 willing to install updates and reboot a machine during a backup? Now, if this were a server, and I were running some third-party backup software, maybe you’d be able to convincingly mumble something about it being my responsibility to override the standard auto-update settings and schedule them for outside the backup window, but this is your own supplied automatic backup software on a consumer laptop. You know, the one that tries to run whenever it sees the backup drive connected and thinks now would be a good time to protect your data?

Left hand, meet right hand; you two should talk occasionally.

From PDF::API2::Lite to PDF::Haru


There are no circles in PDF. Thought you saw a circle in a PDF file? Nope, you saw a series of Beziér cubic splines approximating a circle. This has never been a problem for me before, and I’ve cheerfully instructed the PDF::API2::Lite module to render dozens, nay hundreds of these “circles” on a single page, and it has always worked.

Then I tried rendering a few tens of thousands of them, and heard the fans on my laptop spin up. PDF::API2 is a pure-perl module, you see, and Perl is not, shall we say, optimized for trig. PDF::Haru, on the other hand, is a thin wrapper around Haru, which is written in C. Conversion took only a few minutes, which is about a tenth of the time the script would have needed to finish rendering, and the new version took 15 seconds to render a 1:50,000,000 scale Natural Earth basemap and all the data points.

I ended up abandoning “circles” for squares anyway, though, because PDF viewers aren’t happy with them in those quantities, either. Still faster to do it with PDF::Haru, so the time wasn’t wasted.

As a bonus, Haru has support for rendering vertical text in Japanese. I can think of a few uses for that in my other projects.

(I should note that it’s not useful for every project, and in most respects PDF::API2 is a more complete implementation of the spec, but for straightforward image rendering, it’s a lot faster. Development seems to have mostly stopped as well, so if it doesn’t do what you want today, it likely never will)

Not Engrish


Sometimes, funny-looking English in a sign isn’t. This is a perfectly reasonable translation of the Japanese text on the sign, and I’m sure it makes perfect sense to everyone who sees it.

Stick-wipers
をご使用の方はここでお拭き下さい

Dear Kei Yasuda,


More, please. Preferably without the bizarro zombie/mutant/drag-king who mars two of these shots.

Kei Yasuda

No, seriously, Kemeko, you’ve found people who know how to do your hair, makeup, and clothing, and who recognize that your talent is accompanied by severe hotness. The only thing missing is a long-overdue solo album.

more...

Dear Erika Yazawa,


Again? Seriously? Dogu-chan herself wasn’t wacky enough, now she needs to be backed up by the Doguun 5 bikini combat team?

I suppose the bright side is that this keeps you visible enough for your agency to justify making more DVDs…

Dear Amazon,


Recommendation FAIL: because I own an Ove’ Glove

Amazon recommends...colon!

Diversity of everything except opinion


SF writer Elizabeth Moon has been removed as Guest of Honor at Wiscon, for the crime of stating an opinion that disagrees with the proper view on the subject.

[Update: The Brickmuppet weighs in, with thoughtful and linky goodness, including a Wiscon review. Honestly, after reading the review, I have to think that the only reason they originally invited her was for a chance to hate.]

Cyd Khan


Full of win.

Tera in my pocket


Current sale at Costco (brick & mortar only): Western Digital 1TB bus-powered, hardware-encrypted USB drive, $99.

I like this future we live in, but it still lacks catgirls.

Dear Aya Matsuura,


When you have a new album release that’s less than a month away, and Amazon doesn’t have the cover picture yet, and the official promotional video for one of the songs is one step up from an animated GIF, it’s time to find a new record company.

Dear Hyoyeon,


Camouflage fail. On the bright side, they’re not giving you goofy hair as much in the new Hoot video. Perhaps this is your way of hiding from the stylists when they get vicious?

The Hyoyeon Polka

Loaded for bear,


…or at least little monsters. Earlier predictions for rain tonight have changed, and while it will cool down, I expect a significant number of trick-or-treaters and their attractive young mothers, so my 48-quart cooler is ready for action.

candy, man!

(yes, this is about forty pounds of candy; I give it out in roughly half-pound handfuls)

[8pm update: all gone]

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