Learn How to Code for Free

Here are some tips on learning how to code for free using online resources.

1. Decide what kinds of things you want to build

There are many kinds of programming:

  • Do you want to build websites?
  • If you're building websites, do you want to work on the user interface ("frontend") or the server ("backend")?
  • Do you want to build mobile apps?
  • Do you want to program hardware devices or robots?
  • Create desktop applications?
  • Study machine learning and data science?

If you aren't sure yet, don't worry — you can skip to the books and courses section below and just start with general basics until you find a specific topic to focus on.

2. Choose a programming language

The first programming languages you choose might depend on what you want to build. The table below isn't meant to be comprehensive, but just lists some possible starting points based on your interests.

Tip: you can't go wrong by starting with Python or JavaScript. The things you learn there will be transferable to other languages.

If the table below doesn't make sense yet and you just want a recommendation on what language to choose, skip to the courses section below and start with the free "CS50" course.

Goals Example Languages
Frontend web development HTML, CSS, JavaScript
Backend web development HTML, basic CSS, Node.js, Python, Ruby
Full-stack web development HTML, CSS, JavaScript, Node.js, Python, Ruby
Mobile apps JavaScript, Java, Swift, Kotlin
Data science Python, R
Hardware / IoT C
Systems programming C, C++, Rust
AR / VR JavaScript, C#, C++
Games JavaScript, C#, C++
Creative coding JavaScript, P5.js, Processing
Databases SQL, NoSQL (various)
Test Automation Python, Java

3. Find a course and/or book

Here are some free courses and books to learn from.


Harvard CS50

If you aren't sure where to start, give Harvard's free CS50 course a try. It covers the basics.

MIT 6.00

MIT offers two free, introductory courses that teach computer science using Python:


You Don't Know JavaScript (YDKJS)

The YDKJS series is free to read online.

Automate the Boring Stuff with Python

Automate the Boring Stuff with Python is a free online book on how to learn Python through practical projects.

4. Join a community

It helps to be able to ask questions when you get stuck.

If you're near Berkeley or San Francisco, you can also join our meetup group.