JSON article

JSON for the masses is being widely linked lately.  I find it interesting and a bit perplexing.  It purports to show you how to “program in JSON” — which boils down to using Javascript objects as namespaces to hold closely related functions and variables.

It’s a good idea.  Namespaces are helpful and clarify things.  It purports to make things “object-oriented,” which I find a kind of unfortunate claim.  There’s a brand of “object orientation” which basically is nothing but procedural programming which uses classes and/or objects as namespaces — where an object of a given class has no purpose other than as a place to hang a bunch of conceptually related methods.  Or where certain classes are never instantiated at all and just serve as namespaces for their various methods.  You see bits of this even in respectable object oriented languages, e.g. a Math class which exists only to put the sqrt() method.  But it’s kinda lame, as far as object orientedness goes.  And it’s mega-lame if you’re doing it all the time.  (Mega-lame as far as OO goodness is concerned.  Namespaces are still better than no namespaces, though.)

The other thing that seemed odd about this article was that as far as I can tell, what he’s proposing isn’t actually valid JSON.  JSON is supposed to be a data serialization language, like YAML. If you check the spec, you’ll notice function objects are not there.  So what the author is writing about is not strictly speaking even JSON.  And it’s definitely not there to do what JSON is supposed to do — serialize objects for transmission from one place to another.

So it’s a nifty thing, a good idea, but not really very object-oriented at all, and not really JSON at all.

It does kind of show off how easy it is to mold Javascript into an elegant shape though.  Worth reading for that, I think.

I Still Dream Of Organon…

I bought a copy of Kate Bush’s Cloudbusting the other day, because I’d bought her new album Aerial and it made me wistful for her old stuff from the 80s.

I knew that Cloudbusting was about Wilhlem Reich, but back in the old days we didn’t have no Inter Webs, and I couldn’t google around and learn the details. The details are pretty cool. It’s inspired by a book that Wilhelm’s son Peter wrote, about growing up in his father’s care, believing everything his father told him, and realizing only when his father was imprisoned and his books burned by the federal government, that almost nobody believed the things his father believed or thought his father was the genius that he considered himself.

I’d never made out the word “Organon” in the first line of the song (I’d thought it was something like “I still dream of all the noise…” — whoops). And other things about the song’s lyrics, which were puzzling before, become clear when you know what it’s about —

You’re like my yo-yo
That glowed in the dark

What made it special
Made it dangerous
So I bury it and forget

A yo-yo that glowed in the dark? Well… Reich experimented with radium at his laboratory, Organon. A yo-yo that glowed in the dark might well be special… and dangerous.

It’s an especially thought provoking song becuase Reich is such a character. He was in many ways a reprehensible fellow — the word “megalomanic” leaps to mind when one considers that he’s the author of a book-length rant called Listen, Little Man! (which reads exactly how you’d think it reads from the title). And, well, you know, “orgone energy” ain’t exactly, um, real. But… I don’t know.  For all the craziness, it seems like at heart he was a man who saw how much society can hurt people, and fill them with anger and fear and hate, and who wanted to do something about it, and who convinced himself he’d found secrets which allowed him to change the world.

I would like to read the book that inspired the song.

Everytime it rains,
You’re here in my head
Like the sun coming out –
Ooh I just know that something good is going to happen
And I don’t know when
But just saying it could even make it happen.

$1.6 Billion On Pro-Administration Propaganda


How much is good press worth? To the Bush administration, about $1.6 billion.That’s how much seven federal departments spent from 2003 through the second quarter of 2005 on 343 contracts with public relations firms, advertising agencies, media organizations and individuals, according to a new Government Accountability Office report.

Anyone know how I can get a piece of that action?  I’ve got this nice blog and could use a hundred thousand dollars for promoting Administration policies…