Discover more from Tools for Reporters
Making it easier to learn to code
Hi, reporters! I’m guessing a lot of you don’t write code in your day jobs? Well you can do so easily with a simple tutorial (or a chunk of code you ripped off Github) and a thing I just discovered called Colaboratory!
Colaboratory is the dismayingly vague name for an online code editor that exists right within Google Drive. I often describe tools as “like Google Docs for ___,” but Colaboratory is, literally, Google Docs for code.
I’m always hesitant to teach code to journalists (including you, dear readers!) because there are pretty frustrating barriers. Installing Python, making sure you have the right version, creating a virtual environment…. ay ay ay.
But Colaboratory dodges a significant number of those barriers by allowing you to write and execute code right in the browser!
Right now, it only handles Python (one of many coding languages), but it handles it with aplomb. You can create and share files and have multiple people people edit them simultaneously - remember when I said it was like Google Docs?
If you haven’t written code before, try this: Create a new file in Colaboratory and paste in this example. Change the website, click Runtime > Run all, and voila!! You have now written and executed code. Scrape some websites, reporters!
Did you miss the last TFR? Get free legal advice from Lawyers for Reporters