Archive for October, 2009

The Real Threat of ACORN

Saturday, October 3rd, 2009

acornKaren Heller, a columnist for the Inquirer, wrote about the evil, awful ACORN people conservatives keep attacking. (Inquirer, Saturday, October 3, 2009.) Of course, that line was only a setup, as she went on to describe the young, idealistic college graduates and the African American grandmothers and great-grandmothers who are making sure Latinos have a voice and that greedy banks don’t foreclose on good people who need homes. Wonderful stuff, indeed, but she comes to the conclusion that this work is being shutdown by vengeful conservatives afraid of minorities getting a voice. And she blames the subtly unnamed “right-wing conspiracy” for all of ACORN’s woes.

Never mind that ACORN affiliates all over the country are implicated in sketchy activities. Never mind that anybody in their right mind would have called the cops when that ridiculous pimp-n-ho duo walked in the door (thankfully, the Philly people did). Never mind that ACORN’s very corporate structuring is intended to obfuscate and hide funding and oversight, politicizing non-partisan activities (like voter registration) and using federal funds for illegitimate purposes. Think I’m exaggerating? Read their own lawyer’s internal investigation and strong-worded suggestions.

It’s time for the good people doing good work at ACORN to step out and say, “enough of the corruption, enough of the greed, we’ve got real work to do,” and start their own organizations, well purposed, well governed, transparent from the start. Moral high ground is only difficult to attain for those unwilling to give up their vices.

Anyway, here’s my letter to Ms. Heller:

Dear Ms. Heller,

I understand you’re an opinion columnist, so I don’t ever expect to agree with you.  I think you’re entirely missing the point with your ACORN article, and the comments from readers at the bottom are closer to the truth.  It’s not the fault of accusers that good people can’t continue their good work — it’s the fault of the bad apples and bad ideas that were tolerated too long by bad leadership.

In any case, if you feel ACORN, locally at least, is doing such good work, and that there is a mass of likeminded people that agree with you, why don’t you all fund ACORN yourselves?  Or is this a case where you think ACORN should get OPM (other people’s money)?  The reliance on “free” tax dollars and the distancing of funding decisions from the people most concerned about important issues causes an explosion of greed and corruption.

Sadly, a handful of good people get tarnished.  But maybe its time for them to leave and do their own thing — because surely ACORN can’t be the only organization doing any of this work, can it?

Blame the bad guys for the problems they cause, even to innocent people.  Don’t blame the messengers.

Sincerely,
Walt Rice

Image Tile Caching, rehashed

Friday, October 2nd, 2009

A little more than a year ago, I wrote about my rather simplistic approach to caching image tiles for the interactive map viewer on PhilaGeoHistory.org. Since that time, I’ve made a few updates that are worthy of a reposting, particularly if you want to use the code for anything.

First, one of our partners, the Free Library of Philadelphia, wanted to use the script, but wanted it in ColfFusion. So I migrated it from PHP to ColdFusion. The two versions work very similarly, so you can see the current version in PHP or ColdFusion.

Second, here are the new features:

  • Store the cached images for different layers in different directories. Seems simple enough. I hesitated to do this previously because you could request multiple layers at once through the WMS script, but in practice I’ve never done it.
  • In ColdFusion, open the resulting image to make sure it is a valid image. Sometimes the file that is returned is garbage, or just an error, and you don’t want to cache it. Also, if the PNG file is smaller than 1K, it’s most likely not an image at all.
  • If the first attempt to retrieve an original tile fails, or results in an error, retry the http request again.
  • Use an appropriate file extension denoting the format of the image. Previously, just the hash of the request string was used as the filename. Now it’s the has plus the correct extension. Makes it possible to set the correct MIME type when serving up a cached image, and makes viewing problematic images in the file system a lot easier.
  • Return an HTTP header telling the client to cache the image. The results of dynamic scripts in general are not cached by browsers, but in this case, significant speed benefits arise from holding onto the images, which are very unlikely to change in any short period of time.

Further features that would be useful include recognizing the geographic extent of each layer and not caching tiles outside of that extend; recognizing empty tiles; and more efficiently storing the resulting cached files.

I don’t expect to invest too much in this, especially since there are much larger systems to do things like this (TileCache is one example). Currently, it’s too complicated for me to consider implementing, but if I need more features, or the project scales larger, I’ll have to migrate to something like it.