Level 0 · Foundations

The Programmer's Mindset 🧘

Syntax is the easy part. What separates people who learn to program from people who quit is a handful of mental habits. Here they are, stated plainly, so you can borrow them instead of discovering them the hard way.

Errors are the curriculum

Beginners believe errors mean they are failing. Professionals know errors are the job: an experienced programmer sees hundreds a day and treats each as a clue, not a verdict. The entire skill is a calm loop:

  1. Read the error, slowly, out loud. Not a glance: an actual read. Rust's messages usually contain the diagnosis and the cure. Half of all beginner despair is skipping this step.
  2. Reproduce it. Can you make it happen on demand? A bug you can trigger reliably is already half caught.
  3. Shrink it. Delete or comment out everything unrelated until the smallest possible code still shows the problem. Nine times out of ten, the act of shrinking reveals the cause by itself.
  4. Explain it to the duck. 🦆 Programmers genuinely keep rubber ducks on their desks. Explaining the problem out loud, line by line, to a duck (or cat, or patient friend) forces your brain to check its own assumptions. The bug frequently surrenders mid-sentence.

How to ask for help (the skill nobody teaches) 🙋

Everyone gets stuck. The difference is how you ask. A question that respects the reader's time gets answered in minutes; a vague one sinks. The format the whole industry converged on:

Write that and something wonderful happens: about half the time you solve it yourself before pressing send. The write-up is the debugging. And when you do send it, to the Rust users forum or a Discord, you will get real help, because you handed people a puzzle instead of a fog.

Philosophies worth stealing 🏛️

Escaping tutorial hell 🔥

There is a trap with a name: tutorial hell, where you complete course after course, feel productive, and cannot build anything alone. The escape is uncomfortable and simple: build things slightly beyond your comfort zone, without instructions. The moment you finish Level 1 here, stop and build something tiny that is yours: a tip calculator, a dice roller, an insult generator. It will be harder than the lessons. That difficulty is the actual learning. The lessons exist to make your own building possible, not to replace it.

About feeling like a fraud 🎭

At some point soon you will think: "real programmers understand all of this; I am just pattern-matching and looking things up." Two facts. One: every programmer alive looks things up constantly, daily, forever. The senior engineer next to you has fifteen browser tabs of documentation open right now. Two: this feeling has a name (imposter syndrome), almost everyone has it, and its presence usually means you are growing, not failing. The bar for "real programmer" is: you write programs. You already qualify.

The community you are joining 🦀

Programming cultures differ. Rust's is famously, deliberately warm: the community adopted a Code of Conduct from day one, the compiler's error messages are studied by other languages as models of kindness, and beginner questions on the forums get patient, thorough answers. "We are all learning" is the house style. Match that energy: be generous with credit, gentle in review, and honest about what you do not know. Six months from now, answer one beginner's question. That is how the culture continues, and teaching, as this whole school proves, is the best way to learn.

Exercise 1

Practice the ask

Here is a broken scenario: "My program crashes when I run it with no input." Write a full help request for it using the four-part format (goal, code, expected vs actual, what you tried). Invent plausible details.

Reveal a model answer

"Goal: read a number from the user and double it. Code: [six-line snippet]. Expected vs actual: expected a reprompt on empty input; got a panic: called unwrap() on an Err value. Tried: checked the input is not empty (still panics on letters), read the parse docs (saw it returns a Result, unsure how to handle it)." Notice that writing it basically diagnoses it: the unwrap on user input is the culprit, which is exactly what Lesson 11 teaches.

Exercise 2

Adopt a duck

Find a rubber duck, plush crab, or any object with a face. Put it next to your keyboard. This is now your debugging partner for the whole course. Give it a name. (Yes, really. It works, and every professional who laughs at this has one.)

Reveal the science-ish

Explaining code aloud engages different processing than reading it silently: assumptions become sentences, and false sentences are much easier to notice than false assumptions. The duck is a trick for switching brains. Rusty suggests naming it Ferris Jr.

Exercise 3

Commit to a project

Write one sentence in your rusty-lab/notes.md: the first tiny project you will build alone after Level 1, and commit it with git. Make it small enough to finish in an evening. You now have a contract with yourself, under version control.

Reveal good candidates

A tip splitter, a "which crab are you?" quiz, a countdown to a date you care about, a random dinner picker, a password strength checker. Small, personal, finishable. The best first project is the one you will actually finish.

🎓 Foundations complete! You know what a computer is, you can drive a terminal, you have a time machine, you speak the conventions, and you carry the mindset. Now the real fun: Lesson 1: Hello, World! →