Tom worked for a Belgian insurance company, which meant he knew how to say “We’re not covering that” in three languages. He was a Java developer who’d spent many years building and supporting web services. His only real complaint was Maxime, a “visionary” who’d shown up months earlier. Maxime had been hired as a project lead, and wowed business users and management alike with authoritative, buzzwordy pap. Such a snake-charmer was Maxime that he wasn’t just leading projects anymore- he did all of his own designing, coding, and testing. No one else in the entire company had such one-man-wrecking-crew privileges. Tom had never been impressed with Maxime’s drivel, but his attempts to inject reason were repeatedly shot down. Tom resolved to ignore Maxime, but that became more difficult as Maxime’s “improvements” encroached upon Tom’s domain.
One painfully bright and painfully early Monday morning, the boss didn’t even wait for everyone to grab coffee before commandeering a conference room. “The GTS01 server slowed down considerably over the weekend,” he told them. “The network team assures us the problem’s not on their end. There are only six applications running on that box.” He called up a PowerPoint slide with a bulleted list. “Maxime, any thoughts as to what’s wrong?”
Of course he defaulted to Maxime, the cool and imperious leader. His answer leapt from his tongue almost before the boss had asked. “Tom promoted changes to TTM last week. He must have introduced a memory issue. That’s just what happens with junior developers.”
“‘Junior?’” Tom repeated. “I’m younger than you, but I have eight years-”
“It’s clear that you introduced this issue, and you should get to work,” Maxime cut him off.
“You just put TelPoint and ComPoint into production last Friday,” Tom countered. He tilted his head at the list on the wall.
“Now Tom, I don’t think we should point fingers,” the boss said.
Tom shook his head. “Why don’t we install a profiler to the server and-”
“And use up even more memory?” Maxime cut him off again, rolling his eyes to the others present. “He wants to jeopardize our server even further with one of those open source tinker-toys. Open source! What a joke.”
The boss sighed. “Tom, please start troubleshooting TTM first. If you really can’t find anything there, we’ll… consider other options.”
Tom engaged the standard CYA protocol. First, he made triple-sure his changes didn’t introduce a memory issue on his own machine, in dev, or in test. He tried rolling back his changes in production- no dice. None of his other applications had changed in weeks. He fired up visualvm, part of the JDK, and found services from TelPoint and ComPoint siphoning up memory like Mega Maid on “suck.”
Armed with this evidence, Tom went into source control to grab Maxime’s code. He found the compiled jars easily enough, but the source code that created them didn’t exist.
He emailed Maxime. “Check in your source code, or send it to me.”
No response. Not in his office. Subsequent calls fell into the voicemail black hole. The resident virtuoso simply didn’t have time for Tom, what with all the new and innovative work he was doing.
Time leaked past. The server limped along, and had to be rebooted once a week. Services crashed the heap and killed major applications. Tom went to the boss, who somehow wasn’t mad about Maxime’s source control policy violations, and even seemed afraid to approach Maxime about it. After all, “Maxime knows what he’s doing.”
It was only when the users’ tempers flared, and their shouting reached a fevered pitch, that Maxime was forced to surrender his opuses to Tom. They were nightmares. Instead of using Hibernate and Spring Security as the rest of the business did, Maxime had written entirely custom database access and security libraries built from little more than arrogance and anti-patterns. He’d never told anyone, just dumped the jars into source control. His variable names and comments were in French, a language spoken by only 40% of Belgians. He had copied and pasted over 100 classes from TelPoint to ComPoint, without changes, to “aid interoperability.” But the kicker was when Tom found this class, copied and pasted everywhere:
public static class Cache {
public static HashMap<Object,Object> cache = new HashMap<Object,Object>;
public static void Add(Object requestId, Object requestData) {
cache.put(requestId, requestData);
}
public static Object Get(Object requestId) {
return cache.get(requestId);
}
}
Every request ever made was cached. The Get
method was called exactly zero times. With no expiration or way to delete objects from the “cache”, Maxime had successfully built a memory leak into Java.
Within a day, Tom called a new meeting to demonstrate a proof of concept. With TelPoint and ComPoint installed to a clean server and a program simulating heavy levels of traffic, it only took 15 minutes to crash the server. Quelle surprise.
Tom basked in his triumph. Maxime glowered. The boss cleared his throat. “All right Tom, thanks for your effort.”
A few days later, the boss met with Tom privately in his office. “Great work with that memory issue. We won’t soon forget your efforts.” He grinned at his own silly joke. “In fact, I have great news for you.”
Tom blinked. “Really? What?”
“Maxime is getting promoted. You’ll be supporting the applications he’s leaving behind. It’s like your own promotion, in a way- an opportunity to work with some of the best projects that have ever come to fruition here. Congratulations!”