Go One Primitive Lower

Big unknown → smaller unknown → known primitive. Implement cart → addItem → find existing item → loop → compare ids. Missing foundations are routed to arrays, iteration and functions — only what is needed — and then you return to the cart.

Big Unknown, Smaller Unknown, Known Primitive

"Implement a cart" is too big to start. "Loop through an array" is not. The move between them is recursive: split the unknown into smaller unknowns until one of them is something you already know how to write, and that is where you start.

Q · You know what a cart is, what it remembers and what can happen to it — and you still cannot write the first line. How do you get from "implement the cart" to a line of code you actually know how to write?
Go One Primitive Lower
▶ lab

The button that says "I still don't understand how to implement this" does one thing: it makes the thing smaller. addItem → Find Item → Loop Through Array → Compare IDs. At some rung you already know what to type, and that rung is the start.

Q · You have the pseudocode for addItem in front of you and it still does not turn into code. What is the one move that always makes progress — and how far down does it go?
Where the Primitives Start Is Yours

The walk down goes Unknown → Unknown → Known Primitive, and where "Known" begins is different for every learner. Find your boundary, build upward from it, and stop treating someone else's boundary as the depth you owe the problem.

Q · Two people implement the same cart: one stops at "call find", the other has to write the loop, a third has to learn what an array is. Which one is doing it right — and how do you find where your own walk should stop?
When the Rung Below Is a Foundation
▶ lab

"I don't understand what `items.find()` does" is not a cart problem. It is four small things — arrays, iteration, callbacks, return values — and the fix is to learn exactly those, with the cart as the reason, then come back. Stacking another abstraction on top is the one thing that never works.

Q · The walk down has reached something you genuinely do not understand — not "cannot write in one go" but "do not know what this is". What do you learn, how much of it, and how do you get back to the cart?
The Prerequisite Graph
▶ lab

A cart needs functions, conditionals and arrays; a map is an alternative to the array, not a prerequisite; objects are how an entry is shaped. Drawing what depends on what tells you which foundation to learn first and which ones the cart does not need at all.

Q · You have found more than one gap on the walk down. Which do you fill first, which can wait, and which ones — despite appearing in every "learn to code" list — does this problem not need?
Teach Me Only What I Need

If the learner needs a cart, do not hand them a data structures course. An array, a map to compare it with, a loop, a conditional and a function are the whole bill — and then the cart. The rest arrives with the concept that needs it, which is when it will stick.

Q · A learner is stuck on the cart because of a foundation. How much do you teach them — and what is the strongest argument for teaching more than they asked for?