ProPublica

Journalism in the Public Interest

Cancel

The ProPublica Nerd Blog

New Year’s Resolution: Learn to Code

A year ago I didn't know how to code. I had a journalism degree and had made some graphics, but I would have been hard-pressed to explain the difference between Ruby and JavaScript, and I was pretty happy when I got the YouTube video to embed correctly. I considered myself pretty technical but generally avoided the command line.

When I did start learning, I was amazed by how much was out there: introductory videos, explanatory blog posts, tips and tricks and step-by-step guides. If you're a journalist who wants to make a news app or a student interested in learning to code, you have plenty of paths to choose from.

To get coding quickly, nothing beats having a project – and a deadline. For some of my early projects (with the help of a few developers willing to answer my questions), I learned just enough to make it work: how to show/hide a div or generate a bar chart from a CSV file. Repeating those same steps for later projects helped me actually understand what I was doing (and how the code worked).

As the year went on I came across a number of resources that were also very helpful in digging deeper: tutorial videos that finally cleared up some long-standing befuddlement, random snippets of code that made the damn thing work after three hours of head-banging, some really good explanations I wish I had read weeks earlier, etc. I hope these links will be helpful to you as you get started coding. Most are Ruby and Rails related -- Ruby is a programming language and Rails is a "framework" that makes coding quicker and easier – with some JavaScript, Git, and other stuff that came in handy over the past year.

 

Ruby and Rails

Peepcode: Meet Rails 3 Part 1 and Part 2
Great introductory videos that are also very convenient – you can download them right onto your phone and watch them on the subway (if that’s your thing). Super comprehensive, might wanna watch them a couple times to get everything.

Rails Course from the University of Texas
A complete set of videos from a Rails online class from a professor at the University of Texas, a bit slower-paced and more detailed than the Peepcode lectures.

Rails Guides
This is one of the best resources for both getting an introduction to different components (like routes or active record, etc) and also something to look back on every time you forget the correct syntax.

Bastards Book of Ruby
For a detailed introduction to how Ruby works, from erstwhile ProPubNerd Dan Nguyen.

Ruby on Rails Tutorial
Super detailed, super comprehensive online book that walks you through the entire process of building an app from install to deploy.

RailsCasts
Screencasts for learning Rails. Tips and tricks, how-to’s for solving specific problems, and introductory “tours” of Rails techniques.

Rails for Zombies
A pretty entertaining way to get the basics of Rails down in a real “lesson” format (complete with quizzes and exercises and many zombie references).

    Markdown: a tool for writing plain text that's easily converted to HTML
  • Markdown Basics

You can learn Ruby, JavaScript, and Python for free at http://www.learnstreet.com

Just to add to this, for anybody thinking, “I could never do that,” let me offer a different perspective after programming for many years (if we include messing around in BASIC on my Commodore 64 as a kid, a little over thirty years, if anybody wants to get really technical).

Programming is a social skill, not a technical skill.

Yes, you do have to keep otherwise-worthless trivia in your head (what kind of braces/brackets/parentheses go here, again?) and you need to be able to analyze systems for how to get the results you want.  But if you can drive a car from one end of town to the other or navigate public transportation, it’s the same skill set.

But the social side is where most of the work happens.  It’s all about meaning.

So, you start out with specifying a solution, but what does it really mean in detail?  What problem are you trying to solve and what’s the context?  What are the constraints that nobody mentioned?

Then, when you’re writing, things won’t always work intuitively for you.  But they worked intuitively for the guy who created the system (“Matz,” if you’re working with Ruby).  So, you need to understand the designer’s mindset and “become the system” to figure out the way that works.  Software design isn’t a science, and, for example, Ctrl-X is the “cut” command on the keyboard because (a) X is next to C, used for “copy,” and (b) the guy who originally made the decision thought X looked like a pair of scissors.  It’s much more important to understand the mindset than what’s “right,” because that’s not remotely the most surprising thing you’ll ever need to learn.

Lastly, you need to present your results in a way that the most useful meaning is prominent and the less useful information is hidden.  That means understanding how your audience reads.  Most of every job is really “just” presenting results.

I promise that the code is the easy part, after the first couple of days.

So, if you’re at all interested in programming but think you’re too artsy to handle it, jump on in.  You’ll be pleasantly surprised and, if it works out, believe me, we professional programmers desperately want to work with people with exactly your strengths.

Drilling down on Lena’s list:

1.  If the idea of typing and remembering how to format things is too tedious for you (I know a few people in that boat), look at scratch.org - the interface is designed for children, but the underlying software is top notch and what you learn there will apply to any later work in other languages.  ToonTalk (toontalk.com) is even easier, but the lessons won’t apply outside as well and (as the name suggests) is a little more kid-oriented.  There’s also Alice (alice.org), which is basically Java (not JavaScript, which is suspiciously unrelated—it was renamed just for inept marketing purposes), but I haven’t ever gotten it to install correctly.

2.  I love “vim,” myself, but I wouldn’t recommend it for anybody who isn’t a typist with a good muscle memory.  Yes, you can issue a command to invert the letters of every third word (I think), but just the fact that you need to type ‘i’ (for “insert”) before typing anything useful makes it too much to start learning with, I think.  Go for Sublime unless you’re over 40 and hate it when computer screens show colors other than green.

3.  If you like Markdown (and you will), download a copy of a utility called “pandoc,” which adds features like tables (if a little buggy) and can also convert the documents to Word, OpenOffice, Acrobat, and a bunch of formats you won’t care about.

4.  Building a website with Ruby on Rails handles a lot of the boring stuff, but Hobo (hobocentral.net - which plugs into Rails, basically) takes care of even more, like setting up account management and other things that are annoying.  The expense is that (to me, at least) it’s harder to modify the generated site in a useful way.

A small word of “warning,” though, programming is sort of a door you can’t close.  As you learn about software, you start to see bugs and quirks in software in terms of how they should have been fixed, and it’s a little frustrating.  It also creeps the heck out of technical support when you call them with specific information they think is secret, and that doesn’t translate into getting things fixed faster.

Wow, thanks for the post, and thanks to Joann for a helpful link and especially thanks to John for a comprehensive explanation and encouragement. I’m an editor for a tech jobs site and it would be helpful to me to learn some code, if nothing else but to become a better editor. Now I’m starting to think that’s within the realm of possibility.

J von rockmann

Dec. 20, 2012, 5:28 p.m.

Thanks Lena Groeger for all your research, especially how you think and write, love that brain.  I’m encouraged to learn more and play in the new alphabet. great links, and thanks to Joanne for super link. and thanks to savvy john for his comments,

I really apprecite the encouragement and extra fuel that I needed to get me started. I’ve been considering going back to school for a career change, something that makes me happy and keeps my interests going. And that would be developing and graphic design, both have been hobbies of mine for some time now and seem to pay off, either by feeding my soul or my wallet they do both for me. This is exactly what I needed, some real input from someone without any hidden agenda (such as meeting student enrollment quota) :) Thank you and have a great day!

In case anybody’s still reading here, a couple of additions/corrections struck me regarding my comments.

- I actually meant squeak.org, not scratch.org.  Both are great, but the basis of Squeak (Alan Kay’s Smalltalk) inspired most modern languages, making “real” programming an easier jump.

- Hobo and the “hard to modify” problems have gotten much better in the months since I used it last, mostly because of Twitter’s “Bootstrap.”  It’s basically the layout of a webpage, pre-done (including handling small and large screens) and ready to be modified.  It’s 100% less ugly.

- Nand2Tetris walks you through the entire computer, from how to build the part of the computer that adds numbers (from the microchips you can buy in that weird, abandoned corner of every Radio Shack) to building the operating system and making games.  It’s not critical to know how all that works, but if you consider yourself a dilettante in the field, you owe yourself the broadest education, I think.

Daniel, another route in a case like yours might be to get involved in Open Source projects.  I’m all for continuing education (did I mention that I teach graduate computer science courses after work?), but it’s a struggle to go back to school and a lot of classes tend to follow the book and not provide much experience at all.

On the other hand, walking into an interview where you can point a prospective employer to your GitHub page (for example) to review your actual work in products he can download and play with?  That says a lot more about what you can do for the company than a GPA.

That’s not to shoo you away from going back to school at all, but keep in mind that classes soak up a lot of time and money (both of which could be directed at your career or hobbies), and it takes a lot of work (that has nothing to do with the class) to turn that into a real education.  If money is coming in from programming and design, I’d say that the credential that a degree carries is secondary.

Erland Flaten

Jan. 30, 2013, 4:25 p.m.

Good post and comments. Just a matter of time before I will be happy to get back to the linkes you have provided.

You all read my mind!  I was just talking about the possibility of learning coding with an associate a few days ago.  He told me Oracle was a good beginner program.  I don’t know if that’s true or not but I will look into it along with saving this article for future reference.

A book that is very alligned with the spirit of your learning project is Exploring Everyday Things with R and Ruby: Learning About Everyday Things by Sau Sheong Chang .

Add a comment

Email me when someone responds to this article.