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

  • 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

  • Bringing Historical Data to Census Reporter

    A Visualization and Research Review

    An Introduction Since Census Reporter’s launch in 2014, one of our most requested features has been the option to see historic census data. Journalists of all backgrounds have asked for a simplified way to get the long-term values they need from Census Reporter, whether it’s through our data section or directly from individual profile pages. Over the past few months I’ve been working to make that a reality. With invaluable feedback from many of you,......

    Continue Reading

  • How We Brought A Chatbot To Life

    Best Practice Guide

    A chatbot creates a unique user experience with many benefits. It gives the audience an opportunity to ask questions and get to know more about your organization. It allows you to collect valuable information from the audience. It can increase interaction time on your site. Bot prototype In the spring of 2017, our Knight Lab team examined the conversational user interface of Public Good Software’s chatbot, which is a chat-widget embedded within media partner sites.......

    Continue Reading

  • Stitching 360° Video

    For the time-being, footage filmed on most 360° cameras cannot be directly edited and uploaded for viewing immediately after capture. Different cameras have different methods of outputting footage, but usually each camera lens corresponds to a separate video file. These video files must be combined using “video stitching” software on a computer or phone before the video becomes one connected, viewable video. Garmin and other companies have recently demonstrated interest in creating cameras that stitch......

    Continue Reading

  • Publishing your 360° content

    Publishing can be confusing for aspiring 360° video storytellers. The lack of public information on platform viewership makes it nearly impossible to know where you can best reach your intended viewers, or even how much time and effort to devote to the creation of VR content. Numbers are hard to come by, but were more available in the beginning of 2016. At the time, most viewers encountered 360° video on Facebook. In February 2016, Facebook......

    Continue Reading

Storytelling Tools

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

View More