| Top
11 List Special
|
|
Welcome to Network
Computing's unabridged, annotated, and somewhat illustrated collection
of unusual source code comments as submitted by our readers.
|
| Name
| Code
and Comments on Code |
|
Bill Kannawin
|
/* If you get here the program missed something*/
|
|
Sam Fisher |
From the Scheduler in Multics and GCOS3 ....
/* Abandon hope, all ye who enter here ...... */
|
|
Dan Kwitchen |
You can tune a file system, but you can't tune a fish. UNIX.
|
|
Darryl Toefper |
# Magic Starts here
|
|
Steve Sutphen |
My favorite was in something called "nanocode" (for the Nanodata computer
- built back in the 1970's). It said
"you cannot get here from
there".
It referred to some
rather strange branching and skipping rules in the instruction set. |
|
Israel Lopez de Victoria-Cortes |
/*no comment on this!*/
|
|
Laurie Mersereau |
APL at one point ran on a IBM 2741 with a "goofball" printer element. Some
characters could be made by overstriking one character with another. This
led to strange combinations like capital F , backspace, Capital L was the
same as a capital E because it looked right on paper. The comment in the
code was :
"THE DARK AND SEEDY WORLD OF VISUAL FIDELITY"
|
|
James C. Vibber |
/* Optimize THIS, code-boy! */
|
|
K. Prewett |
'Not sure why, but code bombs without this section
|
|
Mike O'Meara |
/* Load de boofers */
This comment was on
a punched card, part of a deck that loaded the UCB on a mainframe printer
(circa 1977). |
|
Lori Homsher |
........................................
(this is where one of
my programmers fell asleep with his head on the spacebar -- he's no longer
employed here) |
|
John Valleau |
This code was hard to write, it should be hard to understand also.
|
|
Steve Finney |
"We don't do that under Bozo's big top"
(early UNIX V6/V7 version
of the Berkeley vi editor). |
|
Harold Rossi |
//** This should never execute **//
|
|
David Eaves |
// This comment has been left blank intentionally
|
|
Tim Barr |
Xenix running on the Radio Shack/Tandy Model 16/6000 series (circa 1987).
System error message:
"Halt: Shut her down Scotty, she's sucking mud again"
|
|
Cheryl Thompson |
1) From a .asp
' this part is not elegant, but it does the job
2) From a .htm
<!-- lost table close?-->
and
<!--------awful code to use 0X months-------->
and
<!-----------really awful 0x month code----------->
3) From a .asp
'newID is misleading. It's the same id, I just needed a new name.
and
'thought about inserting a pull from the DB here for
values not filled out. Decided not in development time scope.
|
|
Stewart Austin-Raichart |
"Much magic happens here."
|
|
Nancy Payton |
/* this code is here because the printer is stoopid */
|
|
Trevor Paquette |
/* You aren't suppose to be here !! */
and
/* yeah yeah yeah.. I know.. It's a hack
but it works.. */
|
|
Michael Wells |
Started a new job this past fall and have been accumulating the "rules"
as they are revealed:
90-90 Rule: The first
90% of the code accounts for the first 90% of development time. The remaining
10% of the code accounts for the other 90% of development time.
|
|
Curt Gratz |
here's the best.
'***** this is a time bomb in the making...
here's the next best.
<!~-- Ya, Like this will work! --->
|
|
James Wernecke |
/* This part doesn't really do anything yet. Its just here in case we need it. */
|
|
John Farrell |
/* I'm not going to explain this, figure it out yourself */
|
|
C. K. Conner |
//MFC nonsense
.
.
.
//end nonsense
|
|
Dan McNeill |
Long ago and far away, a programmer in our shop had a subroutine in several
programs that he had written. We were supposed to "meaningfully" comment
what the routines were doing. His routine, called XKE, was commented as
"English sports car" 'Nuff said. |
|
Roger Smith |
Buried deep in a large assembly language performance monitor named DCMS
- the Dirt Cheap Monitor System:
/* Purpose: Only Lamont Cranston knows */.
The block of code (50
or so instructions) had no obvious entrance, no exit and the program failed
without it.
Lamont Cranston was
The Shadow.
|
|
James Wernecke |
/* And now the magic happens */
(Globs of incomprehensible code here.)
/* End of happening magic */
|
|
james hrobak |
/* not sure why this works, do not remove or system will core dump */
|
|
Bradley Davis |
From the UCSD Pascal Linker (written by Roger Sumner)
"Abandon all hope, ye who enter here."
(From Dante) |
|
Scot Templeton |
Comment in source code that was inherited and not commented originally.
/* To Do: figure out the next block of code */
/* I am not sure what this does */
|
|
Christopher Bernard |
/* Emergency Turkey Day Fix */
followed closely by
/* Emergency fix to fix emergency Turkey Day Fix */
|
|
Bill Holman |
"This instance of OPParcelObj is owned by an
instance of OPParcelArray that is associated with an
instance of OPCustThread which owns an instance of
the parcel processor which is the processor needed to
process this parcel."
Needless to say it made
an accompanying code just as clear as mud. We just gotta love THAT kind
of inheritance. |
|
james holtman |
We had a program that was functioning fine for several months after the
programmer had left. One day it crashed with an error message. When looking
in the code to see where it came from, there was the following comment:
# this is the second of three impossible errors
Needless to say, this
is where it got to and the error message did not put out enough information
to say why it got there (15 levels deep in some IF-THEN-ELSE statements.
Searching through
the code, we wound the "first of three" and the "third of three" impossible
error comments.
|
|
Dr. Michael G. O'Callaghan |
/* Quiet!!! This is orthogonal code */
|
|
Tom Corner |
/*Well you made it this far-Good luck-I couldn't get it to work either*/
|
|
Mark Haake |
/* Ryan don't comment code! */
Found in a highly critical
program written and utilized by NORAD. |
|
Patrick Kingsley |
/* And, then, a miracle happens! */
|
|
Kevin McCarthy |
/* Assumed impossible condition */
fprintf(stderr,"Dying in disgrace\n")
|
|
Greg Holden |
/* Look what the nitwit beancounters invented this month! */
|
|
Garland Garris |
/* I didn't write this code */
|
|
Tom Joyce |
from XEmacs frame-x.c
x_smash_bastardly_shell_position (Widget shell)
{
/* Naturally those bastards who wrote Xt couldn't be bothered
to learn about race conditions and such. We can't trust
the X and Y values to have any semblance of correctness,
so we smash the right values in place. */
|
|
Mark Huber |
My favorite source code comment was the only comment at the top of a block
of code a few thousand lines long. The code was used to calculate radar
terrain masks, so it was very complex. The comment was:
//Do appropriate logic
|
|
David Kidwell |
/* Not sure what this does but it works */
/* A. Amin - 11/10/01
|
|
Jim Tippins |
I found this at: http://www.kjartan.org/humor/computer/windowssrc.html Author
Unknown... I have hacked into Microsoft and stolen their Windows 3.11 code
and here it is. I am sure that they would love any improvements for the
next version.
/* Coppyrhite 1981 by B. Gates */
/* This program is protected by all copyright laws in the */
/* world, so do not dare to steal any piece of it. */
#include sys_crash.h
#include slow_io.h
#include memory_waste.h
char make_prog_look_big[1600000];
main()
if (detect_cache())
disable_cache();
if (fast_cpu())
set_wait_states( 1/cpu_speed );
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
printf("Welcome to Windoze 3.999
(we might get it right or just call it Chicago)\n");
if (system_ok())
crash(to_dos_prompt);
else
system_memory = open("a:\swp0001.swp", O_CREATE);
while(1)
{
sleep(5);
get_user_input();
sleep(5);
act_on_user_input();
sleep(5);
if (rand() < 0.9)
crash(complete_system);
}
return(unrecoverable_system);
|
|
Neal White |
Back when software used bad sectors as copy protection and counted down
the remaining installs available we had a system crash and needed to use
the LAST install which would have left us without a software install if
we crashed again. We used a sector editor on the disk to check where the
counter was and ran into some readable text that said
"You're not supposed to be here."
|
|
Mike Sepos |
'Insert meaningful comments here
|
|
Scott Johnson |
In the "M" programming language, has been seen the following comment:
;Comment Begin
;I don't know what this is supposed to do, but
;it looks like it is important!
;What ever you do, don't change it!
;Comment End
|
|
Mark Tyndall |
from a graphical schedule board applet in the MXP ERP system, just before
a 2000 character assign statement:
/* Oh, this is nasty. Hope it works.
Pity the programmer who has to find out why it doesn't. */
|
|
Bob KOehn |
/* Break out the Ragu. The following is spaghetti code. */
|