Learn to Code
All tracks
Learn to Code

Free lessons from scratch to pro — every language, databases and DevOps.

AboutContactPrivacy PolicyTerms of Use

Your progress is saved in this browser. © 2026 Learn to Code

PB
Programming Basics
0/10 completed
Beginner
How computers workWhat is a program?Thinking in algorithmsData, variables and types
Intermediate
Decisions and loopsBreaking problems into functionsErrors and debugging
Advanced
Reading documentation and learning on your ownClean code basics
Pro
Thinking like a software engineer
Tracks / Programming Basics / Advanced

Reading documentation and learning on your own

No programmer memorises everything. Senior engineers look things up all day. The real skill is knowing how to find answers quickly and reliably. This lesson teaches you to learn without a teacher.

Where good answers live

Source Best for Examples
Official documentation Accurate, complete, up-to-date reference MDN (web), docs.python.org, react.dev, docs.docker.com
Error message search Fixing a specific error Search engines, Stack Overflow, GitHub issues
Source code How a library really works GitHub repositories
AI assistants Explanations, first drafts, brainstorming Always verify what they say against the docs or by running the code
Tutorials and courses Learning a new topic step by step Like this site!

Prefer primary sources. A blog post from 2017 may describe an API that has since changed. The official docs are the source of truth, so check the version number.

Anatomy of a documentation page

Most reference docs follow the same structure. Here's how to read MDN's page for JavaScript's Array.prototype.slice():

  1. Signature (syntax): slice(start, end). Square brackets in docs often mean optional: slice([start[, end]]).
  2. Parameters: what each input means, its type, and its default.
  3. Return value: what you get back. Here, a new array.
  4. Description: behaviour details and edge cases (negative indices count from the end!).
  5. Examples: usually the fastest way to understand.
  6. Browser or version compatibility.

Now verify your understanding by experimenting. Docs + quick experiments is the fastest way to learn:

JavaScript · editable

Built-in help

Many languages let you read the docs from inside the program:

Python · editable
Python · editable

In a terminal: man ls, git help commit, python -m pydoc json, or some-command --help.

How to search effectively

  • Include the language or tool and the version: python 3.12 read csv file, not just read file.
  • Paste the exact error message, minus your own file paths and variable names.
  • Describe the goal, not your broken attempt: "javascript remove duplicates from array".
  • Look for results from the official docs, Stack Overflow answers with high votes and recent dates, and GitHub issues for library bugs.

Asking good questions

When you're stuck after trying, ask in a way that gets fast, good answers:

  1. What you're trying to do, the goal.
  2. What you tried, with a minimal code example that reproduces the problem.
  3. What you expected vs what actually happened, including the full error message.
  4. Environment: language version, OS, library versions.

Creating a minimal reproducible example often reveals the answer before you even ask.

Learning a new language or tool, fast

  1. Do the official "Getting started" or tutorial.
  2. Learn the core: variables, types, conditions, loops, functions, collections, errors.
  3. Build something small immediately, like a to-do list, a calculator or a file renamer.
  4. Read other people's code on GitHub.
  5. Learn the ecosystem: package manager, testing, formatting.

Avoid tutorial hell. Watching tutorial after tutorial feels productive but isn't. Real learning happens when you build something without step-by-step instructions and get stuck. Getting unstuck is the skill.

Practice

Using only Python's built-in help() and experiments (no searching!), figure out:

  1. What does str.center do, and what's its second parameter?
  2. How do you sort a list of words by their length? (Hint: help(sorted) and look at key.)
Python · editable
✎ Check your understanding

1.What's the most reliable source for how a function works?

2.What does a "minimal reproducible example" mean?

← Errors and debugging