Why MS is Not Opening More Source Code
mario_grgic writes "Apparently inappropriate code comments is one of the reasons according to this story.
I wonder what kind of things developers put in comments that would be so bad for the rest of us to see?"
/* Nothing for you to see here. Please move along. */
The force that blew the Big Bang continues to accelerate.
/* The word 'fuck' is here so you can grep for it */
-mkb
Heh, no surprises here. I mean, from what we've seen from the leaked windows source...
I had but a simple dream, to destroy all humans.
The Spoon
Updated 6/28/2011
// horribly insecure, but we had to meet a ship date...
500GB of disk, 5TB of transfer, $5.95/mo
/* Copyright © 2000 Apple Computer, Inc. All rights reserved. */
- Adam L. Beberg - The Cosm Project - http://www.mithral.com/
grep -ri fuck /usr/src/linux
I just wouldn't be open source without inappropriate comments.
The GeekNights podcast is going strong. Listen!
I used to pepper my code with vulgarities. Then clients wanted copies on their own hosts. It's a hard habit to break.
:)
Particularly when debugging scripts. "F*CKING C*NT" and the like weren't to uncommon.
An interesting tidbit, Viaweb (now Y! Store) used to have a program called storef*cker
-William Shatner can be neither created nor destroyed.
/* Taken from the Linux Kernel 2.6 DO NOT RELEASE UNDER ANY CIRCUMSTANCES, VIRAL GPL WILL HARM US */
/* No one from the Debian Project shall ever see the following, lest you want your head chopped off! */
/* These Samba guys figured it out, here's what they wrote */
In all reality though, it's probably littered with expletives, like the Win2000 source code leak was.
Without a proper flamewar, Anonymous was undecided on what shell to run.
Better yet: The word 'fuck' is here so you can graph for it.
I am a delphi developer and often delve into the VCL source and the source of other third party components and these usually contain little or no comments which leads me to believe that the comments are automatically stripped out when the software is released to the world.
So If Microsoft does this then there is one excuse down the drain, but how many more will there be?
/** * * This method will cause system to crash and *fustrate users * */ /**
*
* This section of code will steal personal
* information from users and give us blackmail
* ability
*
*/
what kind of things developers put in comments that would be so bad for the rest of us to see?"
// I don't know what this value is for, but it seems to stop the BSOD from appearing
Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
/* This code is licensced under the GPL. Please read * the license carefully. Enjoy. */
:) )
On the other this is impossible. I havent found any GPL code as bad as the MS code (Well of course I havn't looked at too many GPL programs and a single MS program
One of my previous employers got slammed in the press one day because a code error let a web server comment get leaked into the HTML comments of a page. It said something along the line of being a work around for the whinny mac people. I don't remember exactly but, it was pretty innocent. They got written up in quite a few Mac related news articles as being anti Apple (when they were actually trying to support it).
OTOH, there could also be missing comments. I think we've all entered projects with no documentation or usable code comments; where the lore of the project is passed from dev to dev.
Or, they may have rushed so many projects that they are embarrased for anyone to see the code. Many companies and the military are guilty of this. Maybe they want some time to do a review / refactor.
----- If communism is a system where the government owns business, what do you call a system where business owns govern
/* Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. */
/* It's our TCP/IP thingy. We're gonna patent it. We own the Internet and all it's (sic) protocols. Resistance is fu... is fut... is useless */
;-)
And a little further down...
Resistance is futile. Reactance buggers it up.
that is completely untrue.
that is like saying once you have seen a book you cant be an author.
it is literally the same expressiveness in both.
you cannot memorize one in enough quantity to matter.
looking is not the same as analyzing and studying it for a long LONG fucking LONG amount of time.
you can get an idea of how things work without the time it takes to remember significant amounts of code.
Lawrence Person (lawrencepersonh@gmailh.com (remove all "h"s to mail)
http://www.lawrenceperson.com/
Well, if ya look at the performance, it's pretty obviously not C.
A few years back, my company was interested in buying a component of our software in an OEM arrangement. We had a formalized code review meeting that spent three days on paper review of architecture and that sort of stuff
The second part of the week was a code walkthrough highlighting certain parts of the tricky code. My software development manager, for some unknown reason, decided to leave in original comments from the developers which included
- Dissatisfaction with a pay raise of only 22 percent
- Disatisfaction of some coding policies I had asked my development manager to implement (real tough policies like add *some* comments in code to explain it
- A reference to two of our female finance people
The President and myself spent a very hard Saturday meeting reassuring IBM that while the comments were unprofessional, the code and archtiecture was sound. I came within a hair of losing my job.
Yes, people were shown the door as a result, and I learned a big lesson on the difference between trust and due diligence.
Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
After reading some of the comments, I've come to realize that many people apparently use vulgar language and/or ridiculous comments in there code. Am I in the minority when it comes to not doing this? I really don't see the point actually. I don't like to comment anymore than the next guy, but when I do, it's usually there to help me out in the future (even if that's just tomorrow when I come back in to work). I would feel like an idiot reading my own code if it were riddled with comments like 'this fucking sucks!', or 'the front desk girl is so hot and has big tits!'.
My favorite from the Quake III source // what the fuck?
i = 0x5f3759df - ( i >> 1 );
A comment containing some profanity may not be the best way to do it, but I can understand the sentiment. A comment could be in place exactly to alleviate a "WTF" sensation for the prospective reader, it could seem that something strange is going on in the code, and we've written a description for why it is that way, maybe even after having debugged it ourselves.
Good code with good variable naming in a good language needs little commenting. As I said, method header comments is another cup of tea, because those may more center around design decisions and the bigger picture, which might be harder to get just by reading the individual pieces of code, no matter how well-commented each piece is.
http://www.google.com/search?safe=on&q=Office+97+e aster+eggs
Not every programmer out there works alone. When your code has to be viewed and worked on by other people, you better have comments explaining the things that aren't self-explanatory. (sorry if I didn't make that clear).
Your code can be really clear using proper variables like iNumber, proper syntax and the works! But when you programming, you're putting in what you have in mind or on your plan. You don't want other programmers to "guess" what you were trying to do in "x-y" lines.
When it's not self explanatory, you should have proper comments. The best way to test this is show your friends or fellow programming teammates and see see if they can guess right and I'm not talking about a "Hello World" kind of program.
The header to one of the DAO files in the Windows source tree said this when I read it (when I worked there). It said (paraphrasing): "Let me tell you a little story about a programmer named Joe. One time Joe tried to read and understand this code. (Bunch of stuff about how ugly the code was.) We don't hear much from Joe anymore. Last I heard, Joe was sorting mail at the post office."
10 rem this will screw those linux a***oles 20 print "copyright Microsoft 1982-2004" 30 goto 12000 40 rem stolen mac parts 50 for x= 1 to 100000 next 1 60 pause 1000 . . . 1200 goto 40
phpBB didn't shut down. The site was just compromised due to a hole in awstats. I'll take your post as a troll then.
Seems Netscape had the same attitude before releasing the future Mozilla code in 1998: http://www.jwz.org/doc/censorzilla.html
Most of the comments here are about what funny things are said in the source code. I think a more interesting piece from the article is "These issues include intellectual property rights". This to me states that either they have licenced parts of the Windows Forms code from third parties, or (for those of you with tin foil hats, put them on now) they have "borrowed" parts of the code from third parties and do not want them to find out about it. Hmmm.
it is only after a long journey that you know the strength of the horse.
Comments like that read by the wrong people end up with expensive legal action - paticularly if the product really is crap.
Bullshit. Running away in fear, just because someone might use your actions as a pretext for a lawsuit, is for cowards.
Mea navis aericumbens anguillis abundat
Two projects I worked on had to deal with 'inappropriate comments':
The first was when a reference to Black Sabbath (a music band) was in some comments. Normally, source is not given to customers, but in this case, it was a shell script, so it did go to customers.
Those who asked for that change were from the useability group. The guy who had to fix it was the archtypical anti-social nerd, but had a strange sense of humor. He entered an issue in the bug/change tracking system saying something like 'change Black Sabbath comment as per customer request'. The irony is, source had the CVS $Log$ tag, which caused all the fix comments of CVS to be in the source [no matter that I thought it was a bad idea, and that 'cvs log ....' would get you the same info, a manager said "this is the standard here"], so the issue description got into the log comments, and Black Sabbath was there again! Ha!
In another case, we had a product that relied on an open source but commerical product. That product was developed by nerds who used programmers' humor all over the help pages, ...etc. The customer was upset by the use of 'conversational English' in the documentation. We had to get someone from the technical writing team to rewrite those pages! Nevermind that the product was geared towards sysadmins and techies! Sigh.
2bits.com, Inc: Drupal, WordPress, and LAMP performance tuning.
Actually, if you strings ftp.exe, it's
"Copyright (c) 1983 The Regents of the University of California.
All rights reserved."
Jamie Zawinski has a list of rude words which had to be removed from the Netscape client code before it could be open-sourced. Microsoft's probably looks a bit like this.
http://www.jwz.org/doc/censorzilla.html
I do not represent myself.
I bet there are code comments inside CreateWindow saying feature X was added to assist Word/Excel/Powerpoint.
I was on the way to a job interview and remembered that they had requested a code sample. I remembered the nifty job I'd done on a DDE interface to netscape (it was small, clean code, and took quite a bit of research and teeth gnashing to get right). I located the source file, printed and printed it out.
/* This is fucking bizzare, blah blah */.
During the interview the hiring manager started going over the code with me and having me explain what it did, how it did it, etc. And then he got down to the
I felt pretty sunk. Ended up getting the job, though.
I _do_ recall when a particular demo for a big client was going well, I was actually calming down (big mistake), etc. A weird path through the code was taken and what do I see?
***Eat my flaming cock, you hairy scrap of shit clinging to the ass of a decent developer, You should never have hit this exception. Please eat the stack trace, curl up, have massive convusions, and beg me for your life. Bring.a bottle of good scotch. -grs#***
Printed in big, red letters on the app. (We have custom error handling, if that wasn't clear.) Note, this is in front of the investors who were financing the company I was working for.
Learning how to sell that to an SVP and MajorCorp client is only the sort of thing you can learn on your feet. I never want to do it again, but it did, um, learn me real good. And I'm not sure what I did, or why they believed me.
-Coward, guess why.
#Initials changed to protect the guilty. Not like it matters too much now, but the fuckup, the boss and me all read this. Live and learn.
I used to work for an company that produced a commercial OS, and their policy was to discourage comments. Their goal was to make readable code, and when you are tempted to make a comment, that means the code was getting too complex and needed simplifying, or better choices of identifiers. Comments were a last resort, shunned as they tend to go out of date faster than the code. Unfortunately the ideal had only limited success, as writing legible code is a skill most coders don't possess. When the idea worked, it worked well. When it failed, you had unreadable code without comments.
You know no hell until you use the goatse site as a test url in development and forget to take it out when the code goes live, and a user and then your boss find out before you do.
These all from 2.6:
/* XXX Fucking Cypress... */
/* Binary compatibility is good American knowhow fuckin' up. */
/* Fucking losing PROM has more mappings in the TLB, but
/* Why the fuck did they have to change this? */
arch/sparc/kernel/ptrace.c:/* Fuck me gently with a chainsaw... */
arch/sparc/kernel/head.S:
arch/sparc/kernel/sunos_ioctl.c:
arch/sparc64/mm/init.c:
arch/sparc64/kernel/traps.c:
Even better is this from 2.4:
arch/sparc/mm/srmmu.c: Are you now convinced that the Swift is one of the
biggest VLSI abortions of all time? Bravo Fujitsu!
Fujitsu, the !#?!%$'d up processor people. I bet if
you examined the microcode of the Swift you'd find
XXX's all over the place.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
/* I hope nobody finds those Tiger Beat photos... */
Warning: Could be fatal if taken seriously
From that guys blog:
The main exception is code that needs optimisation. But when you remember that isn't always to early to optimise code, and when you do optimise, you only optimise the small fraction of the code that has the most effect, then the ammount of code that needs comments is minimal.
The other exception is commenting other peoples code that haven't written it in a legible fashion.
P.S. Like the grandparent post, I'm not talking about function header comments, particularly auto documentation system comments - those are essential. I'm talking about comments mixed in with the code.
The port of Doom for the Atari Jaguar was done largely by an automated tool which turned the C code into risc assembly, thus removing all meaningful lables, variable names, and comments from the source. It was then patched to get round the bugs in the processors, and thus contains no comments at all except for one, which apears often, of "FUCKING DSP!!!"
No, really.
This is, of course, how it should be. Everybody knows that no successful author has ever read a book.
...this is more than just a simple troll.
Page contains a Java trojan. My AV reported:
"Trojan horse TR/ClassLder.c.Java"
"Trojan horse TR/Forten.Java.2.B"
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
I doubt that anyone would place comments in code that basically boil down to "I hate my job and my employer." At the next code review, or the next time a bored coleague looks into your code, it's just begging to be used against you.
/. screaming and waving it around as definitive proof MS can only write bad code.
If comments about the company or other co-workers are present, they'll more likely be a lot milder and kept to something you can sorta justify as just documenting code behaviour. E.g., "this is a work-around for Bug X in Function Y of the MSFC".
On the other hand, there is plenty of room for utterly inapropriate comments about other companies and products. Think along the lines of "unlike the utter crap we took from the BSD monkeys, this one is 40 times faster and uses 10 times less memory." Or "this is here only because the monkeys from are too stupid to do their own buffer checking before calling my function."
Excessive hubris is pretty much part of the job description for nerds. Remember kids, everyone else sucks and is an idiot luser. Only you can possibly know anything at all about computers. And only the skills you have (e.g., pushing the power button or typing "emerge kde") are l33t and cool, the rest is idiot luser stuff.
But my guess is more like MS is just playing defensively. There are a lot of people and has-been companies that are out for MS's blood. Comments that noone minds in the Linux kernel, if found in MS code would get those people screaming for blood and gathering a proper medieval crowd with pitchforks and torches.
I mean, look around. Even a comment as benign as "this is a work-around for bug X in function Y" would get half the MS-bashers on
Doubly so for those who:
A) never wrote any productive code in their entire life, but think they're uber-l33t because they can run someone else's scripts (e.g., "emerge kde"), or
B) wrote a 20 line program in BASIC once, or a 20 line BASH script, so they think they're qualified to pass judgment about 1,000,000 line projects or about whole languages
(No offense intended to good programmers in either VB or various shell scripts. But there is a _massive_ and _fundamental_ difference between a 100 line program and a 100,000 line program. Stuff that works in the former, like, "bah, I wrote it just as well without all this fancy encapsulation and bogus design", might just cause the latter to never be finished or anywhere near working.)
A polar bear is a cartesian bear after a coordinate transform.
Obviously not enuff UKian developers.
This article investigating dubious comments appeared shortly after the Win2k source code was leaked.
"I wonder what kind of things developers put in comments that would be so bad for the rest of us to see?"
:-)
If you had done more coding, you would know.
"Stupid pointless [expletive deleted] for Marketing" or "This is dumb but the boss says Do It".
"I have no idea why this works, so don't touch it!"
"Kill 'em all, let God sort 'em out!!!" (on an instruction to skip over whitespace).
And some actual examples I'd be embarrassed to repeat.
I guess that when one spends all day writing bloodless prose for an unfeeling machine, commentary seems like the only emotional outlet one has. I've written a few comments which were, ah, amazingly vivid considering the humble nature of the operations they describe.