Aug 18, 2017blog

Three steps to learn to code, as a complete beginner

There was a time where all you needed was a program like Dreamweaver and a domain name, and you could learn all there was to know about web development in a few days. Unfortunately, that’s no longer the case.

Web development is now an incredibly diverse, active field, with new tricks and gadgets coming out daily and abandoned just as quickly. Professional web developers use a formidable mix of frameworks and tools that’s daunting to beginners. It’s easy to become paralysed by indecision - what should I learn first?

Luckily, as coding itself becomes more varied, the resources available to total beginners are also better than ever. Best of all, most of these don’t cost a penny.

Here are the three stages of learning I went through over the past four years, taking me from a complete novice who’d never written a line of code to someone comfortable with a range of modern web technologies.

Stage 1: Learn your first language with interactive lessons

Codecademy is one of a growing number of sites which offer free, basic courses in a variety of coding languages.

It’s a powerful tool for learning because it’s interactive. If you make a mistake, it’s easy to work out exactly how to fix it.

Sites that offer only non-interactive video lessons often stump complete beginners - learners might have different software versions to an instructor, and get frustrated when things don’t work as described. Codecademy avoids this problem with a code editor and preview right there in the browser.

The Codecademy interface makes it difficult to get stuck.

The basic HTML and CSS courses are a great place to start. While you can’t build a full-fledged web application with HTML and CSS alone, you can produce great looking websites, and knowing HTML and CSS is a vital prerequisite for learning a ‘proper’ language like PHP, Javascript or Ruby.

Once you’ve learned those basics, Javascript is as good as any language to learn next. It’s Javascript that enables the rich interactive experiences we’ve become used to on the web.

At this early stage, it doesn’t really matter what languages you learn. Modern programming languages have a lot of shared features (loops, variables, functions and so on), so no matter what your first language is, you’ll find it easier to learn your second, and so on.

This initial stage is very swift - you should be able to blast through a few of these courses over a weekend or a few evenings.

Stage 2: Get stuck in with projects and tutorials

You can learn the basics of a programming language in a matter of hours. Once you have that down, the next stage is to apply that understanding to real-world projects. That means tutorials.

Lots of tutorials.

If you are new to self-directed learning, take some time to consider whether you learn best from written articles or video lessons.

Youtube channels like DevTips and Mackenzie Child offer a suite of instructional videos targeted at beginners.

It may be that you’re learning to code with a particular objective in mind. Perhaps you want to sell something, advertise an organisation, or re-do an existing site? Personally, my initial objective was to learn enough to create a Wordpress theme for my student newspaper.

If you have an objective set out, you should seek out tutorials that relate to it. You might even find a tutorial that accomplishes exactly what you want to do. If you can’t, don’t worry, because every tutorial will expand your knowledge in a way you can apply to your later work.

You may even run across people who are surprised you're not using the latest cutting-edge framework or tool in your work. Ignore these people.

Motivation often flags during this stage. The quick results and ‘aha’ moments of learning a new language for the first time don’t happen as often. It’s vital to go at your own pace and only do tutorials you find fun or interesting.

You can keep your motivation up by exploring at the work of others. Publications like Net magazine, and podcasts like the Big Web Show showcase a diversity of successful web projects, and can help you avoid getting stuck in a rut.

Depending on your pace, this stage might last a few weeks, to a few months, to upwards of a year.

Lastly, it’s important to keep a sense of perspective. Web development has only been around for just over a decade. It’s an incredibly fast-moving industry, with a ton of new frameworks, tools, trends released every month. Try not to be overwhelmed and distracted by all the noise: focus on your own goals and learning plan.

Stage 3: Research problems the smart way and start gaining experience

Eventually, you’ll stop following tutorials by rote and start working on your own projects.

You’ll find that you rely less on other people’s instructions and more on your own ingenuity. You’ll also find that the problems you have to solve will be bigger, and won’t throw up as many easily-googled answers.

It’s easy to solve common errors like “why is my CSS not working” or “what does Wordpress ‘Error establishing database connection’ mean”, but once you strike out on your own, your whole project is one big problem to be solved.

You’ll find that as you gain experience, your problems will become less like “How do I…” and more like “What’s the best way to do…”. In web development, there are often many ways to address a particular challenge, and creating good code is understanding which solution is the best fit.

Encountering problems can be very frustrating as a beginner, but once you get to this stage, you’ll start to enjoy thinking your way around each challenge.

At this stage, the best measure of your ability as a coder isn’t knowledge - it’s experience.

Sites like StackOverflow and Github will become your best friend. There’s no shame in keeping forums and reference material close by while you code. No one’s brain is big enough to hold an entire language or framework in their head, no matter what they say.

StackOverflow and Github are two great resources for coders of all kinds.

The popular culture version of a computer programmer - someone who works in isolation, hammering away on their keyboard - is a myth. In real life, coding is a collaborative, social activity, and people who lean on the experience and ideas of those around them generally make better coders.

This is all to say that you should consider web development a community. Listen to podcasts, read articles, follow other developers on social media. If you have the opportunity, go to a conference!

Listening to what other coders have to say is the best way to stay up to date, and to make sure that you never stop learning.