In the continuing saga of Mercy the Mercenary, she continues to struggle with a political campaign- Rockwood for Governor- and its backwards approach to IT. Last time, she had an uphill battle getting the kit to keep their website up.

The request seemed so simple, Mercy knew. Embed a video inside an email message.

“I’m not saying it’s hard,” she said. “I’m saying it’s impossible.”

“The boss wants it to happen,” Ellis said. “And that means—“

“That means we trust her judgment,” Sullivan interrupted. “But why don’t you try telling us why it can’t happen, Mercy? You can use kindergarten terms so Ellis can understand.”

Mercy sighed. “The HTML in email messages gets scrubbed by the client. What that means is anything the email client thinks is suspicious, such as a script tag or an iframe, gets taken out. The stuff that gets left in is just text formatting and images. Even if you got some embedded video code into a message somehow, email clients don’t have the Flash plugin available to load it.”

Ellis clicked on his trackpad, then spun his laptop around to show Mercy his screen. “Packard got it in somehow.”

Mercy examined the browser window. A message was displayed in Gmail from the Packard for Governor campaign. Just above the fold was what looked like a screenshot with a play button in the center. Just like a video player.

“It’s just an image.” Mercy clicked on it, and the browser spawned a YouTube page in a new tab, a Packard for Governor campaign ad playing at full volume. Ellis hit pause halfway into the sentence “I’m Harold Packard and I approve this message.”

“Look,” Sullivan said, "Rockwood’s really stuck on getting this in. Is there any workaround?”

“It won’t be a real video … but we can embed a .gif image.” Mercy, on her own laptop, found the Packard ad and ran it through an online .gif converter. It produced the first three seconds of the ad. “I can add a caption at the bottom, put a big play button in the center, make it look exactly like a video player. There’s no sound, but who wants sound to play when they open an email message?”

“Don’t mention that to Rockwood,“ Sullivan said. ”He’ll want sound playing on every email message we send.”

Mercy downloaded the .gif, noticing the size of the file. “Hey, we don’t want to embed a 3MB image in each email message. We should put this on our CDN server and link to it from there.”

“Won’t there be that little X icon if we do that?” Ellis asked. “I hate it when Gmail does it to our messages.”

“Most subscribers have our newsletter added to their whitelist, so they won’t all see that,” Mercy said. “We attach the template images to the email message, but they’re only a few kilobytes. We can’t send 3MB messages to all of our subscribers.”

The Teapot prize from the British gameshow 'Countdown'

“Our email provider’s giving us a discount this month,“ Sullivan said, ”and I know if Rockwood’s going to want to see the video in the email as soon as it’s out. And if he sees that X icon, he won’t be happy about it.”

Mercy shrugged. “Well, what’s 3MB when people have a TB of storage for email nowadays? I’ll get it done.”

“That’s the kind of motivation I like to see.”

Mercy turned to see Rockwood in the doorway of the conference room. She wasn’t sure when he’d walked in.

“Oh, I’ll make sure that video gets sent out,” Ellis said, with a straight face.

“Ellis, if I was appointed Emperor of Florida tomorrow, you’d say it was all because of you.” Rockwood winked at the man as he sat in an empty chair. Mercy rolled her eyes.

“Now, don’t give me that,” Rockwood said, addressing Mercy. “I have a task just for you. See, I need a countdown clock. You know, like the one in Mission: Impossible, the bomb timer.”

“John,” Sullivan asked, “when is this … bomb set to go off?”

“August 1st, one second after midnight. Think you can do that?”

“Uh, sure,” Mercy said. “What happens when it gets to zero?”

“I’ll let you know.” With that, Rockwood left the conference room.

“Well,” Sullivan said, “I’m sure he’ll let us know just what he wants in due time. So, can you make a countdown timer, Mercy?”

“Sure can.”

// TODO

Cloistered away in her apartment, far from the squawking of the volunteers on the phone lines, Mercy built a countdown clock. Javascript programming didn’t lend itself well precision timing, but coding timers was easier than in other languages due to the setTimeout()/setInterval() methods and functions as first-class objects. In fact, Mercy had written countdown clocks for several past clients. She grabbed a recent copy of that code and modified it for Rockwood’s clock.

$(function(){
	var launchTime = Date.parse(‘2016-08-01 00:00:01 EDT’);
	var $clockTextDays = $(‘#countdown-days’);
	var $clockTextHours = $(‘#countdown-hours’);
	var $clockTextMinutes = $(‘#countdown-minutes’);
	var $clockTextSeconds = $(‘#countdown-seconds’);
	window.setInterval(function(){
		var delta = launchTime - (new Date()).getTime();
		if (delta <= 0) {
			// TODO: ASK SULLIVAN WHAT SHOULD HAPPEN
		}
		else {
			var remainder = delta;
			var deltaDays = Math.floor(delta / 86400000);
			remainder -= deltaDays * 86400000;
			var deltaHours = Math.floor(remainder / 3600000);
			remainder -= deltaHours * 3600000;
			var deltaMinutes = Math.floor(remainder / 60000);
			remainder -= deltaMinutes * 60000;
			var deltaSeconds = Math.floor(remainder / 1000);
			$clockTextDays.text(deltaDays + ‘ days’);
			$clockTextHours.text(deltaHours + ‘ hours’);
			$clockTextMinutes.text(deltaMinutes + ‘ minutes’);
			$clockTextSeconds.text(deltaSeconds + ‘ seconds’);
		}
	}, 100);
})

She put together a quick concept image in Photoshop and emailed it to Sullivan for her approval (she had learned not to run anything past Ellis unless she wanted him to sabotage it in some way).

Sullivan’s response was quick: Good, but less jaggies. -Barbie

Mercy re-examined the concept image in Photoshop to see if she had left a filter on, then realized that Sullivan was viewing her 1200-pixel wide image on a 700 pixel laptop screen. With Sullivan’s implied approval, she coded the styles for the clock, using an LCD-style font for the digits and placing the entire timer inside a velvet-lined briefcase.

The exercise took less than a couple hours, most of it adjusting the styles for cross-browser compatibility. She pushed the code up to the web server hamilton, which replicated it to the others.

The thought of that TODO comment drifted out of the back of her mind as she went to sleep that night.

In With A Bang

WE’RE ON TV! -Barbie

The notification on her phone woke Mercy at 7AM. She wondered which channel Sullivan was referring to, but a Google Alert in her inbox told her. Fox News, taking an interest in the iconoclastic Rockwood facing off against their chosen favorite Harold Packard, had Mercy’s briefcase-framed countdown clock displayed behind the hosts of the morning news, with the headline “Rockwood Campaign About To Explode?” in the ticker below the talking heads.

Back at headquarters later that morning, Mercy checked the logs of the founding father servers. Fox News, Drudge Report, Breitbart, HuffPo, and Politico had all linked to the timer. The common thread of speculation between all of them was exactly what John Rockwood’s timer was counting down to. Mercy brought this up to Sullivan, but she brushed it off.

“This is the best kind of publicity,” she said. “We’re the belle at the ball and every man wants to dance.”

“More like Cinderella,” Mercy said, “and that pumpkin carriage turns back into a pumpkin at midnight. All that timer does is count down to a date. When the date comes and goes, it won’t actually do anything unless we tell it to.”

“The boss will know what to do then,” Sullivan said, as if it were no concern at all. “Anyway, you have approval to begin building our new blogging platform. Just make sure it looks like Ellis’s template.”

Mercy sighed at coding another one of Ellis’s ugly concepts, putting the timer out of her mind.

Out With A Whimper

The morning of August 1, Mercy’s phone buzzed with another Google Alert. This one was from Drudge Report: ROCKWOOD’S BOMB FIZZLES.

Mercy tried to remember in which of Rockwood’s speeches he had mentioned a bomb going off. She couldn’t, so she went back to sleep.

The phone buzzed again. This time, it was Sullivan calling her.

“That countdown clock is counting in the negative!” Sullivan was breathless. “It’s just going negative one, negative two, negative three…”

Mercy remembered. “You never told me what it should do.”

“I thought we told you when we gave you the assignment.”

“No, I asked, and no one would give me a straight answer.”

Mercy dressed and drove to headquarters. Ellis spotted her as she came in, his eyes widening like a shark’s as it smelled blood. “Your countdown clock is broken!”

“Okay, Ellis.” Mercy’s teeth ground together. “What was it supposed to do?”

Ellis waved his hand dismissively. “I’m sure it goes to a press release or something. You should check your email.”

Mercy pulled out her phone. She entered the phrase “countdown clock” in her email client. The only search results were the brief exchange between Sullivan and herself approving the concept image.

In the back hallway leading to the conference room, she saw Sullivan talking to Rockwood. The candidate looked a bit listless. Sullivan was throwing her hands up in frustration. She rubbed his back, said something she couldn’t make out, and made her way to where she and Ellis were standing.

“Funny,“ Sullivan said, ”John doesn’t actually remember telling you to do the countdown clock. I reminded him, but it didn’t jog his memory. He’s such a busy man, I’m sure it slipped his mind.”

Ellis nodded vigorously. “You should have written it down,” he said again to Mercy.

“In fact,” Sullivan added, “I recall the conversation exactly. He said he would tell us later, and wouldn’t you know, he never did. Not his fault, he’s just been so busy!” Her voice sounded flustered. “But I know what it should link to. It’ll go to our first blog post from the campaign! Can you do that?”

Mercy nodded. “The page won’t actually redirect to it unless they refresh the page.”

“I’m surprised you couldn’t have guessed that,” Ellis said, baring a toothy grin. “I mean, anyone—“

“Harry,” Sullivan said, leaning in so close her face was an inch from Ellis’s, “not everyone here is as close to John as you are. In fact, he could really use your help right now. Why don’t you see to it.”

Mercy’s blood ran cold as Ellis shuffled back to see to Rockwood.

Smoothed Over

Mercy stared listlessly at the landing page of the Rockwood for Governor campaign blog, titled “Righteous Rants,” picked by consensus from the volunteers.

Ellis had spent the entire day in the conference room with Rockwood. He only came out once to talk to Mercy, complaining that the mobile view of the blog template didn’t use his hover menus. Mercy explained as best she could that hover menus don’t work on mobile because you can’t actually hover a cursor on a touchscreen. He seemed much more complacent than he had been earlier when he confronted her about the countdown clock.

She was watching a video of one of Rockwood’s stump speeches, filled with his typical long pauses, when the candidate himself emerged from the back. His shirt was rumpled and untucked, but his personality was fresh and cheerful. After greeting some of the volunteers (and fixing his shirt), he came over to Mercy. “I appreciate how much work you put into that little countdown,” he said, shaking her hand. “Wish I would have thought of that! Barbie tells me our page impressions are through the roof!” He whispered, in a conspiratorial tone, “I don’t know what kinds of impressions she’s talking about, but I hope they’re good ones!” He slapped Mercy’s shoulder and left for other matter, Ellis trailing behind. Mercy smiled, remembering the man she saw back in that high school gym several months ago.

Mercy decided that the dropdown menus would open on click at mobile sizes, hover at typical desktop resolutions. They hadn’t fired her for building a countdown clock that did nothing after counting down. Surely she had some executive power when it came to building CSS menus.

But deep down, she realized something was very wrong with Rockwood, and only Ellis and Sullivan knew what that could be.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!