I’m not big on offering advice when it comes to learning how to code. Everyone learns differently and has different goals; my experience isn’t necessarily instructive. But I seem to be getting asked the same question more and more often: someone wants to be able to make cool things for the web, and they don’t know how to get started. Here are some thoughts on how to keep your head on straight while you’re trying to learn. Take them all with a big grain of salt.
Work on an idea you’re excited about.
As a learning tool, there’s nothing more powerful than having an idea that you’re genuinely excited about. There are two big reasons for this:
- Learning how to code is full of exhilarating lightbulb moments, but it’s also full of hours of banging your head against the wall, not understanding why something doesn’t work or what to do next. You will get stuck. You will get frustrated. Being excited about what you’re building will help you power through those times. Rather than lose interest when you hit the wall, you’ll go above and beyond to find a solution.
- You’ll care about doing it well. You’ll learn a lot more when you’re interested in the end product not just as proof that you did it, but as a project you wanted to build for a reason. You’ll think about the details, tradeoffs, and design considerations. You’ll question your assumptions. You’ll refine it over time instead of checking it off the list as soon as it satisfies the bare minimum.
Take your time.
There’s a whiff of infomercialism in the air these days, this notion that if you take the right online course or buy the right book, you can just skip ahead to being a master coder. The 8 Minute Abs version of learning to code is like the 8 Minute Abs of…well, abs. It’s an enticing fiction, the notion that as long as you’re really clever about the process and you buy the right accessories, you can skip most of the actual doing.
It’s true that it’s easier than ever to do amazing things quickly, and that you’ll have lots of bursts of insight that make it all feel quick and easy. You’ll add a few lines of code and make something great happen on the screen, and you’ll be ready to take on the world. But this is a long, gradual, and humbling learning process. There aren’t a lot of shortcuts for building up the context, the “why” behind different approaches and frameworks and the code underneath them, and that’s what will allow you to go off-script and improvise awesome stuff.
You’re not checking off a box when you learn to code. You never stop learning. But that’s part of the fun!
Don’t overload on tutorials.
Tutorials are easy to find. In five minutes of Googling, you could grab 10 of them on every coding topic you care about. But they won’t stick nearly as well as hands-on practice and experimentation. And when it comes to code, it’s much easier to read about the “how” than the “why” (in part because it’s much easier to write about the “how” than the “why”). You want healthy portions of both (one of the peculiarities of learning to code for the web: you’re constantly learning in both directions on the ladder of abstraction, learning new tricks you don’t fully understand and learning more about how your old tricks actually work).
Tutorials are great sometimes, especially when you have a well-defined task you’re trying to figure out, but use them sparingly. Get your tutorials on a just-in-time delivery system. Don’t just go on a shopping spree and expect to download all that information into your brain.
Don’t worry too much about the “right” way to do things.
As you learn to code, you’ll probably feel self-conscious about whether you’re doing things the way you’re “supposed” to. You’ll come up with some weird approach that does what you want but you’ll be certain that it’s an absurd solution and that if you were a real coder you could do it the correct way. Coders actually have a word for this situation: we call it “coding.”
There are lots of reasons it’s easy to feel self-conscious, especially if you’re just starting out:
You get a distorted view of what real code looks like when you’re learning.
You presuppose there’s a right answer.
Finding the one unquestionably correct approach is the exception, not the rule. There are usually many valid ways to coding something for the web. This is especially true because the code under the hood is so inextricably linked to questions of design. Get used to thinking in terms of tradeoffs and what approach best balances them for your users and your goals rather than thinking in terms of right answer/wrong answer.
You feel like you aren’t a “real” coder yet.
You’ll find yourself having conversations and reading documentation full of jargon and backdoor brags that make you feel you don’t belong and you should go sit at the kid’s table. People will drop in loaded words like “simply” and “just” to make time-consuming and difficult tasks sound like they should be effortless, and that if they aren’t it’s because you’re stupid. These same people know full well that most of the things they planned to “just” do ended with them spending five hours tearing their hair out wondering why it didn’t work. There are also some outright code snobs who will act like you might as well be programming on a Speak & Spell if you don’t use their preferred language or software or operating system.
I won’t bother getting into my armchair psychoanalysis of why all this happens, but you shouldn’t let it get to you, and here’s one reason why: they’re making it up as they go along too. There is no high priesthood of people who have gone through the traditional rites and received The Knowledge.
Teaching yourself to code is an idiosyncratic process, like teaching yourself to cook. You don’t suddenly cross the threshold from non-cook to cook; you learn some specific dishes and some underlying common principles, then you learn some more. As you learn new tricks you practice and master your old ones. But what exactly you end up learning to cook will depend on a lot of factors and not perfectly overlap with anyone else. In the same way, every web coder takes a very different winding road to their knowledge and ends up with a mix of mastery of some things and total ignorance of others. This is actually great, because it means we all have a lot to learn from each other.
Find a community.
Don’t be a hero and try to power through the learning process on your own, surviving only on twigs and berries and O’Reilly books. Your fellow learners are your best resource (and remember, all coders are learners). Make friends with fellow beginners, but with more experienced coders too. Go to meetups. Ask lots of questions. Get feedback. Offer feedback. Like somebody else’s work? Tell them so, and tell them why. And don’t forget to share your own work and the lessons you’ve learned. You’ll have much more to teach others than you realize.
There’s always more to learn.
Learning to make stuff for the web means going at your own pace and getting more comfortable with the fact that there will always be a lot left to learn. For every thing you master, you’ll also find out about ten other things you didn’t even know you didn’t know. And the web moves fast - even if you could learn it all, by the time you finished, so much more would be possible. So don’t get overwhelmed. Just worry about the next thing you need to learn, have some fun, and don’t be afraid to get in over your head.
Some fine print: besides being generally skeptical of my advice, you should keep my biases in mind. I’m an accidental web developer who just sort of learned along the way because I had things I wanted to make. That may not suit you. Also, learning by doing without a grand plan works pretty well for the web, but don’t assume the same is true of programming generally, especially complex or high-stakes things. If you’re serving up code to millions of users, managing a bunch of important databases, or writing software for banks or ballistic missiles, you should probably get some real computer science education and care about the “right” way to code things.