From code noob to code ninja — take the plunge

By on March 14, 2013

Here, I’ll say it: It is possible for a journalist with zero background in code to become a coder.

When you look at a page of code with no understanding of what the characters on the screen stand for, you may go through the following stages: intimidation, frustration, surrender. Programming languages are foreign, as is your understanding of the syntax, the definition of words and concepts used, and how to put it all together into something meaningful. It’s like learning a spoken language.

But fear not, my fellow coding noobs! You can overcome that initial hurdle, that sinking sensation that develops when faced with so much uncertainty, and it’s more painless than you think.

Over the past two years, I’ve taught myself HTML5, CSS, JavaScript and, for my current conquest, Python. I’ve picked up a few lessons in the process of learning these languages that I believe will be useful to journalists who want to develop some basic coding chops, but might feel too overwhelmed to take the first step.

Find Reasons to Keep Learning

As with so many things, the best way I’ve found to learn a programming language is to keep using it. Yes, I’m suggesting you dive into a language and start using it before you know how to write in it. This isn’t as crazy as it sounds. It’s all about learning how to hack.

The key concept here is reverse engineering. Find a published project you really like in a language you want to learn or a tutorial found online. Go into it wanting to learn something small, like “how do I make an element disappear when I click on a button.” Use a modern browser like Chrome and Firefox (I like Chrome better) to inspect the underlying code for any given webpage. This part is key: inspectors are your best friend. Grab that source code and slap it into your favorite text editor (you can Google this for suggestions on options). Then start tinkering with it. Start understanding how all the parts work by trying to break it. Once you discover what piece of the code is doing what you want, try it out with your own project.

Do this enough times, and eventually you will start to understand how the language works on your own. But it doesn’t hurt to do some active training as well.

Hit the Books … Or Web

Grab a book or use a website to begin learning the basics of the language, especially the syntax. Doing this in conjunction with hacking examples as described above will start reinforcing the key concepts behind the programming language. You need both the academic and the practical to learn.

Depending on how you learn, there are several options to achieving the “academic” piece. Every major city will likely have a group of hackers that meet on a regular basis. These groups can consist of journalist hackers, hardcore programmers, or noobs who work together for a common purpose. It’s a braintrust worth tapping. Hacks/Hackers is a great example of an organization geared toward journalists who want to develop their technical skills. Also, hackathons are great places to network and learn more about programming.

Online, there are many actives communities willing to help, especially if you have a specific problem. Investigative Reporters and Editors hosts a listserv called NICAR-L where journalists are actively talking computer-assisted reporting. Advice websites like Stack Overflow and Quora also host communities that quickly respond to inquires and house tons of info. Oh, and W3C Schools, if you want the bare basics.

Don’t Give Up

Expect to hit walls. You won’t always get something to work and you’ll get really frustrated about it. Prepare for the initial hump to be a big one. But remember this: It gets better. With every project you tinker with, every project you code, every eureka! moment where you finally understand how a component of the language works, you’ll be one step closer to being a code ninja. Just keep practicing!

This is the latest in a series of blog posts from the first ONA class of AP-Google Journalism and Technology Scholars describing their experiences, projects and sharing their knowledge with the ONA community.

John Osborn is a graduate student at University of California, Berkeley, working on newsgames that explain the U.S. political system.

John Osborn

John Osborn

John graduated from Humboldt State University with a degree in Journalism. While there, his leadership as Editor-in-Chief helped earn its college publication — The Lumberjack — a California College Media Association award for Best Back-to-School issue and third place in General Excellence in 2007.