Seven coding lessons learned building "Your CPS"

I have been a journalist and journalism student for a decade. When I started my first professional job, in 2007, the dream of every young reporter was to have a scoop stamped on the front page of the paper the next morning. At that time, of course, we didn't have the Internet on our phones and social media was 100 percent something called Orkut — at least in Brazil, where I am from.

For years I worked reporting, writing, and editing my texts and my co-workers' in a Brazilian newspaper. Eventually I had the opportunity to start a new website and finally realized that the world was rapidly changing and, oh yes, the news industry was really behind.

So one year ago I packed up and landed in Chicago to learn more about innovations in journalism. During my masters in Media, Strategy and Leadership at Northwestern University, I tried to improve my digital and managerial skills, I wrote my first lines of code, had access to different digital storytelling techniques, read a lot about entrepreneurship, and studied new business models for the industry. I graduated in June, but one question kept me anxious: Am I prepared to be a productive journalist in the 21st century media?

It was then that I met Joe Germuska, Knight Lab's chief nerd. Joe was interested in dynamic articles that are customized for the person reading it. The Upshot had just published a story in which it detected the reader's location in the U.S. and auto-generated texts and graphs accordingly, giving specific information about the best and worst places to grow up in the country. Joe wanted to explore the idea. Perhaps we could learn more about personalized news and how to build new stories based on large datasets. Perhaps we could create a tool to help journalists. Perhaps we could do both, perhaps even something entirely different — whatever it was we'd have to do it in 10 weeks.

I accepted the challenge and soon met Lingwei Cheng, a data scientist and University of Chicago graduate student who would be my partner over the summer. She would be responsible for the technology part of our project, I would be responsible for reporting — and, if I was lucky and proactive enough, I would learn more about programming. The nerdiest part of me was exultant.

We eventually settled on working with the Chicago Public School budget for a few reasons: 1) The city was then discussing how to overcome its most serious economic crisis ever, 2) datasets were available (at least kind of available) and structured (at least kind of structured) and 3) Lingwei and I were both interested in education.

The project, Your CPS, has been a huge challenge, but over the past ten weeks I've gone from:




If, like me, you are a journalist with humanities background and minimal exposure to HTML, CSS, and the programming world, here are some takeaways of my experience.

Don't worry if you don't understand a word

When you start a technology project, you might hear expressions like "Push your changes to Git" or "Do it on your Python server." Proficient people say it without even realizing that it sounds like Aramaic to someone new in the field. But here is one of the best things about the programming universe: it is always OK to ask.

Your lack of experience is not something to be ashamed of. People take different paths and end in technology for different reasons. Even the most talented programmer might be a beginner in some language others consider basic. The environment is open to sharing and collaboration, which may seem a bit strange for people used to the competitiveness of traditional newsrooms. Very soon you will realize, for instance, that forking (basically copying code and using it to build your own project) someone else's code is a very common and welcome practice.

There's always help online

I was lucky to have experienced coders around who I could ask questions (thanks Joe, Heather and Lingwei!), but I know it was a luxury. More often, journalists are left to learn technology by themselves. If this is you, don't despair. Each programming language has its own peculiarities and the community that uses it is probably actively sharing problems and solutions, generating free how-tos and guides, and answering each other's questions. There are endless websites, forums, educational platforms out there.

For me, Codecademy was a helpful refresh some basic concepts. Since I was working mostly with CSS, HTML and JavaScript, I consulted W3SchoolsCSS Tricks, Stack Overflow, and Interactive Data Visualization for the Web several times per day.

Programming will change the way you think, and that's a good thing

You will start to organize your thoughts differently — and believe me, it will help your routine. For people new to technology, like most journalists, this is a truth that might be hard to deal with: in technology projects, you always have to close brackets, metaphorically and literally.

The metaphoric perspective has to do with the way we are formed as professionals and also with the nature of our jobs (if you are a Latin American, like I am, this tends to be even more true). We are always invited to open-ended discussions, when we frequently open round brackets, and frequently neglect to close them.

Our jobs reinforce it. When you call a source and she doesn't answer immediately, what do you do next? You will probably use your waiting time to start researching and reporting your next story. Our workflows are full of on-going pieces that are not necessarily connected to each other.

However, when you are programming, you must have a general goal and break it into smaller pieces. Each task must be initiated and finished in a certain order and it's easier if you put things into categories. If you have a chaotic creative process like me you run the risk of breaking your code constantly.

Your day will be full of the joy of small victories

Creating a list of small tasks has also another direct benefit: Every challenge overcome will be a clear small victory.

Let's say you want to create a navigation bar in your website. You will first look for some visual references that match with your project. You will probably find some parts of HTML written by someone else that you will want to use. When you put all the pieces together and it works the way you wanted to, you will experience what I call "the joy of a small victory." After that, you will style the nav bar with CSS. Applying color, choosing the font, and positioning it the way you want will each be a small victory — actually, in my case, I considered every working positioning a FIFA World Cup victory.final_da_copa_do_mundo_2002

There is no right or wrong answer

Programming is almost a strategy game. You have one final goal, but endless ways of getting there. For example, if you want to center a certain headline, you may add margin or padding, you might change the display type of the element and get very similar results. Some will be more adequate than others, depending on your project.

Because there is no right or wrong, even the most experienced professionals will not be 100 percent sure about the best approach for all the problems. More often than not they will be experimenting with some possibilities. Heather Batagglia, who helped me a lot with HTML and CSS, would always say: "Let's try it and we will see what breaks." The first time she said it, I doubted that she really didn’t know the result we were about to get. She then told me: "That's my life is all about: finding where it breaks."

Sometimes we only identify an error when our projects are up and running and people are actually using it. For us journalists, this is difficult to accept because we don't usually publish a work in progress. What we publish must be absent of errors because a mistake or a misused information can cause lots of pain. When we are working with technology, though, the development is constant and we have to improve the product on the go.

Technology can dazzle, but don't lose sight of the story

The natural tension between design, programing, and traditional journalism may create some internal conflict. At least I had some. As I learned new skills, I wanted to show them off. For instance, Lingwei and I were experimenting with data visualizations and the dataset we had allowed for infinite possibilities. Some graphs could be quite impressive in a technological standpoint, but we had to keep our audience in mind.

Sometimes we decided to go ahead with fancy technology, other times we opted for simplicity. We're still not 100 percent sure if we made the right calls. In all situations, however, we tried to keep our journalistic judgment untouched. Some of the questions we always had in mind were:

  • What point do we want to make?
  • Is this content meaningful?
  • Am using this technology because it is the best way to present this information?
  • Is my grandmother going to understand this?

New skills are new power.

Ten weeks after I first entered the Knight Lab as a fellow, I feel much more confident in my digital skills. I have now some experience with data journalism, programming, and design under my belt.

However, I am still thinking about the question I asked myself when I graduated: "Am I prepared to be a productive journalist in the 21st century media?."

Today I would still answer "Not yet." Now that I have a real sense of what is out there, I have no doubt that I will never be allowed to stop learning to become the type of journalist I want to be. And, to me, this is an amazing perspective.

I was introduced to a set of new skills that will take me a long time to master, but I am already able to use them for my benefit. Now I am aware that I can do an array of things that were unreachable a year ago. If I am not prepared to do everything by myself, I know where to find help and learn.

Therefore, considering what I still can do and learn, more than anything else, this summer gave me power. I hope to use it wisely.

Latest Posts

  • Prototyping Augmented Reality

    Something that really frustrates me is that, while I’m excited about the potential AR has for storytelling, I don’t feel like I have really great AR experiences that I can point people to. We know that AR is great for taking a selfie with a Pikachu and it’s pretty good at measuring spaces (as long as your room is really well lit and your phone is fully charged) but beyond that, we’re really still figuring...

    Continue Reading

  • Capturing the Soundfield: Recording Ambisonics for VR

    When building experiences in virtual reality we’re confronted with the challenge of mimicking how sounds hit us in the real world from all directions. One useful tool for us to attempt this mimicry is called a soundfield microphone. We tested one of these microphones to explore how audio plays into building immersive experiences for virtual reality. Approaching ambisonics with the soundfield microphone has become popular in development for VR particularly for 360 videos. With it,...

    Continue Reading

  • How to translate live-spoken human words into computer “truth”

    Our Knight Lab team spent three months in Winter 2018 exploring how to combine various technologies to capture, interpret, and fact check live broadcasts from television news stations, using Amazon’s Alexa personal assistant device as a low-friction way to initiate the process. The ultimate goal was to build an Alexa skill that could be its own form of live, automated fact-checking: cross-referencing a statement from a politician or otherwise newsworthy figure against previously fact-checked statements......

    Continue Reading

  • Northwestern is hiring a CS + Journalism professor

    Work with us at the intersection of media, technology and design.

    Are you interested in working with journalism and computer science students to build innovative media tools, products and apps? Would you like to teach the next generation of media innovators? Do you have a track record building technologies for journalists, publishers, storytellers or media consumers? Northwestern University is recruiting for an assistant or associate professor for computer science AND journalism, who will share an appointment in the Medill School of Journalism and the McCormick School...

    Continue Reading

  • Introducing StorylineJS

    Today we're excited to release a new tool for storytellers.

    StorylineJS makes it easy to tell the story behind a dataset, without the need for programming or data visualization expertise. Just upload your data to Google Sheets, add two columns, and fill in the story on the rows you want to highlight. Set a few configuration options and you have an annotated chart, ready to embed on your website. (And did we mention, it looks great on phones?) As with all of our tools, simplicity...

    Continue Reading

  • Join us in October: NU hosts the Computation + Journalism 2017 symposium

    An exciting lineup of researchers, technologists and journalists will convene in October for Computation + Journalism Symposium 2017 at Northwestern University. Register now and book your hotel rooms for the event, which will take place on Friday, Oct. 13, and Saturday, Oct. 14 in Evanston, IL. Hotel room blocks near campus are filling up fast! Speakers will include: Ashwin Ram, who heads research and development for Amazon’s Alexa artificial intelligence (AI) agent, which powers the...

    Continue Reading

Storytelling Tools

We build easy-to-use tools that can help you tell better stories.

View More