|
Sometimes if my code requires throwing an exception, I'll write a small story (like 2 or 3 sentences) telling the what the error in some kind of silly way. is
|
|
|
|
|
I only put jokes in BEFORE code reviews... that way I can see who actually read the code BEFORE the meeting and who is reading the code AT the meeting ...
|
|
|
|
|
List<decimal> fixedDenominations = ...
double[] fixedDenArray = new double[fixedDenominations.Count];
int i = 0;
foreach (decimal d in fixedDenominations)
{
fixedDenArray[i++] = (double)d;
}
|
|
|
|
|
Jokes ???? My code is my expression, I don't want to joke when I'm in code writing process !!!
Zqr
|
|
|
|
|
I remember the time I had started my career in a small company, when no source control exists. We use to back up the folders everyday as old, new, _Date etc. Once it reached its height when a back up folder was created as "latestold" (???)
|
|
|
|
|
Sometimes you do something in the most amusing ways.
I had a situation where I refactored some code and was left with something like this:
if (check1 == true && check2 == true)
{
}
else
{
code was here.
}
|
|
|
|
|
Or if I'm just in the mood.
|
|
|
|
|
The only time I ever attempted to add a joke as a comment was in an attempt to hide the embarrassment of using a 'GOTO' statement in some vba code was writing (about 100 years ago); can't remember the joke!
for the record: That was the first and last time I ever used a GOTO statement
|
|
|
|
|
I have seen many times comments like - the day when the code page was started comment was: "Happy Birthday!"
SQL.NET
|
|
|
|
|
i write poems there! and if they be interpreted while having the code in mind ,sometimes it can be a real fun!
|
|
|
|
|
Hi all,
Though I really like to write funny words whereever I get chances but I don't do this when it comes to coding. But, one of my team mate does a lot. Specifically, whenever he is having a tough time with our boss then he abuses him in the code comment region. He must thank to god that the boss does not read the code too often.
There is no foolish question, there is no final answer...
modified on Tuesday, July 27, 2010 9:37 AM
|
|
|
|
|
I never thought that anyone would put in jokes in comment field.
|
|
|
|
|
I know people who've put nasty words in error messages for their own amusement only to forget to change them when it goes live, and the day that message pops up !!!! Something along the lines of 'This cr*p system I was asked to write has broken' - or even something more personal !!
|
|
|
|
|
The internal application I wrote is used by one person so a few of the error messages are personalised, e.g. "Order number is required. Do pay attention, *Agatha."
|
|
|
|
|
That's great - I never thought of that !!
|
|
|
|
|
Where do all the easter eggs come from, otherwise?
|
|
|
|
|
Remembering I have been here more than 20 years and they can't sack me now, I can allow myself a bit of fun in the comments. No-one reads it but me and my colleagues, and QS can't read English.
No-one here has written any examples of their fun comments, shame.
I did a lot of help stuff on one project, and sometimes there was no requirement, so if they pressed F1 they would get
-no use asking me, I don't know either
-no help here, ask Toby
------------------<;,><-------------------
|
|
|
|
|
Then again, 99.999% of the time, no one reads my code other than team members. The second it gets out of that zone, its all white, precision, professional, clinical.
If the post was helpful, please vote, eh!
Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ
<span style="color:Red">Now and forever, defiant to the end.</span>
What is <a href="http://en.wikipedia.org/wiki/Multiple_sclerosis">Multiple Sclerosis</a>[<a href="http://en.wikipedia.org/wiki/Multiple_sclerosis" target="_blank" title="New Window">^</a>]?
|
|
|
|
|
Mustafa Ismail Mustafa wrote: The second it gets out of that zone, its all white, precision, professional, clinical.
What a shame I'm thinking that a majority of people would rather have something amusing to view instead of the usual non-informative crap.
i.e. Imagine: "Whoops, seems you've done something totally unexpected...good job" instead of "System error"
Just a thought
Mike
|
|
|
|
|
Hmm, it might be better if I explain a bit more.
Let's say I'm working on something that relies on another module that Joe wrote, I'd have something like this in my comments:
#IF DEBUG
MessageBox.Show(string.format("Joe, you're getting sloppy, look what you made me do! You're making me look bad./n{0}", MyException.Message));
#ENDIF
I would never allow a message like that to show up at the User's side. Never.
If the post was helpful, please vote, eh!
Current activities:
Playing Star Craft II. Don't bother me, eh?
Now and forever, defiant to the end.
What is Multiple Sclerosis[ ^]?
|
|
|
|
|
I understand what you are saying and you are right those should not be let through.
Mike
|
|
|
|
|
Someone who suggested this survey talked about this sometime back and I liked the idea.
And now that I will resign from my current organization very soon, I will surely try a few of them.
..Go Green..
|
|
|
|
|
All of my code will eventually be seen by the customer.... Now if your code stays internal always you have a bit more flexibility to have fun... but if your bosses and or customers see your code.... then you probably want to be a bit more serious....
_________________________
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
Shhhhh.... I am not really here. I am a figment of your imagination.... I am still in my cave so this must be an illusion....
|
|
|
|
|
I don't think one can look at any Linux device driver code without encountering some swearing in the comments (particularly those who have read through the legendary Sun Happy Meal protocol code).
http://www.ohohlfeld.com/linuxfun.html
Sadly a lot of the great Linux comments have been cleaned up now. Gone are the days when gcc used to say "semi-colon missing at end of line (you lazy bastard!)"
|
|
|
|
|
...when your code is going to be (or likely to be) scrutinised by customers and/or (even worse) standards/approvals bodies, everything has to be kept "professional" in tone.
On the other hand, the people who put together the instruction set for the PowerPC must have had a laugh when they came up with the assembler instruction Enable In-order Execution of I/O (short name EIEIO).
In one company for which I worked, a group of disenchanted engineers broke off and formed their own competing company. This was apparently because of a conflict with a person whose initials I will call "ABC" (initials changed to protect somebody I thought of as a friend). EVERY part of the product - PCBs, sheet metal, plastic work, etc - was stamped with the "code" ABC4Q2. (Sound it out to yourself in private - I'm not going to spell it out any more.) This was in a product that had to get through all sorts of approvals bodies all around the world, too. That makes the code comment thing look a bit lame, really.
Professional Geek,
Amateur Stage-Levelling Gauge
|
|
|
|