• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ultimate Comments in coding

 
Yogita Kahadane
Greenhorn
Posts: 2
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Today I received the mail with subject line as above.
I want to share that with you all

1.
/// <remarks>
/// The point of this is to work around his poor design so that paging will
/// work on a mobile control. The main problem is the BindCompany() method,
/// which he hoped would be able to do everything. I hope he dies.
/// </remarks>


2.
// I dedicate all this code, all my work, to my wife, Darlene, who will
// have to support me and our three children and the dog once it gets
// released into the public.


3.
// Magic. Do not touch.

4.
return 1; # returns 1

5.
/* This is O(scary), but seems quick enough in practice. */

6.
/*
* You may think you know what the following code does.
* But you dont. Trust me.
* Fiddle with it, and youll spend many a sleepless
* night cursing the moment you thought youd be clever
* enough to "optimize" the code below.
* Now close this file and go play with something else.
*/


7.) and here comes my favourite......






//When I wrote this, only God and I understood what I was doing
//Now, God only knows

Please share if you could have written some code comment like that.

Best Regards,
Yogita

 
Sumit Bisht
Ranch Hand
Posts: 331
Python Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol

@Yogita, Welcome to JavaRanch

// TODO : Add Comment Here
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15205
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you like things like these, then have a look at The Daily WTF.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
 
Henry Wong
author
Marshal
Pie
Posts: 20881
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It's funny from a third party point of view. Having encountered code like this -- it is far from funny. Generally, it means... the code is complex. the code is poorly written. the code barely works. the code is not documented. etc...

Henry
 
Yogita Kahadane
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Sumit , Jesper

Yes Jeanne, even i found it very funny

Hey Henry,
Jokes apart,
@Having encountered code like this -- it is far from funny. Generally, it means... the code is complex.
If we look the other way round,yes,providing simple solution is real deal
Well ..such comments are harldy entertained

Cheers,
Yogita
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
// It is what it is.
 
Muse Ran
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yogitha,
share your code comments

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found these comments on a common library application, made by an architect

/**
* You need to set provider name before accessing this. Dont ask me why it is so !
*/

/**
* This should now work eeesshshhuppp !
*/

I know this is meaningless drivel and all but I am not joking about those comments. The code by itself was not bad and it was fun reading the comments.
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this type of comment in one of the site I was working on (in a js file)

/* Who wants some whiskey? I want it!! Here you go!

Woo Hoo, amazing whiskey */

And after that all the variable names and function names had whiskey in them. One of the variable was amazingWhiskey. There were a lot of other comments like this one but they were kinda offensive so ...
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Garg wrote:I found this type of comment in one of the site I was working on (in a js file)

/* Who wants some whiskey? I want it!! Here you go!

Woo Hoo, amazing whiskey */

And after that all the variable names and function names had whiskey in them. One of the variable was amazingWhiskey. There were a lot of other comments like this one but they were kinda offensive so ...


At work ? wow.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only I can remember of is a class which I had no clue what its purpose was, and whose comment is :

/**
* Nice!! Creation date: (00/09/01 11:28:37)
*
* @version $Revision: 1.4 $
* @author $Author: XXXX $
* @author YYYY
*/
 
Sagar Rohankar
Ranch Hand
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is also my first Orkut profile photo
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on a serious note, I have seen people doing so to obfuscate the code.

and yes
//When I wrote this, only God and I understood what I was doing
//Now, God only knows

that's the best
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In code I was maintaining I found the following (after two days of tracking down an error):

/**
congratulations, you finally found the method that is causing all the problems

**/
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I can never forget this comment

We had to check various version in VSS to check what was actual code, which was deleted

Shailesh
 
Suresh Thota
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I once read this comment in a co-workers code after he left the company.

/* Temporary workaround until <some other team> delivers their fix (which is never gonna happen) */
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of my friend got screwed because of this. He used to send SMSs to friends using 160by2 site. Since he didn't wanted to keep that site open for too long (since it was not allowed in the office), so he used to type his SMS in the code and used to copy paste it into the site and send it. But once he forgot to delete one SMS from the code and submitted the code. When his supervisor found that SMS, he was called by the boss and scolded. Now he cut pastes his SMSs (people never quit )...
 
Kashyap Hosdurga
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/* The below lines are deleted by XXXXX*/
 
Raghavendra nandavar
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of my favourites which I saw in one of the applications:

// This code is added by me, today.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic