Entertaining Bits From The Ancient Kernel Tree
option8 writes "I have added a page of some of the miscellaneous comments that appear in the Linux Kernel, version 0.01 (ca. August, 1991).
Linus turns out to be quite the jokester, leaving all kinds of non-sequiturs and irreverent one-liners in the code, many of which survive today in the latest developmental releases.
I thought to archive these and share with those people who aren't the types who go diving through ten year (gasp!) old code for kicks. Enjoy."
Did anyone see that someone posted the incomplete source to COMMAND.COM way back?
http://slashdot.org/co mments.pl?sid=00/06/08/0647212&cid=574.
Have to love this bit:
; REV 1.50
; Some code for new 2.0 DOS, sort of HACKey. Not enough time to
; do it right.
--Remove SPAM from my address to mail me
Think about, Win32 didn't exist, and IBM didn't know MS were going to screw them over with OS/2. Amiga were fighting with Atari.
The Gulf War was on...threats of bombing and the stealth plane made it's debut.
Slashdot didn't exist. Heck, Tim Lee was thinking maybe Hypertext mught be a cool way to store his university notes, thus was born the web.
Usenet didn't contain thousands of porn pictures, BBS systems were alive and well.
Sort of wierd, that unknown to all the mainstream and even tech groups Linus + some people were working on the only OS that would ever threaten Microsoft.....that Microsoft would even *need* threatening.
And still 10 years later, MacOS still is cludgy and can't multitask....I suppose some things just don't change.
Acting stupid isn't much fun when there's someone around who knows better
a friend of mine was writing a simple assembler in Perl for a class project he was working on. the assembler consisted of two parts, the first being the preprocessor that would strip out comments and replace labels with addresses and such, and th second part being the actual assembler.
each part worked perfectly fine by itself, but for some reason the assembler as a whole was not working. finally he was fed up enough that in the middle of the program he wrote the preprocessed assembly out to a file and then read it all back in before continuing on with the program. it worked!!! this of course made no sense whatsoever, since he was merely writing the contents of an array to a fil and reading the exact same data back in. but for some reason that made the difference in whether or not the program would run successfully.
being rather confused at this point, he commented out the lines that he had just added to the program and ran it again. lo and behold, it still worked. but when he rmoved those lines entirely, it stopped working.
in the end, he turned in the project with the code in the middle still in place, commented out, preceded with a comment about how utterly strange it was and a warning that the commented code should not be removed for any reason...
only time i've ever seen comments affect the actuall execution of a program.....
If I don't put anything here, will anyone recognize me anymore?
I put this in an assignment for an Artificial Intelligence course. It was a Java applet that implemented the A-star search algorithm that we had to modify. The code was pure garbage, and the teaching assistant that marked it was also the one who picked it off the web in order for us to modify it. I was not amused. So, I stated my position in a rather forward manner...
/me slaps original programmer around with a hammer.
// what the hell is with this magic number crap?
//
...
// This is a butt ugly hack, but given the utterly shit
// code that surrounds it, it should feel right at home.
...
// I don't know why I had to set a number to tell me what
// finishCell to use, but I did. I simply do not have the
// time to wade my way through this crap program to figure it
// out. I got better things to do, like pull my fingernails
// out and then bathe my hand in lye.
...
// I added this awful, awful hack. I am ashamed to have written code like this.
I also wrote a letter to the prof and TA on behalf of the other multitudes of students who thought the same thing I did. Needless to say, I got a bad mark (didn't care anyway) and the TA hates me now. Turns out they really do read the comments! =)
Woz
Comments in code are like a time capsule, from one programmer to another. They communicate what the code does, but also the mood of the author.
My first coding job was cleaning and adding "improvements" to some anchient and nasty C code.
Some of the comments described the previous programmers' marital problems, opinions on co-workers, etc.
It made a sucky job more bearable.
Meow!
Yes, that's really my e-mail. Don't change a thing.
Why didn't you post Linus' entire comment?
:-) The source is here. Change :-) :-( )
For those with more memory than 8 Mb - tough luck. I've
* not got it, why should you
* it. (Seriously - it shouldn't be too difficult. Mostly
* change some constants etc. I left it at 8Mb, as my machine
* even cannot be extended past that (ok, but it was cheap
* I've tried to show which constants to change by having
* some kind of marker at them (search for "8Mb"), but I
* won't guarantee that's all
Bill Gates didn't include source code and encourage others to change it. He wasn't saying it in jest, and he was not referring to an Alpha release.
All this making you the bigger idiot.
from sched.c:
/*
:-)
* 'schedule()' is the scheduler function. This is GOOD CODE! There
* probably won't be any reason to change this, as it should work well
* in all circumstances (ie gives IO-bound processes good response etc).
Okay can anyone tell me how many times they have thought the exact same thing about their only for somebody else to suggest a scenario or even worse use it "improperly" and find a bug. I think I'm up to several dozen times...
It's from the driver for the cmd640 IDE chipset.
* This file provides support for the advanced features and bugs
* of IDE interfaces using the CMD Technologies 0640 IDE interface chip.
*
* These chips are basically fucked by design, and getting this driver
* to work on every motherboard design that uses this screwed chip seems
* bloody well impossible. However, we're still trying.
- CD (Orange, Green, Red book) are all still secret. You can not find them on internet
- DVD + Next.Gen. DVD (Confidential standards. Kept a (trade) secret by the DVD Forum!)
- Dolby AC3 Digital Audio [And with it all Dolby sandards]
- ISO9660 (for some time, it's ECMA119 now and downloadable for free, but ISO charge[sd] about $1000 for it)
- MacroVision (though I don't think it would have caught on in the Open Source world
:) ) - FAT32 and NTFS (eeeh... well...)
By the way, compact casette was also a confidential standard until Philips decided to give it away for free to gain more market...And these are just the standards I could think of in a second. I think more 'standards' are secret and have to be paid for than one would think.
Common sense is not so common - Voltaire
I wonder how much this early commenting helped form the Linux programmer community and shape it's atmmosphere early on? Getting the self abasing and also highly informative comments delivered to an audience of peers (...even if you weren't a peer, it made you feel like one to read those comments)
Returned Peace Corps IT Volunteer