Advertisement

Funny source code/documentation/comments?

Started by January 16, 2005 10:53 PM
75 comments, last by jonaakey 10 years, 7 months ago
According to this page, the programmers porting Halo from PC to Mac found this in the source code:

              short m_c = m_g_m_b_n(                          o_d->o.m.i,   /******************/   n,   /*                */   o->o.r_p,   /*    o      o    */   NULL,   /*  \    <>    /  */   N,   /*   \________/   */   o_g_n_m(o_i),   /*                */   T_F(o->o.f, _o_m_b),   /******************/   m,                          m_m_c);


Also, the Marathon 2 source released by Bungie has some classics in it. Some I found just now:

  • this is not your father's texture mapping library.(in fact it isn't yours either, dillweed)


  • Friday, June 16, 1995 9:12:50 AM- I am completely fired. And a complete f***ing moron. The revert game information is stored in stale pointers, which is crack, because they are pointing into random stack memory. This is completely evil, totally stupid, and I feel ridiculously dumb.


Censored by me.

[Edited by - Neex on January 17, 2005 5:30:08 AM]
I havn't really ever come across any truly funny comments...

but I've seen more than enough scary ones that just made me laugh..

if (...){...}else{   // do nothing}


or maybe this is more descriptive:

...//write the details of each bot to a file representing that botpublic static void removeBot(String idNumber){}...
Advertisement
Working on the Mac port of my game (which I wrote entirely), I search a bug for a couple of hours, only to discover it on a line with a "not portable, sue me" comment.
Quote: Original post by Diodor
Working on the Mac port of my game (which I wrote entirely), I search a bug for a couple of hours, only to discover it on a line with a "not portable, sue me" comment.


lol, quite frustrating, eh?
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
hmmm...
i had that:
//if(k<0)then writeln('buggeroceratops!!!!');
and also i had some "testfuhrer" and similar thingies.

Another thing i seen somewhere was something like
for(fatherland=0;fatherland<100;fatherland++){
........
}
and something like
node1->MakeChild(node2);// O la-la!


clickster about funny variable names

i've seen some very funny page in the web but can't find it now.
From the Unreal Tournament Public Source:

FFileManagerWindows.h:
SQWORD GetGlobalTime( const TCHAR* Filename ){ //return grenwich mean time as expressed in nanoseconds since the creation of the universe. //time is expressed in meters, so divide by the speed of light to obtain seconds. //assumes the speed of light in a vacuum is constant. //the file specified by Filename is assumed to be in your reference frame, otherwise you //must transform the result by the path integral of the minkowski metric tensor in order to //obtain the correct result. return 0;}

Advertisement
Quote: Original post by sphinx23
From the Unreal Tournament Public Source:

FFileManagerWindows.h:
*** Source Snippet Removed ***


No way it is real!
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
Quote: Original post by vNistelrooy
Quote: Original post by sphinx23
From the Unreal Tournament Public Source:

FFileManagerWindows.h:
*** Source Snippet Removed ***


No way it is real!
Hehehehe, good one.
Quote: Original post by Zahlman
Anyway. c2.com > k^2. Sorry.

I have been challenged. I shall fetch my charts and graphs. *scribbles*

public static void Main(string[] args){  Console.WriteLine("The greater of the two is {0}", ("c2.com" >= "k^2") ? "c2.com" : "k^2");}


This prints "The greater of the two is k^2". So there!
- k2 "Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
I think I've done the following:
// If you need to read the comments to figure out what this does// you shouldn't be allowed to touch a computervoid printSomethingToFile();

Either that, or I just wanted to do it at work when I got a lecture on how important comments are from the guy who never adds meaninful comments.

I've also seen this in legitimate working code
inc x   ;increment x

That was really helpful when figuring out some obscure assembly language statements. Ugh.
______________________________"Man is born free, and everywhere he is in chains" - J.J. Rousseau

This topic is closed to new replies.

Advertisement