Categories
JavaScript Writing

JavaScript Cookbook 2nd Edition: Live and Personal

JavaScript Cookbook cover

The second edition of the JavaScript Cookbook just went live at O’Reilly. If you’re wondering why I haven’t been writing about technology as much lately, it’s because I was saving all my tech writing mojo for the book.

We went a somewhat different path with the second edition. I spent a lot less time on syntax, and a lot more on JavaScript in use. When I wrote my first book on JavaScript, in the dark ages that was the mid-1990s, syntax was about all you had with JavaScript. Now, JavaScript is everywhere. It’s the programming language that ate the world.

Well, nibbled the world. JavaScript is still that friendly, approachable language, even with the new ECMAScript additions. JavaScript has never roared; it’s meowed and purred its way into our lives. Good kitty. Nice kitty. Here, have a closure.

In the new edition of JavaScript Cookbook, I covered JavaScript in the browser, and re-visited our old friends (Ajax and the JS objects), yes. But I also spent a considerable time covering JavaScript in the server, in the cloud, and in our mobile devices. The only environment I didn’t cover is the open source hardware, DIY, wearable world, and that’s because I feel these need more preliminary introductions to the environment, so you don’t do something like fry your new Raspberry Pi. Or Computer. Or shirt.

I will never join with those who are critical of JavaScript. I have always had fun with this language. There’s just so much you can do with it.

Categories
Media

Rethinking our Twitter Twitchy Actions

Cleaning up after the bird

Very interesting piece by Sam Bibble at Gawker on Justine Sacco. Sacco was the PR person who tweeted a bit of satire that blew up in her face, and almost destroyed her career.

The problem with Twitter is every post lacks context. You don’t know the person to know if they’re joking. You haven’t seen the build-up to know if the post is ironic, satirical, or a true belief. And it’s so damn easy to retweet the actions and reactions, and to get caught up in the rush to condemn. That’s the bad, the very horrid part of Twitter.

At the same time, Twitter can be damn useful. Anyone who closely follows the Ferguson events will tell you that you can find more up-to-date information in Twitter than any in any news site. We can find a lot of racist crap, true, but we also found livestream links, breaking news, and even thoughtful insight, 140 characters at a time.

Bibble’s advice for weathering a Twitter storm is good—don’t engage, you’ll only had fuel to the fire. But maybe we should seriously re-think our twitchy actions. There are two kinds of outrageous tweets at the core of these storms. The first is the satirical tweet, taken out of context; if we retweet these, we can be harming an innocent person. The second type of outrageous tweet is from those who want attention; if we retweet what they post, all we’re doing is giving them the attention they want.

I watched this happen with person claiming to be a journalist, who tried to write himself into Ferguson’s history and failed. Every new and outrageous tweet of his that got caught up and magnified resulted in him getting at least a hundred new followers. In our outraged reaction, we gave him exactly what he wanted, and now he’s been featured in publications such as the New York Times, Slate, and the Washington Post. We didn’t create the monster, but we sure gave it juice.

Categories
Political

Missouri’s new debtor prison

oops!

I discovered these were 2014 bills, not 2015 bills. Sigh. My bad. However, the issue of bias based on economic status stands.

earlier

I accidentally stumbled on to a new landlord/tenant bill introduced into the current Missouri legislation session. It’s HB 1982. Among other things, it would actually criminalize non-payment of rent. Yes, if you’re thinking “debtor prison” you got it in one.

The bill would also allow landlords to collect three months rent as security deposit. Tell me something: how many low-income folk can afford three months security deposit? Heck, how many middle-income folk can afford three months security deposit, and pay the first month’s rent? As it is, the amount a landlord can collect now is two months rent.

One thing rarely discussed (with one fine exception) in relation to Ferguson and Mike Brown’s shooting is the location: right in the middle of several lower-income apartment complexes. In addition to inherent racial bias at play in the events leading to Michael Brown’s death, there’s also the bias many law enforcement and community leaders feel toward lower-income citizens. Especially lower-income people living in apartments, trailer parks, or other larger grouping of people sharing a common economic status.

This bill demonstrates that Missouri still doesn’t get it when it comes to preventing events like Michael Brown’s death. Not only was the Grand Jury a farce, new bills such as the landlord/tenant bill, as well as a bill that would allow communities with less than two million in revenue to be exempted from the 30% traffic fine cap (allowing these communities to apply any amounts over 30% to their own schools, rather than disburse the money to the state’s general fund), preserve the status quo rather than solve our very real problems.

I don’t know if it’s ignorance or arrogance at play with these new House bills. Probably a combination of the two, which means Missouri will continue to be that sad state in the news, as well as fodder for late night comics and Jon Stewart. And a damn miserable place to live if you aren’t white, wealthy, or a farmer.

Categories
Government

Torture and Learned Helplessness

image from Seligman's research

My senior psychology research project was about “learned helplessness”, based on the work by Martin E. P. Seligman. He saw it as the underlying basis for depression, while I was interested in its effect on workers.

I have written about learned helplessness in the past. Oddly enough, one of the writings is titled, Learned Terrorism, posted in 2002. Others are The Value of Anger, and What’s the Use?

I would never have dreamed that this theory would become the foundation for a system of torture used by the CIA against US prisoners. All I can say is the practitioners most likely discovered what I did, years ago: you can’t artificially engineer “learned helplessness” directly. Not to the extent these interrogators wanted. You can in dogs, but you can’t in humans. If anything, attempting to do so can have an opposite effect than the one intended. Rather than generate the helplessness that would, somehow, make the prisoners compliant, it could make them even more determined not to cooperate.

For learned helplessness to occur, circumstances have to meet a specific set of criteria. They would have to get the prisoners to internalize the current events; to see themselves as the cause for the negative circumstances. Yet individuals differ in how they internalize negative events–there is no one size fits all technique you can use to create the same effect with everyone. The person would also have to feel nothing they can do will change their circumstances. This runs counter to the seeming desired effect of the interrogators. After all, if you want a person to respond with information in order to prevent negative events, you don’t engineer in them a feeling that no matter what they do, or say, nothing will ever change.

So if they did, somehow, engineer “learned helplessness” in the prisoners, in the hope of showing that the effects can be mitigated by providing data, the prisoners would not have been able to make this association. The whole basis of the theory is that the sufferer would have been unable to see the solution offered. Either the engineering would fail, and the prisoner would dig in, even harder, against cooperating, or the engineering would succeed, and the prisoner would become completely apathetic. In both cases, the prisoner would either say nothing (because of anger or apathy), or they’d say everything—they’d blather along until their captors seemed satisfied with their blather, completely indifferent to any possible negative consequences for giving incorrect information, because no matter what they did, nothing would change.

Unbelievable. Not only was the psychology abused and twisted, it wasn’t even accurately applied.

Categories
Media

Ferguson: Media, You are Hurting Us

screenshot of Jon Stewart on Crossfire

The story read that the FBI had arrested two New Black Panther members for buying explosives to bomb Ferguson protests. Not long after, though, the St. Louis Post-Dispatch posted a story that what really happened is the FBI arrested two men for providing false information when buying guns. And the New Black Panther association? Well, that’s implied because a “police source” made the connection. Not the men. Not officially from the FBI. A “police source”.

One of the many sources who have added to the confusion and alarm associated with the Ferguson protests; the same sources that both Twitter users and mainstream press reporters have quoted without fact or verification. There is some excuse for the Twitter users: it’s not their job to fact check what they retweet. The same cannot be said for the media, who have done a piss poor job of covering Ferguson.

Even today, the Chicago Tribune and Washington Post have stories about a $5,000 bounty placed on Darren Wilson’s head by a black militant group. The only problem is, it’s all fake, a fraud. There is no black militant group. There is no $5,000 bounty. It’s all one anonymous Twitter user making the claim among a set of overly fantastic and conflicting claims, in an account that demonstrates glaringly obvious disconnects in linguistic styles. A Twitter account for a group that has absolutely no hint of existence outside of Twitter. Even photos purportedly showing the Twitter user’s hands holding a box of ammo, with dark implications of future mayhem, generated little but doubt from other Twitter users primarily because the hands looked remarkably white, and what most people missed, remarkably feminine. So much for discussions about “fellow warriors”.

[Tweet removed as account no longer exists]

(The only other reference to the group was a pulled Go Fund Me page.)

It was all fake, yet these stalwarts of the press, these icons, dutifully copied each other without any of their journalists once going, “Hey. Maybe we should fact check this or something.”

CNN writes last week about a Grand Jury decision on Friday, and it wasn’t because they had inside information, as the implication might be. No, it was nothing more than a guess. So we end up having a press conference and all sorts of stories on Saturday about no Grand Jury decision happened on Friday. That’s the same as saying, “We didn’t get hit by an asteroid this weekend,” or “There’s a lot of snow in Buffalo.”

How much confusion has been generated by dutifully quoting Chief Jackson from Ferguson, as he makes assertions in the AM, only to add “clarifications” later that day or the next? By the time the media report the clarifications it’s already too late: the seeds of doubt are sown, and mismatched stories get flung about in Twitter, like pellets from a shotgun blast.

All these stories do is add to the tension and distrust. They generate unnecessary suspicion and add fuel to an already volatile situation. It is as if members of the media have gotten together over a beer somewhere and said to each other, “You know, riots in Ferguson would be good for ratings. What can we do to make it happen?”

What did Jon Stewart say on Crossfire years ago? Before his appearance on the show signaled its impending doom?

Stop, stop, stop, stop hurting America.

Media, you are hurting us.