Linux Kernel Code Humor
An anonymous reader writes "This article points to some pretty funny comments and code in the Linux kernel. From colorful metaphors, to burning printers, to happy meals... A recursive search through the entire code base reveals some interesting language. Is all code like this?"
If yours is, you won't either. I've heard of a few people who've gotten burned by sexist/offensive comments in their code.
Linked off of article here.
Easier to read too.
Now when the customers SEE these msgs, you really get to see what kind of company you work for... at a former gig we had a debug mechanism which caused a debug msg to be displayed when the program crashed in in debug mode. Theory was, the customer would never see these msgs but they were helpful for debugging. Some customer happened to run "strings" on the executable and since they're compiled (unlike comments), got to see a whole lot of messages along the lines of "we should never get here" etc. Kind of funny, really. The customer thereafter put out an anual list of interesting strings found in the program and everyone got a chuckle out of it. None of my comments ever made the list tho
Only in a politically correct going to the uncivilized country will this lead to someone getting fired. What's the problem with some extra comment ?
... there is the bikini, in Iran
Have a lot more trouble without comment.
Now picture the following:
- some developers are writing a scanner driver for a medical scanner
- at some exotic combination of resolution, size and so on, the driver gives an embedded image instead of the real one
- during development this is a bikini calendar
- someone forgets to replace this image and put in the team foto
- a hospital in Iran decides to use a front end to automatically calculate the scanning parameters and guess what ? It hits those specicific values and
Talk about an incident. This even stirred political comment.
Do you think people got fired ???
In PC world (like the USA) probably for sure.
And today it might be a reason in Europe too.
But 10 years ago the repercussions in the European firm concerned did not go that far.
So get a life, there's more than just code in code.
On Error GoTo Hell
Or in general
GoTo ConsideredHarmful
GNU has a whole page with (more or less) funny variable names
Programming can be fun again. Film at 11.
Just just gotta love this one: /* Fuck. The f-word is here so you can grep for it :-) */
include/asm-mips/mmu_context.h:
This is why many companies walk you out the door the very minute they announce you are laid off. In the middle of that upgrade/install/whatever? TFB!
They say the first thing to go is your penis. Well, it's either that or your brain. I forget which...
of course, This story is completely and 100% true and you would never perpetuate a false rumor or anything.
I think this was pulled a couple months back; it confused newbies, and was really applicable back in the old days of tractor feed dot-matrix printers where a jam really would cause a fire (or at least make your printer smoke) but not in Laser Printer days. Someone missed it so much he made a patch against the kernel to restore it.
I have this card on a PII-350MHz Red Hat Linux machine, and an integrated one in a 1.3GHz Celeron laptop dual-booting Windoze 2000 and Debian Linux. In Linux, I never get above 5MB/s on a 100baseT-FX link, but in Windoze the limit is around 1.5MB/s. I guess Windoze has even worse support for this chipset than Linux.
An article similar to this was posted sometime over a year ago I'm certain where we discovered all sorts of interesting tidbits of humor within the kernel (mostly of words with expletives). It'd be easy to find if I could look back through all the comments I've posted (thanks /.), but I can't turn anything up via either Slashdot's search engine or Google... Anybody know what article this is?
SIG: HUP
Oh, you simply wouldn't believe the inside of MS code bases -- both good and bad.
The Office Assistant (Clippy and all his ilk) started as a project in the Office group. It came up for review in front of BillG, and when someone told Bill exactly what feature the meeting was about, he said, "Oh, is this about that fucking character?"
Needless to say, this was a pretty demoralizing remark for the team presenting their new feature. So, internally, "TFC" became the codename for the Office Assistant, and was used as the function prefix, header file prefix, etc. for a long time.
I know this because I worked with some of the guys from that team, and I've heard the story corroborated by a lot of different sources.
And apparently, originally it was a very legitimate error message.
Another bit of lore and trivia for the mad scientist to know
;-)
"It is a greater offense to steal men's labor, than their clothes"
Yep, that's valid VB to pretend the error didn't happen and carry on to the next instruction. It's at the top of just every .vbs virus/worm I've ever seen (where spreading at all costs is the goal regardless of things breaking) but it certainly has no place in "real world" code.
Of course you could argue the real culprits are MS for putting this in the language to start with. At least such a horrible kludge is slightly more work in other languages, e.g.
catch (Exception e)
{
return;
}
Bonzo the wonder dog
a tie is a most useless piece of cloth
History of the tie
- - - - - - - - - - -
I am a programmer. I am paid to produce syntax not grammar. Deal with it.
Basicly what was going on was that fork() internally was a routine [newproc()] that returned 1 or 0 depending on whether you were the parent or the child .... and one of two things happened ... either you had enough memory, allocated it, copied the parent, and fudged up a return stack in the child to get back to return 0 (or 1 I forget which). But if you didn't have enough ram you'd swap out the parent and dummy up the swapped out image as the child, and set this bit in the process state saying you needed to return from newproc() somewhere in the swapper - which is why this comment was there - suddenly in the middle of a routine that returns no value it would test a flag, fudge the stack and return '1'.
"//I wonder why this works"?
:-)
I couldn't find exactly that comment. This is as close as I can get:
grep -ir 'wonder.*work' linux
linux/net/ipv4/arp.c: I wonder why people believe that they work.
linux/drivers/acorn/block/fd1772.c: * code - I wonder if it will still work... No
linux/drivers/nubus/nubus.c: * I wonder how the CRC is meant to work -
Do you care about the security of your wireless mouse?
Another good place is in section 4 man pages. The bsd's actually have man pages for most of their drivers. Here are FreeBSD's ethernet drivers, OpenBSD's ethernet drivers, and NetBSD's list of all drivers (NetBSD's web page doesn't provide a link to just their ethernet drivers. Also check out the quick reference catagories on FreeBSD's and OpenBSD's online man pages for other device drivers.
Does anyone know how to do grep for "ant" (exact word by itself)? :)
Lots of answers, but most of them not really good. How about reading the man page. After doing that, I came up with this:
grep -ir "\<ant\>" *
The use of -i is simpler than specifying every letter could be upper or lower case. And the use of spaces at each end of the word misses those cases where where other chars are used at the word boundaries. Then better use the grep builtin feature to indicate start and end of a word.
Do you care about the security of your wireless mouse?
I was trying to find out how to clear the history from XUL in mozilla when suddenly ->
/**** No honey, I haven't been visiting any porn sites. ****/
p er /there.is.only.xul"
The comment above the code for clearing the history in mozilla is something like
Mozilla has lots of stuff like that.
I mean this is how you import the standard library ->
xmlns="http://www.mozilla.org/keymaster/gatekee