Reading Code
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
- 1Typed vs untyped
A typed language tracks what kind of value something is, such as a number or text.
- 2Variables & kinds of data
A variable is a label on a box that holds one value.
- 3Lists & objects
A list is an ordered row of items.
- 4Conditions: if / else
A condition lets code choose.
- 5Loops: doing it again
A loop repeats the same steps for every item in a group, or until something changes.
- 6Functions
A function is a named set of steps.
- 7State & side effects
State is what the app remembers right now.
- 8Errors & empty values
An error is code saying it can't continue.
- 9Waiting: async work
Some steps are slow because they wait for something outside, like another computer or saved data.
- 10What case did it forget?
An AI change handles the cases it was asked about.