So You Wanna Learn How to Code? Going from Zero to Programmer Hero in One Guide, for Great Justice.

v1.8.22 - Last Update: 22 Apr 2014 1:50p EDT - by Peter Hurford (with lots of help)

UPDATE: Thanks to someone in the comments, I found a new resource for learning programming called The Odin Project, and dare I say it, I think it’s better than my guide. I took detailed notes on it here, and I urge you to read them if you’re interested in a slightly different take on learning programming.

The Introduction

So you wanna learn how to code? Whatever your motivation, computer programming and general computer know-how are good skills to have. Programming knowledge can be potentially high value for careers or start-up opportunities, and with not too much time investment, you can figure out if programming is something you would enjoy and be good at.

There are multiple paths to getting a programming job, learning programming, or whatever goal you may have. There’s no “one true way”, and there’s going to be a lot of conflicting advice on what is the “best” way to learn. Honestly what is best is going to vary person by person, and based on your interests and goals. I’ve designed a guide here based on my personal experience and had it tweaked based on feedback from other programmers. This guide is heavy on web development and Ruby on Rails because those are the things I’ve had the most experience with, they seem like good places to start, and they seem quite employable. That doesn’t mean that learning other languages is not a good idea. This guide is designed with the mind to try and find your interests as soon as possible. But it still might not be precisely right for you. Your mileage may vary. The best thing to do is just start, somewhere. See if this guide works for you, tweak if it doesn’t. Let me know.

Additionally, you might find out that programming is not a good fit for your skills and interests, and you have to be okay with that. Keep in mind that true programming skill only comes from the long haul. There is no real “learn X language in two hours” – even 100 hours of learning will only give you a beginner’s knowledge of one particular language. “Programmer hero” status will only be achieved after many years of work. So it’s important you really like it and stick with it, if you want to get anywhere. Programming also seems to come best if you have multiple, uninterrupted, consecutive hours to devote to it – it appears much harder if it’s just 30 minutes here, 30 minutes there.

Also, let me know (Peter Hurford on Facebook or peter@peterhurford.com by email) if you try this guide, so I can get feedback on how it goes for you. Feel free to also reach out to me with comments on how to improve the guide – I’m still relatively new to programming myself and have not yet implemented all these steps personally!

-

The Guide, Pt. I – Zero to Beginner

Step One – Codecademy

If you don’t know any programming at all, it would be a good idea to get a feel for it on Codecademy. Pick either the Python lesson or the Ruby lesson. Spend about 5-10 hours on one of them (no need to finish it).

Here’s a good test – Can you implement FizzBuzz in either Python or Ruby? Can you implement bubble sort in either of those languages? If you answered no to the first question, definitely do this step. If you answered yes to the first, but no to the second, consider doing this step. If you answered yes to both, definitely skip this step.

If you do this, see how you feel after the 5-10 hours are up. How fun was it? How much of a struggle was it? How much time were you able to devote to it per week? Is this something you can see yourself doing?

I don’t think it’s necessary to complete the course, but feel free to finish it at this point if you wish.

Step Two – Hartl’s Ruby on Rails Tutorial

I’ve got good news and bad news for you. The good news – real programming is actually a lot more fun and interesting than Codecademy. The bad news – Codecademy is not real programming. Codecademy is a good supplemental learning guide, but it isn’t comprehensive enough. So we’re going to look to something a bit better.

At this point, I’m going to recommend to you to complete Michael Hartl’s Ruby on Rails tutorial. Ruby on Rails is already a really popular and useful language right now, and is a very employable language to know if you want to go into the start-up / tech world. The guide also provides useful introductions to many other important supporting technologies, like GitHub, RSpec, and Heroku. You’ll also learn critical concepts like Model-View-Controller and test driven development.

When you complete this guide, make sure you never copy and paste the provided code – always retype it by hand. You won’t really learn it if you just copy and paste. Moreover, try all the provided exercises in each section. That’s how you expand your knowledge.

My guess is that it should take you 30-60 hours to get through the tutorial. Use Beeminder or something if you feel like you’re not doing a good job at getting the hours in.

Optional Other Step Two – If you hated Hartl’s Tutorial…

I personally enjoyed Hartl’s tutorial a lot and think it’s a really great set-up to not just Ruby on Rails, but many other things (e.g., GitHub, getting a text editor, etc.). But if you disliked it, don’t fear! It doesn’t mean programming is right for you, it just means you’re different than me.

Some other ways to learn the right amount of Ruby on Rails to progress to step three is to sign up for Code School and work through all the Ruby classes. This costs money, but is worth it. This is a decent method in my opinion and I believe is the preferred method of Ozzie Gooen.

Buck Shlegeris doesn’t like Hartl’s tutorial and prefers that people complete the Codecademy class for Ruby completely and then work through Test First’s Ruby Tutorial. I’ve not personally tried this, but Buck seems to have turned out pretty well, so it can’t be that bad. Buck then says after the Test First tutorial to then also sign up for Code School and work through all the Ruby classes.

Yet Another Optional Other Step Two – Consider a Programming Bootcamp

If you feel like you enjoy programming and want to make a career about it, but haven’t been doing so well at self-teaching, you could consider going to a programming bootcamp. These are more-than-full-time intense programs that teach you programming and help you with job placement. Here, you set aside 10+ weeks, enroll in the site, learn from the program, and hopefully pop out with a job on the way.

I’ve never personally gone to a boot camp (and don’t plan to). Keep in mind that a bootcamp is neither necessary nor sufficient to land a good programming job. But for people with the time and inclination, it could be a lot better than trying to go through this guide yourself. If you’ve got the time, it’s definitely at least worth investigating.

App Academy is widely considered to be the best program and there’s been lots of discussion of it on LessWrong. App Academy basically does Step 2-17 from this guide, but gives you support, formal teaching, and a good learning environment. Buck Shlegeris is a TA at App Academy and is happy to be a contact if you’re interested in getting more information on applying and/or getting coached through the process. Here’s an interview with Buck about App Academy for more information.

Buck and Chris Hallquist (who went to App Academy) also say that Hack Reactor is the second-best program if you’re not able to get into App Academy (it is somewhat selective). Here’s a full list of all available bootcamps, with details.

It’s worth noitng that App Academy might be best for people in the US. Maker’s Academy seems pretty good for people near London, though.

Step Three – A Personal Rails Project

Now you should know enough to fail forward on a project of your own. You’re off the bunny slopes and now it’s time to ski down the hill. Personal projects are the most exciting and useful ways to learn code, and you now should know exactly enough (and not much more) to try your own Rails application. So make something! I made a Job Board, others made a Skillshare. Hartl had you make a Twitter clone, but you could try to create a clone of another popular app like Reddit. It doesn’t have to be useful, because the idea is just to learn code.

This may be hard, but Googling around and StackOverflow should get you farther than you think. It also could be a really good idea to seek out a personal mentor or two, who can walk you through inevitable points where you get stuck.

Optional Step Four – Another Rails Tutorial

If you feel like you’re struggling at this step, you could consider working through another Ruby/Rails tutorial to re-learn some of the stuff in a different context. I like “Agile Web Development with Rails”. No need to do this if you feel like you’re going well, though.

Step Five – Re-evaluate

At this point, you are a certified beginner in Ruby on Rails. Congratulations! At this point, you could probably get an internship or Junior Developer position at a rapidly expanding tech company. Not too bad for ~200 hours of work.

But more importantly – at this point, you should now be able to know if programming is for you. Did you complete your personal project? Was it fun? (It should be fun.) Was it hard? (It should be hard.) If you enjoyed yourself and found yourself able to put in a fair amount of time on it each week, then congratulations – programming might be for you! But be honest with yourself, and don’t force it just because programming seems glamorous.

Optional Step Six – Learn Python

Earlier, in Step One, I had you look at either Python or Ruby. Python is somewhat popular in the start-up world, though not nearly as popular as Ruby on Rails. However, Python is really popular in the academic world. It has good support for statistical programming and has a platform called Django that acts similarly to Rails.

It’s a good language to know, but that being said, several of us don’t think it’s worth the time investment if you’re solely focused on getting into the start-up world and don’t have a particular use for it.

However, if you’re interested, now would be a good time to pick it up. If you’d like, work your way through “Learn Python the Hard Way”, skimming a bit as necessary. Also, give a look through “Think Python”, though you’ve probably learned much of it already from completing “Learn Python the Hard Way”.

The Guide, pt. II – Skiing the Blue Squares

Step Seven – An Interlude for HTML/CSS

I think now is a good time to switch gears. Ruby on Rails is a language that does back-end, or helps you get information on the server to the user. But we also want to give you some experience in front-end, or making that information usable and well presented. Hartl’s tutorial gave you some intro to this and you probably worked on some of this for your personal project, but now it’s time to take it to the next level.

Skip this if you already know HTML and CSS pretty well. Neither is particularly hard, but both are completely essential for front-end development. That is, could you re-create a simple personal website like this by hand, with minimal looking up of things online? Feel free to try. Even if you’ve never done HTML and CSS before, you might have picked up enough to do it.

If you can’t (don’t worry!), read through Shay Howe’s Beginner HTML/CSS Guide and Advanced HTML/CSS Guide (though “advanced” is a bit of a misnomer here). After you’re done, try to re-create the site.

Step Eight – And Now, JavaScript

We’ll start with the undisputed base language for front-end development – JavaScript. Let’s start by working our way through the entire “Eloquent JavaScript” textbook.

Step Nine – JavaScript Design Patterns

Design patterns are reusable solutions to common programming problems. They’re really good to know. Let’s learn some JavaScript design patterns. Work your way through “JavaScript Design Patterns”.

Step Ten – Go Advanced on JavaScript

Now it’s time to get a little more advanced and learn more about what JavaScript can do. Work your way through “Learn Advanced JavaScript”.

Step Eleven – Connect back to Back-End work with Node.js

Work your way through “The Node Beginner Book”. If you want to learn more about Node.js, consider also working through “Node.js in Action”.

Step Twelve – Get Intermediate on Ruby

We now seem to know more JavaScript than Ruby, so it would be good to catch up here. Let’s read through Peter Cooper’s “Beginning Ruby” and then David Black’s “The Well Grounded Rubyist”.

Step Thirteen – Build a More Complex Application

You now know a lot of Rails and JavaScript, and it’s time to bring it all together. Make something cool. Much cooler than your last app. Show off both your front-end and back-end skills.

The Guide, pt. III – Aiming for a Job?

Step Fourteen – Re-evaluate, Again

Earlier, I mentioned that you knew enough to consider applying to a programming job. At this point, this is even more the case. You now know the beginnings to both a front-end and back-end framework and can build sites on your own. If you were interested in applying to a job, consider looking into that now. Think now about if that’s right for you.

Step Fifteen – Get an Intro to Algorithms

Lastly, it could be a good idea to learn some more about algorithms – this is a good idea even if you’re not aiming for a job. First, reaTry to sign-up for and work through the Coursera class on Algorithms I and Algorithms II. It’s best if you can do them while they’re live, but not necessary. You can also supplement this work by skimming through the “Algorithms” textbook.

Optional Step Sixteen – Read “Cracking the Coding Interview”

If you’re aiming for a Senior Developer job at a tech company, it would be really helpful to tie this algorithm knowledge to how you’ll need to know it – in the interview. Read through “Cracking the Coding Interview”.

Optional Step Seventeen – Do Other Basic Job Stuff

  • Create a GitHub account if you haven’t already and put some projects there.

  • Create a nice portfolio website for your work (like Chris’s or mine).

  • Read through Alexei’s account of getting a software job.

  • Create a list of companies you want to apply to. Ask people to add to your list.

  • Seek out people to give you advice on how to apply and perhaps give you internal referrals in a company (very valuable to have).

  • Familiarize yourself with basic job etiquette like thanking interviewers by e-mail afterwards.

  • Do some google searches for interview questions beyond what you read about in “Cracking the Coding Interview” – some questions are basic trivia unrelated to coding, such as questions about hexadecimal or how the internet works.

  • Consider creating an Anki deck of information to know for interviews.

Optional Step Eighteen – Complete some Problem Sets

Besides building your portfolio with projects, another good idea would be to complete some problem sets. Project Euler asks you to solve math problems in any programming language, which is a good test of creativity and math skills. CodeForces Problem Sets are similar.

Exercism is also good – they’re not nearly as math-oriented, but instead offer Ruby and Python (and other) challenges where you try to make code work a given test suite.

Codility challenges also more closely approximate what you might encounter in an interview, with the two-star problems being about the difficulty you should expect, according to Chris Hallquist.

It seems good to try to get a breadth of challenge from all four, though I’d stick more to Exercism and Codility if you’re looking for a position in web development / software engineering.

Also, continuing with this guide couldn’t hurt. The stuff after this guide appears to give much less marginal returns for entry-level jobs, but they’re still important.

The Guide, pt. IV – Black Diamond JavaScript and Ruby

Step Nineteen – Test Driven Development for JavaScript with Mocha

If you’re not looking for a job, or just want to take your skills to the next level, there’s still more guide. I now suggest you learn some good tests for JavaScript and jQuery. Mocha is a nice platform for testing your front-end code. Work your way through the Mocha tutorial.

Step Twenty – Learn Backbone.js and Angular.js

Work your way through “Developing Backbone.js Applications”. You could then consider also learning Angular.js by working through this tutorial and these videos.

Step Twenty-one – Learn more SQL

Rails handles most of the SQL for you, and you’ve probably already learned some SQL through other tutorials. But at this point it could be nice to just get it done. SQLZoo is a nice interactive tutorial here. Let’s complete it now.

Optional Step Twenty-two – Watch RailsCasts

RailsCasts cost money, but they’re an excellent resource for learning how to do particular things in Rails.

Optional Step Twenty-three – Skim around with BentoBox

BentoBox is another site with a lot of resources for learning programming. While less structured than this guide, it offers more depth, and provides resources for learning many things that are not contained in this guide. Maybe you could start learning PHP or Java, maybe you might take up building mobile apps, or who knows? BentoBox provides some resources to help with all of that as well.

Optional Step Twenty-four – Learn Some Data Science

In addition to work in front-end and back-end, another popular programming career is data science. This is a bit of enthusiasm on my part, but statistical programming can be pretty fun and open up a whole new world about what programming can do. And statistics is, next to programming, one of the great skills to know.

If you don’t know stats or want a refresher, work through Udacity’s Intro to Stats class. Then work through Coursera’s Data Analysis class – it’s much better if you can catch it while live, because it’s a pretty dynamic class. After that, work through “Advanced R Programming” and then try your hand at some Kaggle tutorials and competitions. This tutorial on the Titanic is good, and has a companion guide that teaches more R.

Once you’re here, if you want to get really serious into Data Science, I’m pretty sure you’ll have to learn Hadoop and/or MapReduce. But you should have done the hard part already.

Optional Step Twenty-five – Celebrate!

You should now know enough about programming that you’re off on your own. If you’ve found a good mentor, they can tell you what to do next. Or maybe now you can land a programming job and learn programming in a real-world context. Good luck!

-

UPDATE: Thanks to someone in the comments, I found a new resource for learning programming called The Odin Project, and dare I say it, I think it’s better than my guide. I took detailed notes on it here, and I urge you to read them if you’re interested in a slightly different take on learning programming.

Followed up in “A Better Way to Learn Programming? Notes on The Odin Project”.

The Acknowledgements  

This advice is based on my personal experience, plus advice given to me (in rough descending order of magnitude) by Richard Batty, Chris Hallquist, Robert Krzyanowski, Ozzie Gooen, and Buck Shlegeris.

The Changelog  

  • v1.0.0 - Initial launch.

  • v1.0.1 - Added more info to intro.

  • v1.0.2 - Added version tracker.

  • v1.1.2 - Added alternatives to Hartl’s tutorial.

  • v1.1.3 - Added my contact information.

  • v1.1.4 - Added call for action for feedback.

  • v1.1.5 - Added Changelog.

  • v1.1.6 - Added more info about “multiple routes” to intro.

  • v1.2.6 - Added info on programming bootcamps.

  • v1.2.7 - Added more info on Python.

  • v1.3.7 - Added an explicit step for HTML/CSS.

  • v1.3.8 - Added more info on when one can apply to an internship / Junior position.

  • v1.4.8 - Added another re-evaluate period.

  • v1.4.9 - Added Codility to the list of problem sets.

  • v1.4.10 - Added info on Hack Reactor.

  • v1.4.11 - Added FizzBuzz test for the first step.

  • v1.5.11 - Added more info on getting a job.

  • v1.5.12 - Reorganized some of the steps.

  • v1.6.12 - Added a step for SQL.

  • v1.6.13 - Minor fixes.

  • v1.6.14 - Added more information on App Academy.

  • v1.6.15 - Tweaked intro.

  • v1.6.16 - Typo fixes.

  • v1.6.17 - Added BentoBox.

  • v1.6.18 - Added reference to list of Bootcamps.

  • v1.6.19 - Added link to interview with Buck.

  • v1.6.20 - Fixed some broken links.

  • v1.6.21 - Fixed two typos.

  • v1.7.21 - Added information about The Odin Project.

  • v1.7.22 - Made punctuation consistent in changelog.

  • v1.8.22 - Added clarification for people who live outside the US.