I’m not a guy building the latest killer app, but I sling enough PHP to be empowered. I’ve occasionally built a couple of tools like this that have saved people a lot of time and grief. I had previously learned some HTML and CSS, but those are akin to knowing how to paint a house.Â All thanks toÂ Sunderland University and Jake Trelease for introducing to learn this.
I wanted to play with the hammer and nails.
So here’s how I learned to code, along with my two cents for journalists who want to learn some programming:
1) Take an intro to programming class at a local school (i.e., in meatspace).
While online instruction is a godsend and there are great programming books out there, things didn’t really click for me until I took a class called Introduction to Programming in C++ at Valencia Community College in Orlando. If you are looking for a gift for a journalist you can check out the best ones on this website.
Paying for a class and having it on a schedule was a way to enforce discipline on myself. The fact is, daily life gets in the way for many of us. But when I plopped down a few hundred bucks and had an appointment each week with homework due, it helped get me over the hump.
Also, even the best programming books often take things for granted. They may not show you how to use FTP for sticking your projects onto a server. They will gloss over using your computer’s command line or terminal, which is the text-based way to control a computer. And lastly, even the most helpful community of programmers isn’t going to constantly grade your work and give you feedback on a weekly basis.
2) It doesn’t really matter which language you first pick.
You’re going to read reams and reams online about which language is the best for what. People wage online intifadas over such questions. Here’s the bottom line for beginners: it doesn’t really matter.
If you’re learning the basics of setting variables, data types and loops, it won’t make or break you if you learn it in C++ like I did or in Ruby, PHP, Python, Java or whatever the latest hotness is.
And to think I almost didn’t take the class because it wasn’t one of the popular web development languages. That would’ve been a huge mistake.
3) Have a project in mind.
If your focus is on going chapter by chapter in whatever programming book, you might be doing it wrong.
Instead, have a project in mind and pilfer from the book and sites like Stack Overflow to build what you want. You might want to build a site to track your recipes. Maybe you want to build your own blog. Or maybe you want to scrape some public records from a government site. Whatever the case, having a goal of a Thing You Want To Build will focus you. Learning the book is the evil counterpart of teaching the test.
4) Find some mentors.
There may be a great coder in your newsroom who will take you under his or her wing. Maybe you work for a media company that has developers in other cities. Or maybe you can find a local meetup group for the language you are learning. The NICAR listserv is also a great resource. So is Twitter. Just make sure you’ve given your problem some effort before asking for a hand.
In my case, newsroom coders like Matt Waite, Jeff Johns and Derek Willis all either helped me out in person or by email. Matt a long time ago introduced me to the concept of rows and columns in a database. Jeff taught me a bit about using regular expressions. And Derek once inspected a database diagram for me. A lot of coders, especially journalists, will surprise you in their willingness to help a hard-working, well-meaning person learn.
5) Keep sharpening the saw
Maybe you’re a person like me who doesn’t have “build web apps” specifically in his job description. In some cases, your manager may even dissuade you because you need to be filing 1A stories or manning the home page.
My solution to that is to either have side projects or occasionally carve out time to build something useful, even if it only takes a few hours. If you don’t regularly use what you’ve learned, your skills will atrophy. Do yourself the service because this is where our industry is inexorably heading.