Narrative-Driven Design

Posted Sunday, September 10, 2023 by Sri.Tagged TROPE
EDITING PHASE:gathering info...

"Narrative-Driven Design" a way to make doing difficult solo work more interesting by writing about myself in the third person as if I were doing something much more exciting. In the example below, I'm pretending I'm refitting an old spaceship with a shiny new custom system, and am grouchy about it. But I wrote through how the character might react while actually solving the technical work problem that un-spaceship me was dealing with.


"Hey, these two things should talk to each other", thought Sri, clanking the two modules together. "But how will they talk to each other without visible wires?"

Sri inspected the modules more closely. They seemed to support several ways of mounting, with a flush antenna area and a recessed socket on each end. This, she thought, implied that they might work in series. They seemed to snap together as a stack or in a series, which was cool! Sri wasn't sure if the color coding made a difference; the two modules she had seemed to have a deliberately shaped socket on it that was universal, but there were a set of recognition pins (she thought) next to them that varied by module, surrounded by the color coded symbol. Rummaging around the workshop, Sri found another box filled with similar modules, but some did not have the end sockets. Otherwise, the configuration of the other elements seemed to be be quite standardized in their placement. Sri sketched out her understanding of the parts of the module.

Wiring Diagram of ModuleWiring Diagram of Module (full size image)

"So, if I want to connect my own data source to this system, I'll need to reverse engineer how this works. I'm not sure how it DOES work, but let me outline my guesses..."

  • "DATA IN / DATA OUT are a kind of stream interface"
  • "The IDENTIFIER and its SENSE PINS describe something about the modules function, so you know what the thing is supposed to do and what kind of data it might expect, but I need a reference for what that is"
  • "The DIRECT API" seems to be another way of interacting with the module, perhaps as something you can just plug-into another kind of system that isn't based on stream interface processing"
  • "The TELEMETRY I/O" seems to be an ambient communications system that is aware of components that are not directly connected to it through either the stream interface or the direct API port"

"I wonder if I can make a version of a module that actually doesn't do anything but take the stream input and spits it back out to the stream output? That might be a good first step! Yeah!"

SRI and the MODULAR REFIT (cont'd)

Sri's shuttle docked with the Netcreate's outdated airlock system, which wheezed open after some hesitation. This raised Sri's hackles as it reminded her of the slap-dash nature of the vessels engineering and construction, but she mustn't get distracted by this. There had been no word at all from technical command, as they were busy with some other activity, so Sri was extra grouchy at the vacuum. While she had become accustomed to the feeling, lately she had been feeling the crushing weight of nothingness around her, compressing her very soul into a dark lump of carbon that howled in anger.

Still, nothing was going to get done if Sri couldn't push herself past it, though she felt her limbs grow heavier and less responsive the further she trudged deeper into the Netcreates narrow hull toward the seondary engine compartment.

The cluttered workspace was as she had left it. Sri thumbed the WAKE UP button on the terminal to see where she had left off, seeing that she had been wiring-up a very primitive sequel connection protocol to work out some architectural details. She had already done a preliminary informatics pass on the data interface and its protocol. Her attention lingered on the sketches made by Sri of the Past, which she could barely remember or identify as being herself, and this immediately jumped back her memory further back to when she was a new student at the CI as the locals called it. The Intergalactic Institute of Celestial Informatics, which was its fully pompous name, was where she had stumbled upon her love for piecing together patterns of data so they could create pleasing results. She'd happily enrolled in the CI, but discovered it was a rather dusty backwater institution despite the implications of its galaxy-spanning name. Still, it had been an exciting time that seemed filled with possibility. What happened to that version of Sri? Her she was now, pushing middle age, fixing someone else's garbage scow of a science vessel instead of soaring through clouds of delicious and scintillating data, dispensing wisdom of the universe in convenient comprehension-sized nuggets.

The feeling of space pushing in on her increased dramatically, causing her soul to creak uncomfortably under the stress as it threatened to be extinguished. Sri contemplated letting it happen, but this seemed incredibly unjust.

There was a past incarnation of Sri that came to mind, one of the first memories of being a cat-like being with a long fluffy tail, who had grown up in a magical world but then took on a mechanical trade once she had become aware of it due to travelers from outside her world. While disaster had followed, that version of Sri had continued to exist with the same uncomfortable interest in mechanical stuff (now associated with the death of her people) and the nature of her magical being. Sri of the present, crammed into a greasy starship, contemplated how this duality seemed to exist in herself as well. In her mind, she was a magical being manipulating the energies of data to affect the perception of people, catalyzing them in ways that they could grow now that they could see what they weren't able to before. But she was also stuck knowing how to fix greasy garbage scows masquerading as science vessels, and it paid pretty well with flexible hours. And so here she was.

The modular refit, Sri realized, was a kind of chokepoint in her existence. Such chokepoints arose periodically, giving rise to much angst of the type she was feeling. Not just a challenge, but also an opportunity to evolve. If she could finish this module system to her liking, that would grant her a level of control that spanned not to just the Netcreate, but ships of all types. It could perhaps be one more portable skill she could bring with her. Perhaps, Sri thought with some embarrassment at the childishness of it all, that it would be a form of magic, if one squinted at it in just the right way.

If only it weren't SO BORING. Sri half-glared at the pile of modular system casings around her, leaden sausages bereft of life or meaning, until she poured something of herself into to them.

Sri sighed. She initiated power to the modules just to see if they did anything. She no longer cared. The pile of modules lit up briefly, and then spat out an error code: 'MODULE_NOT_FOUND'. What the hell? With a grumble, Sri traced the maze of temporary connections and corrected the issue. The modules behaved and spat out some test data. Well, at least that was something.

Sri wasn't sure what to do next, so she revisited the abstraction in her head. The idea was to make a universally useful module container that could funnel data from one to the next, transforming it as it went. Each module could be customized to perform a particular type of operation, but were restricted to producing only ONE kind of transformation. This would prevent (she hoped) the tendency of crew to just pour all the functions into one piece of hardware until it stopped functioning and was impossible to fix. Althought the utility seemed clear to her, it was not so clear what the shape of this solution would be. Or rather, she sternly reminded herself, she didn't know what the OPTIMAL shape would be, and because of that her prototype lacked shape itself. She would have to work on both shapes simultaneously and solve them together. Sri felt a little anxious about this revelation, because she has always been rather bad at simultaneous solutions and could not hold them in her head at the same time. The anxiety of forgetting burned too much energy, and distracted her. She would have to shamefully resort to an external memory aid. While she was aware that the use of such aids was standard in her field, she knew of people who didn't need such aids and had once talked down to her with such certainty that she had crumpled under it as she realized how deficient was in this ability compared to others. It is a feeling she knew she could (and maybe should) overcome by recognizing that the essence of strategy is to lead with one's strengths and minimize where weaknesses would matter. Sri envisioned herself as a master swordswoman standing in a dazzling cloud of ground lightning, feet firmly planted and looking back at her with an over-the-shoulder grin. She would cut them down with this sword, and take the fight to where she was strongest.

Sri wasn't sure how this imagined scenario would bolster her spirits, so she looked back at the problem of solving an OPTIMIZED SHAPE problem simultaneously. While she didn't know the answer, she could make a pattern from what she had right now, and discern maybe what the shape could be from that.

So what is the pattern? First Sri had to diagram everything. Immediately the feeling of being crushed increased. Wow, there is something really resisting this in me or outside of me Sri thought.

Sri makes a sloppy outline of the modules she has deconstructed:

API Map of ModulesAPI Map of Modules (full size image)

Sri then looks at what her test rig is currently doing:

API Map of ModulesAPI Map of Modules (full size image)

What's missing:

  • setting up messaging between the children that are created
  • establishing the handshake that occurs on connection

Sri notes that the UrModule class is intended to encapsulate the notion of a forked child process with all the features of her module architecture, abstracting the idea of data in, data out, messages, and events across the three or so different APIs. For example, streams share some events with forked processes and are also used for IPC in standard pipes, but they all have slightly different implementations. On top of that, the universal telemetry also has similar APIs but are not the same either.

The challenge is to make UrModule conceptually very distinct in what's an input, what's an output, what's an operation so end users don't have to think about pipes, events, streams etc because that requires more technical background than is generally available in the ship's crew.

A small increase in clarity! Sri creates a low level task list that is devoid of decision making, because she trusts that decisions will be made as these tasks are performed.

API Map of ModulesAPI Map of Modules (full size image)

The crushing pressure, Sri notices, has reduced considerably. In fact, she hadn't felt it at all while doing the outlining and review of code because it gave her greater clarity of the situation, and by offloading the various elements onto the external memory aid her mind was free to make connections very quickly. Since her memory recall was so prone to distraction and uncertainty about its accuracy, trying to do it all in her head was perhaps 100 times less efficient and also unlikely to succeed as any decisions quickly decayed if not transcribed, and even then the transcription itself held no lasting power if not used immediately.

Sri felt a bit of shame at having to rely on memory aids, feeling small and unworthy of servicing even a garbage scow like the Netcreate. She admitted that the foundation of the ship itself were based on thousands of human-years of engineering knowledge that was far beyond her ability to comprehend, let alone apply. She was, at best, an experienced cartographer and pipe fitter of products produced by far more skilled engineers. Her heart started to break at the feeling of inadequacy, but she stilled this thought because it was dumb. NO SINGLE PERSON of those thousands of human-years of engineering did this. There were a lot of smarter people than her, but what always mattered was that someone was in the right place at the right place to improve and grow. She was one of those people, at the very least. There was no place for pride here as an individual. While Sri admired people who were very good at what they did and envied their skill, what was more impressive were those people who gathered people together in harmony so those skills were applied to the greater good. Such people had awareness that extended beyond the tip of their noses, and these were the people that mattered. Despite the creaky hull of the Netcreate being a nightmare of scavenged part, every part of her was designed to meet the need of the greater good, and every member of her crew was devoted to this on some level. There was a huge variety of interest and skills, imperfectly working together. The ship itself _wanted to live_for her mission too, to be used and appreciated and launch the lives of the thousands that might board her for a trip to distant stars. Sri's heart broke at the thought of her petty selfishness, tears pooling and dribbling down her nose, which started to itch. This made her laugh at how dramatic she was being, but the essence was true; She was part of a mission that was and would always be imperfect and crewed by a bunch of people who had not attended Celestial Informatics or even understood them, but were parts of the system. She vowed to assume the best rather than fear for the worst, and be brave despite her shortcomings. Just being here was a privilege, a foundation upon which she would build on and continue to move. She was valid, because she was here and could sense the life of the ship in a way that others could not. But above all, Sri was here. And Sri was enough.

To think otherwise would be to dismiss the contribution of others as callously as she felt dismissed by them. That is not what Sri wanted to be dominated by, though it still felt extremely lonely. But perhaps she could hang on long enough to find kindred crewmates and someday have her own starship.

It was time for dinner.