Page 1 of 2

check out a comment i wrote in my code the other day....

Posted: Tue Nov 22, 2005 2:40 pm
by Charles256

Code: Select all

// the paticularly long while statement dynamically generates the navigation menu
			// since theoretically we don't know how many carts there are in the system
			// we need some way to handle it dynamically. it loops the different gk types
			// and then matches this information to the gk type in the actual
			// kart table. this is a n-n relationship;)
			// either way we also have the addition that if no kart is listed
			// under a certian type then it doesn't display their name as a header
			// because if it has no go-karts then what is the point.
			// we may even later add a clause so that it ensures the gk has parts
			// listed before it does anything.
			// the next thing noteworthy is the expand variable. if expand is not set
			// for the paticular group (Which is also dynamically named)
			// then we don't show the actual go karts.
			// rather we wait for the user to select which one he wants to look at
			// before we display anything.
			// the below code might be slightly complex but just remember it's trying to handle
			// all the navigation without actually knowing anything.
			// pretty nifty if i say so myself.
			// for future reference always start at counting at 0, stupid math has
			// peolpe starting at 1...
anyone got anything longer than thaT? I wrote my life story...LOL...sorry.was just browsing over it and started laughing at myself.

Posted: Tue Nov 22, 2005 2:45 pm
by Ambush Commander
You should have used /* */ ;)

You may want to break it up and put the comments in the corresponding code locations. That will help prevent comment rot.

Posted: Tue Nov 22, 2005 2:46 pm
by Charles256
lol.i love how you just commented on my comment. lol. good stuff:-D

edit : i'm easily amused today.

Posted: Tue Nov 22, 2005 3:05 pm
by Roja
I prefer my version:

Code: Select all

// Magic here. Don't touch unless you can conjure larger demons than I can.

Posted: Tue Nov 22, 2005 3:06 pm
by onion2k
I hate comments like that.

Posted: Tue Nov 22, 2005 3:09 pm
by Charles256
onion,who ya talking too?me or Roja?
Roja, awsome comment. that's probably what I should have done. that loop went like...erm..5 levels deep or somethign like that...let's loop through the loop which loops through the array which has been passed by reference from a class on page 2 of 75....hehe..not quite but you get the idea:-D

Posted: Tue Nov 22, 2005 3:13 pm
by John Cartwright
Roja wrote:I prefer my version:

Code: Select all

// Magic here. Don't touch unless you can conjure larger demons than I can.

I just may use this... better than my traditional

Code: Select all

// Don't touch anything here unless you want to be spanked.

Re: check out a comment i wrote in my code the other day....

Posted: Tue Nov 22, 2005 4:36 pm
by Grim...
Charles256 wrote:

Code: Select all

// pretty nifty if i say so myself.
:lol:

Posted: Tue Nov 22, 2005 4:40 pm
by Charles256
what can I say? i get proud of myself occasionally.....now if I could figure out the loop I'm working on now there would be much rejoicing....

Posted: Tue Nov 22, 2005 5:44 pm
by Roja
Jcart wrote:I just may use this...
The really cool thing is that I actually had a developer send me an email...

"So I finally have a reason to ask. Just how large a demon can you conjure?"

Which was *exactly* the intent. I don't mind if it changes, I just want considerable thought to go into it.

As it turned out, my ever-so-magical code was reduced to a smoking pile of embers by his much more powerful Demon of Optimization +7. ~70 lines became *20*. Harsh. But thats what happens when Demons battle over code.

Posted: Tue Nov 22, 2005 5:45 pm
by Charles256
damn! owned!!!! sorry..heh...I've had it happen to me too..I got a snippet of code floating out there I'm certian I could cut in half..I just don't feel like it:-D

Posted: Tue Nov 22, 2005 6:21 pm
by Burrito
here is one I dug up from some code I did a while back...

Code: Select all

// I am commenting out the below code because I guarantee the stupidassbeotch will want to go back to what it is now in less than a week...burrito

Posted: Tue Nov 22, 2005 6:33 pm
by Roja
Burrito wrote:here is one I dug up from some code I did a while back...

Code: Select all

// I am commenting out the below code because I guarantee the stupidassbeotch will want to go back to what it is now in less than a week...burrito
Smells .. bitter.

Posted: Tue Nov 22, 2005 6:40 pm
by Burrito
Roja wrote:Smells .. bitter.
more than you'll ever know...and that's not my nature...but GRRR!!

Posted: Tue Nov 22, 2005 9:41 pm
by d3ad1ysp0rk
Charles256 wrote: that loop went like...erm..5 levels deep or somethign like that...let's loop through the loop which loops through the array which has been passed by reference from a class on page 2 of 75....hehe..not quite but you get the idea:-D
Refactoring instead of over-commenting anyone? ;)