Head of Storytelling, NZZ

How I Learnt to Code in One Year

January 2, 2013 (updated on October 8, 2016)


Auf Deutsch lesen

The year is over and the progress bar of my #CodeYear is at 100%. On a scale for journalists, I can now code. On a scale for programmers, I can, well, nothing. This big picture view is important, but not discouraging. On the contrary.

When I started my quest, my goal was not to apply for an engineering job at Facebook. I wanted to broaden my horizon as a journalist, unlock new possibilities and simply learn something new. That’s why I will state confidently: It was worth the effort. Learning how to code is rewarding, I recommend doing it. At the same time, my answer to whether journalists should be able to code has become more nuanced. More on that later.

This article aims to document how my CodeYear went, to highlight difficulties and to record key learnings – hoping to encourage fellow journalists to give it a try themselves.

The Quest

On August 8 2011 I publicly announced that I will learn to code. What I had on my track record: decent skills in HTML and CSS and a knack for maths and logic (if none of this is true for you, nevermind, these skills didn’t prove prerequisite). I had two main problems.

  1. What’s the best way (for me) to get going?
  2. What’s my goal, anyway?

The web does not offer too few options for beginners, but too many. I read through some tutorials, bought a copy of «Java Script: The Definitive Guide» and completed a few dozen video tutorials at Treehouse. None of which really did the trick for me. The book was too abstract for the bloody beginner I was. In the Treehouse courses, I got the feeling I can easily pass them without thoroughly understanding the matter. Most importantly, though: I still did not have a well-defined goal that would pull me forward.

The solution to both my problems came when, at the end of 2011, online learning platform Codecademy launched #CodeYear. It provided me with a goal (not an explicit one, but I could trust on someone else to define it for me), a structured curriculum (weekly courses) and the hope not to be alone in this (yes, I’m looking at all you fellow journalists who tweeted you’re all in for CodeYear).

Learning 1: Set a goal and talk about it. You’ll need the pressure.

Kicking Off #CodeYear

Learning how to code is similiar to learning a new language in many ways (which is hardly surprising, since JavaScript, Python et al are essentially languages for communicating with computers). Getting started feels great: You’ve only just begun and you can already say «Hi» console.log(“Hello World!”), count to three 0,1,2 and pour a pint of beer beer.full = true;

Codecademy makes it easy and fun to get started. You read short instructions and get coding right away in the editor. You are guided into this new world step by step, while you already feel like you’re right in the middle of it (because you don’t read or watch video tutorials, but write actual code right from the beginning).

Each course consists of three to six lessons, each of which again is subdivided into four to eight coding exercises. The steps are small enough for you not to feel overwhelmed, yet at the end of each week’s course you have coded something decent that feels like progress (the virtual badges that you earn as you go along do their bit, too). Especially if you have a daily job, you’ll appreciate the small steps, as they allow you to stop and take up again almost any time.

Learning 2: I recommend Codecademy as a learning platform. CodeYear 2013 has just started. No better time to start than now.

And Then It’s a Pain

You can see from the list of my badges: I gave up at the end of January. One reason was that it takes a lot of discipline to carve out two or three hours every week to sit at the computer and fill lines with cryptic language (especially if you work full time).

But the main reason for my surrendering was a different one. Learning how to code differs from learning a foreign language in one crucial aspect: Computers are bloody inflexible and merciless. Close a }-bracket at the wrong place, forget one single semicolon and communication fails.

The weeks after my initial euphoria turned out to be a nasty endurance probe. It feels like you make hardly any progress and it freaks you out when almost perfectly written code simply fails. Like ordering a full three course menu at the restaurant and not getting anything just because you pronounced the name of the wine slightly wrong (come to think of it, a short visit to France might be a good way to toughen yourself before starting #CodeYear).

Learning 3: Once the euphoria is over, it gets really tough. But fun will be back.

The Second Coming

It took me until July to get back on track. I would not have waited that long had a known how things went from there. It wasn’t hard to get back in at all, even more to my surprise, things got better very quickly. Looking back, I still recommend a few weeks’ break. It lets sink in the basic principles of variables, parameters, functions and – yes – brackets and semicolons. Plus: It lets you restore your frustration tolerance.

When I took up coding again, I realised that I not only remembered a lot of what I had learnt at the beginning of the year, but actually saw things a lot clearer. As if something had clicked. That made progress in the following weeks fast and easy.

Learning 4: Allow yourself a few weeks’ break after failing for the first time.


It was little more that an ironic statement when I opened a Github-Account in July (it’s basically a social network and collaboration platform for programmers). Even today, it says «Journalist. Programming Toddler.» in my bio at Github.

What I expected to get out of Github: to get a feeling of the community that makes (and occasionally breaks) our whole digital world, the people who zealously work on tools we journalists can use (see my collection on Quora).

However, I had no idea that I would be able to massively benefit from Github and its community a few months later.

Learning 5: Get an account at Github. Be it only as an ironic statement first.

My First Project

On October 7, the instructions for the weekly challenge at Codecademy simply said: «Use what you have learned so far to build something useful or fun». Up to this point, there was close guidance, you were told what steps to take to get to the final product. Not now: just an empty editor.

There it was again: the challenge to find your own goals. This time, however, no problem. I had gained a pretty good understanding of what programming is and what’s possible (for me). So my first tool came into existence, a simple word counter (try entering just a few words and see what happens).

The first project is a reward. And a caesura. It takes more discipline afterwards to stick to the course track. It ignites the motivation to tackle more, bigger projects – bearing the danger of overreaching ourself. I did both: I dutifully continued with the courses and came up with projects that were not in my league.

Learning 6: Tackle your first personal project as soon as you feel comfortable enough to apply some creativity.

A Mentor IRL

I remember a number of moments during the year when I was very glad to have someone to explain things to me face-to-face, whom I could ask stupid questions. I was fortunate that Hannes Gassert got interested in my efforts early on and willingly helped me whenever necessary. It was he who set up the local server on my Mac, who explained to me how Commits and Pull Requests work on Github, who gave feedback on the code for my wordcounter.

Learning 7: Find an experienced programmer you can ask for help when you’re stuck.

More Projects and the Crucial New Dimension

I mentioned overreaching. The project with which I (deliberately) did so, was Famous First Tweets. A simple form to find any user’s first tweet. Tools like this, of course, exist already. I did it to practice working with forms and getting to know APIs.

Looking back, this was the project that made me realise that me and coding are really getting somewhere. A lot of what’s needed for successful coding came together:

  • I was able to break down the project into single steps and identify the functions I needed for them.
  • I was able to sketch the functions
  • I was able to upload the project to a Github repository to enable collaboration
  • I knew the right keywords to search for code elements on the web
  • I understood the code elements well enough to embed them to my project

It’s thanks to these factors that the tool «Famous First Tweets» now really works (and thanks to a British programmer, Matt West, whom I didn’t know before, who contributed code elements via Github that were yet too complicated for me).

I’ve coded a number of projects since then, most importantly Instacurate, the final project of my CodeYear, so to speak. All projects are linked to on labs.davidbauer.ch. All of those projects relied on the factors mentioned above.

Learning 8: And then it all comes together. From there, the sky’s the limit (okay, let’s say something sky-ish).

What I Would Do Differently

Looking back, everything has worked out fine for me. I’m actually astonished how far I got. So little regrets, but three things I would have done differently had I known what I know now.

  • Make the first steps with Python instead of JavaScript. Pythons syntax is more intuitive.
  • No five-months-break and tackle self-imposed projects earlier.
  • Worry less about the fact that most exercises have no obvious relation to journalism.
Learning 9: Don’t fixate on the journalistic value. It will get obvious soon enough.

So Then, Should Journalists Be Able To Code?

The answer is no. However, not a No meaning that coding is not something journalists should do. Just like not all journalists need to be great at writing longreads, just like not all need to have a voice apt for radio, just like not all journalists need to be good photographers, not every journalist needs to know how to code.

Journalism is a broad field and journalists distinguish themselves in their very own set of skills. Coding skills will play an increasingly important part in this mix. And, at least for now, if you know how to code, you have a skill that distinguishes you from almost all other journalists.

My own perspective on the matter has changed a bit due to the fact that my role has changed from being mainly journalist to mainly working on concepts and strategies to make journalism shine in the digital context. One thing has become evident: (Plat)form and content can no longer be considered separately, good stories do not just fit into an existing system, but explore the possibilites of technology.

You’re at an advantage if you know how to code. It’s really not about journalists spending their time coding. When things get serious, you’ll need an experienced programmer anyway. But when you understand their language, you unlock a whole new dimension of creativity. You have an idea of what’s theoretically possible and the vocabulary to speak to programmers about it. And yes, of course, you’re able to code smalls tools all by yourself. Not all newsrooms have their own programmers and not all programmers are always available to you.

Learning 10: Being able to code is a USP for journalists and allows you to think beyond existing formats.

How far I got

This is what I built at the end of my Codeyear: Instacurate – turn your Twitter timeline into a personalised news site, in an instant.

The Tools I Use

Recommended Reading

These are great times for journalism. This is how I work:


I grew up as a journalist of words. It remains one of my favourite means to tell stories. Chosen wisely, put in the correct order and structured well, words are as powerful as ever.


When we build applications, when we report and present stories in novel ways, code is what drives them. Speak the language of computers, make them work for you.

LabsHow I Learnt to Code


Call it data journalism, if you will. Numbers and data in general are a wonderful raw material to work with. I dig for stories and tell them in visually compelling ways.

Weekly Filet

The Weekly Filet is a compilation of the best pieces found on the web. Intriguing articles, stunning photographs, telling visualisations, excellent songs, smart videos. 5 recommended links, every Friday, free home-delivery.

Weeklyfilet.comWeekly Filet on Flipboard


Turn your Twitter timeline into a personalised news site, in an instant.

Try it nowInstacurate for Reddit

Dystopia Tracker

Explore predictions about the future and their realisations.

Open Dystopia Tracker

I write about technology and its effects on humans, markets and society.

My book, KurzbefehlReferat buchen


My work has appeared in The Guardian, Quartz, Spiegel Online, Das Magazin, Tages-Anzeiger, SonntagsZeitung, TagesWoche, among others.

Showcase | Show all

Get in touch


Find me on the web

Where to meet me in person

Usually Zürich
Regularly Basel