Actions

Work Header

Compiler Theory

Summary:

"What the hell is Professor Vaughn's third year Compiler Theory?" Coulson asked.

"It's complicated," Jemma tossed over her shoulder, as she took off down the corridor to find Fitz.

---

When Simmons decides to take a course far outside her core academic experience, Fitz fails to help her with the material until it's too late. When he realizes the mistake of his own childish behavior, he arranges an impromptu (and possibly career-ending) solution to that little problem for her. Neither of them realized, back in their third year at the Academy, that the lessons she learned as a result would allow her to save his life many years later.

Work Text:

Jemma's chest heaved, her heart pumping so fast she was beginning to feel lightheaded. She saw the wild look in Fitz's eyes on the screen in front of them and she could hear the fear in his raised voice, roughened and sharp with adrenaline as he faced down mortal danger from the Primatives he was locked in with.

She could feel the energy of everyone around her, all of them focused on getting their people out of the hangar. Coulson was barking out questions to Fitz, looking for the solution as he pushed them all to consider any workable option. Tension radiated off May in waves, the urgency from her was palpable and insistent that they just do something, anything, that will keep them from watching their teammates—from watching Fitz—get devoured by those things.

Jemma wanted to cry when Lincoln offered the perfect solution, if not for the lockdown and the distance between where they were and the location of the service system. Using his powers, Lincoln could easily flood the system with electricity, mimicking a power surge, which would trip the automatic reset function. That would, temporarily, at least, disconnect the motion sensors from the security protocol as the system completed its quick reboot program, letting Fitz and the others out of the hangar. It would have been ideal, except for the stark reality that Lincoln would never make it across the base in time.

Her mind raced, trying to think of any closer access panel or section of conduits he could overload to achieve the same goal, when it hit her. A power spike was one way to force the security system into the quick reboot that would temporarily remove its connection to the motion sensors, but it wasn't the only way. She ran through the equipment in the hangar bay, hoping there was a terminal sophisticated enough there for Fitz to use, but her stomach dropped when she realized there wasn't.

With Daisy's or Fitz's skills, this would be trivial. She watched Fitz on the screen, his body coursing with nervous energy, and wondered if either of them were clear-headed enough for him to walk her through it. When she couldn't imagine parsing the instructions from him in time, she tried to remember a time, any time, when she'd watched him do anything similar, giving her an idea of how to accomplish it on her own.

The words were out of her mouth before the thought was fully formed in her head.

"Fitz. Professor Vaughn's third year Compiler Theory?" she asked, their longtime in-joke seeming like the fastest way to ask him if her plan might work.

Relief flooded through her when he immediately agreed. He shouted his belief that she would remember enough of what he'd shown her, looking at her through the security camera, and she locked eyes with his image on the screen for a moment before she set to work. The encouragement rang in her ears, his faith her only comfort now that it was clear the solution would come at her hands or not at all. This was their only hope, and she was at the terminal with her fingers racing over the keyboard a second later, shoving her doubts to the side and picturing a younger Fitz and Simmons huddled together in his room at the Academy.


Fitz stared up at the security camera, a poor stand-in for Jemma's beautiful face, as every molecule in his body thrummed with the hope that her brilliant mind could travel back through the years and recall what he'd shown her on the afternoon she'd just referred to.

He usually made it a point never to doubt her, as he'd seen many others underestimate Jemma Simmons only to be proven exhaustively wrong, so he hoped she'd forgive him later when he tacked on a question that implied her memory might not be strong enough to reach this far into their past.

As shots rang out from the agents around him and they huddled deeper and deeper into the corner, Fitz thought back to their third year and hoped this wasn't his impending death causing his life to flash before his eyes.


S.H.I.E.L.D. Academy, Simmons and Fitz's Third Year

Fitz took the steps two at a time, whistling a little as he headed to the lab where 'Vaughn the Yawn' was about to give them their final exam in their Compiler Theory course. The afternoon found Fitz in an excellent mood, confident he could ace anything Vaughn was going to throw at them even with one lobe of his brain tied behind his back. He was considering different ideas to keep himself entertained after he'd finished enough work to lock in top marks in the course, toying with the idea of embedding unflattering ascii pictures of their instructor somewhere in his code.

He came up short when he reached Vaughn's hallway, finding Jemma pacing a rut into the flooring just outside the door. Her hands were fluttering against each other with tension as she muttered something to herself, shaking her head and frowning so intently he thought the 'v' carved between her eyebrows might be permanent.

"Simmons? Are you—"

"I should have listened to you, Fitz." She crossed the hall, her hand painfully clamping around his wrist as she tugged him with her, out of earshot of everyone else waiting for the exam to begin.

"Ow! Simmons, what's gotten into you?" He pulled his arm away, her hand opening as soon as she realized exactly how hard her fingers were digging into his skin, her eyes suddenly filled with apologies.

"I'll tell you what hasn't gotten into me." She looked side to side, narrowing her eyes at the other students nearby, presumably to make sure they weren't eavesdropping. "Compiler Theory."

"Oh, Simmons. Is that all? You insisted on taking this course outside your own disciplines, extra course load on top of your electives and core curriculum, and now you're surprised that getting the hang of the material isn't the walk in the park you assumed it would be? You're gutted that you might get less than perfect marks for once?"

He sounded a bit churlish, he knew, but his irritation at her flippant attitude toward the difficulty of the courses in the engineering track had been brewing for weeks. He was surprised he'd had the restraint not to let more of it spill over before now.

Her expression fell even further, followed by her shoulders slumping and her head ducking toward the floor. She looked defeated, and he wondered how unprepared she truly was. He couldn't imagine Simmons failing to excel at anything the Academy could throw at her, whether she used the innate power of her analytical mind or blasted through the material with her dogged, undying determination.

"It's not that I...oh, Fitz. Perhaps you're right. I must not have taken this seriously enough." There were actual tears in her eyes now and his stomach tightened at the sight. This wasn't typical Simmons, seeming anxious about her marks only to beat him by several percentage points. This was genuine panic. He wondered how he hadn't seen the state she was in until now, and then he remembered...he hadn't lifted a finger to study with her, though she'd asked him several times over the past few weeks.

"Listen," he began, pulling her further down the hallway. "You always second-guess yourself like this and go on to get the top score. You'll be fine, I'm sure."

She nodded, the troubled look on her face not budging an inch. "Hopefully this won't impact my overall portfolio too much, Fitz. I really don't want to let you down."

"Let me...Simmons, why would I be let down?" She looked even more unhappy, so he decided to try a little levity, hoping to joke her out of this uncharacteristically pessimistic attitude. "I mean, I suppose I do care about your grades almost as much as I care about mine, if only because I know you'd be inconsolable if you didn't beat me."

"Well, you needn't worry about that this time. I'll be lucky to score above the mean today, I should expect. When you were so busy the other night and I was having trouble with some of these code translation concepts, I asked Rossi if she could look over my notes and explain a few things. I'm not sure I even fully understood her summary, much less the larger issues she was cautioning me to keep in mind. I'm sure she was really trying to make the material more accessible to someone who doesn't have a doctorate in engineering, but I'm still rather fuzzy on all of it."

If Fitz had felt regret before, he certainly felt worse now. He'd assumed Jemma was simply trying to beat him yet again and he'd abandoned her to her own studying, angered at the idea that she was so competitive that she couldn't stand to have him eke out one measly win. Now it seemed she'd be fighting simply to pass the course, and he regretted more than he could express that his childish behavior had contributed to the position she was in.

"I should have pushed you harder to drop the course before the deadline, Simmons," he said, without considering his words carefully enough. A single tear slipped down her cheek and she brushed it angrily away, her face reddening as she nodded and fought to regain her composure. "It's not that I don't think you're capable of the work, it's that so much of this draws on material you've never seen before. The rest of us have. Three different instructors tried to dissuade you from enrolling, if you'll remember, and you had to have the prerequisites waived."

"I'm certainly regretting my choice now. Thank you very much, Leopold." She leaned into his first name and he knew she was annoyed with him now. They'd formed an understanding long ago that his given name was unacceptable to use in polite conversation.

"Why did you insist on this? I still don't know why this course was so important to you." He should have put the question to her months ago, when she'd first announced her intention to join him in Vaughn's classroom for this mess of a course. An agony of expression changes crossed her face before she sighed, her eyes dropping to the floor before she drew a shaky breath to answer him.

"We're leaving the Academy soon, Fitz. We'll become full agents and get our assignments. I wanted us to..." she paused, chancing a look at him before she studied the floor again. "...stay together. Given your aversion to the sights and smells of the bio and chem labs, I thought that proving I could be of some use outside my specialties might help. If I can't show at least some rudimentary proficiency in engineering, I'm afraid we'll be sent halfway across the world from each other." She spoke the words as though they were the most terrible thing she could imagine happening, and he could do nothing but stand there, silently agreeing with her assessment.

"Simmons, we'd make it happen somehow. Did you think I would grab my badge and run away from here without you?" He was surprised to hear her talking this way. They'd never discussed it outright, but he'd always assumed they would remain partners after leaving the Academy, turning down any assignments that weren't suitable for both of them.

Her eyes widened, boring into his, and the disbelief in her face tugged at his heart.

"We could be assigned different levels. You might not even be able to talk about your work with me, after we leave here. Engineering is vital to S.H.I.E.L.D., Fitz. You've already got some of your technological breakthroughs helping agents in the field. They'll bump you to level 4 and whisk you away, and I'll be lucky to ever hear from you while I process samples in the back of a bio lab."

"Simmons..." he intoned, wondering how all of this could have been percolating in her brain without him being aware of it. She was speaking as though she wasn't the most extraordinary scientist S.H.I.E.L.D. had ever seen, and apparently forgetting how he'd spent the better part of three years struggling to keep himself in shouting distance of her accomplishments. "You're aware you're a genius, aren't you? S.H.I.E.L.D. isn't going to shove you into grunt work in some backwater lab."

"Superior agents take our performance here very seriously when considering assignments. I agree that my previous results might have been enough to recommend me quite highly, but with the stain of my poor marks here..." she trailed off, gesturing weakly toward the lab door. "I'm afraid they'll call into question my usefulness on a scale commensurate with yours. You have, after all, taken several courses outside your specialty and acquitted yourself quite well. You've more than proven your worth over the last three years, Fitz."

He felt sick as he considered what she was saying. Not because she was right, of course. She was completely blowing the importance of this single grade out of proportion. The terrible part of this was the sheer amount of time Simmons would spend obsessing on the ramifications of this 'horrible mistake' she was so sure she'd made. The anxiety that would ensue would probably shave years off both of their lives.

It was all made worse when he realized he'd done so well in those courses outside his own specialties because Simmons had taken them alongside him, helping him study, giving him advice on his research papers, and talking him through the unfamiliar concepts until he could ace the end of term exams. What had he done when the roles had been reversed? He'd secretly hoped he would get a higher mark than she did for once, decided her motive was simply to show him up inside his own specialization, and then avoided helping her. She would never have done the same to him.

He opened his mouth to say something, uncertain what he could do to help her without a time machine, but he was interrupted by Vaughn's arrival. Their instructor swept pompously through the crowd, threatening to fail the last person to cross the threshold, and Jemma hurried inside before Fitz could stop her.

She settled in at her terminal, just in front of his, and Fitz recognized all the hallmarks of highly anxious Simmons body language. She adjusted, re-adjusted, and then re-re-adjusted the position of her bag next to her chair. When she was satisfied with that, she tucked her hair behind her ear over and over, her hands getting less dextrous and more frustrated the more her soft brown tendrils failed to stay where she'd put them. Once the pencil bouncing started, Fitz realized this was the most high-strung he'd ever seen her.

And that was saying a lot.

Vaughn surveyed the class, smirking at them rather gleefully, and then he reached forward to activate the exam on the student terminals.

Fitz took in the data that popped up on his screen and sighed, realizing that Vaughn must have been angry from the beginning at the presence of someone in his course who lacked a doctorate in engineering. There were a thousand ways an exam could be constructed that would test the compiler theory material without requiring a thorough engineering or computer science background, but this wasn't it. This test seemed to be designed specifically for the purpose of failing Jemma Simmons.

"This should be straightforward, cadets," Vaughn began, spinning a little from side to side in his chair at the front of the room. "You can either construct the compiler necessary to translate and prepare to execute the code snippets I've provided, or you can't. You have one hour, which is a lot more time than you'll get to perform a task like this in the field, so I don't want to hear any complaining from the peanut gallery. If that's clear, you may begin."

Vaughn spun around in his chair, putting his back to them as he held up a tablet, apparently finding the room full of students slaving over his exam too boring to watch. Fitz briefly considered hacking into Simmons's terminal to leave her a few hints, but he knew she'd view that as cheating and she'd refuse to accept the help.

What he needed instead was a way to delay the exam. If he grabbed her right now and they stayed up all night studying, he was confident he could prepare her to do what Vaughn was asking of them. She was a remarkably quick study, and he knew tons of shortcuts and tricks that would help her understand the material more completely.

It was possible he'd never been more angry at himself, watching over her shoulder as her fingers were motionless on the keyboard, hovering there in a portrait of indecision as she tried to decide how to dive in.

The other cadets were racing ahead, typing madly as they constructed their solutions. Fitz looked at the blinking cursor on his screen, checked again to make sure Vaughn was too preoccupied to check in on them, and he set forth on an entirely different task.

Breaking into the main system in the lab was simple. It was a standard S.H.I.E.L.D. filesystem and Fitz had been hacking around those since his second week. Once he had full access, he took a look at what Simmons had so far.

It wasn't bad, actually. She wasn't as far along as she needed to be to finish on time, but she was fighting her way through. He could see several errors his fingers itched to correct, and he seriously considered for a moment if she'd even notice him dropping in a little help here and there. He was about to make the first change when he realized how angry she would be if she ever found out, and how likely it was that her conscience would demand she turn them both in and get them drummed out of S.H.I.E.L.D. for breaking the honor code.

Fitz would have to find another way to buy her the time they'd need for him to get her properly up to speed. He began to poke around in the error handling on the system, looking for any protocol that would put the system into an automatic reboot. He knew Simmons would never stand for him destroying the work of any of their fellow cadets, but if he could wait until everyone else was done, lock them all out of the system, shut down everyone's terminals but Simmons's and his, and then corrupt the filesystems on everything that was still connected, Vaughn would have no choice but to give them the opportunity for a make-up test.

He frowned one last time at his screen, knowing this was an either/or proposition. There was no time to write his compiler and arrange the system crash, corruption, and reboot. If his plan didn't work, he and Simmons would both fail Compiler Theory, and he wasn't at all sure what would happen after that.

One glance at his best friend, shifting uncomfortably in the seat in front of his, and he'd made up his mind. System crash it was, then.

With one eye on Vaughn's reclined figure at the front of the room and the other on his terminal, he began to set up everything he'd need to complete his plan. He monitored the progress of the other cadets, mentally checking them off as they locked in their work and moved on to looking through their e-mail or playing the bootleg version of Minesweeper most of them had hidden on their personal cloud storage.

He had the filesystem corruption virus finished as the last cadet other than Simmons and himself locked in their exam work. Fitz gulped uncomfortably as his fingers moved faster, beginning the work that would either save Simmons or get them both kicked out of the Academy.

Out of the corner of his eye, he saw the moment each of the other terminals shut down. He followed that quickly with the release of the virus on Simmons's system, sighing with relief when her body language betrayed her shock as the screen changed from her work to random ascii strings, before it went dark altogether.

He put a ten second delay on the execution of the virus on his own system, using the time to start the full reboot before his own screen was taken over by the nonsense character strings.

In the end, the most difficult part of the procedure had been pretending to be surprised, and then angry at this 'interruption', as the system's security alarm sounded on Vaughn's instructor terminal, alerting them to the reboot.

Vaughn scrambled out of his chair, clearly surprised that something in his classroom hadn't gone exactly to his specifications, and he set about bringing the closed network back up and checking the health of the systems attached to it. The classroom was utter cacophony as every cadet began talking at once, each of their voices strained as they considered the possibility that they'd just lost a full hour's work.

As each student discovered none of their data had been lost, Vaughn began dismissing them from the classroom, whittling the population of the room down to Fitz and Simmons. He called them to the front, his face impossible to read, and Fitz tried to act as outraged as possible when Vaughn told them there was no way to salvage anything from their terminals.

"Take a look, Cadet Fitz," Vaughn said, pushing his chair back from his desk and gesturing to the keyboard. "If you can salvage anything out of either filesystem, I'll grant you a passing grade in any engineering course you'd like. It can't be done."

"If we could move to different workstations, sir, perhaps we could begin the exam again?" Simmons suggested, and Fitz almost let out a wail of frustration. Of course she would innocently propose that solution after the ridiculous amount of work he'd just put in to buy her a day before the re-test, and he held his breath, waiting for Vaughn's answer.

"As much as I enjoy spending time with my cadets, Dr. Simmons, S.H.I.E.L.D. has other requirements of me afternoon and I can't remain here for another hour. We'll have to do a re-test tomorrow, right here, same time. I won't bother changing the parameters of the exam, so study all you'd like this evening, Cadet Simmons. I have a feeling you might benefit from a little extra time to brush up your methodology."

The sneer on Vaughn's face as he delivered those last few sentences to Simmons confirmed Fitz's suspicion that this exam had been chosen deliberately to put a massive roadblock between Simmons and a passing grade. Knowing that one of their instructors would do this so gleefully curled Fitz's hands into fists at his sides as anger built up in his chest, threatening to release itself in an frustrated litany of accusations and inelegant name-calling. It was only his certainty that Simmons would be mortified if he indulged that impulse that kept his temper at bay.


They left the classroom and Simmons walked quietly next to him, her hands worrying at the strap of her bag until they exited the building. Once the sun was beating down on them, she apparently couldn't hold back any longer, dragging him off the path to sit next to each other on a wrought iron bench.

"It's rather odd that everyone's work was preserved other than yours and mine," she began, and he knew he'd never had any prayer of her not working out what he'd done.

"Simmons, all you need is one extra night of studying and a little help from me. Vaughn won't know what hit him when you write that compiler tomorrow, because neither of us is going to sleep until you can write one twice as complicated as the one he wants." He stood up and took her by the hand, trying to pull her up to take her back to his quarters, knowing she'd want to dig into the material right away.

"You cheated for me."

"I didn't cheat, Simmons," he said, sitting back down and lowering his voice, looking around them to make sure no one had overheard. "I bought you one day. No one else lost any work."

"You lost yours—oh, but you didn't have time to write yours, did you? Not while you were also orchestrating that little fiasco in there to rescue me from my own hubris."

"Simmons, no. Don't do this. Let's not rehash that, let's just start here and move forward. We can do this, but we don't have a moment to waste."

"You should have allowed me to fail," she said, looking at her folded hands in her lap.

"No, what I should have done is help you get through this material the way you helped me get through that Immunology elective last year, or the Polymers course our first year." He put his hand under her chin, lifting it up to encourage her to look at him. "I've been really petty, Simmons. You've never denied me help when I needed it, and I ducked every request you made of me the last few months because I relished the idea of getting a higher mark than you. For once."

He could see the hurt in her eyes as it all came together, and he knew she must have been wondering why he'd suddenly been so distant after they'd shared their course schedules with each other a few months ago. She was too smart to not at least have had an idea what his motives had been, but hearing outright confirmation of his selfishness obviously pained her quite a bit.

"Let me make it all up to you, Simmons. Come on. You can shout at me about it tomorrow, but first let's work together and get you ready to nail this, all right?"

"You risked your entire future for me, Fitz. What you did—it breaks the honor code about a dozen different ways. You put your career on the line over one grade."

He shook his head. "Not over one grade. For you."

Her face softened, and she sandwiched his hand in both of hers. "Fitz," she whispered, blinking at him for a long moment as his heart threatened to beat its way out of his chest.

"It's what they've been teaching us in those Tenets of S.H.I.E.L.D. seminars," he continued, trying desperately to make this moment feel more normal. "I'd do anything to help another agent in the field, and so would you. I saw someone who needed my assistance to complete her task, and I did what had to be done."

"When you put it that way," she said, a small smile on her lips, "and because it's already done, I suppose I'll graciously accept your offer."


They spent the next dozen hours in his quarters, Fitz drilling everything Simmons needed to know into her head until she could repeat it back to him without hesitation. When they got into an argument about one of the finer points of compiler theory sometime just before three a.m., Fitz found himself grinning at her despite the weighty feeling of fatigue that had settled over him.

"What? Does your silence indicate that you concede my point?" she asked, her eyes flashing with challenge.

"No, he laughed. "You're still bloody bonkers, but we couldn't have this argument if you didn't have a rather deep understanding of the task you'll have to complete in the lab tomorrow."

She blinked a few times, and then laughed as well. "I suppose not."

"Come on, Simmons. Let's get some sleep. Can't we just pass out for a few hours before we decide which one of us is right, for a change?"

"All right, but I'm setting the alarm a little early tomorrow," she said, and he tried to ignore when his heart raced again as he realized she was planning to sleep in his room, apparently too tired to walk across the quad to the women's dormitories.

"I will not wake up early to argue with you. The line has to be drawn somewhere, Simmons, and I think that's it."

"No, it's not that," she scoffed, pulling the blanket from between the duvet and the sheets on his bunk and beginning to make up the couch. "I want you to show me how you crashed the system yesterday. Those skills are much more likely to be useful in the field than the material we've learnt in the course itself—you said so, yourself. If we're to get onto a field team—"

"Haven't even passed our field assessments, Simmons," he interjected, getting a flash of her angry face in return.

"—if we're to get onto a field team," she repeated, raising her voice, "it might be something I need to know one day."

Fitz threw her one of the pillows from his bed, which she began to fluff between her hands before tossing it at the end of the couch. She was about to climb under the blanket when he crossed the room, stopping her with his hand, and pushed her lightly towards the bed instead.

"I can't take your bed, Fitz. After you stayed up so late solely to help me—"

"If I'd helped you all along, as you would have done for me, we wouldn't be here right now, having this argument. So just let me take the couch as penance, all right? Just remember how I did this when it occurs to you a week from now that you should do something to exact your revenge for my petty behavior, yeah?"

She giggled, and his stomach clenched in a strange way that he instinctively decided not to examine too closely as she slipped into his bed, snuggling the side of her face into his pillow and sighing happily.

"I'll show you the whole thing, Simmons. Tomorrow, I promise. It's not that complicated, really. Once you're through the security protocols, forcing a reboot isn't that difficult. It's the virus that took most of my time, actually. Might take longer to teach you that one, but that system flush and reboot might be useful for you know. We'll start there."

He waited for her answer, sitting up when it didn't come, and then he grinned at her as he realized she'd immediately dozed off. Her mouth hung slack and her face was relaxed in sleep, at peace for the first time that day.


Present Day

Jemma pelted through the corridors of the Playground, trying to get to Fitz as quickly as she could. She'd heard him report in after she'd gotten the motion sensors working and she knew, intellectually, that he was safe. There was no force on this planet that would allow her to really believe it, though, until she felt the warmth of his miraculously unscathed body burning under her own hands.

She rounded the last corner and saw him, still plastered tiredly against the wall. She plowed into him, hearing his surprised grunt as he absorbed the hit.

His arms closed slowly around her as she peppered his face and neck with relieved kisses, no longer caring if anyone saw them. They'd had a long discussion a few days ago about professionalism and secrecy, coming to the conclusion that the shift in their relationship was nothing anyone else needed to know, but sense and rationality tended to go out the window after yet another near-death experience.

"I can't believe I remembered how to do that," she blurted out, picturing how close she'd come to losing him again.

"I never doubted you," he said, earning a raised eyebrow from her. "All right, I questioned your memory for a moment there, I know. Briefly. But I was in mortal peril when I did, so you can't hold me responsible for every word that popped out of my mouth."

"My instructor in S.H.I.E.L.D. System Crashes 101 was excellent," she whispered, looking around to make sure they were alone one last time, then she pressed him against the wall for a long, deep kiss. "Thank you for waking up early that morning, seven years ago, to teach me what I needed to know today to save you."

"I love you, Jemma. Did you know that?" His eyes glistened in the darkness, and she struggled to draw breath enough to answer him as she fell into those unfathomably deep pools of blue.

"Of course I did, Fitz. Don't be ridiculous." He laughed, looking a bit surprised, as he clearly hadn't expected this reaction from her. "Do you think I would be so silly as to fall in love with someone who didn't love me back?"