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?"
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.
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.
Yeah yeah, YHBT and all that...
Notice how the code snippet you pasted is inside #if? That means the preprocessor will strip it out at compile time, not run time... got that? Next you note that htons performs the same check. That would be the htons function right? There's this thing about functions... Every time you call them you have to push your state onto the stack, wasting cycles. That means your version will waste a processor cycles every single time it is called, but the linux one won't. We call this optimisation.
What's that? Cycles don't matter? How frequently do you think the function above is called? Can you be certain it won't be called when performance is key? Lets be clear, there is some ugly code in the linux kernel, most of it is stuff written years ago that could be refactored if anybody bothered. But pointing to an optimisation and saying: look, that's redundant! is just foolish.
My favorites are the ones from the "drivers/net/sunhme.c" file of the Linux Kernel:
/* Welcome to Sun Microsystems, can I take your order please? */ ... /* Would you like fries with that? */ ... /* Anything else? */ ... /* Fifty-two cents is your change, have a nice day. */
/* We have a special on GNU/Viking hardware bugs today. */ ... /* Will that be all? */ ... /* Don't forget your vik_1137125_wa. Have a nice day. */
/* foo on you */
/* Lettuce, tomato, buggy hardware (no extra charge)? */
/* We're consolidating our STB products, it's your lucky day. */ ... /* Come back next week when we are "Sun Microelectronics". */ ... /* Remember: "Different name, same old buggy as shit hardware." */
/* Only Sun can take such nice parts and fuck up the programming interface
* like this. Good job guys...
*/
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.