What I learned building my first news product, JuxtaposeJS



 

Just in time for last week's Online News Association Conference, Knight Lab announced the launch of JuxtaposeJS, a lightweight, easy-to-use, image comparison tool.

Any product launch is exciting and I'm excited to see how journalists use JuxtaposeJS to tell stories. But from a personal perspective JuxtaposeJS is more than just a tool — it’s the first tool I’ve ever built from start to finish. It was also my first major Javascript project and I learned a few things during its development.

I’m sure that most of these lessons are old news to a veteran software developer, but as someone who is now graduating from self-described beginner to self-described intermediate, these lessons seem worth sharing with other beginners:

Everyone is always talking about iterating for a reason

Start small and iterate. When I started building JuxtaposeJS (at the time, it was just “Before/After Slider Maker”) I had grand visions of how the authoring tool would look and all the bells and whistles it would include. But a front-end interface is not much use when you haven’t written any of the code for the sliders themselves.

I started first by displaying a red square and a blue square, then by changing the solid colors to be images. Over time I added features, fixed bugs, and moved on to the next problem.

For all I’ve heard about the power of iteration, I needed to experience it for myself to understand why the process works so well. If you are curious, you can see all of the changes that were made in Juxtapose’s development on its GitHub commit log (and while you are at it, fork Juxtapose and make it even more awesome).

Version control takes away the worry

Version control lets you break everything and not have to worry about putting the pieces back together. Whether it’s seeing how a radical design change looks or rewriting a large chunk of code in an ultimately futile attempt to fix a bug, using GitHub and making regular commits gives you so much flexibility in writing your code. In retrospect, I wish I had experimented more and taken advantage of Git’s ability to create project forks to try new things.

C'mon, you can do it

Challenge yourself. At one point early on, JuxtaposeJS was dependent on jQuery and it was working. I was really excited about this and when I showed it to Joe (Knight Lab’s Chief Nerd), he said “Great. Now see if you can make it work without using jQuery.”

I thought it was ridiculous to rewrite perfectly good code as an academic exercise. But by rewriting everything to be independent of jQuery, I not only improved my understanding of JavaScript, but also made JuxtaposeJS more lighter weight and easier to use.

Challenging yourself and trying things you aren’t comfortable with is the only way to learn new skills.

Integrating Flickr was a struggle for me because I didn’t totally understand how to deal with asynchronously calling an API and I was also (and, to be quite honest, still am) a bit confused about object-oriented programming in JavaScript. It took me a while before I realized that I needed separate Graphic and FlickrGraphic classes, which might not be the best possible implementation, but it works. The best solution is one you understand how and why it works.

A lot of this advice may sound familiar — I’d heard it many times before. It’s not new and it’s not that original. But the only way I could learn them, was to build a part of JuxtaposeJS, fail, and keep going. Which is the most important lesson, I guess. Build things. Build things. Build things. Build smaller things, then medium sized things, then bigger things. Because the only way these ideas ever start to actually mean something is by building things yourself.


About the author

Alex Duner

Student Fellow

Latest Posts

  • A Big Change That Will Probably Affect Your Storymaps

    A big change is coming to StoryMapJS, and it will affect many, if not most existing storymaps. When making a storymap, one way to set a style and tone for your project is to set the "map type," also known as the "basemap." When we launched StoryMapJS, it included options for a few basemaps created by Stamen Design. These included the "watercolor" style, as well as the default style for new storymaps, "Toner Lite." Stamen...

    Continue Reading

  • Introducing AmyJo Brown, Knight Lab Professional Fellow

    AmyJo Brown, a veteran journalist passionate about supporting and reshaping local political journalism and who it engages, has joined the Knight Lab as a 2022-2023 professional fellow. Her focus is on building The Public Ledger, a data tool structured from local campaign finance data that is designed to track connections and make local political relationships – and their influence – more visible. “Campaign finance data has more stories to tell – if we follow the...

    Continue Reading

  • Interactive Entertainment: How UX Design Shapes Streaming Platforms

    As streaming develops into the latest age of entertainment, how are interfaces and layouts being designed to prioritize user experience and accessibility? The Covid-19 pandemic accelerated streaming services becoming the dominant form of entertainment. There are a handful of new platforms, each with thousands of hours of content, but not much change or differentiation in the user journeys. For the most part, everywhere from Netflix to illegal streaming platforms use similar video streaming UX standards, and...

    Continue Reading

  • Innovation with collaborationExperimenting with AI and investigative journalism in the Americas.

    Lee este artículo en español. How might we use AI technologies to innovate newsgathering and investigative reporting techniques? This was the question we posed to a group of seven newsrooms in Latin America and the US as part of the Americas Cohort during the 2021 JournalismAI Collab Challenges. The Collab is an initiative that brings together media organizations to experiment with AI technologies and journalism. This year,  JournalismAI, a project of Polis, the journalism think-tank at...

    Continue Reading

  • Innovación con colaboraciónCuando el periodismo de investigación experimenta con inteligencia artificial.

    Read this article in English. ¿Cómo podemos usar la inteligencia artificial para innovar las técnicas de reporteo y de periodismo de investigación? Esta es la pregunta que convocó a un grupo de siete organizaciones periodísticas en América Latina y Estados Unidos, el grupo de las Américas del 2021 JournalismAI Collab Challenges. Esta iniciativa de colaboración reúne a medios para experimentar con inteligencia artificial y periodismo. Este año, JournalismAI, un proyecto de Polis, la think-tank de periodismo...

    Continue Reading

  • AI, Automation, and Newsrooms: Finding Fitting Tools for Your Organization

    If you’d like to use technology to make your newsroom more efficient, you’ve come to the right place. Tools exist that can help you find news, manage your work in progress, and distribute your content more effectively than ever before, and we’re here to help you find the ones that are right for you. As part of the Knight Foundation’s AI for Local News program, we worked with the Associated Press to interview dozens of......

    Continue Reading

Storytelling Tools

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

View More