← Back to Blog

Where to Start with Programming When You Know Nothing

A no-nonsense roadmap for teaching yourself programming and computer science from home: what course to start with, which books to read, how much math you need, and the traps to avoid.

If you've ever typed "how to learn programming" into a search bar, you know what happens next: hundreds of courses, dozens of languages, YouTube roadmaps with 40 boxes and arrows, and people arguing about whether you need a degree, a bootcamp, or just "build projects bro."

It's overwhelming, and that overwhelm is the number one reason people never start or quit after two weeks.

This post is the roadmap I'd give a friend who knows nothing about programming and wants to learn from home, for free or close to it. I'll cover what to start with, why, what to read alongside it, how much math you actually need, and the mistakes that derail most self-taught learners.

N
NOTE

The short version:

  1. Take Harvard's CS50x (free) and finish it.
  2. Practise problem-solving separately from the course.
  3. Read two approachable books: Code and Grokking Algorithms.
  4. Don't front-load math. Learn it when you need it.
  5. After CS50x, pick one direction and go deeper.
  6. Build your own small projects, use Git, and don't hop between courses.

Step 1: Start with Harvard's CS50x

CS50x is Harvard's Introduction to Computer Science, offered free online. If I could recommend only one thing, it would be this.

Why CS50x and not a "Learn Python in 30 Days" course?

  • It assumes zero experience but doesn't water anything down. Most beginner courses teach you syntax: how to write a loop in one language. CS50 teaches you computer science: how data is stored, how memory works, how algorithms are compared, and why some code is fast and some is slow. That knowledge transfers to every language you'll ever touch.
  • It covers several languages on purpose. You start with Scratch (visual blocks), move to C, then Python, SQL, and a bit of HTML, CSS, and JavaScript. Seeing the same ideas in different languages teaches you that languages are tools and the concepts underneath are what matter.
  • The problem sets are excellent. They're hard enough to make you think and structured enough that you can finish them.
  • The lectures are good. You'll want to watch them, which matters more than people admit.
  • It's free, and there's a large community around it (Discord, Reddit, Stack Exchange).

What to expect

W
WARN

The C weeks are hard, on purpose. Somewhere around weeks 2–5 the course works in C, and you'll meet memory, pointers, and arrays at a low level. Many people hit a wall here. That's normal.

Why it's worth it: C hides almost nothing. Once you understand what's happening in C, higher-level languages like Python feel like a gift instead of magic you don't understand.

  • Pace: don't try to do one week per week. One to two weeks per course week is a perfectly healthy pace for a beginner with a job or other commitments.
  • Time: an hour a day beats a single 8-hour Saturday. Your brain consolidates new skills between sessions, so frequency matters more than duration.
T
TIP

How to use AI while learning. CS50 has its own AI tutor (the "CS50 duck"), designed to guide you without handing you answers. That's the right model for any AI tool while you're learning:

  • ✅ "Explain what a pointer is, using an analogy."
  • ✅ "Why does my loop run one extra time? Don't fix it, give me a hint."
  • ❌ "Write the solution to this problem."

The struggle is the learning. If the AI does the struggling, the AI does the learning.


Step 2: Learn to think like a programmer

Here's something nobody tells beginners: syntax is the easy part. You can look up how to write a for loop in ten seconds. What you can't look up is how to break a problem you've never seen into steps a computer can follow.

That skill (problem decomposition) is what "thinking like a programmer" really means. It improves with deliberate practice.

A simple method for any problem

  1. Restate the problem in your own words. If you can't, you don't understand it yet.
  2. Work a small example by hand, on paper. What did you just do, step by step?
  3. Write those steps as plain-English pseudocode before writing any real code.
  4. Solve a simpler version first. Can't sort a list of 1,000 names? Sort 3.
  5. Translate to code one small piece at a time, and run it after each piece.
  6. When stuck, change one thing and observe. Print variables. Guess, test, adjust.

Where to practise

  • Exercism: free exercises in dozens of languages, with optional feedback from human mentors.
  • Codewars: bite-sized puzzles ranked by difficulty. Stick to the easiest levels at first.
  • Advent of Code (each December): a puzzle a day. Great once you're past the basics.

A few short exercises a week, separate from your course, will sharpen your problem-solving faster than anything else.

The book for this

Think Like a Programmer by V. Anton Spraul focuses entirely on problem-solving strategy rather than any one language's features. It's a good companion once you've done a few weeks of CS50.


Step 3: Read two books that make everything click

You don't need a stack of textbooks. These two are readable, even enjoyable, and fill gaps a course can't.

Code: The Hidden Language of Computer Hardware and Software by Charles Petzold

This book builds a computer from scratch in your head, starting with flashlights and Morse code and ending with a working processor. It reads like a story, not homework.

Why read it: after this book, computers stop being black boxes. Binary, logic gates, memory, and instructions all make sense, which makes the early CS50 lectures far easier to absorb.

Grokking Algorithms by Aditya Bhargava

An illustrated, friendly introduction to algorithms: searching, sorting, recursion, graphs, and "Big O" notation (a way of describing how fast an algorithm is).

Why read it: algorithms are the part of CS that sounds scariest. This book shows they're mostly common sense with good names.


Step 4: The math question

"Do I need to be good at math to program?" is probably the most common question beginners ask, and it stops many people from starting at all.

N
NOTE

The honest answer. To start: no. To go deep into some areas (graphics, machine learning, cryptography, algorithm design): yes, eventually. But you learn it when you need it, not before.

What you need at the start

  • Basic arithmetic and algebra: variables, simple equations, order of operations.
  • Logic: AND, OR, NOT, if/then reasoning. Programming is mostly logic, not numbers.
  • Binary and hexadecimal: CS50 teaches these in week 0.
  • Remainders (the modulo operator): e.g. "is this number even?" You'll pick it up in an afternoon.

That's it. Really.

What to learn later

Once you've finished an intro course and want to go further, the most useful area is discrete mathematics: logic, sets, proofs, counting, probability, and graphs. This is the math of computer science.

  • Khan Academy: for refreshing algebra or filling gaps, free and self-paced.
  • Mathematics for Computer Science (MIT, free online): the go-to resource when you're ready for discrete math properly.
W
WARN

Don't do "math first." A common trap: "I'll brush up on math for a few months, then start programming." Months later, there's still no code and motivation is gone. Start coding now. When a topic needs math, learn that piece then. It sticks better when you have a reason to learn it.


Step 5: After CS50x, pick a direction

Once you finish an intro course, you've earned the right to specialize. Pick one of these, based on what excites you:

If you want to...Go to
Automate tasks, work with data, write scriptsCS50P (CS50's Python course), then Automate the Boring Stuff with Python (free online)
Build websites and web appsCS50 Web or The Odin Project (free, project-based)
Understand the tools every developer usesMIT's The Missing Semester: the command line, Git, editors, debugging
Get a full CS-degree-level education, self-taughtOSSU or Teach Yourself CS: curated, free curricula
Make gamesCS50's Game Development course, or a beginner-friendly engine like Godot
T
TIP

Do The Missing Semester no matter what. It's short and covers the stuff every course assumes you already know: using a terminal, version control, and debugging tools. It'll save you dozens of hours of confusion.


Step 6: Habits that matter more than which course you pick

Courses are the easy part to choose. Habits decide whether you actually become a programmer.

Build your own things, however small

Following a course feels productive, but real learning happens when you face a blank file with no instructions. Between courses, build something small that you want: a to-do list, a budget calculator, a script that renames your photos, a text adventure game. It doesn't need to be original or impressive. It needs to be yours.

Use Git and GitHub from day one

Git tracks every change to your code. GitHub stores it online. Learn the basics early (init, add, commit, push) and put your work there. You'll build a habit professionals rely on, and you'll end up with a public record of your progress.

Take notes in your own words

After each lecture or chapter, write a short summary without looking. If you can't explain an idea simply, you haven't learned it yet. This is the fastest way to find your own gaps.

Read error messages

Beginners see red text and panic. Error messages are the computer telling you what's wrong, usually including the line number. Read them slowly, top to bottom. Search the exact message. This one habit separates people who get unstuck from people who give up.


Troubleshooting: common traps and how to escape them

!
BUG

"Tutorial hell": I've finished five courses but can't build anything. Why it happens: following along feels like learning, but someone else is making every decision. Fix: stop starting new courses. Build one small project with no tutorial. You'll get stuck constantly. That's the point. Look things up only when blocked.

!
BUG

Course-hopping: "Maybe this other course is better." Why it happens: every course gets hard eventually, and a fresh one feels easier because it starts with material you already know. Fix: commit to finishing one course. Difficulty means you're at the edge of what you know, and that's where learning happens. It doesn't mean you picked the wrong course.

!
BUG

Language paralysis: "Should I learn Python, JavaScript, Rust, or Go first?" Why it happens: the internet loves this argument. Fix: it barely matters. Concepts transfer; syntax is learnable in days once you know one language. Pick what your course uses and move on.

!
BUG

Stuck on a problem for hours. Fix: use a time limit. Struggle for 30–60 minutes, then ask for a hint (a forum, a friend, or an AI told to give hints, not answers). Explain the problem out loud to an object on your desk ("rubber duck debugging"). Saying it out loud often reveals the issue. Or step away, since sleep solves a surprising number of bugs.

!
BUG

"Everyone else is smarter than me." Why it happens: you're comparing your messy middle to other people's polished results. Fix: compare yourself to you from a month ago. Every experienced programmer has stared at a broken program feeling stupid, and most of them still do regularly.

!
BUG

Losing momentum after a busy week. Fix: lower the bar instead of quitting. Twenty minutes counts. One exercise counts. Reading a chapter counts. Keeping the habit alive matters more than any single session.


Your first week, concretely

If you want to start right now, here's your first week:

  • Sign up for CS50x (free) and watch the Week 0 lecture.
  • Complete the Week 0 Scratch problem set. Yes, it's visual blocks. It still teaches real logic.
  • Order or borrow Code by Charles Petzold and read the first few chapters.
  • Create a free GitHub account.
  • Set aside a regular time, even 45 minutes a day, and protect it.

That's it. No roadmap with 40 boxes. One course, a couple of books, a practice habit, and the patience to keep going when it gets hard.

N
NOTE

Remember: every programmer you admire started out knowing nothing. The difference between them and people who "tried coding once" mostly isn't talent. They kept going.