Saturday, November 10, 2018

Magical Thinking, Tee, and Tea

(note: this is a continuation of a story that starts here)

Fred shut his eyes hard and held them tightly closed for several seconds.

When he opened them, he still saw the same thing.

"Does this do what I think it does?"

"Yes," answered Samantha.

She sounded a little distracted...like she was holding onto the bumper of a car full of children perched on the edge of a cliff and about to fall into a ravine.

Fred's jaw hung slack for a minute. His nostrils flared. First once, then twice.

Then he exploded with laughter.

That was all she wrote for Samantha. She threw back her head and howled. It was high-pitched.

The two of them roared with mirth, slapping their knees and trying to sputter phrases. "I ca-"..."It's no-"..."There's no-"...

No sentence survived past its second syllable.

Tears ran down both their faces. Samantha's mascara fanned down her cheeks; little runnels of faint gray documenting the absurdity of what they both had seen.

After a minute, they were both gasping for air. When they settled down a little, Samantha forced out the words "R-r-read the comment."

Fred thrust his chin forward and squinted as he scrolled up. A moment later, they were both laugh-crying all over again.

What Fred beheld was a gigantic, meandering method. It ran on its own thread. It searched through all the objects on the heap. Every time it found one that met some incoherent criterion, it added it to a list and locked it.

When it found a hundred that met the condition, it serialized the lot of them and wrote the result to the logger. Then it released its reference to the locked objects and (consequently) the lock. The whole thing was set up to conditionally compile so that it didn't run in Debug mode...only in a release package, like what would run in production.

Fred could barely piece together what the code was doing, it was so messy and convoluted.

Before the mess lay this comment.
// move objects from memory to disk
It was beautiful in its ignorance, harkening to a magical worldview that Fred almost envied.

"It's a miracle it worked at all," said Samantha.

Fred countered "It kind of didn't. I had to factory-reset one of the phones I was using to test it."

"Hmm. Coincidence? It seems like we'd be hearing about something like that from the field if it was real."

There was a long pause.

"Still," she continued. "Most of the time it did work. It just didn't do what Kramer intended and it was really slow. How could someone so dumb make something this complicated even half-work like that?"

"He probably copied it off the Internet and changed it to," Fred used his fingers to form air-quotes "'do what it's supposed to do'."

"Maybe." Samantha bit her lip, looking downward to study her nails while she cracked her knuckles. "Maybe."

They both sat in silent consideration of the apparent paradox.

"Now topic!" shouted Samantha.

Fred turned his head to look at her and arched his right eyebrow.

"You seeing Jane, tonight?"

Fred shrugged. "Probably," he answered.

"You're like the airlines used to be."

Fred shook his head slightly and flapped his hands a little.

"You're okay with baggage but the limit is two."

Fred smirked. "Cute," he said.

Later, Fred found himself standing outside a door covered in a distressed two-by-four facade.

He half-glared at the stream of hipsters pouring past him and into a The Broken Bean. Fred didn't have anything against hipsters as a group. He wasn't a prejudiced man. He took the time to individually despise each one of them on their own merits.

It was okay, though. The kids didn't notice his gaze and wouldn't have cared if they had. Most walked with their chin to their breast and their eyes darting between a faint, blue-white glow and whatever was immediately in front of them.

The air was a little chilly. Not cold enough for Fred to bundle up but cool enough for him to want to tuck his hands under his arms so he could warm his fingers.

Fred drew a deep breath and exhaled, creating a little, pale puff that faded almost immediately.

His focus slacked and the hipsters bled together into a translucent foreground only barely obscuring the code he had seen before.

Something bothered him about it. Rather: something about it bothered him more than usual.

It wasn't just that it was terrible code. Kramer always wrote terrible code. Samantha was right...the algorithm was ultimately worthless and made things a lot worse but it did what it was "supposed" to do up to (but not including) getting the targeted objects off the heap. That was no mean feat.

There was a clumsy elegance to the whole thing. It made him think of a clown on a tightrope, always on the edge of destruction but never quite seeming to fall.

Where did that analogy come from? Its source escaped him.

Jane's voice broke the trance. "Sorry," she said. "The sitter was late."

Fred turned to face her and stepped toward the door.

"I got your text," he said. "It's alright."

Inside, the line was short. Most of the hipsters stood around the little bar where the coffee was served. Only one person stood between the register and Fred or Jane and he was already paying for his order.

"Welcome to The Broken Bean," said the employee. Her tone was casual, almost unprofessional. "What can we get you?"

Jane turned to Fred and looked up to him in askance.

"Ladies first," was his reply.

"I'll have a fifteen ounce white mocha with praline shavings and sea salt."

Without missing a beat, the cashier asked "Fresh shavings or pre-shaved?" After a moment, she added: "It's thirty-two cents extra."

Fred winced at the arbitrariness of the exchange. He liked Jane but he didn't like going to places like The Broken Bean.

"Fresh, please...and could you crack the sea salt a few times? The granules are usually a bit big for my taste."

"Of course," said the barista. Turning to Fred, "...and you?"

"Earl Gray, if you have it."

The young woman rolled her eyes and reached for a cup. An overly-exaggerated sigh accompanied her nearly slamming it on the counter. The "clack" of the impact was so loud, it caused a few nearby hipsters to look up from their phones.

"You make your own plain tea," she said. "There's hot water and tea bags in the back." She jerked her head to indicate the direction. "The cup's five cents."

Fred let his eyebrows bounce upward. "Oh-kay..." He reached into his wallet and pulled out a credit card.

After Fred paid, the proto-couple drifted toward the tea bar in the back.

"So," said Jane. "Tea?"

"Yeah," said Fred.

Fred opened a pouch containing a bag of cheap Earl Gray tea and pinched the paper tag inside. The teabag fell from the pouch and danced on the end of its tether momentarily before settling into a gentle pendulum action.

Jane smiled a little self-consciously. "Never would have guessed. Is there a story behind it?"

Fred pressed his lips together and considered. Without looking up from his cup, he said. "Not really. I guess I liked the process of making it when I was a kid. Now it's just what I drink."

"Are you upset?"

Fred shook his head. "Huh?"

"Are you upset that I was late or something?"

"No." Fred shook his head again, vigorously this time. "No. Hell, no. Sorry. I'm just distracted by something at work."

"Oh? Want to talk about it?"

Fred looked down at Jane for a moment. He started to nod and allowed a little smirk to manifest.

"Naugh," he said. "Sorry. I should be here, now. I can be there, tomorrow."

Jane smiled and Fred began to forget all about Kramer's "fix".

(continued here)