How to learn to code when you have no idea where to start

Apple's Hour of Code program is back at Apple retail stores, taking place December 4 - 10! You can sign up for workshops at your store by visiting Apple.com/retail. Whether you join Apple or work on your own, here are some great resources for learning how to code.

It would likely take you millions of years to consume all the content available on our computers, phones, and tablets — there's so much out there on the Internet and App Store, and more coming every day. But what if you want to make your own content? That world can be a lot darker and scarier if you're not sure where to start.

There's a ton of great content on website-building, ebook creation, writing automated workflows for productivity, and even putting together your own apps. But when you're starting from step zero, where do you go? Who do you talk to?

Why learn to code in the first place?

I remember being in the dark. I first started tinkering with HTML in 1998, back when how-to sites were few and far between. I stumbled into self-teaching myself HTML, CSS, PHP, and Javascript throughout the next decade, with a few terrible detours — including Python, which to me, felt just as scary as the snake of the same name. And then, in 2010, I started the whole process over again in learning how to build ebooks.

I got lost more times than I can count. I made many, many mistakes. But: I came out of nearly two decades of experimentation loving to code.

Coding gives you the power to not only enjoy other people's projects, but also to say "I can do that!" and build your own passions. You form excellent problem-solving skills and troubleshooting steps — steps that I use almost every day in other areas. And if you enjoy logic puzzles, coding is a neat way to scratch that itch and make something special for yourself.

The language you learn can be helpful in the most unlikely of situations: Because I knew HTML and CSS, I ended up with lots of one-off web jobs from friends and acquaintances who didn't want to venture into those waters. In my early post-college years, those jobs paid my rent; and it was HTML and CSS that helped land me my first job at Apple, and my ebook-building job at Macworld.

And, like learning real-world languages, once you understand one coding language, it's a whole lot easier to get to know the others.

Great resources to start learning how to code

The good news is, you don't have to stumble through coding and self-teach yourself the way I had to. It's 2017, and you have your pick of great, interactive resources for learning to code. Whereas I had to rely on the kindness of random internet strangers and HTML Goodies, you can quickly pick up the basics of just about any coding skill with the right tutorials.

Here are some of my favorite starting points:

Code.org

If you've never touched code before and the mere thought of writing things with brackets and chevrons scares you, give one of these programs a whirl. Apple has partnered with the company for years to help teach its "Hour of Code" workshops, and it's easy to see why: The lessons are fun, colorful, and present code as more of a Lego puzzle to be built than endless lines of text. And better yet: You can take the courses on your Mac, PC, or mobile devices.

Khan Academy

Khan Academy offers a large assortment of online classes for you to enjoy ranging all manner of topics, but I put them on the list specifically for their Computer Science program. If you want a deeper dive into the theory and building blocks of coding, this course does an excellent job of it — and keeps you entertained, too!

If you want to dip your toe into web development, Khan Academy also offers Hour of Code tutorials for creating Javascript animations, building a webpage, or databases of information. And if you want to learn on the go, Khan Academy has a great app for iOS devices.

Codecademy

Ready to get your hands into some actual web development? Codecademy is an incredible free resource for learning just about every major web programming language out there. The website offers a step-by-step interactive course for building a webpage along with lots of tutorials for web languages and systems like Javascript, Ruby on Rails, SQL databases, and Git.

Codecademy's tutorials are very easy to follow and all your progress is automatically saved, so you can come back to it at any time. Unfortunately, the website doesn't work well with iOS devices at this time, but they're excellent in a Mac or PC browser.

Learn Swift

If it's iOS app development you want to explore, Apple's Swift language is the perfect place to start — and the Learn Swift website has collected a ton of material for beginners and intermediates to peruse. While there are no sites offering free interactive tutorials for Swift (that I know of — readers, if you have a great site to recommend, post it in the comments!), that doesn't mean you solely have to rely on text documentation.

There are great resources like We heart Swift if you're looking for interactive paid tutorials, or Apple's extensive Swift library for text, video, and everything in between.

When in doubt, search!

I've been coding HTML websites for over 18 years, but I still use Google almost every day to double-check a piece of code, or integrate an open-source Javascript tool. Your search engine is one of the best tools you have for finding answers or information to your coding problems: Chances are, someone else online has had this problem before you, and it's been solved.

  • Stack Overflow is also a great resource. It's a huge programming community full of smart developers, and always worth a visit if you're having trouble with your projects.
  • W3 Schools serves a vital role in the web coding space: showing how these things are supposed to work and breaking down the individual components so you can see exactly what does what.
  • CodePen isn't so much of a resource as it is a tool for web developers. With CodePen you can try out live changes to your markup without having to save and reload a page, or just use it as a playground to see how HTML, CSS, and JavaScript all work together in web harmony.

Let's find out together!

Whether you want to learn how to build a website, create an ebook for the iBookstore that doesn't suck, get an introduction to the great iOS automation app Workflow, or ease into app programming with Swift, we're hoping we can answer your questions and give you a good starting point.

Have a topic you'd like us to look into? Let us know in the comments.

Updated Nov 2017: Updated content for 2017.

Serenity Caldwell

Serenity was formerly the Managing Editor at iMore, and now works for Apple. She's been talking, writing about, and tinkering with Apple products since she was old enough to double-click. In her spare time, she sketches, sings, and in her secret superhero life, plays roller derby. Follow her on Twitter @settern.