Port and Stash

THE DOORWAY AND THE BOX — a program can't use what it can't keep: Port brings information in from the world, and Stash holds it safe in a labeled box until the program calls for it — take it in, then hold it

A story read by Port and Stash

Loading audio…

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

Show full transcript

Loading transcript…

01 Opening
Port and Stash beat 1 of 5

The program stood at the edge of the world, and between it and everything outside there was exactly one way through: a doorway, wide and busy, with Port standing right in the middle of it.

Port loved the doorway. Port was the doorway, really — the one place where the program and the world could pass things back and forth. A tap on a key, a click of a button, a number typed in, a word spoken aloud: all of it came in through Port. And whatever the program wanted to send back out — a picture on the screen, a beep, an answer — that went out through Port too.

"I'm the in and the out," Port liked to say, waving something through. "Nothing reaches the program without coming past me, and nothing reaches the world without going past me either. I'm the doorway. Traffic's my whole life."

Beside the doorway, quiet and boxy and patient, sat Stash.

"Busy day?" asked Stash.

"Always," said Port. "Here — catch."

02 Port and Stash
Port and Stash beat 2 of 5

And this was the thing Port could not do alone, the thing Port had learned the hard, fluttery way: Port could let information in, but Port could not keep it.

A number came flying through the doorway — a good number, a needed number — and Port passed it along and reached for the next thing, and if there had been nowhere to put that number, it would have simply... slipped away. Gone. Out the other side. Port's hands were always full of the next thing coming through; Port had no way to hold onto the last thing at all.

"That's the part that used to scare me," Port admitted. "All this coming in, and me unable to hold a single bit of it. Like catching rain in open hands." Port let a value fly past. "I can open the door. I just can't keep what walks through it."

03 Port and Stash
Port and Stash beat 3 of 5

But Stash could keep it. Keeping was Stash's entire calm nature.

Stash was a box — a plain labeled box — and the whole point of Stash was to hold a value until it was called for. When Port passed something through, Stash took it, tucked it safely inside, and wrote a name on the front so it could be found again. score. name. count. Whatever it was, Stash held it, steady and unbothered, for as long as the program needed — a second, an hour, the whole run.

"You bring it in, I hold it," said Stash, catching the number Port tossed and setting it gently inside. "That's the deal. You're the door; I'm the box. Ask me for it whenever — I'll have it right here, exactly where you left it, with its name still on the front."

And later, when the program did ask — what was that number again? — Stash opened up, and there it was, safe and sound, ready to be used.

04 Port and Stash
Port and Stash beat 4 of 5

So they worked the doorway together all day long, the pair of them, in a rhythm as easy as breathing.

Something came through the door — Port caught it. Port turned and passed it over — Stash held it. The program called for it — Stash opened up and handed it back — Port sent the answer out into the world. In through Port, held by Stash, out through Port again. Over and over, the whole warm humming day.

"Funny how it works," said Port, during a quiet moment between visitors. "On my own I'm just a door with the wind blowing through it. Everything comes in and everything leaves and I keep none of it."

"And on my own," said Stash, "I'm just an empty box with a name on the front and nothing to hold. I can keep anything — but only if somebody brings it to me first."

05 Closing
Port and Stash beat 5 of 5

By the end of the run, the box was full of exactly the right things — every number, every name, every value the program had needed, each one safe in its place with its label facing out — and the doorway stood quiet at last, its long day's traffic all come in and gone back out again.

"Good catching," said Port.

"Good keeping," said Stash.

There is a warm, settled feeling in being the one who holds — the one others bring their important things to, trusting you to keep them safe and hand them back whole when the time comes. Port opened the door to the whole wide world. But it was Stash, quiet and boxy and steady, who made sure that nothing the program needed was ever lost — and being the keeper of things that matter is its own small, sturdy kind of good.

The CodeRealm ensemble

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

Kids also liked