You can read and write — right?
Odds are, you can.
Next question: Can you read and write code?
Odds are, you can’t.
One percent of Americans are professional programmers. But for the remaining 99 percent of us, learning to code may be nearly as important as good old reading, writing, and arithmetic. At least, Steve Jobs thought so. The Apple cofounder said in 1995: “I think everybody in this country should learn how to program a computer because it teaches you how to think.”
Plenty of other people and organizations have bought into the learn-to-code hype: In 2013 a nonprofit called Hour of Code launched a campaign to encourage people to start learning code, with backing by Apple, President Barack Obama, Microsoft founder Bill Gates, and Facebook founder Mark Zuckerberg. In 2014 England added coding skills to its nationwide curriculum. And numerous startups and nonprofits have emerged to meet the demand for training; in the past three years, 260 million people have used the free Hour of Code training.
Here’s a step-by-step guide to take you from code newbie to know-it-all.
1. Understand what coding is.
Coding is, quite simply, a way of telling a machine what to do.
If you’re down for a deep dive, you can read this 38,000-word essay answering the question “What is code?”
“Coding” is the most common term used by educational sites, but it’s a bit more complex than that. First, there’s no one way to code — there are numerous languages used to code for different types of projects. Second, knowing how to code with a particular language doesn’t make you a programmer or developer.
Though there is some debate about the overlap of coding, programming, developing, and other related pursuits, most people agree that to get beyond coding, you need to be able to understand logic and algorithms, connect different systems and languages, and communicate and collaborate with other people.
2. Understand how coding can help you.
Enhance digital literacy. Since machines are everywhere, knowing how to talk to them is a pretty useful skill. You can better understand the digital tools you use every day — and make them work better for you.
Cultivate skills. Learning to code can foster both hard and soft skills that will benefit you in your career and life. The hard skills help you do cool stuff: create websites, apps, games, and software; analyze a web of data; automate complex tasks; or tackle any number of problems. The soft skills help you think and work better: you’re pushed to model and iterate ideas, identify and solve problems, and work within a collaborative community.
Expand your horizons. Learning to code expands your options much like learning to learning to read and write allows you to explore and express a world of ideas. Mitch Resnick of MIT Media Lab said in a TED talk, “When you learn to read, you read to learn. And it’s the same thing with coding: If you learn to code, you can code to learn.”
Solve problems. Don’t learn to code for coding’s sake — learn because you want to use code as a tool to solve problems. “Before you look at programming at all, figure out a problem that you’re excited about, something that’s going to motivate you to learn about the languages and tools available,” advises programmer and vlogger Kevin Gisi. “And once you’ve built that really cool thing, you’re going to discover that you accidentally picked up a lot of skills along the way.”
3. Pick your path.
Before you start, remember Gisi’s advice — figure out what you want to do with your future coding skills. Figuring that out is important for two reasons: first, different programming languages are used for different things, so you want to make sure you learn the language that best fits your goals. Second, having a specific, meaningful goal motivates you to keep going.
“Learning programming is like practicing scales,” Gisi says. “It’s going to make you a very strong musician, but if you do that for years without ever playing a song, you’re going to get very frustrated. It’s a lot easier to learn something when you have a reason to want to know it.”
So which language should you learn?
The Learn Programming subreddit (a subreddit is a forum on a particular topic — if you’re unfamiliar with Reddit, here’s a primer) offers this guide in determining which language to learn first:
|I Want to Learn How To||Then Consider Using|
|Make iPhone Apps||Swift|
|Make Android Apps||Java|
|Write Windows desktop applications||C#|
|Make 3D games||C# or C++|
|Do scientific/mathematical computing or data analysis||Julia, Python, R, or Matlab|
|Do automation and scripting||Many languages (Python, Ruby, Bash, Powershell, AutoHotKey…)|
Other resources to help you find your programming-language match:
- This flowchart
- This quiz
- This choose-your-own-adventure
- This lengthy essay (scroll down to section 7.1)
4. Pick your course.
Check out our ultimate resource list for learning to code for a curated list of sites that are highly rated by users, recommended by experienced programmers, and associated with well-known institutions.
All of the sites on the list offer courses for people with zero programming experience. Each listing details the types of courses offered, cost, time commitment, experience level, and a sampling of topics covered. Though many courses are free, courses geared toward people seeking a career in programming are usually paid. Among all the options, you’re sure to find one that’s right for you.
5. Have a support system.
Code can be intimidating, but you’re not alone — the programming community values collaboration. Here’s how you can get help:
Get a buddy. Even if your buddy is a newbie too, you can keep each other accountable and work through challenges together. Look for a buddy on Perunity or the Programming Buddies subreddit. You can also find local buddies by searching Meetup for interest groups focused on what you’re learning. Girl Develop It has chapters that help women network and team up to learn and practice programming.
Get a mentor. Mentors can help you when you get stuck and make sure you’re on the right track. Find one on CodeMentor or the Code Mentors subreddit.
Ask a forum. The most popular programming forum is Stack Overflow, followed by Reddit — the general programming subreddit is Learn Programming, and there are many other subreddits specific to a particular programming language or narrower area of interest.
Ask good questions. To get (free!) help with coding, you have to follow the unofficial code of conduct for asking questions. If people feel like you’re wasting their time, you’ll get either no response or a snarky one. Consider these tips:
- Before you post, search the forum to see if your question has already been answered.
- Write a descriptive title and post. The Learn Programming subreddit uses these examples: BAD: “What’s wrong with this?” GOOD: “[C++] Segmentation fault while writing to array in a for loop.” (The programming language is listed in brackets, and it describes both the attempted task and the problem.)
- Demonstrate that you’ve made an effort to tackle your problem, and you’re not expecting people to do the hard work for you. Mention what methods you’ve tried so far to address your problem.
- This article on asking smart questions has more great advice, and is also a useful introduction to the distinct character of the programming community.
6. Go beyond the basics
It’s true you can quickly learn the basics of code. But just as learning English (or any other language) doesn’t make you a great novelist, learning code doesn’t make you a great programmer. That takes plenty of practice.
In fact, Erik Trautman, founder of Viking Code School, observed that after the “hand-holding honeymoon” of beginner online coding courses, many people fall off the “cliff of confusion” into the “desert of despair” as they struggle to move to intermediate and advanced levels and apply what they learned to real-life problems.
The solution: keep practicing and pushing yourself toward meaningful goals. Check out one of these sites to find project ideas, challenge yourself, and compete and collaborate with others:
- Code Abbey
- Daily Programmer subreddit
- Fight Code
- Practice exercises suggested by the Learn Programming subreddit
- Project Euler
- Sphere Online Judge
With practice, soon you’ll get to the phase beyond the “desert of despair” — Trautman calls it the “upswing of awesome.”
Holly Munson is a freelance writer, editor, and content strategist based in Philadelphia. She has been reporting on business trends for seven years and has also worked in marketing, magazines, and museums.