Habits of highly successful web developers (journalism edition)

My pal Brian Boyer wrote an excellent synopsis of his NICAR 2010 talk recently. It’s well worth a read even if you aren’t writing web applications in your newsroom.

For folks who write software for a living, there’s nothing here you probably don’t already know. But for those of us new to this whole development thing, his advice is indispensable — especially coming from the very different culture of a newsroom.

I’ll admit, I used to be skeptical. When I formed the Interactive News team at the Times a little more than two years ago, this stuff — testing, source code control, staging environments — seemed like an awful lot of useless overhead.

Hey, if it works on my laptop, surely it will work in production. Why bother with a staging deploy? Source control is a great way to store code, but why bother with all the pain of branching, merging and all that?

What it really boils down to is a difference in approach. As a journalist, the destination is pretty much what matters. How you get the story is less important than the route you take to get there. "Any landing you walk away from…" and all that.

Testing in particular seemed like a ridiculous waste of time. Why write all that code to test something that obviously works?

Needless to say, I’ve come around — even on testing. The first time you catch a massive bug in your code because a test starts failing, you’ll be sold too. On my team, a solid test suite is a must — especially if the application is likely to live on nytimes.com for a while. It has saved us (and me) from embarrassing errors too many times to count.

What it really boils down to is a difference in approach. As a journalist, the destination is pretty much what matters. How you get the story is less important than the route you take to get there. “Any landing you walk away from…” and all that.

As a developer, the route is as important as the destination, largely because of scale. Print scales infinitely. It doesn’t matter what Rube Goldberg contraption you build to get the answers you need. The answers are what’s important.

As a developer, you learn very quickly that everything matters. Scaling is a logarithmic problem, not a linear one. Code that works fine for X users can explode spectacularly for X + X users. (I’m still trying to live down the nightmare that was March Madness 2009, trust me on this.) Worse, one application that’s thrashing can have a cascade effect, and take down everything on that server or slow your shared database server down to a crawl.

The other quirky thing about news applications is the traffic patterns tend to be spiky. Something on the homepage of nytimes.com be exposed to millions of eyeballs, and before you know it your little app will be racing to keep up.

And so, while good habits aren’t a guarantee, they do tend to force you to solve problems before they become problems. Good habits lead to solid code.

So, yes, there is a lot to learn, especially for journalists who have not spent their careers working in software shops. The code is just the start. But trust me, it’s worth it.