Inside the OpenSolaris Source Code
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.'"
Hardly part of the actual OS.
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.
Agreed. In my work placements at University I was putting 'funny' comments and debug output in code. I got pulled aside by the manager and told it was definately not on. I thought he was being a bit boring at the time but now looking back I can see it was a geat piece of advice.
Pay girls to strip!
I like the guy's humour. Either that or he is not smart for putting a reputation-ruining 'bomb' in the source code :-) But anyway... good programmers are supposed to be very critical of their code so even functionally correct code can be commented as though it were horrible.
see a Text Widget
ZDnet seems to want us to think "clock speeds" are at 3 Ghz regarding the following quote:
'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.
Looking for freelance Actionscript (Flash/Flex) or ColdFusion work and/or freelance developers. Email me, put Slashdot
something really interesting in the code, now that Solaris is open? People has been saying "Sun will never open Solaris" for month, now that it is open all that they do is to grep "fuck" or "shit", or look for frustrated comments?
Wondering why i am doing so strange posts? I am trying to get a "+5,Flamebait" or "-1,Insightful" rating.
It's not like the customer will ever see the code, so it may be something that businesses don't really concern themselves with.
I wonder how many Solaris developers thought that.
Us professional programmers care.
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.
Did you RTFA? They're saying OSS is WORSE for profanity and unprofessionalism.
Could Gord be http://slashdot.org/~Gord I wonder.
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!
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...
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.
Anonymous Kev
Proudly posting as AC since 1997
(Finally got a dang account in 2004)
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.
Troll Like a Champion Today
Secodn that - shoot for the ideal, knowing full well that the customer will very likely move the goal posts before you're finished, either shortening the deadline and/or insisting on bolt-on extras with no additional time allowed.