Reading Rust

Part 0 · Orientation

Why you will feel stupid, and why that is the plan

This course is deliberately uncomfortable. Here is the evidence behind that choice, and the five rules that make it work.

25 mindesirable difficultiesPOEself-explanation
What this lesson is trying to break (3)
  • Smooth reading means successful learning.
  • Being confused is a sign the material is badly explained.
  • An experienced engineer can skim a new language and pick it up.

You have six years of experience and you have picked up languages before. Go took you a couple of weekends. TypeScript was barely a speed bump. So the honest question at the start of a Rust course is: why would this one be different, and why is this site built to slow you down?

Here is the short answer. Every language you have learned so far shared one model with the languages you already knew: a variable is a name that refers to a value, and something else takes care of memory. JavaScript, TypeScript, Java and Go all agree on that. Learning them was mostly learning new syntax and new libraries on top of a model you already had.

Rust disagrees with all four of them, at the level of what a variable is. You are not adding to your model. You are replacing part of it. That is a different kind of work, and the research on it is unambiguous: it is slower, it feels worse, and the usual study methods fail at it in a specific way.

The trap: your existing model is fast, confident, and wrong

Let us establish the loop immediately. This is the pattern for every lesson.

Predict firstcommit in writing, then look
fn main() {
    let s = String::from("hello");
    let t = s;
    println!("{s}");
}

Take it seriously — type an actual answer. Ten seconds.

That absence of doubt is the whole problem. A wrong model that produces doubt gets checked. A wrong model that feels obvious does not — you read straight past it, and it stays.

Why reading The Book is not enough

The Rust Book is genuinely excellent. That is precisely why it is dangerous for someone in your position.

Well-written explanations produce fluency — the reading goes smoothly, each sentence follows from the last, and you finish the chapter with a warm sense of having understood it. That feeling is a real psychological state and it is almost uncorrelated with whether you can use the material later. The literature calls this the illusion of fluency or the illusion of knowing, and it is one of the most replicated findings in the study of learning.

The mechanism is simple. Clear prose removes difficulty. But a specific kind of difficulty is what causes learning. Remove it and you get the comfort without the effect.

Robert Bjork’s term for the useful kind is desirable difficulties: practice conditions that make performance worse now and learning better later. The four with the strongest evidence are:

  • Retrieval — pulling an answer out of memory, not recognising it on a page.
  • Spacing — meeting the same idea again after you have partly forgotten it.
  • Interleaving — mixing topics so you must first work out which idea applies.
  • Generation — producing an answer before being told one, even a wrong one.

Every one of these makes a course feel harder and score worse on “did you enjoy this module?” surveys. That is roughly why you have not met them in a programming course.

Rust has the best learning oracle of any language, and courses waste it

Here is something genuinely underused.

Predict-Observe-Explain is a technique from science education. You commit to a prediction, you observe what actually happens, and then you explain the gap. It works because the commitment creates a stake, and the mismatch creates surprise, and surprise is what makes a confident wrong model finally move.

Its usual weakness is the “observe” step. In a physics classroom you need apparatus, setup, and a teacher to adjudicate what the result meant.

Rust hands you a perfect oracle for free. rustc is instant, authoritative, and completely unambiguous about whether you were right — and its error messages are frequently better explanations than the textbook’s. A physics teacher would give a great deal for an instrument this good. Rust courses use it as a build tool.

So this course uses the compiler the way a science course uses an experiment. Which brings us to the rules.

The five rules

1. Never read past a Predict box without typing something. Not thinking it — typing it. A thought like “hmm, probably an error?” is too vague to be wrong, and something that cannot be wrong cannot surprise you. It takes ten seconds and it is the highest-value thing on this site.

2. Rate your confidence honestly, including when it is high. The site records your confidence and later shows you your accuracy at each level. For an experienced engineer learning a new language, overconfidence — not inability — is the main obstacle, and it is invisible without measurement. You already have rustc 1.96 installed; the Calibration page is where you find out how much your intuition can currently be trusted.

3. Check against a compiler, not against your feeling. Every self-contained snippet on this site has a Run button that compiles it on the real Rust Playground and shows you rustc’s actual output — including the full error, which is frequently a better explanation than the surrounding prose. Use it, especially when you are sure. Better still, keep a scratch crate open:

cargo new scratch && cd scratch

4. Come back on days you did not plan to. The Review queue uses expanding intervals and mixes topics on purpose. When a question about lifetimes arrives next to one about Send, you have to work out which idea applies before you can answer — and that sorting step is the skill that survives contact with real code. Grouping by topic lets you skip it.

5. Stop when you can explain it out loud, not when you are bored. This is the tech-lead test and it is the actual goal of the course. If you cannot say it in a sentence without looking, you do not have it yet.

Before you go onwrite it — thinking it does not count

Which of the five rules will you personally skip? Be specific and be honest — name the rule and the reason. Then decide whether you are going to skip it anyway.

(This is not a trick to shame you into compliance. Knowing which support you have opted out of tells you how much to trust your own sense of progress later.)

About the English

A note, since English is not your first language and this material is dense.

Rust’s community vocabulary is unusually precise, and much of it is metaphorical: values are “moved”, references are “borrowed”, a trait is “implemented for” a type, a lifetime “outlives” another. These are not casual descriptions. Each is a technical term with an exact meaning, and using them loosely is how a discussion goes wrong.

So this course does two things about language. Terms are defined at first use and never assumed. And the Glossary gives every important term a plain definition plus a real sentence showing how Rust programmers actually use it — because knowing what dyn-compatible means and knowing how to say “that trait isn’t dyn-compatible” in a design review are different skills, and you need the second one.

What comes next

0.2 gives you the frame that organises everything else — the claim that Rust has three machines, and that most confusion is using the wrong one. It also contains a ten-question pretest.

You will do badly on that pretest. That is intended, and it is not a figure of speech: being tested on material you have not learned yet measurably improves how well you learn it afterwards, even for the questions you get wrong. It is called the pretesting effect. Do not look anything up.

In the wildgo read the real thing now, while it is fresh
  • The Rust Book, chapter 4Read the first two pages, then close it. We will come back to this in 1.1 with a different frame. Notice how reasonable it feels while you read — that feeling is the thing this lesson is warning you about.
  • The rustc error indexBookmark this now. It is the single best Rust reference nobody tells you to read, and it is essentially a curriculum in disguise.
Scheduled for recall3 items added to your review queue

These are not shown to you now on purpose. They will surface in Review tomorrow, mixed in among items from other parts of the course — not grouped by topic. Sorting out which idea applies is the part that transfers.