a working method, not a personality

Learn how to code.

Seventeen languages, taught from scratch — plus the actual working method behind the code: the loop to run, the principles to hold, and the habits to refuse to break. No secret syntax, no trick. Steal what's useful.

how this site works

Three steps, in this order.

🛠️ New here? Install an IDE first. You can't write or run any code without one — start with this 2-minute setup guide. open →
01

The loop to run

Every task — a one-line fix or a new module — goes through the same six stages. It's a loop, not a line: verifying often sends you back to understanding. Click a stage to open it.

02

The principles underneath

The loop is the choreography; these are the convictions that decide what "good" means at each step. Open one to see it in code.

03

Think it through

Pick a small problem and step through it the way it should actually go — clarifying before coding, naming the edge cases, then writing the simplest thing that survives them.

04

Small style choices, repeated

None of these is clever. They're the boring decisions to make the same way every time, because consistency is what makes code skimmable. Each is a real before / after.

05

What to refuse to do

Habits are mostly defined by what you don't do. These are the moves to catch yourself reaching for and put back down.

06

The smell test

Read this snippet. It runs. It even passes a happy-path test. Decide what you'd change before revealing how to review it.

// returns the discounted price for a cart
function calc(items, c) {
  let t = 0
  for (let i = 0; i < items.length; i++) {
    t = t + items[i].p * items[i].q
  }
  if (c == "SAVE10") { t = t * 0.9 }
  try { logAnalytics(t) } catch (e) {}
  return t
}

Six things to raise

  1. The names hide the meaning. calc, t, c, p, q force the reader to decode. Rename to cartTotal, total, couponCode, price, quantity — now no comment is needed.
  2. == instead of ===. Loose equality invites coercion bugs. Default to strict equality unless there's a specific reason not to.
  3. The coupon is a magic string and a magic number. "SAVE10" and 0.9 belong in a lookup the rest of the system can share, not buried in an if.
  4. The empty catch swallows failures. If analytics breaks, no one ever finds out. Catch only what you can act on, and at minimum log it — silent failure is the expensive kind.
  5. No guard on the input. What happens for an empty cart, a missing quantity, a negative price? Decide the contract on purpose rather than letting NaN leak downstream.
  6. One function doing three jobs. Summing, discounting, and logging are separate concerns. Splitting them makes each testable in isolation.
07

Before calling it done

This is the pass to run before saying a piece of code is finished. Tick them off — it's the same gate every piece of code has to clear.

0 / 8 cleared
✓ That's the gate. If all eight hold, the code is ready to hand over.
start here — the basics

The 14 core concepts behind every language.

Variables, loops, functions, arrays — these are the grammar of programming. Learn them once and every language becomes a matter of new spelling, not new logic.

first — the concepts

Ideas that apply to every language.

Before you dive into a specific language, it helps to understand the big ideas that most languages share. OOP, functional thinking, types, memory, errors — these get their own page, so you can read them whenever you like.

Part II — the practice

Learn a language, step by step.

Pick a language below — each one gets its own page. Every lesson is kept simple and friendly, starting from your very first line of code and slowly working up. There are seventeen languages to choose from, so start wherever you like.

the glossary

Stuck on a word?

The lessons keep jargon light, but coding still has a lot of words. Here's a plain-English dictionary you can search any time — kept separate from the languages, so you can browse it on its own.

The goal was never to write code that looks smart. It's to write code that the next person — often you, later — can read, trust, and change without fear.

Run the loop. Hold the principles. Verify before you claim done. That's the whole method.