What happens when you ask for advice on learning to code?
"Try Python. At first you'll be just fooling around, but then in 15 minutes you'll be intrigued and after an hour you'll wonder where the time went!" -- Anon
"I don't recommend python as a first programming language to learn... Java is the perfect starting spot." -- Zef D
"Learn Java or C++ then take Stanford's online class in iOS app development." -- 1finite
"Which programming language you learn and use doesn't matter." -- Zed S
"VBA and SQL are excellent beginner's languages for almost any professional or student." -- Zuhalter
"Make sure not to ask too many questions and turn into a help vampire." -- Max
"It’s a good idea to start with a very simple programming language that doesn’t require setting up a lot of environment." -- Queisser
"Learn the basics of a programming language in a command line or some kind of eval loop." -- Anon
"Use whatever your friends use." -- Peter N
"No book is going to replace getting your hands dirty and just figuring things out." -- JZ
"[Do] things the right way at all costs, rather than just [make] it work and [improve] from there" -- via Nick B
"Pick one language and stick with it until [you are] reasonably fluid in it. I say go with Ruby, Python, or Clojure and forget PHP." -- James
Learning to code for the first time is awesome and overwhelming and scary and fun. We call the sweet beginning of this exciting journey, where you're surrounded by helping hands, the "Hand-Holding Honeymoon" because of all the great resources out there and how much help you're likely to receive. It's the first of four phases of the learning process and certainly the most supportive.
This is an easy phase in which to get advice because everyone has a strong opinion about how you should learn. Sometimes, though, this support and advice can be overwhelming.
If you ask a dozen people how to get started, you will probably receive 15 different answers. Ask the Internet and you'll find that it's rife with giant SEO-friendly listicles packed full of resources for learning how to code (see here and here and here and here and here...) and occasionally even a few tips about how to navigate through them.
The dilemma comes when you're faced with all those reasonable-seeming approaches and need to choose between them or risk wasting your time. The problem, therefore, isn't a lack of resources or even a path, it's a set of criteria for figuring out which path makes the most sense for you to take.
Our Purpose Here
In this post, I'll show you an opinionated approach for taking on the first 100 hours of your coding adventure. It's hardly the only one out there but it's been an effective jump start for thousands of students so far so I believe in its inherent value. Despite this, only you can decide if it's the right fit.
That's why, prior to walking through the path itself, we'll look at how to actually think about this phase of the learning process. It's a commonly missing piece which will allow you to independently evaluate the effectiveness of this or any other suggested plan.
The goal of this post is to once-and-for-all answer the question "How should I get started with coding?" by empowering you to answer it for yourself.
Note: An underlying assumption of this post is that you do, in fact, want to learn to code. Many people only think they do... something we'll cover in an upcoming post.
Syntax and the Self
In your first 100 hours, you should accomplish 3 deceptively simple goals:
- Go fundamental -- Learn the basic syntax and constructs of coding.
- Go broad -- Familiarize yourself with the full web development stack.
- Go within -- Find your coding "match" so you can passionately dive deeper into that area.
Most students tackle the first part, give a nod to the second part, and generally pay little mind to the last part. They're more likely to force themselves to power through a bunch of dry syntax in a language they hate because they've heard it's the thing to do. This approach should really be inverted.
Learning to code is like a new relationship. You’ll spend weekend nights curled up with a glass of wine and the gentle glow of a text editor. You’ll yell at code, you’ll fight with code, and you’ll eventually make up with code and build wonderful things together. It's an intellectual love driven by passion. So it should make sense that the initial phase is a bit like a dating game and it's worth your time to find the right match.
With this in mind, there are two questions you should consider on the way to finding what you're genuinely passionate about:
- What do I enjoy learning the most (ie. which technologies or projects)?
- How do I enjoy learning the most (ie. which types of resources)?
When you can answer these questions, the path ahead becomes much clearer.
This is relevant because most of the knowledge you'll gather in your first 100 hours is completely interchangeable among all languages or technologies anyway so it hardly matters which one you pick up. A deep well of genuine passion for what you're studying, however, can be critical to help you to pick yourself up after the inevitable stumbles. It keeps you fully engaged with the material instead of feeling like learning is an obligation. Additionally, an understanding of how you learn best will prevent you from becoming discouraged by resources that don't fit well with your learning style.
So, regardless of which path you end up taking into coding, make sure it doesn't just allow you to learn a bunch of syntax or context but also provides enough room for you to find what you're genuinely passionate about.
I'll focus on web development in the recommendations below, but you should be able to port the same thought process to pretty much any stack.
Before I show you our preferred path, let's cover a few key principles that guide our approach. Some of these align with conventional wisdom and others might be contrary to what you've heard. While everyone is different, experience has shown the following to generally hold true:
- Learn one thing at a time. Many people tell you to learn several languages at once. That might work for the particularly gifted, but it's a recipe for disaster with your average human. We'll cover multiple technologies but in a single-threaded progression so you can get comfortable with the syntax of one before diving into the next.
- Get a taste of the full stack. You'll often hear people tell you to dive deep into one language. We agree... but not before you've had the chance to play with all the technologies of the web stack to give you necessary context and to help you discover what you really enjoy.
- Try a variety of resources. It's easy to find a resource which doesn't match your learning style. We believe you should try several different types of resources to identify the way you learn best. By honing in on this, you'll make all your future learning much more productive and you'll know when it is, in fact, not your fault that it seems so difficult :)
- Have a project you want to build. This is one which people will commonly cite and it's great advice. You will learn significantly better and find your passion quicker if you have something you'd really like to build. We don't, however, advocate starting on it immediately because that will encourage major gaps in fundamentals. In the first 100 hours, unless you absolutely must see your project hacked together ASAP, focus on the fundamentals and use your desired project as an incentive to stick with it.
- Explore... When you're just starting out is the best time to explore -- everything is new and exciting! It's okay to experiment because, as we've said, finding your passion is a major goal of this phase.
- ...But don't dawdle. You need to explore, but also move on when it's time. It's easy to get trapped in a loop of constantly trying new beginner resources because it's so easy and immediately rewarding. If you want to move forward, you've got to be disciplined about taking on the next challenge before the current one becomes comfortably easy.
An Overview of Our Approach
Our 100-hour approach is designed to get you the exposure to web development technologies that you need to accomplish all three goals laid out above -- going broad, going fundamental, and going within.
It uses the best possible resources but also provides several different options for progressing through them based on your preferred style. It assumes you already understand the basic context and terminology of web development.
The 100 hour approach breaks down into the following buckets, which cover the "full stack":
- HTML & CSS -- 20 hours
- The Command Line & Git -- 5 hours
- Databases & SQL -- 5 hours
- Ruby -- 20 hours
- Ruby on Rails -- 25 hours
This layered approach is designed to give you the kind of breadth you need while providing many different touch points that you can use to determine which language really "does it" for you.
How it's Laid Out
Each step of this approach is laid out in detail below. You'll find:
- An overview of what you're learning and the estimated time it will take.
- Your goal for that step -- usually something you can build to prove you're ready to move on.
- Two options for learning the material using different styles of teaching. You only need to use one but it's often best to try both to help layer your knowledge and get familiar with different resource styles.
- Alternate resources which cover a spectrum of different styles and can be used either to shore up holes in your knowledge or to experiment with other teaching methodologies.
Step 1: HTML & CSS
Markup and styling combine to build the interface for every web page in existence. HTML is the web -- everything else is there to serve it to you. Or style it, in the case of CSS. You may not need to become an expert, but everyone needs to understand how HTML and CSS work to some degree.
Your goal is to build a copy of a simple homepage on your own, for instance Google.com.
Option A: Codecademy's Web Track
Codecademy is a fully interactive in-browser tutorial which covers all the basics with tons of support. It's too slow and "hand-holdey" for some people and just right for others. This represents the most supportive learning you can get without working directly with another human but it's also the most confining because you're stuck in their tracks.
Your Plan: Go through the entire track.
Best For: Anyone who's starting almost literally from scratch or who is just experimenting.
Downsides: You'll grow out of it quickly if you're a quick learner or want to try things that are outside their scope.
Option B: Shaye Howe's HTML & CSS lessons
Shaye's taught HTML and CSS for years on his site and it keeps getting better. It's the best parts of working with a textbook but built and optimized for the web. It covers the material more thoroughly than Codecademy but with much less support.
Your Plan: Go through all 12 lessons and, at the end of each, write some markup in a code editor which uses what you just learned.
Best For: The impatient and fast-moving learners or those who prefer a more text-based learning approach.
Downsides: You're pretty much on your own to build toy projects alongside it to test your knowledge, so be sure to do so instead of just trying to power through.
Pair With: Codepen.io, the in-browser markup and code editor, if you prefer not to work on your local machine yet.
These are resources similar to those above which are worth glancing through before choosing one
- Khan Academy's HTML/CSS track -- a great multi-media approach that combines text, videos, and exercises.
- GA Dash -- quick and shallow exercises. Signup (free) required.
- Treehouse(PAID) -- combines the hand-holding of Codecademy with very beginner-accessible videos.
- Code Avengers -- an alternate to Codecademy
- Udacity's "Intro to HTML and CSS" course(free by clicking the "Access Course Materials" button) -- a journey through the fundamentals on their video-and-exercise platform.
As with the HTML and CSS tracks, Codecademy's signature tracks will slow down and hold your hand through all the tricky bits. The challenges will have everything you need to complete them.
Best For: Anyone without familiarity with "real" coding and/or who is highly visual.
Downsides: Lots of hand-holding means you need to focus more to retain the knowledge.
Your Plan: Read at least the "Introductory" section of MDN and the "About jQuery" and "Using jQuery Core" chapters of learn.jquery.com. Read ahead through the Events, Effects, and AJAX sections for a deeper look at things.
Best For: Textual learners and those who really just want to get to the point. Best if you have previous experience with coding (or have gone through Codecademy's courses).
Downsides: There are no exercises baked in so you'll have to set up your own projects and exercises to help retain the material. Building is key!
- Khan Academy's Intro to Programming track is a great introduction if you're quite new to programming in general. It's well presented, a lot of fun, and highly accessible.
Step 3: The Command Line and Git
To get good with any server-side scripting, you'll also need to pick up some basic command line usage. The moment you crack open that white-on-black screen, you'll really start to feel like a developer. Git is the most popular version-control system out there and an essential tool in your developer arsenal.
Create Git repos for your previous projects and push them to a Github account.
Option A: Web Development Basics from VCS
This is a partially text-based and partially video-based collection of lessons and links to external resources. "The Basics of Web Development" section contains the good stuff for our purposes here.
Your Plan: Do (at least) the Command Line Crash Course lesson for learning the CLI, Getting to Know Git to introduce you to Git and Git Calisthenics to marry the two by using Git from the command line.
Best For: People who need to see it, watch it, then try it.
Downsides: It's not textbook depth so you'll need to look elsewhere to get really deep.
Option B: Learn Shell, Try Git, and The Git Guide
The first two of these are more interactive resources which allow you to type directly into the browser. The third is a straightforward beginner's guide to Git with "no deep shit".
Your Plan: Read through all three of these resources.
Best For: Interactive learners since these allow you to type directly into the browser for command execution.
Downsides: For greater depth, you'll need to peruse the alternate resources below. In-browser execution is okay but doesn't force you to learn (and apply) it on your own machine, which you'll need eventually.
- The Command Line Crash Course web-book from Zed Shaw is a walkthrough tutorial of the CLI which covers pretty much all the bases.
- Git SCM is the standard text-based documentation for Git.
- Atlassian's Git Tutorials provide an alternate in-depth video-plus-documentation Git guide.
Step 4: Ruby Scripting
Now it's time to get some use out of your command line with Ruby, the high level scripting language built for programmer happiness.
Frankly, you can learn Python or even PHP instead if you'd like; it really doesn't matter in this phase. But we love Ruby because it has a massive community of supportive developers and just about every question in the world has been answered on Stack Overflow. Once you get familiar with its syntax, Ruby will always have a special place in your heart.
Your goal is to build a simple Tic-Tac-Toe game on the command line which can be played with two players or just you vs the computer.
Option A: Codecademy's Ruby Track and Ruby Monk
As before, Codecademy will get you over the basic syntactical hurdles by guiding you gently through exercises. Ruby Monk will ask you to complete challenges that start to have some real meat to them. It's a quirky journey into some deeper aspects of Ruby.
Your Plan: Go through the entire Codecademy Ruby track and then tackle the full Ruby Monk Primer course to layer it on. Next, do at least the first four sections of the Ruby Primer: Ascent course (which should get fairly challenging).
Best For: Interactive learners who want a bit of hand-holding.
Downsides: Ruby monk isn't always clear what they want and some of the material jumps into the intermediate realm.
Option B: Learn to Program and Learn Ruby the Hard Way
Your Plan: Go through the entire web version of the Learn to Program book and then dive into LRTHW (or buy the full Learn to Program book and do that instead). Do the exercises presented at the end of each chapter of Learn to Program.
Best For: Textual learners and people coming in with existing scripting experience who just need a translation of syntax.
Downsides: LRTHW can be a bit opaque but should be within reach.
- Treehouse's Ruby track (PAID) is a video-based alternative to Codecademy.
- Satish Talim's Ruby Tutorial (which he calls "study notes") is a to-the-point walk through the breadth of Ruby.
- Why's Poignant Guide to Ruby is the strangest programming (comic?) book ever... and maybe it's exactly what you need.
- Ruby Koans are exercises you can download and use to test your understanding.
Step 5: Databases
You can't build a web app without thinking about data. In fact, data is the critical backbone of any true web application so it will need to be top-of-mind regardless of whether you end up working mostly in the front end or back end.
Our goal here is simply to give you a taste for what's going on in databases and a bit of SQL syntax which will come in handy when you actually employ a database in the future.
Do the SQL Zoo's tutorials 0 (SELECT basics) through 3 (SELECT from Nobel). This should give you some practice playing with databases without actually requiring you to do any installation work on your local computer.
Option A: Udemy's MySQL Databases for Beginners
This video-based course is free and has just over 2 hours of total content. It provides a good overview of SQL.
Your Plan: Go through the entire course.
Best For: Video learners.
Downsides: It'll go a bit quick if you haven't seen this stuff before. Consider doing the course below as well.
Option B: Stanford's Intro to Relational DBs and SQL Sub-Courses
These two sub-courses are part of a larger Introduction to Databases course from Jennifer Widom of Stanford. They are also primarily video-based and represent pretty much the best the free Web currently has to offer for database training.
Your Plan: Go through both sub-courses and do the quizzes they offer.
Best For: Those who like the MOOC-style learning.
Downsides: It's a bit 1990's and a bit deep on irrelevant-to-you technical details but you can stick with it.
- UMass Boston's CS630 Handout 1 (Database Theory) and Handout 2 (SQL) are in-depth text-based resources. Consider them beyond our scope here but interesting nonetheless.
- W3 Schools' SQL Tutorial is a no-nonsense walk through the syntax and usage of SQL. Follow the "Next Chapter" links at the top right and bottom right to navigate.
- Learn SQL The Hard Way from Zed Shaw is an incomplete book which walks through the basics of SQL. It's good because it can be followed in tutorial format but it's not the most user-friendly in the world.
Step 6: The Ruby on Rails Framework
Rails is the "Killer Framework" of Ruby (and perhaps the last 10 years as well). It allows you to rapidly build production-ready applications while maintaining the control you need to make them 100% customized. This website is built on Rails.
Our goal here is to give you a taste of building something on Rails and going through the end-to-end steps of producing a functional web app. Whether or not you use Rails in the future, this should give you a good taste of "MVC" web frameworks and a sense for what all the fuss is about with Rails.
If you're committed to using Rails on your local machine (which you'll need to actually build a Rails app), check out the installation instructions here (RailsApps), here (Go Rails, Mac OSX), here (One Month Rails, Windows track) or here (EngineYard). Installing Rails usually means lots of time debugging things on the command line (especially if you have Windows), so bear with it! Otherwise, look into a free hosted virtual machine from Nitrous.io which will have it already installed.
To build the world's simplest Blog application on your own machine without "cheating" too much by using a tutorial. It should be able to create Posts, read Posts, update Posts, and delete Posts.
Option A: Codecademy's "Make a Rails App" Track
This fully in-browser application will not require you to do any installations on your own so you can skip that rite of passage. As with all Codecademy lessons, it'll hold your hand a fair bit.
Your Plan: Do the entire track.
Best For: Anyone totally new to Rails who might not want to go through the installations process before trying it out.
Downsides: ...you don't have to go through the installations process, so you don't really have ownership of your code.
Option B: The Rails Guide Tutorial
This simple tutorial is hosted by the Rails Guides, the primary documentation for the Rails framework.
Your Plan: Install Rails and do the tutorial on your own machine. Try reading it through once first to see how much you can understand (probably not a lot yet!).
Best For: People with a bit of prior Rails experience or dedicated text learners.
Downsides: It gets the job done but it's a bit dry. You're on your own, so you'll need to debug your own error messages.
- Rails for Zombies by Code School is a fast-moving in-browser introduction to Rails. It's a good course to take after you've already had a bit of exposure to Rails because it will otherwise probably feel a bit overwhelming.
- Learn Ruby on Rails book (PAID) from Daniel Kehoe is a gentle tutorial-introduction to the Rails framework
- One Month Rails (PAID) is a tutorial which walks you through building a Pinterest clone.
Where to go Now? Choose Your Own Adventure!
If you've followed the plan above, you've invested roughly 100 hours to get a good sense of what the web stack looks like and a solid grasp of the fundamentals of programming. You've tried out a number of different resources and technologies.
It's time to self-evaluate. Which of the previous steps did you enjoy learning the most? Which resources did you find to be the most helpful? Basically, what sparked your passion?
- If you were most comfortable being in the driver's seat on the server-side or thinking about data models, you'll want to look deeper into Ruby and Ruby on Rails. Another popular option is Python/Django.
Don't stress out about the decision -- once you learn one language well, it's much easier to jump into another later.
Regardless of which direction you choose, your goal should be to start building. We'll dive much deeper into how you can navigate this process in the next post, but the moral of the story is that you need to roll up your sleeves and build. Do whatever it takes to move from the toy projects you've created so far towards constructing more meaningful applications.
The first time the training wheels come off and you need to build something on your own is a difficult transition but it's why you're learning this stuff in the first place. As long as you've found your geek passion, you'll have the necessary motivation to push through and kick some butt.
You might even impress yourself along the way.