Writing Prompts: The Cost of Code

Unedited Writing Prompt I made on Reddit.

[WP] You are a software developer with a strange power. You can tell what the cost of a line of code is. Normally the cost is measured in cpu cycles, or bytes of RAM, or hours of future maintenance. Today it’s measured in lives lost.

Original Post: Reddit

I didn’t hear him approach. My headache distracted me from anything but my current task. Even that was hard to focus on with the words disappearing from the screen from time to time.

“Devlin? You, uh, able to meet for a moment?” he said with a drawl. “We have a few, uh, things to discuss. It won’t take long.”

Yeah right, I thought. Declare a five-minute meeting that lasts for hours. I couldn’t say no, however, he’s my supervisor. “Yes. I’ll be right there. I need to lock my computer.”

I had one last glance at my screen. $580 and four hours flashed across my eyes. A much better cost than $48,000 that it was before. Too bad I couldn’t pocket those savings. I let it slip once that I could see the savings, but my colleague just scoffed at me.

In the boardroom, three others sat opposite to me, waiting for me to take a seat. As I leaned over, my head pounded like never before. I must have visibly squirmed because it caught the attention of the others.

“What’s wrong with you?”

“I think I have a migraine. My head hurts like hell, and I can’t see straight.”

“Then we’ll make this quick. You can take some medicine. We need you working late for this one.”

I didn’t have time to rebuke his statement, even internally as he started right away.

“Mark here has brought to our attention that your code commits from three weeks ago has some severe flaws.” The code was on the screen within moments: $ 7,400, 37 hours. “Mark?”

“Yes. Thank you, Alfred. So, uh, Line 781. The equation is subject to the potential of being uninitialized for variables here, and here throwing notices and storing incorrect values that would affect the dollar values our clients receive.”

“Anything that affects money received by our clients is a critical matter, Devlin. It is not to be taken lightly. You should know better. Mark, what do you propose?”

“Uh, yes. I have that ready.”

I sat quietly. Any other day, I would have defended myself, but the pressure was mounting up in my temples. I needed to be out of the room as soon as I could.

Mark fumbled at the keyboard, pecking away with two fingers until finally, the revised code was visible. $230,500, 201 hours, and 2 jobs. That was new. I stared at the screen, looking for the problem. Nothing stood out to me, except the horizontal scroll bar. Something was off to the right that I couldn’t see.

“I don’t think that’s an improvement. Something looks off.”

“This is not a debate,” interjected Robert, the other supervisor. “Mark has been here much longer and knows the system better than you do. Your coding has been slack as of late. As such, we need you to work late for the next four weeks, migraine or not. That is all.”

I had no fight left in me. I was happy to get out of there. I could hear Mark muddle something about his other project, but I didn’t care, nor hear them properly. As I was slipping out the door, I caught one last look at the screen. While my migraine was still playing tricks with me, hiding words and code in various places, I saw something I’ve never seen before. 2 lives. I tried focusing in, but it was difficult from across the room to make out what I was reading — some conditional statement.

The supervisors were now glaring at me as I overstayed my welcome.

“This meeting is no longer for you, Devlin. What are you still doing here?”

“There’s a serious prob–“

“What do you know of this project? You’re not assigned to it, nor have the permission to view it. Leave now, or I’ll make it five weeks.”

I closed the door slowly as I processed what I just saw. For the first time, lives were the code of that code. Peaked by my new found curiosity, I ignored my headache best I could and raced to my desk. I pulled up my code revision manager and stepped through each commit looking at the cost. Every line brought up only dollar values and hours. The occasional memory spike, too.

Nothing I worked on could have any life-changing impact. It must be through another project that the company works on that I needed to check. Stephen, a relic at the company, is notorious for leaving his password as a post-it note by his desk. A lousy practice for someone who is supposed to be the code branch master. He didn’t even have two-factor authentication like myself. I needed to visit him; my work can wait. A pleasant man but he can ramble on sometimes. Luckily for me, I saw the note, as well as he had some ibuprofen.

The pain starting to subside by the time I got back to my desk and my newly acquired credentials, I restarted my code revision manager with elevated permissions. There were a lot more code bases than I thought the company had. One particularly caught my eye named Operation Iron Fire. Skimming through it, I finally found another line that reported a life. I looked at the code but being unfamiliar with it, I couldn’t see why it too would cost a life. I checked the commit, and Mark made it.

Adrenaline pumped through me, knowing I was peering at code I shouldn’t even be looking at. I had no idea when a manager would walk by, but standing up to look around always made them suspicious. I had to work quickly. Filtering now only by Mark, I brought up all his commits, and there were many. His code seemed inefficient, always costing several thousand per line. Then I saw it. 13 lives. A few commits later, another 4. This was absurd. I caught another number out of the corner of my eye but only caught the first number before shuffling from behind me made me shut down the manager in a panic.

Coming to rest on the partition behind me was Alfred. “So, uh, Devlin. We’re gonna have to ask you to come into the boardroom once again. So, I hope you got your medicine. Otherwise, it will have to wait until after.”

Entering the boardroom, I noticed their demeanor was very different from when I left an hour or so before. Mark seemed all chummy, and the two supervisors were smiling their stupid grins.

“So, uh. We’ve discussed this, and despite your previous costly mistakes, you are ready for an increase in responsibility. Mark has brought us up to date with his project so far, and we’ve decided to increase productivity on that particular project, you are to be brought on and help with it. You’ll reap all the benefits this new project will bring. As you have successfully served as an integration specialist on other projects, we’ll be bringing you on primarily for that role as well as any code updates that need to be done. This way, the client can put a name and face to the project. Mark, please bring Devlin up to speed.”

“Certainly. The product is currently called Diamond Shoulder unless marketing comes up with a better name. Any code changes will be done to the project called ‘Operation Iron Fire.'”

My heart fell to the floor, and I almost threw up over the table. The next few moments were a blur as thoughts and questions raced around my head. I didn’t listen to a word Mark was saying. After some time had passed, he stared at me, nodding in his head. “Any questions?”

I could only think of one. “Has this been released already?”

“Uh, yes. The client has had it in testing for a year now, it’s just gone live two days ago. I’ll get you set up with the code by tomorrow, and then you’ll be good to go.”

My head spun. I felt sick. I dismissed all attempts at asking questions to get back to my desk as quickly as possible. I didn’t have permission to be looking at the project just yet, but I no longer cared. The client had the code. I knew the price of each line, but I could never tell when it would come to collect on the cost.

I returned to view any commit made by Mark in Operation Iron Fire. Each commit had hundreds of lines of code, scanning them all, I found those I found earlier, 13 and 4 lives. A few older with a cost of 2 lives and another with 78 lives. I could no longer hold in nausea. Wiping my mouth with my sleeve, I dared to continue. Then I saw that number from earlier. 181,301,291.

I closed the manager and sat with a cold sweat beading on my head. Over the next few days, I dodged any attempt to confirm any access to the project, making up excuses and carefully avoiding being at my desk with Alfred or Mark tried to approach me. After a week, I could take it no longer. I called in sick, blamed it on the migraine which came and went over the next few days.

The migraine did return and lasted for one day longer than I expected. When I finally was able to return to work, I was greeted by a flurry of red and blue lights by the front doors. Uniformed men were scurrying around several of the other programmers and salespeople were sitting on the curb smoking. One of them saw me darted towards me.

“What’s going on?” I asked.

“You. You not hear? It’s all over the news.”


“Millions dead. The government is saying it’s from our software.”


“What do you mean, ‘already?'”

I stammered a few times, unable to find a voice until a suited man approached me. “Excuse me, sir. Do you work here?”

“Yes, I’m, uh, Devlin.”

“We’d like to ask you a few questions. If you would follow us this way.”

I rubbed my clammy hands under the board room table. It felt like I was waiting alone for hours while the clock only registered 10 minutes. I could see out of the frosted windows that the agent was still there talking with someone. The moment he broke away and pushed the door open, adrenaline surged through me. I braced for what I expected next.

“Mr. Johnson,” said the agent, staring down at a series of papers gathered before him.

“Devlin. Yes.”

He didn’t look up at all. “Devlin, as I understand it, you are a software engineer here. Is that correct?”

“Uh, yes.”

“You were granted access to a project known as Operation Iron Fire?”

“Yes, but I didn’t–“

“You worked alongside a Mark Falitashi?”

“Not really. We worked in the same–“

“Did he give you access to the project I mentioned earlier?”

“I’m not sure. I was at home sick since I had a meeting with him.”

“Did you have access from home? Be it offline copies, FTP, VPN or otherwise?”

I stared intently at the agent this time. Every attempt to express my lack of involvement went unnoticed. “If I did, I didn’t use it,” I said shortly. I jerked my head back as he raised his eyebrow at me, unsure if I crossed a line. “Mark should be able to vouch for me.”

“Unfortunately, Mark has been arrested on suspicious of radicalization.”

The next few moments were in silence as he leafed through his papers. I ran through scenarios in my head and potential conversations on how I will get out of this. Mark was handing me a project that killed millions and now I was a possible suspect. How could I not be?

“Am I in some sort of trouble?” My voice cracked despite willing myself not to.

“No,” he said coldly. It was an unconvincing response, not because it lacked confidence, but that it was void of all emotion and could not be read through his body language or tone. Like reading a single word typed out on a piece of paper by itself, except that would hold more meaning than his answer would. For the first time during these questions, he looked up and began to scrutinize my response before he asked his next question. “Were you aware that lives would be lost with the project that you would have worked on?”

My heart sank. A blood-curdling fury at Mark and a nauseating panic flooded my sinuses. The emotions battled for who would dominate me. Fear won out as I lied.

The agent squinted at me. He rifled through the papers once more and pulled out another one and began reading.

“On January 20th, 4 years ago, you had a conversation with a Ms. Claire Chelly:

“‘I can see what it’s going to cost. Like how much time we’re going to have to spend supporting it afterwards,’ you say.

“‘I get that you’re the best quoter here,’ Ms. Chelly says.

“‘No. You don’t understand. It’s any bit of code. I can see what it will cost without even running it. CPU spikes, hours spent cleaning up the data, hell, I also know how much memory the code will eat up.'”

I sat there wrinkling my brow so hard, it started to ache. “How did you–?”

“I’ll ask again, Mr. Johnson. Were you aware that lives would be lost with the project that you would have worked on?”

He clearly knew more than he was letting on, and there was no use trying to hide. “Yes,” I confessed. I wasn’t prepared for his next response.

He carefully pushed another piece of paper towards me, on it were three blocks of code. He indicated that each block was a snippet from an actual system already developed. To my surprise, there was enough code on each of them for me to see the cost of each, on paper of all things. One was blank, apart from the code itself, the second cost an enormous dollar value, the third… a life. Two lives actually. After asking me to pick one, I point to the safest.

“Why not the other two?”

“Well, the second will cost a lot to support.” I hesitated for a moment, his eyes always watching me at this point. “The third is… dangerous.”

“How so. Be specific.”

“Someone will die. I think. I mean. I’m not sure.”

The agent breaks his stare to look down at the papers once more than at the frosted window before back to me. “Just one? Or more?”

“Two, I think. Well, I see two, but I don’t know if it’s certain or not. I don’t know how to explain it.”

Once again, the agent gets up and steps out of the boardroom, leaving me to stew in this weird blur of a day. My colleague arrested, our company turned inside out, and some software that killed millions. But instead of being interrogated continuously, I began to feel like I was a lab rat being prodded and studied.

He returned quicker than he did last time, much to my relief. This time with another paper. I knew the drill, look at it and pick the best. It was a language I didn’t understand the syntax but was asked to choose one anyway. He seemed disinterested in my answer and probed for one more. If there was a difference in the last two. For a moment, I thought there was a difference. One seemed to chill me to the bone, while the other was filled with anger. But the more I stared at them, the less I knew which invoked which emotion. Eventually, I shook my head.

“Mr. Johnson. This next question is an important one. Please answer it truthfully as you can. Could you write code that is used to kill others?”

I almost choked on my own spit. “No,” I blurted out.

“What if it was for national security. Or for our allies. Would you write code that would defend our nation, even if it meant killing others?”

“Well, I guess I could.”

The agent looked back at the frosted window and nodded. “Mr. Johnson. You have a unique talent. One that we are very interested in. I do not represent any agency that you know of, but the opportunities are beyond what you can imagine. I’m here to ask if you would come to work for us. We can help you learn the limits of what you are capable of. Should you accept, you’ll be sworn to secrecy from here on out.”

I didn’t hesitate one moment this time. “Yes. [redacted]”