We Are What We've Built
March 21, 2010 at 2:59 p.m.
The Atlantic seems to be settling into its new site, despite a rocky relaunch. James Fallows is blogging again, and Andrew Sullivan and Jeffrey Goldberg are back to disagreeing over Israel and Palestine, instead of the nuances of web design and information architecture. As far as I can tell from the limited vantage point of my feed reader, things are getting back to normal.
But the brief turbulence that followed the relaunch of the rebuilt and redesigned site was interesting in the ways it failed. By most accounts, it did what it was meant to do: the diverse group of ...
Django Recipe: A template for any blog post
February 13, 2010 at 8:08 p.m.
One more quick code recipe before I jump back into the Journalism to Django series. In my last post, I mentioned that I set up permalinked paragraphs on a couple recent entries, using a different technique on each one. You might be wondering how I did that.
This is documented, but it took me a while before I realized how simple it is. The key is Django's get_template and select_template functions, which are part of the template system. Get template takes a string and gets a template. Select template chooses the first one that matches from a list or ...
JavaScript Recipe: Adding Paragraph-level Permalinks
February 12, 2010 at 5:24 p.m.
Paragraph-level permalinks are hot, right? Let's do this in JavaScript, just for fun.
Remember from my last post that all you need is a block of HTML and something to parse it with? This is pretty much what JavaScript was made to do.
var entry = document.getElementById('entry-text');
var paras = entry.getElementsByTagName('p')
Assuming you have a div with id="entry-text", we've just grabbed every paragraph below it and created an array called paras. Simple enough.
Now, like we did with Python and Beautiful Soup, we're just going to loop through that list of paragraph elements, add ...
Python Recipe: Adding Paragraph-Level Permalinks
February 11, 2010 at 9:06 p.m.
I mentioned in my last post how useful Ben Welsh's code recipe's are. Count this post as my effort to encourage the practice among coding journalists.
Since launching the NewsHour's Annotated State of the Union, I've gotten a few questions about how it worked, particularly about linking comments to paragraphs. What's needed is paragraph-level permalinks. As it turns out, that's pretty easy to do.
The first thing you'll need is a block of clean HTML. Then, you'll need something that can parse and modify that HTML. Fortunately, tools abound.
Doing it server ...
Journalism to Django, Part Two: Required Reading
February 7, 2010 at 12:34 a.m.
So, you've gotten the hang of HTML and CSS. You can install Wordpress in five minutes, and you're comfortable mucking with templates. Or you get databases and it's time to get them on a web. Or you read my last post and feel ready for the next step.
Starting Points
At this point, take a look at the Django Book.
You can learn Django and Python at the same time (I did, as have others). But it is worth getting the hang of Python a bit first. Take some time and go through Think Python. It's ...
Footnotes on the State of the Union
January 28, 2010 at 10:51 p.m.
Last night the NewsHour went all-in covering State of the Union. We had on-air analysis, video from the Capitol and coverage on our new blog, and a new app to annotate the speech as it happened.
The Analyzer (I can never think of clever names for my apps; this is what everyone here calls it) is built in Django, with a lot of help from jQuery. From pitch to launch took exactly a week, including a working weekend.
The app is built around two main models: Speeches and footnotes. Every footnote is tied to a speech and indexed to a ...
From Journalism to Django, Part One: Prerequisites
January 26, 2010 at 10:26 p.m.
Programming is hard.
There's no way around it: Learning to make a computer do things means learning a new form of expression. It is not, in some ways, all that different from learning a spoken language.
But it's also fun in an addictive sort of way. It's like telling your Legos to build themselves. When things start to click, massive problems begin to break apart into a long series of eminently squashable bugs.
Before you start learning Django, a few things I recommend brushing up on:
(X)HTML: This is, after all, a framework for building web ...
Why Django
January 12, 2010 at 10:37 p.m.
As of this month, I'll have been using Django for two years, and using it professionally for a year. That's a strange thing to think about, because I still have a hard time calling myself a "programmer" (though "web developer" feels easier, for some reason). I am, after all, a politics major with zero formal training in computer science. Yet here we are.
Over the past few months, friends have started asking me about my favorite framework: How'd I get started? Is it as good as the hype? Can I, or should I, learn it?
Well...
Why ...
More on China and Reality: The Big Disconnect
December 24, 2009 at 4:40 p.m.
Kaiser Kuo is one of those rare people who can live seamlessly in two worlds. Here, he tries to get Chinese and Americans--regular people, not just leaders--to see each other's perspective. Here's a good summation of the problem at hand, as seen in 2008:
If you were to take away the rednecks and the Red Guards from the equation, you are still left with two groups who are still fundamentally at odds with each other.
Watch.
(via Fons Tuinstra)
Good Reads on China and Reality
December 19, 2009 at 7:14 p.m.
James Fallows is right: The 44 percent of Americans who recently told Pew that China "is the world’s leading economic power" are (I'll be kinder than Fallows here) deluded.
But it's not an entirely unreasonable misconception, given the way China gets talked about on this side of the Pacific. China's economy is booming (though it, too, has suffered in the Great Recession). Its military is growing (even if it is far behind the US). It remains stubbornly Communist and undemocratic (though a far cry from totalitarian in many ways, and the central government is far less ...
Building a Better Ecosystem for Transparency
December 9, 2009 at 10:23 p.m.
Transparency is an ecosystem. Each part--government, journalists, activists--interact to create an environment where information flows, or doesn't. It's up to each part to ensure the continued growth of a healthy transparency ecosystem.
Happy Thanksgiving
November 26, 2009 at 9:11 a.m.
I have been neglecting this blog of late, so here's a quick list of things for which I am thankful. This year has treated me well, and I am grateful, first, to all the people who have helped make that happen.
My fiance is wonderful, and amazing, and I love her. What can I say? I lucked out here. I'm getting married next year and that makes me happy in ways I can't put into words. Thanks, Laura.
Mom, Dad, Katie, Nick, Mike. Getting married brings up all kinds of opportunities to gripe about the family. But ...
China's big day, the short version
October 4, 2009 at 6:50 p.m.
China's 60th Anniversary national day - timelapse and slow motion - 7D and 5DmkII from Dan Chung on Vimeo.
There's a lot to like in this video: the shots chosen, the editing, the way it swings between time lapse and slow motion punctuated with moments of real-time. It also assumes, if you're watching this video, you probably already know the back story. It's not news. It's an exceedingly well-done illustration that shows me in three and a half minutes what China's 60th National Day parade looked like, which is exactly what I wanted to see.
(Via ...
Lessons from Gov2.0, and How I liveblogged it
September 19, 2009 at 11:51 a.m.
For three days last week, I attended the Gov2.0 Expo Showcase and Gov2.0 Summit, liveblogging the entire thing here and cross posting to Twitter. Between Tuesday and Thursday, I posted nine entries and 550 updates. After the conference, I dumped the entries and updates into one document, amounting to 66 printed pages and 19,815 words, plus another page of notes from the event's press conference and two video interviews with Tim O'Reilly and Santa Cruz's Peter Koht.
This was, in effect, just my usual notes, except more thorough and done entirely in public. Doing ...
Gov2.0 Summit, Day 2: Afternoon session
September 10, 2009 at 2:13 p.m.
We're in the final stretch now. I'm coming late to the afternoon session following a press meetup with some of the conference organizers and key speakers. I'll have more to post on that talk soon, but for now, here's the last bit of Gov2.0 liveblogging.
Next page >>
