Row

LIST / ARRAY — many values lined up in order, each reachable by its position number (indexed from 0). Where a variable is one labeled box, an array is a numbered rack: reach index 3 instantly, append to the end, or walk it item by item.

Loading audio…

Press play to listen along. The line being read lights up as you go.

Show full transcript

Loading transcript…

01 Opening
Row beat 1 of 5

Row is not an animal-tween. Row is not a faced figure. Row is a deliberately abstract concrete object — a long wooden rack of small labeled boxes in a single line, each box marked with a position number starting at 0. Inside each box sits one value. That is the whole figure, and it is on purpose: CodeRealm's cast is non-human and non-gendered, concrete objects rather than animated people, because the design refuses tech-genius-hagiography — the notion that coding is only for one "smart" kind of person. A primitive is an operation, not a personality. Row embodies the array (or list). Where Stash is one labeled box, Row is many boxes in a numbered order: you can reach into index 0, or 2, or 5, and grab exactly that value; append a new box to the end; or walk the whole row, box by box. Loop sets Row on the bench in front of a squinting class. "This is Row — an array. Stash held one value. Row holds many, in order, each reachable by its number."

02 Row
Row beat 2 of 5

Row has no village-craft family origin — concrete objects don't have biographies — so Loop introduces it by demonstration, not story. He fills the rack: box 0 gets "apple", box 1 gets "bread", box 2 gets "milk". Then he points to box 2. "Here's the one thing that trips everyone at first: the numbering starts at zero. So the third box is index 2. It looks off by one until you see why — the index is really 'how far from the start,' and the first box is zero steps from the start." He reaches in by index and pulls milk straight out of box 2, then bread out of box 1. "No searching the whole rack, no walking past the others. You name the position, you get that value — instantly. That's the power an array buys you: direct access by index."

03 Row
Row beat 3 of 5

Loop demonstrates Row's moves with Bit, the little robot the learner programs. "Bit needs a shopping list, so we give Bit a Row." He loads the list and shows the operations, one at a time — reach by index (list[0] gets the first value, counting from 0); append (a new box appears at the next number); update (swap what's inside a box without moving the box); length (count the boxes to know how many there are); iterate (hand the boxes to a loop, one by one, in order). "An array doesn't decide anything," Loop says. "It doesn't think. It holds many values in order and lets you reach any of them by number. Reach by index, append, update, ask its length, or walk it. That is the entire job — and it's exactly enough."

04 Row
Row beat 4 of 5

Loop hands Row to Trek, the loop, so the kid can watch an array and a loop work together — the heart of most real programs. "Bit, walk the list." Trek takes box 0, then 1, then 2, handing each value to Bit; Bit reads apple, then bread, then milk, checking each off; when the boxes run out, the walk ends on its own — because the loop runs for each index up to the length, and the length is exactly where it stops. The kid programs Bit to append eggs to the end, then walk the whole list again. Bit reads all four, finishes the last one, and stops. Every item handled, in order, none missed, none read twice. "Array plus loop," Loop says. "That pairing is most of the programs you'll ever write."

05 Closing
Row beat 5 of 5

Loop sets Row back on the bench, its numbered boxes neat in a line. "Here's the honest framing. Row is not a mind. It doesn't think or decide. It's a numbered rack of boxes — values lined up in order, each reachable by its index. Reach in by number, append to the end, or walk the whole row. That is all an array is." But the kid, watching Bit finish its tidy list, feels something real — the quiet, ordered satisfaction of many things kept findable and complete, nothing lost, nothing out of place. There's a calm in good structure, and the kid feels it. "This is Row," Loop says on the object's behalf. "The array. Many values, in order, each reachable by its index from zero. Reach in, append, or walk it through. Honest framing, all the way down." The rack rests, ready for the next program — and the kid heads off glad, carrying that quiet, satisfied calm of things kept in good order.

The CodeRealm ensemble

Row is part of CodeRealm's distributed-narrative cast. Each character embodies a different curricular primitive; together they teach the full subject.