Learning to code from scratch and not for what you expect

This is my year to learn to code and if the number of sign ups for codeyear is anything to go by, I’m surely not alone. It’s great that lots of people want to learn to code but ironically enough it’s not the numbers that interest me. It’s the reasons. What do all these people plan on doing with their new found skills?

I don’t want to be a developer,  not even a web developer nor designer. My interest is in journalism. Not just the telling but the gathering. Technology and journalism are merging into a beautiful soup at the moment. In that sense there are already fantastic developers flocking to media platforms and progressive media management looking at technology not only as their platform but as their product. Nowhere else is this more clear than at my host news institution: The Guardian.

Thanks to the web, all the tools to publish are readily available. You can easily practice journalism. Big scoops and great insights are no longer confined to newsroom staff. Honing your journalism skills, attracting readers and learning how to best supply their needs is all within easy reach. Learning to code and getting the opportunity to explore its possibilities requires guidance and a support team. Knight-Mozilla have given me these opportunities for the year.

So why extend code further into the newsroom? That’s what I want to find out. I want to code but I will never be a developer and the learning route is very hazy when you are of this mindset. So I’m learning how to learn in order to experiment with application. And I’m doing it all in the open as part of the Knight-Mozilla News Challenge. With that sentiment in mind, here are my tips for learning to code from scratch and not for what you expect (I started by learning Python so these tips are based on Python programming):

As an introduction to the basics, watch these videos introduction computer programming from Khan Academy.

Then I would read this really short and simple book: Python Visual QuickStart Guide. You can play with the coding examples without having to install anything with this online app.

Once you’re comfortable with the basics, I would commit to the cause and work through Learn Python The Hard Way. It’s the easiest way for beginners (trust me). It’s name is referring to the fact that programmers don’t actually like writing code (they are very lazy!) and this involves typing everything out. This means you need to install Python, download an editor and use the console. These steps are a rite of passage but will take you from being a computer user to knowing how a computer is used.

A step up from this is Python koans which you need to fork from GitHub and install. Having a GitHub account means you have a repository for your code and can build on top of other people’s (actual developer’s) code. This will introduce you to the world of programming!

If you think you’re ready to start writing your own code but not yet at the ‘build’ stage, then a quick journalistic fix is to write a scraper in ScraperWiki. The development environment is built-in so all you need is a browser.

If you want to have a neat programme that you can run from your computer then a cute little build is the Python IRC Bot Phenny. I’ve added some journalism related modules. You can read the post here and get all the code from GitHub.

Those are the steps I took which impressed Mozilla and The Guardian enough to give me a year of mentorship. But it’s just an introduction. It’s like being asked to work as a writer in the newsroom after having only learnt to read and write.

I am currently going through the simple steps of JavaScript at Codecademy. I’m also planning on learning R. I hope knowing the grammar of Python, SQL, R and JavaScript will be enough to explore the boundaries between journalism and technology fully.

So wish me luck!

Enhanced by Zemanta

3 thoughts on “Learning to code from scratch and not for what you expect

  1. I noticed you got a Javascript badge on Code Academy yesterday and decided to give it a go. As an ex-web developer (and now student currently enrolled in a journalism MA), I blew through a bunch of it without really having learned much about using JS in a useful way. Yeah, Javascript can iterate and do loops and have functions and stuff, but if you’re using a server-side library like Python, you’re probably already doing that.

    Personally, my use of Javascript has been dramatically impacted by learning how to use jQuery, which allows you to select any object in the Document Object Model (DOM; I.e., “the ordered hierarchy of all the stuff in a web document”) and then modify it to suit. It’s a different than simple JS — you chain together lots of different functions to accomplish a task — but ultimately allows you to do really interesting things without refreshing the page (which is really the power of Javascript when compared to server-side languages like Python or my personal preference of PHP) and, more importantly, without writing a boatload of regular Javascript.

    There are other libraries that accomplish similar things (Mootools, for one), but I’ve found jQuery to be the most widely used. Also, WordPress already uses jQuery for a lot of different things, so you don’t have to install any extra libraries (Just enqueue your Javascript file using ‘jquery’ as a dependency — see: codex.wordpress.org/Function_Reference/wp_enqueue_script).

    Hope that’s at all useful! Drop me a line if you have any questions!

  2. Learning to code was one of my journo resolutions this year (and I’m already behind on codeyear) so this post is really helpful.

    Why am I learning to code?

    Because I’ve come to realise in our under-staffed, under-resourced newsroom, that if I don’t learn these skills, I’m never going to get the shiny data interactives I want.

    I also don’t want to be a developer but it’s unlikely I’ll be able to steal any time off the ones I work with, so this is the workaround. It is slow going but I am starting to feel like I’m making some progress.

  3. Learning to code is very important for anyone in a computer-aided profession.

    You don’t have to learn a whole lot to get a better understanding of how the computer works.

    And the better you understand how the computer does what it does, the better you can do your job.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*