Yay Python!

Recently, I’ve been writing some Python CGI’s for administrative interfaces (Python’s SOAP and XML-RPC interfaces are really sweet). Today I had to calculate array differences and was looking into doing it in Perl, but it turns out that it’s even easier in Python because it has set functionality built-in. Here’s how to calculate the difference of two arrays:


a_set = set(a_list)
b_set = set(b_list)
aonly = list(a_set - b_set)

Sweet!

Um… Is this thing on?

The blog has lain fallow a bit while other areas have taken priority, but I’m going to do my best to get back on the saddle. I can see now how easy it is to just stop once you get out of the habit… And then how it’s sort of awkward to start up again because… well, enough navel gazing.

One of the causes of much busyness is that I finally got around to the long overdue task of clearing stuff off my plate, starting with quitting work (I finish up at the end of the month), which entails wrapping up with a new revision of the campus-wide portal, pending launch of campus-wide wikis, and piloting of blogs (my involvement with Elgg should be continuing).

While working as USC has been a mostly positive experience, there were too many things on the todo list, and something had to give. I’m really looking to having a least a few weeks to unwind and knock out a number of little projects starting next month.

There’s a ginormous backlog of cool stuff to comment on (locally and on the web), so more soon.

Tabs vs Spaces

I’m typically not bother too much by the whole tabs vs spaces, but for some reason, it sort of got on my nerves last week (I do most of my editing in vim where it doesn’t really matter, but I’ve been doing some stuff in SubEthaEdit latetly) and got me looking at some of the back and forth…

Anyway, while the last article actually got me thinking, in the end, I decided to stick with spaces. Tabs just introduced more complexity, and mixing tabs/spaces leads to all kinds of wonkiness when done improperly. I did decide to be a bit more aggressive about using retab if I got bothered again…

For reference, my vim settings for tabs:

" interpret tab as an `indent' command instead of an insert-a-tab command
set softtabstop=2
"indent with two spaces when hitting tab 
set shiftwidth=2
"expand all tabs to spaces according to shiftwidth parameter
set expandtab
" mod%2 to ignore tabs
set tabstop=2

More on the TV Thing

The other week, I came across an interesting article in the Weekly Standard (yeah, that Weekly Standard) on Joss Whedon’s upcoming Firefly movie (née half-season cancelled Fox show), Serenity. Firefly was a highly regarded, but totally doomed space-western show that I’d never really bothered to look into despite having heard good things about it (not being a huge Whedon fan, being way too busy, and not watching TV being some strong factors).

The article piqued my interest though, especially in light of the whole Global Frequency thing and my pleasant surprise with Battlestar Galactica (another show doing very smart online stuff — and yeah, I’ve been watching a lot of TV programming the past few months for someone who doesn’t even own a set anymore).

I ended up going through the series this past week, and came away impressed. It starts out smart and grows on you as it goes on – there’s a lot of character, both in the uh, characters, and the settings (a wild-west spin on humanity’s 26th-century interplanetary colonization, with an Anglo-Sino Alliance occupying ‘civilized’ core worlds surrounded by frontiersy border worlds). I should mention however that the pronunciation of the Chinese phrases they interject are mangled laughably beyond belief (and comprehension).

Perhaps as interesting as the story in the show is the meta-story of the show: put in a Friday death slot and shown out of order by Fox TV execs, but subsequently kept on life-support post-cancellation by the dedication of both fans and the production crew, and given a new lease on life as a feature film following strong DVD sales (as strong as it’s ever been right now, currently the #8 top seller on Amazon.com, 1.5years after release – and yeah, they sold me a copy).

Sci-Fi channel will airing all the Firefly episodes made (including 3 never aired by Fox) in the next couple weeks, which should be an interesting movie lead-in (if my math is right, they won’t get to the end before the movie comes out – maybe that’s planned to encourage DVD sales?)

I don’t know if there’s a moral to this story. The Fox execs are making money hand-over fist despite their blindness, but at least it highlights both the changings dynamic in entertainment consumption and also hints at the additional opportunites available for those with vision – Global Frequency highlighted the opportunities for seeding (ahem) pilots and seeing what takes, while things like the Family Guy and Firefly perhaps points to a viable model of recognizing and continuing quality shows canned before their time (that’s exploiting known-quantity, low-risk, untapped revenue streams to the suits).

On Laziness

I’ve noticed that recently I’ve been taking less and less photos since I’ve gotten my T7. I think that part of it is since I carry it around everywhere, there’s less of a need to justify bringing it by taking lots of photos – hence, less interesting stuff to post. Even when I do have photos, it’s more of a pain to transfer, since I need a Duo adapter and a separate card reader (vs carrying around my CF/PC card adapter in my laptop slot). And lastly, when I am taking shots, I’m much more likely to do video now than stills. And beyond an a cheesy AppleScript, I don’t really have any automation tools for thumbnailing/posting those. As someone once said, “it’s hard work.”

A short death polo clip* from a BBQ in the Golden Gate Park this weekend:

Guido!

* no actual deaths

Last Throes

Excerpt from Press Briefing by Scott McClellan, Office of the Press Secretary, June 16, 2005:

Q Scott, is the insurgency in Iraq in its last throes?

MR. McCLELLAN: Terry, you have a desperate group of terrorists in Iraq that are doing everything they can to try to derail the transition to democracy. The Iraqi people have made it clear that they want a free and democratic and peaceful future. And that’s why we’re doing everything we can, along with other countries, to support the Iraqi people as they move forward. The fact that they are making great progress on the political front is significant because that helps defeat the terrorists, because the terrorists don’t want to see democracy take hold. They don’t want lasting democratic institutions to be put in place. And that’s why we are standing with the Iraqi people as they move forward on the political front.

We’re also standing with the Iraqi people as they move forward on — to address the security situation. We are working side by side with Iraqi forces now to defeat those terrorists and regime elements who want to derail the transition to democracy. And every day we move forward on democracy and training Iraqi security forces is every day closer that we are to succeeding in Iraq.

Q But the insurgency is in its last throes?

MR. McCLELLAN: The Vice President talked about that the other day — you have a desperate group of terrorists who recognize how high the stakes are in Iraq. A free Iraq will be a significant blow to their ambitions.

Q But they’re killing more Americans, they’re killing more Iraqis. That’s the last throes?

MR. McCLELLAN: Innocent — I say innocent civilians. And it doesn’t take a lot of people to cause mass damage when you’re willing to strap a bomb onto yourself, get in a car and go and attack innocent civilians. That’s the kind of people that we’re dealing with. That’s what I say when we’re talking about a determined enemy.

Q Right. What is the evidence that the insurgency is in its last throes?

MR. McCLELLAN: I think I just explained to you the desperation of terrorists and their tactics.

Q What’s the evidence on the ground that it’s being extinguished?

MR. McCLELLAN: Terry, we’re making great progress to defeat the terrorist and regime elements. You’re seeing Iraqis now playing more of a role in addressing the security threats that they face. They’re working side by side with our coalition forces. They’re working on their own. There are a lot of special forces in Iraq that are taking the battle to the enemy in Iraq. And so this is a period when they are in a desperate mode.

Q Well, I’m just wondering what the metric is for measuring the defeat of the insurgency.

MR. McCLELLAN: Well, you can go back and look at the Vice President’s remarks. I think he talked about it.

Q Yes. Is there any idea how long a last throe lasts for?

MR. McCLELLAN: Go ahead, Steve.

We live in fictional times indeed.

Whoa Doc, That’s Heavy

I’m doing some clearance on a server I’m canning, (check out the bandwidth monitor) and I’m hitting load levels I’ve never seen on a single proc machine before. Apache2 is, impressively more responsive than my SSH terminal (uptime took about 20s to get started, and another 7s to run). Check it out:

17:41:18  up 117 days,  7:50,  1 user,  load average: 108.48, 106.08, 77.03

Welcome to the Global Frequency

I’m pretty jazzed to have discovered Kung Fu Monkey, the blog of a Hollywood screenwriter/exec, who was most interestingly was executive producer of a unbroadcasted TV series, Global Frequency (an adaptation of the Warren Ellis comic of the same name).

Last week, a screener of the pilot was leaked online, and this week, John Rogers wrote up a follow-up analysis. This struck me as particularly insightful:

I’ll also call Nelson McCormick, the director and let him know that on several counts he was right and I was wrong, and I owe him a beer. They made the show, you like the show. We executive types need to get the hell out of the middle of that relationship. … But you know what? I bitch and moan about how all this emergent technology is going to change the entertainment industry and nobody’s taking advantage of it. And here I have, well, unless I’m mistaken, a fan base which exists and is trying to organize for a show which has never appeared on television. Not a cancelled show — a show which has literally never aired on broadcast television. This is BoingBoing and Wired’s frikkin’ dream. Seeing as I was planning on writing a book on this stuff, I’d be insane not to follow up in some way.

Hey, what do you know, a Hollywood producer that gets it. This, from my experience, is depressingly rare in this town.

The “it” that I reference of course is the shift in the media consumption cycle due to distributed networks. This is playing out in a lot of very interesting ways, but in terms of TV production, the changes we’re seeing are just beginning (remember, this is an area where just a couple years ago, the cable was considered a “disruptive technology” (no joke, in essays published in the 00’s — what they’d call the Internet or P2P I don’t know — “the apocalypse,” most likely).

There’s a dozen connections I want to blurt out right now, but it’s late, and I’ve been swamped lately, so I’m not up for it. That, and there are already so much out there. I’ll leave off with a link to an (IMHO, classic) essay by Henry Jenkins, Interactive Audiences? The ‘Collective Intelligence’ of Media Fans. (Also: some related collected references I compiled a while back)

WWDC 2005 Wrap-Up

I just finished watching the WWDC 2005 Keynote. The presentation was good, but I’m still surprised by the way the announcement/timeline was handled. No punches pulled, no consolation prize, no “one more thing.” More of a “yeah, we’re Osborning our line for the next year. k thx bye.”

Jobs’ hand-waving about new PPC products was the least convincing part of the keynote, and I hope that that gets addressed before mass confusion descends (I’m sure the cognitive dissonance is deafening right now, especially as the Mac faithful look at the top-end).

In any case, I’m looking forward to a decently performing PowerBook with Napa (my currently top of the line 1.67GHz G4 has issues with HD playback and is still lacking in ‘teh snappy’), and I’m really hoping for a good media hub solution soon (but let’s face it, I’ll probably end up with an XBox360 or a PS3).

An interesting aside, MacRumors was using AJAX for its live updates (although MacObserver’s page handled much better regardless).