Paul worked for a branch of the Defence Department in Australia, writing reams of C++ using the standard template libraries on a Linux box. On a typical afternoon, Paul checked some code into CVS with a comment:

Fixed bug 7551, see issue report 2119. Tinky Winky is my favourite Teletubby.

The addendum continued a long-running inside joke. At this point, the weird check-in comments were only funny because they were applied so consistently.

“Hey Paul, come over here a second!”

Paul’s friend and fellow developer Stan had initiated an impromptu gathering around his desk. Once Paul joined the huddle, Stan turned back to his computer screen. “I’m getting sick of these warning messages. You know, the ones our compiler throws because our namespace names are longer than 256 characters? I have trouble finding the real errors around these things. Do any of you know how to shut them off?”

What a Tinky Winky might look like
Paul also has a lovely red purse.

“I do,” Paul said. “Here, let me show you what I’ve done.”

Paul supplied the name of a header file he’d been working on recently, then pointed to a line near the top. “See that pragma statement? It’ll suppress those warnings during compile time.”

// We don't need these stupid warning messages PMJ
#pragma warning( disable : 4507 34 )

“Oh, cool. I’ll try that,” Stan said. “Thanks, Paul!”

Life went on.

The trouble started a few weeks later, during a code review. Paul was asked to attend as an impartial reviewer for a project he had no involvement with. When he sat down in the meeting room, Burt the project manager was already there, giving him narrowed eyes.

“Paul,” Burt began, “are your initials PMJ?”

Paul frowned. “Yes… why?”

“The research scientists on my team are complaining that the word ‘stupid’ appears at the start of almost every header file.”

“What does this have to do with me?” Paul asked.

“Well, you’ve been touching all this code.” Burt brought up a Word document on his laptop, which was projected onto a screen in the meeting room. “I compiled some samples the scientists showed me. This right here, for instance…”

Paul blinked at the offending screenshot, which displayed the following two lines:

// We don't need these stupid warning messages PMJ
 #pragma warning( disable : 4507 34 )

“Oh! That’s just code for suppressing warning messages during compile time,” Paul said. “I wasn’t the one who put it in here. One of the other developers must’ve copied and pasted it in wholesale.”

“‘Stupid?’” Burt demanded and accused all at once.

“That’s just a comment. It doesn’t actually do anything.”

“It makes the scientists angry,” Burt snapped. “It’s inappropriate- and it’s everywhere! They’re questioning the entire code base and the quality of our in-house software! I think we should take this offline for further discussion.” His glowering lifted as more project members filtered into the room for the code review.

A few days later, Paul was roped into a meeting with Burt, his own boss, and a very offended research scientist.

“Stupid! Do you think national defense is stupid?” the scientist fumed. “Do you think I’m too stupid not to notice? What good is the code in that stupid file, anyway?”

“I didn’t touch all those files,” Paul tried to explain.

“You initialed every line!” the scientist cried.

“Check CVS. I wasn’t the one checking in those changes!” Paul returned. “And who cares anyway, it’s just a stupid comment! It doesn’t do anything!”

“Again with the stupid! It reflects an attitude that is rude and demoralizing. How would you like it if I called your work stupid? Oh wait, I see you already did!”

“Let’s calm down here,” Paul’s boss intervened. “Paul, you said it’s a comment, right? Taking it out won’t change the behavior?”

“No, course not.”

“Well, then that means it’d be no problem for you to remove the word ‘stupid’ wherever it appears in the code base- right?” His boss smiled with the glow of a self-assured master diplomat.

It turned out Paul’s fellow developers had copied the warning suppression code to hundreds of files. Paul wrote a shell script that nuked all occurrences of the offending word and his initials, which he ran during a couple of code base merges when he had everything checked out.

Disaster averted- or so Paul thought. Paul’s boss reared his head again a few days later, frowning. “Is Tinky Winky really your favorite Teletubby? If you think you had too many meetings about ‘stupid’, think about how many I had. You’d better edit the log.”

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