Inside the OpenSolaris Source Code 338
An anonymous reader writes "Ten million lines of code and not a single profanity? Is that really possible? Apparently, yes, says OpenSolaris community manager Jim Grisanzio. He said even before Sun filtered the code, it was relatively free of profanity. 'They went through the code for a great many things,' he said, 'and I'm sure they cleaned a word or two. Or three.' But a careful look through the code will reveal some programmers' frustration." From the article: "The most embarassing comment came from a developer of the GRUB project who went only by the name of 'Gord'. 'This function is truly horrid,' he wrote. 'We try opening the device, then severely abuse the GEOMETRY->flags field to pass a file descriptor to biosdisk. Thank God nobody's looking at this comment, or my reputation would be ruined.'"
Grub is a bootloader (Score:3, Insightful)
Sounds like Sun did a bang-up job with their software, reining in the developers under pretty solid coding guidlines. It's the Open Source people who have gone off and sullied the code with their silliness.
Humor in comments is sometimes good. Just not on Slashdot where it only risks your karma.
Re:Odd Fascination (Score:2, Insightful)
Nice humour (Score:5, Insightful)
10kHz in 1996 (Score:5, Insightful)
'Another tried his hand at predicting the future of system speeds. "As of this writing (1996) a clock rate of more than about 10 kHz seems utterly ridiculous, although this observation will no doubt seem quaintly amusing one day," he wrote.'
But in 1996 you had roughly 100Mhz 486s and Pentiums, so clearly it's not that clock, it's some other clock.
Has anyone found ... (Score:5, Insightful)
Re:Odd Fascination (Score:2, Insightful)
I wonder how many Solaris developers thought that.
Re:Who cares? (Score:1, Insightful)
When you are doing a bid do having a conference after winnign one do you sit down and say,
Yeah, we can code that fucking system no problem. I mean shit man it may be hard as shit but we can meet that deadline. What we need to know is why the fuck did you want that in there. Can't we just get rid of this shit and move this over here. Fuck man, it makes more sense.
I don't think so. Being a professional means acting like a professional and only adding comments to code that help explain the program.
Having outsourced HUGE amounts of programming in my life, I can say that finding a comment like "Fuck this a hack." would not be a plus for the vendor in question.
Re:haha score one to open source (Score:1, Insightful)
People (Score:2, Insightful)
At least Gord's quote was useful... (Score:3, Insightful)
At least Gord's comment gave some indication of what the code was doing.
My pet peeve is a block of utterly inscrutable code, with nothing but the following comment:
Seriously, commenting effectively is *so* simple. If a brief comment neatly sums many lines of code, it's useful. If it explains a subtle interraction with some other bit of code somewhere else, it's useful.
If it points out the blatantly obvious -- yes, ugly hacks are very easy to spot -- don't bother! I don't care that you realize your code is ugly, I just want to start understanding it without reading every line in the project!
Source browser in the wrong hands (Score:3, Insightful)
More ludicrous is the author's supposed identification of a Mark Felt lurking in the shadows of the DTrace code: That's based on what? The two ASSERTs that follow the cited comment? This one doesn't go all the way to the top...
Re:Odd Fascination (Score:3, Insightful)
If I'm trying to fix a mess of code and the comment says
// We're fucked, this shouldn't happen
My first impression is the coder was an idiot practicing stream of conciousness coding (which is more like typing, really). He's vented and that made him feel better, but it really hasn't helped me at all.
If the comment over that same code says
// Bad news. The lock was set, but somehow we're in the think-it's-unlocked section
My first impression will be much more favorable. The coder has mastered his anger and left me a useful clue to the problem.
I realize that dozens of "comment f*ckers" will descend and use their rich language skills to correct my misconception. But I've been designing and implementing software for almost three decades now. There are exceptions, but my data points show that profanity never improves the code and leaves an unprofessional appearance. Period.
I mean, would you hire a carpenter who wrote "F*cking nailgun!" on every 2x4 that gave him a problem? That would be some house.
Re:Wow (Score:3, Insightful)
Yes, the solution is:
Do peer reviews.
There are other benefits, which you can read about in books by the likes of Kent Beck and Martin Fowler. But I'll bet that if you made it a policy to do reviews, and a policy that profanity would not be tolerated, it would clear up sooner than later.
Re:As a self-proclaimed expert (Score:3, Insightful)
Re:Has anyone found ... (Score:3, Insightful)