How silly/funny are your code/comments?

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.

How silly/funny is your code (in the absence of job restrictions)?

Poll ended at Mon Jun 09, 2003 1:25 pm 0

Not at all. Absolutely professional, even if I'm only coding for myself.
11
34%
Silly comments, or debug-build-only messages, are ok as long as the user won't see them and they're still informative.
7
22%
I use silly and/or joke variable or procedure names.
7
22%
I use silly and/or joke variable or procedure names.
7
22%
 
Total votes: 32

User avatar
Ely
Baaaaaaa!
Baaaaaaa!
Posts: 7404
Joined: Tue May 28, 2002 6:32 pm 0
Yahoo Messenger: ely_uw2000
Location: The other place....
Contact:

Post by Ely »

Pretty boring comments from me, but they are more little pointers that full descriptive dialogs. As for Var names, gotta be meaningful really, I have enough trouble remembering what some code does without that added hassle.

I do remember having a rather nice COBOL program at college that had a PARAGRAPH called WUGAHUMPHDONWOOF tho. And also a joint effort of Connect 4 in COBOL with the AI PARAGRAPH called the MEGABRAIN_PARA or something silly :) :)
User avatar
triphed
Baa!
Baa!
Posts: 39
Joined: Mon Jun 02, 2003 9:04 am 0
Location: I'M TAKING CONTROL OF THE DRUM MACHINE
Contact:

Post by triphed »

i'm terrible.
i never use tabs to neaten up code. i am always using colons to squish-up lines of code. i never make any comments of any kind. nearly all variables' names consist of three random letters, and if i go back to the code without looking at it for as little as a week, i can't understand how it works anymore. :?
jheeb mashka wert boyno.
User avatar
Dvorak
Baaaaaa!
Baaaaaa!
Posts: 4560
Joined: Wed May 08, 2002 7:37 am 0
Yahoo Messenger: d3dxquaternion
Location: Germany

Post by Dvorak »

triphed wrote:i'm terrible.
i never use tabs to neaten up code. i am always using colons to squish-up lines of code. i never make any comments of any kind. nearly all variables' names consist of three random letters, and if i go back to the code without looking at it for as little as a week, i can't understand how it works anymore. :?
El Diablo! 8O
User avatar
Dvorak
Baaaaaa!
Baaaaaa!
Posts: 4560
Joined: Wed May 08, 2002 7:37 am 0
Yahoo Messenger: d3dxquaternion
Location: Germany

Post by Dvorak »

sack wrote:if((man == 5) && (devil == 6) ) god == 7; // if you understand this code, can i have my MP3 CD back?
Man, that's completely buggy!
If I remember that one from the Daisies correctly it should read

Code: Select all

if (man==5)
{
   devil=6;
   god=7;
}
Please go and correct your code... :wink:

So much to mixing-up two different levels of semantics...
User avatar
hairy_pete
Baaaaaaa!
Baaaaaaa!
Posts: 7217
Joined: Mon May 27, 2002 8:10 pm 0
Location: A Tiny Village in Bavaria

Post by hairy_pete »

Most of the stuff I code is barenaked assembly language, right on the hardware. Most of the time, the truly elegant and efficient solutions tend to be completely unobvious, and there's no such thing as variables to make things more legible either.

So for the sake of myself still understanding it two weeks later :oops: , I do comment things in a useful way. You will however find the occasional rant about extremely stupid hardware implementations in there :evil:
User avatar
spinlizard
Baaaaa!
Baaaaa!
Posts: 1612
Joined: Mon Dec 09, 2002 10:09 pm 0
Location: Somewhere cosy

Post by spinlizard »

I use i, j etc for generic loop counters and stick fairly closely to hungarian notation ideas. Every function and proc is documented with a brief overview at the top of each one describing what it does and is peppered with comments in the body itself.

Horribly sad I know, but I just find it so much easier to maintain, especially when coming back to it after 6 months. Tab stops also just have to be set at 2.

When a bug crops up and I have 30 (no 29) minutes to fix it I'm glad of them.
Boo
Baaa!
Baaa!
Posts: 247
Joined: Wed Feb 05, 2003 5:19 pm 0

Post by Boo »

In a word no; no jokes. And no Hungarian notation -- remember the DRY principle, folks? These things will get you in the end.
User avatar
spinlizard
Baaaaa!
Baaaaa!
Posts: 1612
Joined: Mon Dec 09, 2002 10:09 pm 0
Location: Somewhere cosy

Post by spinlizard »

triphed wrote:i'm terrible.
i never use tabs to neaten up code. i am always using colons to squish-up lines of code. i never make any comments of any kind. nearly all variables' names consist of three random letters, and if i go back to the code without looking at it for as little as a week, i can't understand how it works anymore. :?
Evil. Truly evil. Make the maintenance guys work for their money eh? :wink: :D
User avatar
Dr. M
Baaaaaaa!
Baaaaaaa!
Posts: 6368
Joined: Sat Jun 22, 2002 12:44 pm 0
Location: Sitting in a chair in my office - sort of.

Post by Dr. M »

Boo wrote:In a word no; no jokes. And no Hungarian notation -- remember the DRY principle, folks? These things will get you in the end.
Awwww... Fluffy (feathery(?)) storkie! :stork:
Boo
Baaa!
Baaa!
Posts: 247
Joined: Wed Feb 05, 2003 5:19 pm 0

Post by Boo »

Dr. M wrote:Awwww... Fluffy (feathery(?)) storkie! :stork:
Why, look at that! (Perhaps it's a Kiwi; those are fluffy aren't they? If you squint, and squeeze your eyeball gently...)
User avatar
mattycarr_uk
Posts: 8
Joined: Sat Apr 26, 2003 11:25 am 0

subject line, read it at your peril.

Post by mattycarr_uk »

since no-one ever gets to see my source code... i usually end up using sorta real names... but i usually use the same name over and over so i get something like PanelPosition, PazelPosition, NasalPoisiton, PointionZasel... and my code turns into unreadable doggerel.

and about tabs... I use so many tabs in my progs, i once wrote a defender clone where you fly the ship across the edge of the source code... O_o
All incarnations terminated. Simulation Aborted. Danger is my business.... meheheheheeeh.
User avatar
Dvorak
Baaaaaa!
Baaaaaa!
Posts: 4560
Joined: Wed May 08, 2002 7:37 am 0
Yahoo Messenger: d3dxquaternion
Location: Germany

Re: subject line, read it at your peril.

Post by Dvorak »

mattycarr_uk wrote:and about tabs... I use so many tabs in my progs, i once wrote a defender clone where you fly the ship across the edge of the source code... O_o
:D class!
Post Reply