Archive for March, 2010

Multiple $document.ready Calls

Thank you, Karl, for clearing this up for me.

When I started using Jquery, I packed all my initial processing into a single $document.ready call. I quickly noticed that this wasn’t standard. Many code snippets used a $document.ready for each logical modification to the dom. Finally, I wondered at all the instances of:

$(function() {
// manipulate dom
});

which I first misread for:

function() {
// manipulate dom
};

Well, as Karl informs me, $(function) is simply shorthand for $document.ready(function).

So create $document.ready(function)’s till your heart’s content or save your fingers the trouble and replace them with $(function)’s. Thanks to Karl, google, the internet and anyone/thing else in the time-saving chain.

Decorators in Python

This was very helpful. The most challenging thing about finding information about Python decorators, when I encountered them, was that searching for “python @” didn’t bring up anything useful.

Also Not Shocking

The mighty Glenn Greenwald is taken aback by Wolf Blitzer’s ludicrous and antagonistic piece on the “loyalty” of Justice [sic] Dept officials. You see, these officials had represented kidnapped foreigners who have been in cages for . . . just about a decade now. Of course, questioning the state’s blatantly illegal, not to mention obviously evil, actions is grounds for charges of treason. At least, that’s Wolf’s take. Or, to be more accurate, that’s the perspective, delivered by some arch-conservative, that Wolf let go unchallenged by objections or questions.

This is unsurprising to me. My very first memories of Wolf, were of him uncritically covering the first Iraqi slaughter in 1992. Glancing at his CV, he also worked for AIPAC in the 70s. Soooo, yeah, probably not that objective when anti-muslim fervor can be stoked a bit.

A Task for the Believers (or Bring America Home)

I just caught wind of the coffee party. I don’t know that it will catch on, but the sentiments espoused by the founders and participants appeal, I think, to a broad swath of the not-yet-totally-disillusioned. Here’s the mission statement from coffeepartyusa.com:

MISSION: The Coffee Party Movement gives voice to Americans who want to see cooperation in government. We recognize that the federal government is not the enemy of the people, but the expression of our collective will, and that we must participate in the democratic process in order to address the challenges that we face as Americans. As voters and grassroots volunteers, we will support leaders who work toward positive solutions, and hold accountable those who obstruct them.

And their facebook blurb:

We the People demand: Reason and civility in public affairs; A government accountable to the People; Liberty & Justice for All.

I fundamentally disagree with the premise that government is anything but an enemy of people*. It sure as hell is no representation of my will, or the will of anyone I know or care to know. But that’s not my rant today. Today I bring a proposal. A simple test which, if passed, will save countless lives and provide the money to fund every domestic project every dreamed of.

I know what you’re thinking, I thought the same thing as I perused this post whose proposal I bring to the caffeinated today.

The claim of the state apologist, captured in the coffee party mission is that it is possible for the state to act in the interests of the citizens and reflect the wishes of its people. Certainly nothing could be more rational in a time of dire financial crises than to repurpose the trillions of dollars spent annihilating distant, provably harmless, civilizations to rebuilding our own.

Clearly, our global wars of occupation are not effective at achieving their stated aims. Both reason and evidence indicate, in fact, that the exact opposite of “national security” is heightened as the list of the aggrieved soars into the 10s of millions and the viability of a life spent violently fighting western institutions increases.

To the coffee party and anyone else who still imagines that the state is the servant of the people. I beg you to apply yourself to this one single, utterly reasonable and most critical of political actions. The coalition awaits and, as Chris notes, it is a truly big tent.

* At least 99.9% of people.