About this book
When I started doing interactive journalism at Congressional Quarterly in 2009, it was an exciting time. Smartphones had started to become widespread, and while apps got much of the attention, it was a sea change for the web. In rapid succession, we learned about responsive design, got amazing new powers via HTML5, and tried to figure out how touchscreen interaction would work in a world previously filled with hover styles and tooltips.
To deal with this extra complexity, newsroom developers often relied on tools and frameworks to bridge the gap between where we wanted browsers to be, and where they actually were. Almost all of us used jQuery, and many added D3 (for visualizations) or Underscore and Backbone (for what would become "single-page applications"). We needed these libraries, because while some browsers had switched to a rapid release schedule, others had not, and the specter of IE7 loomed. Even in the "standards-compliant" browsers, features and performance could vary widely.
Almost ten years later, however, that landscape has changed. These days, the slowest release cycle comes from Safari, which puts out major versions roughly once a year (but still manages minor releases with significant new features in between OS updates). Elsewhere, Chrome and Firefox have continued to sprint ahead, adding new technology that's often inspired by the frameworks of the past. IE was replaced by Edge, which has also moved to an evergreen update cycle. While we were heads down on deadline, the web platform became enormously more capable, and consistent, than we might have thought.
In this book, you'll learn how to build powerful data visualizations online, based on three principles:
- Write for the web platform, not frameworks or libraries, whenever possible
- Use data to structure shorter, more elegant code
- Have fun!
Above all, through these short lessons, you should have a chance to level up as an interactive developer, building the confidence to create your own stories and graphics from scratch. You'll also be in a better position to evaluate the third-party code you use, because you'll understand what's going on under the hood. Who knows? Maybe you'll even write your own framework. I can't wait to see it!
Finally, if you use a Chromebook, you may have used the text editor I wrote for Chrome OS, Caret.
I'm writing this book with junior newsroom developers in mind: the kinds of young journalists I often meet as interns or as producers, who are looking to develop their skills outside of a traditional tech pipeline. After all, the problem with being a young newsroom dev is you're often figuring things out as you go along, without a more experienced developer to guide you.
That was certainly the case for me—I spent most of my time at CQ just trying not to do anything incredibly stupid, because even at a fairly tech-savvy newsroom, there wasn't really a more senior data journalist to teach me the ropes. It wasn't until I went to work for a game company, and found myself surrounded by people much smarter and more experienced, that my skills really progressed.
Developers now have a lot of resources that I didn't have, including supportive newsgroups and chatrooms that they can turn to. But that's still no substitute for a good mentor who knows the challenges you're trying to solve. This book can't mentor you either, unfortunately. But I hope it can fill some of the gaps for the "lonely coders" of the news world.