Really, It’s Worth It

This was originally posted on the Local Fourth blog as part of my participation in a community media innovation project at the Medill School of Journalism.

You’re in the middle of a big project with tight deadlines. Parts of your infrastructure are a little, well, jenky. Do you take the time to make things cleaner and more coherent, or do you focus on coding, hoping that your stack holds together until you have time to clean it up? Will a new tool pay off or is it just a distraction from perhaps more tedious, but more crucial work that needs to be done.

This was my situation early this week when I started looking at our deployment procedure when moving developing on our workstations to making our work public on our webhost. I was working on a bug where things that worked on our development machines weren’t working on the webhost. Instead of just setting up a new instance for testing on our webhost, I decided to invest the time in exploring a new-to-me tool called Fabric.

Fabric is a Python library and tool for scripting commands to be run on a remote server over SSH. You can store it in the root of your Django or other Python project and run tasks on the remote server. For instance, to build up a new staging instance on our webserver, I type ‘fab staging mkinstance’ on my shell.  In this example, staging and mkinstance are just tasks that you’ve defined as Python functions. staging is a task that sets context variables about this particular instance, such as the home directory where the other tasks will execute on the remote server. mkinstance just calls other tasks to create a new virtualenv, install required Python packages, download the most recent version of the source from git and more. I may go into the details of our Fabric configuration in the future, but, more importantly, I want to explain why I think exploring this tool to improve our deployment was a good way to spend my time early this week.

Avoid rm -rf . “Oh #$%!(*&!!”

I would say that even savvy system administrators who know better, who will lecture their junior admins about what not to do at great length, sometimes hop in a shell to run a quick command only to carelessly wreak disaster. I recently caught myself typing commands into shells on the wrong host. There had to be a better way. Fabric modules compel me to explicitly type the action that I intend to take and the instance I want to take it on. fab staging destroyeverything has a different resonance to ssh somehost.com && cd /home/ghing/webapps/ && rm -rf myproject.

A deployment reasoning tool

Automating your deployment process in a script helps you break down the deployment process. What are the steps that need to be taken? What order should they be run in? What are the dependencies between the steps? Writing these things out in code helps identify redundancies or potential problems in the process.

Code as documentation

An artist who taught game development to high school students told me that she introduced students to the idea of programming by having them work in pairs and take turns writing pseudocode to instruct their partner about how to move around in a space. I’d imagine one of the big takeaways is the difference between code and natural language. The latter can make for some beautiful journalism, but it can make describing a process convoluted. After I finished our Fabric module, I wondered how I would have written free form paragraphs to describe our deploy process, or explain them out loud. Even with few comments, its clear what’s happening in the deploy process. In around the same time it would take to write a step-by-step description of the process, I have one in code that can also do all the steps for me.

Further Reading

Refactoring fabfile.py for fast, robust Django deployment by Christopher Groskopf got me stoked about using Fabric, and it’s a good place to look for good practices for deploying Django in the cloud. It was, however, a little daunting as an entry point to the different tools.

Tools of the Modern Python Hacker: Virtualenv, Fabric and Pip does a good job of describing the connection between these tools and how they can be successfully used together for deployment.

Deploying Django with Fabric helped get me started in writing my Fabric file and understanding the conventions of the tool.  Some of the information on this page may be a little different with more recent versions of Fabric.

Deploying with Django’s Sites Framework on Webfaction (virtualenv, mod_wsgi, git) helped me figure out some of the non-Fabric stuff to make deployment consistent on our webhost.

A Heads-Up About Head-Down Coding

This was originally posted on the Local Fourth blog as part of my participation in a community media innovation project at the Medill School of Journalism.

I first became acquainted with the term hackathon in college. A computer science student group organized an all-night event in one of the computer labs and ordered in pizza and a seemingly limitless supply of caffeinated soda. I remember the event as fun, but I mostly worked on classwork. I didn’t yet have a backlog of personal hacking projects that could really benefit from hours of uninterrupted coding.

At the start of this project, Shane, Steve and I participated in a mobile hackathon sponsored by The Media Consortium. It was a fun way to familiarize ourselves with our chosen software tools, get used to coding as a team and anticipate some of the hurdles we’d encounter during the innovation project. Though I spend a lot of most days in front of the computer, there’s something pleasurable about having an entire day, or weekend, of frenetic, uninterrupted programming. This might sound like hell to a lot of people, but it’s fundamentally satisfying to building something from scratch and to be able to be fully immersed in a project, really feeling every aspect of the process and design.

Most of my coding time doesn’t feel this way. Within the innovation project, there are countless meetings, e-mail threads to read, documents to share. While there is a certain amount of coordination required between developers working on the same code base, the time overhead required to connect with other teams feels like it increases exponentially. While communicating about the project often feels like an interruption, finding uninterrupted time to program is even more difficult when I have to factor in childcare responsibilities.

On a typical Wednesday, I try to leave the workspace before 3:30 to pick the kids up from their after school program. Then we head home where I have to help with homework, cook dinner, do the dishes, go to the park if we have time and then remind them when it’s time for bed. It’s around 9 before I can even think clearly about code again. Thursdays, I leave even earlier to pick them up from school, drop Florence at home and drive Oona to the West Loop for her dance class (though this has made me really good at doing long division in my head while navigating traffic). If the traffic’s bad, I’m in the car for around two hours total. I sometimes try to squeeze in a little work while they’re doing homework, or reading after dinner, but it usually feels like a kind of attention purgatory where I’m neither able to focus on the infuriating bug that I’m trying to fix or the needs of the kids. On the days when I have to leave early, it feels like I never end my work day at a coherent stopping point, where I’ve at least discovered the cause of a bug and have a plan for a fix or where I’ve sketched out enough of the implementation of a feature where I can come back to it and everything will make sense.

I’ve lived with and helped take care of my friend’s twin daughters, now 10 years old, for a few years.  But, my responsibilities, and their impact on my time, really ramped up since we all moved to Chicago. I’m somewhere between a babysitter and a parental figure and this ambiguity mirrors the range of likely responses to talking about trying to work on a software project and share in childcare responsibilities. For a lot of my peers, who are childless, the response is “I can’t imagine what that’s like.” For older folks who are parents, it’s more like “duh, that’s how it is.” It’s a tough topic to talk about, made tougher because, from week to week, I either feel overwhelmed by all the juggling or like the responsibilities that I have are a cakewalk compared with those of a full-time single parent.

As a recent thread about parenting and start-ups on the excellent Geek Feminism Blog points out, its not a very productive conversation to generalize about how parenting or any other real-life experience affects technology projects and the people behind them. Still, the experience of someone struggling to balance the needs of a project and the needs of others is different than those who aren’t struggling with such ambivalence. I’ve read accounts of developers who are fathers feeling alienated when they leave at the end of the workday, just as their childless colleagues are ordering pizza for a late-night coding session. During this past year’s Ada Lovelace Day, a campaign to forefront women in technology, a blogger voiced criticism that some men used it as an opportunity to acknowledge how their female partners gave them time to work on technical projects rather than celebrating the direct technical contributions of women. In the context of childcare responsibilities, it’s easy to see how this underscores a trade-off between one person’s ability to participate in demanding technology projects and another’s. But I want to go beyond pointing out that there might be some disparities and prejudices around different people’s availability for technology work or projects. Instead, I try to question whether the amount of time someone spends hacking on a project, or in the office necessarily represents the only value of their labor.

I yearn for days where I can work, uninterrupted and on my own schedule, on a juicy programming problem. But I, and hacker culture in general, may also overly romanticize this kind of heads-down coding. Interruptions are frustrating, but they can also mean that our work and lives as programmers are grounded in the world and not just in code. Good software exists to meet needs, not for its own sake, and a life without significant demands outside of a software project can make it much more difficult for a developer to design software that is both elegant and useful. Furthermore, more code, or time coding, doesn’t necessarily mean better code. I’ve definitely spent hours of intense coding, only to find that I’ve hacked my way into a corner, leaving behind a series of commits more convoluted than when I started.

Now I just need to remember this when I’m stuck in traffic rushing to make that after-school pickup.

Paying It Forward

This was originally posted on the Local Fourth blog as part of my participation in a community media innovation project at the Medill School of Journalism.

I’m finding the word community increasingly confusing, especially when navigating the world of hyperlocal publishing.  When someone says community, do they mean community like the city of Evanston, or the city’s West Side neighborhood, or a block club or church. Or, do they mean the community of users of a particular site? When do these groups intersect, when are they too disparate?  The 2010 Knight News Challenge goes as far as defining a specific Community category for entries:

Community: Seeks groundbreaking technologies that support news and
information specifically within defined geographic areas. This is designed to
jump-start work on technologies and approaches that haven’t arrived yet.
Unlike the first three categories, sub-
missions in this area must be tested in a geographically designated community.

But, in a Sept. 20 post announcing the 2010 challenge, the poster wrote “I think of this as our io9 category,” referring to a Gawker Media-run science-fiction and popular culture site.  Perhaps the poster was referring to the future-focused voice of the site, but it also surfaces the possibility that people may increasingly identify with communities and person-to-person interactions that aren’t geographically bound.

In looking at strong, geographically disparate online communities, groups of people engaging around free/libre/opensource software, or FLOSS projects are one of the most compelling. While they can exhibit the same segregation or bickering of physical communities, they can also be a model for people coming together to build something that serves a clear need. The way in which many projects are firmly grounded in utility and the way in which similar projects seem to sustain themselves not by competing but by understanding how their project does a job that’s different than other software is a lesson that media organizations, particularly in the hyperlocal space, would do well to learn.

FLOSS projects also complicate traditional notions of sustainability. While many projects have found ways to sustain themselves financially, either through donations, sponsorship or by incredible use of volunteer time coding, documenting and providing help and training for the project, FLOSS projects tend to put utility ahead of commercial viability. Making technology that serves a need and remains relevant and responsive to changing needs and to feedback from users is as important to the sustainability of the project as the dollars and cents.

We make use of a lot of FLOSS for implementing the technological part of the innovation project. While there are lots of ways that we could give back for this technology that is so useful us as developers (Palintir, a Chicago-based web development shop that specializes in sites based on the Drupal content management system, for instance, contributes code that they use to develop new features for their clients back to the larger Drupal community), the tight time constraints of graduate school and a rapid project mean that dollars are the best way that I can give back to these projects.

Even though most of the tools that I use to make technology are available free of cost, paying something for them helps me think of how I value the tools for this project. I’ve decided to donate the amount of money that I spend each week on a common indulgence during this project, going out for lunch with other team members, to some of the FLOSS tools that I’ve used the most in the last few weeks.

Python – most of the code in this project is written in this language. It’s flexible, easy to learn, has a large number of useful contributed libraries and is very readable making it easy to understand someone else’s code. Donate to the Python Software Foundation.

jQuery – If the back end of the project is written in Python, the front end is highly dependent on the jQuery javascript framework. JQuery makes it easier to implement some of the rich user interactions that people have come to expect on the web. Donate to the jQuery project.

Django – Django is a Python web framework that has its roots in the newsroom. . The first time I used the framework, I was amazed at how it streamlined the most tedious aspects of web development. When I’m curious about how to do something in the framework, I often discover that there’s an elegant approach provided in the framework along with clear documentation. Donate to the Django Software Foundation.

Vim – I was compelled to learn to use this editor when I started at my first tech job at a regional Internet service provider. The network administrator said that it was important to learn vi (Vim, an enhanced version of the classic UNIX editor, stands for vi improved) because you could be assured that it would be available on any UNIX system that you found yourself poking around. While the navigation of the program, which is keystroke heavy, seemed unintuitive at first, once I got used to it, the lightweight but highly customizable and extensible editor felt like it was designed just for me. Rather than asking for donations to sustain the project, Vim’s lead developer solicits donations for a charity that supports children in Uganda.

Firebug – I don’t know how I wrote programs for the web before Firebug. This Firefox extension helps me understand and tweak the HTML and CSS of a design and also see what is going on behind the scenes with Javascript errors and AJAX requests. Donate to the Firebug project.

Free, Link Economies and Moving From Politics to Emotion

This was originally posted on the Local Fourth blog as part of my participation in a community media innovation project at the Medill School of Journalism.

One aspect of spending so much time working on this project in Evanston is eating at a lot of Evanston restaurants. Today, the project coders went to Bat 17, which has become one of my favorite places for lunch in Evanston. Just after lunch, we had some tough conversations about how a site built on the platform we’re developing might be sustainable and why, if we’re able to drive content to local publishers sites, we don’t charge them for that privilege. One example of how another local business (one big takeaway from the Block by Block conference was that online local news sites need to convey that they’re small local businesses too) leveraged free stuff to get more business was right there, digesting away in my stomach.

Bat 17 has free coffee, not just for people stopping to eat, but for anyone who wants to stop in. Their reasoning is that people may come for the free coffee and decide to stay for lunch, or appreciating the service, come by after work or class for a few drinks. I don’t have the numbers, but it seems like a smart move because the restaurant has been full the couple of times that I’ve been there. The restaurant also makes a big deal about sourcing ingredients from other local businesses like Bennison’s Bakery.  Rather than competing in the Evanston food space, the two businesses have  a relationship that is mutually beneficial. Sourcing from Bennison’s gives Bat 17 local credibility (according to the Bat 17 website, Bennison’s has been around since the 1930s) and also drives business to Bennison’s. If local news organizations want to compete with the emerging Paneras of local news, they need to find platforms for mutual benefit in the same way that Bennison’s and Bat 17 have used sandwiches. I want to think that we’re imagining such a platform.

Another good analogy for the link economy is this YouTube video. It illustrates that part of what builds a business’ reputation isn’t just what it sells – it’s also its knowledge of who can best provide the goods or services it can’t offer.

A few weeks ago, Terri Gross interviewed John Stewart, host of “The Daily Show” on her show “Fresh Air.” Though the title of the show was “Jon Stewart: The Most Trusted Name In Fake News,” Stewart had some insightful things to say about real news:

GROSS: Did doing the show make you more political than you ever expected to be – more politically aware, more politically engaged?

Mr. STEWART: I think it made me less political and more emotional. The closer you spend time with the political and the media process, the less political you become, and the more viscerally upset you become at corruption. So its – I dont consider it political because political – I always sort of denote as a partisan endeavor.

GROSS: Mm-hmm.

Mr. STEWART: But we have – I have become increasingly unnerved by just the depth of corruption that exists at many different levels. I’m less upset about politicians than the media. I feel like politicians, there is a certain, inherent – you know, the way I always explain it is, when you go to the zoo and a monkey throws its feces, its a monkey.

Mr. STEWART: But, when the zookeeper is standing right there, and he doesn’t say bad monkey…

Mr. STEWART: Somebody’s got to be the zookeeper. And that’s – so I tend to feel much more strongly about the abdication of responsibility by the media than by political advocates.

I found Stewart’s juxtaposition of politics and emotion particularly intriguing and it made me think of some of the comments I had read while exploring the online news ecosystem in Evanston. Many comments expressed anger, frustration or fear about things that were happening in the city, but many also seemed designed to overwhelm opposing viewpoints. People were voicing their concerns or trying to raise their pressing questions, but these perspectives where often overshadowed by the conflict, sometimes with the commentors losing their own valuable insight amidst a rant. People respond emotionally to the things that happen in their life. I think part of the media’s job should be to validate that emotional experience, but it needs to take care to not exploit it.  In his book “What is Happening to News: The Information Explosion and the Crisis in Journalism,” Jack Fuller even suggests that emotionally honest reporting becomes more important in an age of media overload and responding to increasingly emotional media stimuli.

The point of our platform, which drives rich context for local news through questions, concerns, answers and responses all tied to discovery from local media, isn’t to de-emotionalize people’s responses to the news in their community. Instead, by forefronting brief questions and concerns that distill responses to their most direct form, I hope the platform can validate people’s perspectives while offering a path to discovery of new information.

Community Development: The Challenge of Building Integrated Teams for Local News Innovation

This was originally posted on the Local Fourth blog as part of my participation in a community media innovation project at the Medill School of Journalism.

I’m really excited that our project is working in the domain of local online-first news. Recent discussions at the Block by Block conference and analysis of best practices from recipients of the Knight Foundation-funded New Voices grants show that local news is a vibrant space for people trying to both innovate and meet the needs of their communities. But some of my interest is personal – local is what made me interested in journalism.

Prior to starting at Medill, I had been involved in a community project that engaged around prisons and literacy and was closely following debates around a proposed expansion of the county jail in Bloomington, Ind. Going to heated community meetings and also noticing apathy in other parts of the community made me recognize that information gaps and how issues are framed within a community can mediate who participates in community decision making and how they participate. Moving to Chicago with two school-aged roommates made me realize how, despite lots of news coverage of Chicago Public Schools, understanding how the system worked and how to navigate it was no easy task. At some point, the need for local news and information comes colliding into one’s life.

I’m also excited because this innovation project will have the unprecedented opportunity of working with four other classmates with a software development background. Though we’ve been immersing ourselves in reporting, audience insight, media business models and other parts of the Medill curriculum, we’ve also been anticipating the opportunity to do some coding. This gives our team a unique potential to build a working prototype or even a deliverable product rather than mock-ups. However, matching this capacity for innovation with the strengths of other parts of our team and matching our entire team’s abilities with the information needs of Chicago-area communities is not a simple task. We’re in the third week of working together as a team and while I started the week interviewing Evanston residents and looking at spreadsheets of interview responses collected by our entire team, my attention quickly jumped to imagining ideas for new online information platforms.

Our team is broken out into sub-teams including ones exploring audience insight, industry practices and needs, revenue opportunities, local business needs and technology development. Though its clear from hearing stories from online local news practitioners that attention to audience, revenue and technology are all crucial, even in our team, its hard to see how you connect the dots. We start our days with meetings and use shared Google docs to keep everyone on the same page with research findings, but as we move from research to implementation I think it will be one of our greatest challenges to make sure that each sub-teams focus is an important consideration for the others. The best idea I’ve heard so far was for team leaders to encourage different mixes of team members to have lunch together to create a less formal exchange of ideas and priorities.

Equally challenging is keeping community needs in mind when trying to code something new and cool.  Not every information important information need wants new technology. As Gary Wolf wrote in a Wired article about Craiglist, “In a design straight from the earliest days of the Web, miscellaneous posts compete for attention on page after page of blue links, undifferentiated by tags or ratings or even usernames.” Still, Wolf pointed out the site dominates in terms of traffic for people seeking dates, jobs and apartments. One account from our research described an Evanston neighborhood’s popular online news source as a mailing list, started when one neighbor went door-to-door encouraging neighbors to sign on. Many others were happy with getting information about their community from word of mouth.

When I interviewed EveryBlock creator Adrian Holovaty for a class assignment over the summer he said one of the “juicy” technical problems he was pondering was more social than technical: how to get a critical mass of people in a neighborhood to engage around EveryBlock. Even for a media organization that’s acknowledged as new and cool and innovating around technical problems, audience still remains a challenging problem space.

Negotiating these different priorities isn’t easy, and its likely to be sometimes frustrating. But this is also what makes news and information such an exciting space for a developer. Throughout the brief development cycle, I’ll be blogging not only about the coding problems we’ll be facing, but also the context of the code – both in terms of the team and the community.