Lesson 04 · Overview

Reading Code

Read the code your AI writes well enough to review it: types, values, lists, decisions, repeats, functions, state, errors and waiting. · 10 topics
Reading Code lesson overview — Alice reads Bit's cart change: types, jars, lists, forks, loops, machines, state, errors and waiting

Bit just rewrote Alice's shopping cart. She can't write code, but she can learn to read it.

After this lesson, you'll be able to read a short piece of code in plain words: kinds of values, what it stores, what it decides, what it repeats and where it can go wrong.

When AI writes an app, you will read its explanations and error messages. You do not need to write code, but you do need to recognize types, variables, conditions, loops, functions, lists, waiting and errors when you see them.

When the AI edits a function, you need to say what goes in, what comes out, and what happens when the list is empty or the save fails. This lesson names those parts in plain words — values, lists, decisions, repeats, state, errors, waiting — each with one picture and the question to ask. You won't write code; you'll read a change and know what to look for.

What this lesson covers

  1. 1
    Typed vs untyped

    A typed language tracks what kind of value something is, such as a number or text.

  2. 2
    Variables & kinds of data

    A variable is a label on a box that holds one value.

  3. 3
    Lists & objects

    A list is an ordered row of items.

  4. 4
    Conditions: if / else

    A condition lets code choose.

  5. 5
    Loops: doing it again

    A loop repeats the same steps for every item in a group, or until something changes.

  6. 6
    Functions

    A function is a named set of steps.

  7. 7
    State & side effects

    State is what the app remembers right now.

  8. 8
    Errors & empty values

    An error is code saying it can't continue.

  9. 9
    Waiting: async work

    Some steps are slow because they wait for something outside, like another computer or saved data.

  10. 10
    What case did it forget?

    An AI change handles the cases it was asked about.

Reading Code · Vibe to Dev