Skip

Is the source open enough for you?
September 22, 2010 4:57 AM   Subscribe

When releasing the Mozilla source code, Netscape's lawyers insisted that the code first be sanitized. In particular, "any text containing vulgar or offensive words or expressions; any text that might be slanderous or libelous to individuals and/or institutions," had to be removed. Here is a sample of what it looked like before that occurred.
posted by Obscure Reference (46 comments total) 30 users marked this as a favorite

 
#### TOTAL FUCKING KLUDGE.
posted by Halloween Jack at 5:07 AM on September 22, 2010 [3 favorites]


We Are Morons: a quick look at the Win2k source trawled some leaked Microsoft source code for profanities a while ago.
posted by TheophileEscargot at 5:10 AM on September 22, 2010 [2 favorites]


*finds new interest in OFO programming*
posted by lukemeister at 5:12 AM on September 22, 2010


Ha, awesome. I wish we were allowed to do this at work - it's built into the coding standards that product code has to be presentable to customers, even if we have no expectation that they're ever actually going to see it, so it's all rather boringly predictable.

Not so in our internal test tools, of course, where the rules are rather less strict. I've made code comments along the lines of "yes, I know this is a horrible horrible hack" before, as well as things like "This message must have been routed wrongly. Throw everything in the air and scream." My personal favourite was probably the example code I wrote to show how to override inherited class functions in Python, which inserted Eddie Izzard quotes into the output. Never before has a telephony message included the custom header "P-I-like-my-coffee-like-I-like-my-women".
posted by ZsigE at 5:15 AM on September 22, 2010



ns/cmd/macfe/restext/MacXPStrings.c void AppleSucks ( void );

who sucks now fat Netcaspe coder?!? Huh? Who sucks now?

(continues to gently stroke iPad)
posted by the noob at 5:18 AM on September 22, 2010 [2 favorites]


#define rename hpux_sucks_wet_farts_from_dead_pigeons
Heh.

who sucks now fat Netcaspe coder?

I believe they've made it very clear:
[...] it'll all just be too damn hard to figure out. So, I give up, the Mac just completely utterly sucks complete rocks and there nothing on the planet [...]
posted by Civil_Disobedient at 5:25 AM on September 22, 2010


Can't recall if it was sendmail or bind (and google is failing me atm), but during the compile process I always used to get a kick out of seeing the "MATTS HACK LIVES" message go scrolling by in all of the output.
posted by jquinby at 5:30 AM on September 22, 2010 [2 favorites]


That was funny. Makes me wonder what's under the hood of various videogames.
posted by dragonplayer at 5:38 AM on September 22, 2010


I read this as the voiceover murmur of a thousand voices, as the camera pans slowly over a huge beige room of sullen coders tapping away at keyboards.
posted by stupidsexyFlanders at 5:50 AM on September 22, 2010 [13 favorites]


MetaFilter: This stuff is so fucked.
posted by cavalier at 5:52 AM on September 22, 2010


Makes me wonder what's under the hood of various videogames.

Ms. Pac Man - //We used a bow because circles don't have TITS!!

Tony Hawk 2 - //A fucking bull and loop de loop? This is just getting out of hand. What next, Spiderman in space?

Quake 3 - //Am I the only fucking idiot who thinks this will be better than Unreal Tournament? Fuck, we're fucked!

Railroad Tycoon - //Cum-dripping nut fart casserole in my ball hair soup.
posted by Bathtub Bobsled at 5:53 AM on September 22, 2010 [2 favorites]


crap from Marketing
Searching google code for profanity is always a fun way to spend some downtime.
posted by SyntacticSugar at 6:04 AM on September 22, 2010




THe great thing about places like github is you can trawl the codebase for cusswords.
posted by seanyboy at 6:08 AM on September 22, 2010


Metafilter: /* WHY THE FUCK DOESN'T THIS WORK??????? */
posted by r_nebblesworthII at 6:11 AM on September 22, 2010


> ns/cmd/macfe/restext/MacXPStrings.c void AppleSucks ( void );
> #define rename hpux_sucks_wet_farts_from_dead_pigeons

The comments are a list of namechecks for every major and minor desktop OS circa 1997, excepting Amiga. None are regarded positively.
posted by ardgedee at 6:12 AM on September 22, 2010


/* check if Lou is a pindick */
posted by ALongDecember at 6:39 AM on September 22, 2010


"This hacky pile of poop" is my new favourite phrase.
posted by neushoorn at 6:39 AM on September 22, 2010


*sigh* this is why working with open source code is no fun....
posted by melissam at 6:44 AM on September 22, 2010


The worst thing I ever wrote in any product source , and I'm sure it bears repeating, is "Deepak is a weenie."
posted by newdaddy at 6:59 AM on September 22, 2010 [1 favorite]


Metafilter: // crap from marketing
posted by Potomac Avenue at 6:59 AM on September 22, 2010


We took a project rather more public one time, and were asked to sanitize the problem reporting system, as an external entity was going to review it. Now, these are not code comments; you can't delete lines/sentences/paragraphs, or stuff stops making sense. So instead: search and replace! Which leads to reports like: "Whatever dainty superhero wrote this delightful module forgot to capture one silly obvious edge case, and I fixed it like so..."
posted by Ella Fynoe at 7:08 AM on September 22, 2010 [9 favorites]


Heh, I remember the great code sanitization at Microsoft. That was fun. I changed one instance of "this sucks" to "this inhales vigorously." Good times.
posted by jeffamaphone at 7:11 AM on September 22, 2010 [11 favorites]


Metafilter: funky doubly linked list shit.
posted by Cookiebastard at 7:16 AM on September 22, 2010


Prevent idiots who set colspan=20000000

OMG those people are the WORST.
posted by Sutekh at 7:22 AM on September 22, 2010 [5 favorites]


"Object oriented? Fuck that shit! Pabst Blue Ribbon!"
posted by RobotVoodooPower at 7:28 AM on September 22, 2010 [9 favorites]


Similarly, from StackOverflow's What is the best comment in source code you have ever encountered?, there's a link to this page, which explains the reasoning behind production code such as:

public void BindCompany(int companyId) { }

// snip

private void MakeSureNobodyAccidentallyGetsBittenByRichardsStupidity()
{
// Make sure nobody is actually using that fucking bindcompany method
MethodInfo m = this.GetType().GetMethod("BindCompany", BindingFlags.DeclaredOnly |
BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
if (m != null)
{
throw new RichardIsAFuckingIdiotException("No!! Don't use the fucking BindCompany method!!!");
}
// P.S. this method is a joke ... the rest of the class is fucking serious
}


posted by Hartster at 7:39 AM on September 22, 2010 [3 favorites]


In video game code comments, the ones I've seen are either comments about others on the team, or comments about console manufacturers. "Doing this because Shawn's an asshole and Sony is a traveling pack of assholes."
posted by Cool Papa Bell at 7:46 AM on September 22, 2010 [2 favorites]


Good times. Interesting comments and debug messages do make the day go better, especially when programming in a team situation. As long as you can reliably sanitize before release.

Salacious debug messages are particularly dangerous in short-turnaround web apps. I have the scars to prove it.

Best protection is an externally-set session var or a cookie to trigger debug mode.... something that couldn't ever be possibly set when live. Or so we hope.
posted by Artful Codger at 7:54 AM on September 22, 2010


What I always love seeing in source code is something like this, "This is a temporary hack and we should find the right way to do this", and then look at the source control history and find that comment's been there for eight years.
posted by octothorpe at 8:00 AM on September 22, 2010 [12 favorites]


This took the cake for me:

Object oriented? Fuck that shit. Pabst Blue Ribbon!
posted by word_virus at 8:11 AM on September 22, 2010 [3 favorites]


> Salacious debug messages are particularly dangerous in short-turnaround web apps.

Seconded. It's always an unpleasant surprise to find out which of your clients are going to take offense at the offense you took when surprised by Internet Explorer's exception to a minor, simple chunk of Javascript. Hypothetically speaking, of course.

These days, if I were to drop bombs in my comments, they would stay in the server-side code. Hypothetically speaking, of course.
posted by ardgedee at 8:15 AM on September 22, 2010


My two favorite examples of this, when I was in QA, were a comment that read "// drunk; will fix later" and a dialog box that popped up IN A RELEASE CANDIDATE (albeit under trying and unusual circumstances) that merely read "No, fuck YOU. [OK]"
posted by KathrynT at 8:34 AM on September 22, 2010 [5 favorites]


Sometimes, you don't need to make the salacious comment on purpose. When I wroked at a pritner manufacturer, I saw a printer that for some reason would lose 8 bytes from the USB identification string so it ended up identifying itself as "ASS:PRIN". (which came from CLASS:PRINTER)
posted by mkb at 8:34 AM on September 22, 2010


Linux Kernel Swear Counts
posted by Gary at 8:52 AM on September 22, 2010


But everybody lies about this value, fuck it.

This is so going into my next metric report at work.
posted by quin at 8:56 AM on September 22, 2010 [1 favorite]


private\ntos\w32\ntuser\client\nt6\user.h:
* The magnitude of this hack compares favorably with that of the national debt.

posted by MtDewd at 8:59 AM on September 22, 2010


But everybody lies about this value, fuck it.

Oddly enough, I get to use this line when we get to Nietzsche in my intro course.
posted by joe lisboa at 9:04 AM on September 22, 2010


I have intimate familiarity with the JavaScript codebase I work on, because I have many occasions to scroll through it looking for random things while troubleshooting.

I can say, in no uncertain terms, that there's nothing like this in our codebase. The worst thing we have is comments like // hack for ticket xxxxxx.

I want to say this is a testament to the quality of our code and processes, but it is not; I'm also glad to say it's not because we're boring, because we have a surprisingly good time. What it seems to boil down to is this: we're front-end coders first and foremost, and we know that everyone can see our code.

However, it does make me wonder what our Java code base looks like. Time to start greppin'!
posted by davejay at 9:26 AM on September 22, 2010


I once got docked points off a major project for

#ifdef STUPID_FUCKING_PIECE_OF_SHIT_DOESNT_SUPPORT_C99_LOG2
double log2(double n) {
  double a = log(2);
  double b = log(n);
  return (b/a);
}
#endif


It ended up taking me from an A to a B+ in the class (file structures).
posted by thesmophoron at 10:00 AM on September 22, 2010 [1 favorite]


Similarly, from StackOverflow

That was making the rounds amongst the developers a couple of days ago; my fave (and one we'll most-likely be implementing):
// 
// Dear maintainer:
// 
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// 
// total_hours_wasted_here = 25
// 

posted by Civil_Disobedient at 10:16 AM on September 22, 2010 [38 favorites]


The best comments are always those added by debuggers in someone else's code.

Things like "I don't know why the fuck this works" or "Why the fuck would you do this?" or "OMG, my eyes!".

But as the codebase gets older the #1 comment always seems to converge on "HACK HACK HACK". Often with an implied "fix me later", but no one ever does that of course (usually it just gets removed in the next rewrite, if you're lucky).
posted by wildcrdj at 12:55 PM on September 22, 2010


That was funny. Makes me wonder what's under the hood of various videogames.

Oh do you now?

Some old-school Japanese computer games have hidden text buried in the game, text that never gets output to the screen but is still in the game's data. Have a look:

Some examples
posted by JHarris at 1:22 PM on September 22, 2010


Another example
posted by mkb at 1:24 PM on September 22, 2010


An example, in the Famicom game Erika to Satoru no Yumebōken, although it actually is possible to get the message in the game:

Mmm, that’s a nostalgic song playing. Those were good times. Meanwhile, who the hell are these people with this project? I’m so glad it’s over. You think it’s nothing but good memories? Hell no! Let’s use this space to give out some thanks.

First off, Kaoru Ogura, who ran off with some guy in the middle of the project. Yes, you, you bastard. Don’t show up at the office without showering after having sex 6 times the previous night. Next, Tatsuya Ōhashi. Yes, you, you bastard. Don’t give me your flippant shit — coming in late on the day we ship the ROM like nothing’s amiss. You can give me all the porn you want; I’m not forgetting that one. All that fucking weight you put on. No wonder you paid out 18,000 yen and still got nothing but a kiss out of it. Kenji Takano, Namco debugger. You are a part-timer; don’t dick around with the project planner. And finally, Kiyoharu Gotō, the biggest thorn to my side in this project. Yes, you, you bastard. Once I get a time machine, I’m sending you back to the Edo period. Go do your riddles over there.

Ahh, that’s a load off…wait, no it’s not. Kiyoharu Gotō — yes, you, you bastard. Aaaagh, just disappear already.

posted by JHarris at 1:26 PM on September 22, 2010 [1 favorite]


"Once I get a time machine, I'm sending you back to the Edo period."

Samurai Codeploo in the making! Thanks for sharing.
posted by dragonplayer at 5:27 AM on September 23, 2010


« Older DADT stands.   |   RIP Kihachirō Kawamoto Newer »


This thread has been archived and is closed to new comments



Post