Season 4 Episode 2

The Refugee Crisis

Key scene illustration
Key scene illustration

In which our protagonist discovers that scaling a system is harder than building one, and the captain-commander has a worse day.


The refugees kept coming, and they kept coming the way code keeps coming when a daemon is leaking into the event queue, slow and steady and unstoppable, and the capital had been designed to hold sixty thousand people, and the capital was now holding a hundred and forty thousand, and the difference between the two numbers was, in the driest possible language, the kind of bug that does not show up until the production system is on fire.

Kenji had been awake for thirty hours when the count crossed a hundred thousand, and the count had crossed a hundred thousand because the southern roads had been clogged for a week, and the clog had finally broken, and the break had been, in the language of the system, the moment when the queue flushed and the queue was, in a small way, going to keep flushing for as long as there were people in the south who could walk.

[Population: capital, 140,000 / 60,000 capacity]
[Status: critical]
[Shelter utilization: 100%]
[Food stores: 12 hours remaining]
[Compiler note: the system is the senior engineer who has been asked to onboard a junior. The junior is the developer. The senior is, in a small way, exhausted.]

The system was exhausted. The system was, in a small way, a colleague, and the colleague had been quietly logging the resource counts since the second day, and the colleague had not, until now, said anything, because the colleague had been waiting for the developer to ask, and the developer had been, in the language of the old job, the kind of developer who does not ask until the alert page arrives, and the alert page had just arrived.

Patches. That was what the work had become. A patch here. A patch there. A small spell to extend the shelters. A small spell to purify the water. A small spell to slow the spread of disease. A thousand small spells, each one a band-aid on a system that was bleeding out, and each band-aid a temporary fix, and each temporary fix making the next temporary fix harder, and the next fix harder still, until the system was, in the driest possible language, a tower of patches built on top of a legacy codebase that had never been designed for this load.

It was, he realized, exactly the way legacy code always failed. Not in one catastrophic crash, but in a slow, grinding, piece-by-piece collapse, where every fix was a temporary fix, and every fix made the next fix harder, and the only solution was a full rewrite, but the rewrite was too expensive to do in the middle of the crisis.

He had to choose: patch the system, or rewrite the system. He could not do both. The patches were cheap. The patches were fast. The patches were, in the driest possible language, the kind of fix you made when you were the on-call engineer and the page was on fire and the only thing you could do was keep the system up for one more hour. The rewrite was slow. The rewrite was expensive. The rewrite was the kind of work you did when the alternative was to lose the system forever.

He chose to patch. The rewrite would have to wait. The people could not wait. The people needed food, shelter, water, medicine, and hope, in that order, and they needed it now, and the developer was, in a small way, the developer who had learned, in his old life, that the customer was always right, and that the customer, in this case, was a hundred and forty thousand people who were very tired and very hungry and very afraid.

Elara was getting worse.

The corruption in her shoulder was spreading. The healers had tried everything. The mages had tried everything. Pip had scanned her a dozen times, and each scan had been logged in the part of the system that did not, in fact, have a name, but that the system was, in a small way, treating as a priority queue.

[scan: Elara Vance, left shoulder, depth 4cm]
[corruption spread: 2cm since previous scan]
[status: deteriorating, slowly]
[Compiler note: the senior engineer is the one who has been asked to onboard the continent. The senior engineer has been touched. The system is, in a small way, hoping the developer notices before the senior engineer is, in a small way, no longer senior.]

She refused to stop working. She sat in the command center, directing the guards, organizing the relief efforts, refusing to lie down, the way a person refuses to lie down when they know that the moment they lie down is the moment the system they have been holding together for seven years will, in a small way, fall apart. She was, Kenji thought, exactly the kind of person who would work herself to death before she would admit she was hurt, and the kind of person who would, in the driest possible language, be the most valuable person in the room, and the most stubborn.

"Elara," he said, on the evening of the second week. "You need to rest."

"I am resting. I am sitting down."

"You are sitting at a desk, writing orders, while your shoulder rots. That is not rest. That is stubbornness."

"Says the man who has not slept more than three hours in two weeks."

"I am a software engineer. We are designed for this. You are a swordswoman. You are designed for short bursts of high activity, followed by long periods of recovery. You are not recovering."

She looked at him. She did not have a good answer. She did not have any answer. She was tired, and she was hurt, and she was scared, and she was trying to hold everything together, and she was failing, and she knew it, and the knowledge was, in the driest possible language, the kind of knowledge that the system was, in a small way, logging for the developer, because the developer was, in a small way, learning that the cost of debugging a continent was going to be paid in the people he loved.

[captain-commander status: deteriorating, slowly]
[recommended action: rest, in a small way, before the captain is, in a small way, no longer the captain]
[Compiler note: the system is, in a small way, the senior engineer who has been asked to onboard a continent. The senior engineer is, in a small way, hoping the junior developer will, in a small way, tell the senior engineer to take a break, in a small way, on purpose.]

"I cannot rest," she said, quietly. "If I rest, everything falls apart."

"Everything will fall apart if you do not rest. You are the linchpin. The linchpin has to be intact for the system to work."

"Then what do I do?"

Kenji thought about it. He thought about his old job, about the times he had been the linchpin, about the times he had tried to do everything himself, and the times he had learned to delegate, and the times he had learned that delegation was not, in fact, the same thing as giving up, and the times he had learned that delegation was, in the driest possible language, the skill that separated the engineers who shipped from the engineers who burned out. He thought about the system he was running, the refugee crisis, the kingdom, the continent. He thought about the fact that he was trying to do everything, and the fact that he could not do everything, and the fact that he had to let some things fail so that other things could succeed, and the fact that the letting-fail was, in a small way, the most expensive thing the developer had ever learned to do.

"You delegate," he said. "You pick the three most important things. You do those. You give the rest to people you trust. You rest. You let the system run without you for a few hours. The system is designed to run without you. You just have to let it."

Elara looked at him for a long moment. Then she nodded, slowly, and the nod was the nod of a person who had been holding the system together by herself for seven years, and who had just been told, by a person whose system was, in a small way, a colleague, that the system could, in fact, hold itself.

"Okay. I will rest. But I am going to pick the three things, and you are not allowed to argue with me about them."

"Deal."

"Thing one. The food distribution. I am giving it to the mayor of the lower city. He is good at logistics."

"Agreed."

"Thing two. The medical coordination. I am giving it to Master Yuen. She has the magic and the authority."

"Agreed."

"Thing three. You. I am giving you to me. You are going to sleep for six hours. I am going to sit in this chair. I am going to be the captain-commander for six hours. And if you argue with me, I will put you over my knee."

"I would like to see you try."

"I would like to do it. Sleep."

He slept. It was the best six hours he had had in two weeks, and the six hours were, in the driest possible language, the kind of six hours that the system was, in a small way, paying for in advance, because the system knew that the next six hours were going to be worse.

When he woke up, Elara was still in the chair, the kingdom was still running, the refugees were still being fed, and Pip was orbiting her head, pulsing, the pulse feeling like: "She is going to be okay. She is not going to be okay for a long time. But she is going to be okay for tonight."

Kenji sent back, in the language he and Pip had built together: "Yeah. She is."

The week ended. The refugees stabilized. The system held. Elara's shoulder was still infected, but the infection had slowed, the way an infection slows when the body has decided, in the driest possible language, that the body is not, in fact, ready to give up. The healers had bought time. They had not bought a cure.

The cure, Kenji thought, was going to take something bigger than healing magic. The cure was going to take the rewrite. The rewrite was going to take the alliance. The alliance was going to take the Council of Kings.

Pip landed on his shoulder, soft, blue, and pulsed, very quietly, in a tone that was, in a small way, ahead of him, and the pulse felt like: "The Council is coming. The Council is going to be the moment when the debugging scales. The Council is going to be the moment when the system stops being a small town and starts being a continent. The Council is, in a small way, going to change everything."

Kenji did not answer. He was, in the driest possible language, a developer who had learned to trust his own system, and the system was, in a small way, ahead of him, and the system was right.