Page 1 of 1

fun with programming comments

Posted: Fri Oct 08, 2004 10:14 pm
by Red Squirrel
Gota love funny comments found in code, or making some.

My latest is in a new module I'm making for the site's security system, after a cookie has been detected.

Code: Select all

//if we made it here, it means we are already logged in
//(or that someone made their own cookie to try and exploit the script - they'll get wacked later...)
//...So we authenticate the session hash.
[code]

Sometimes funny comments make it easier to move around in large scripts/programs since they tend to be harder to forget.  :D 

Anyone else here like me and like to put funny and/or weird comments? :D

I'm the same with html.  You'll find rather interesting stuff if you look at the end of the source for the forum.  :roflmao2:  

[color=#888888][size=85]Archived topic from Iceteks,  old topic ID:2740, old post ID:22342[/size][/color]

fun with programming comments

Posted: Fri Oct 08, 2004 10:32 pm
by Death
Oh heck ya. I always put weird comments in my programs. If I find one in one of my programs, I'll post it. I remember once I had a list of things to do and I put "GO TO THE BATHROOM" as one of them. Which was actually a good thing to put there 'cause I had programmed for 7 hours straight and I had to pee after 5 hours (You know how it is when ur on a roll). I'll have to look through my programs for that. Unfortunately, I lost most of my good programs when I gave away my computer. Note to self, never trust a floppy :(:(.

Archived topic from Iceteks, old topic ID:2740, old post ID:22343

fun with programming comments

Posted: Fri Oct 08, 2004 10:43 pm
by Red Squirrel
HAHAHA. True I'm like that too. I have to pee but it takes me so long to actually decide to get up, and omg turn my head away from the screen :o to then go. :D

I tend to get overly excited when I'm programming something and everything is going super good. It can be scarry sometimes. Especially security related stuff, I have some kind of fetish for security. :D

Archived topic from Iceteks, old topic ID:2740, old post ID:22345

fun with programming comments

Posted: Fri Oct 08, 2004 10:48 pm
by Death
I have a knack for debugging. My programs have to be solved before I go to sleep. One time, I was working on a bug at 12 am. I finished it at 3 am and looked at the time. Then I said: "HOW DID THAT HAPPEN?!!" I have to have my programs incredibly stable as well. I can't have any runtime errors due to things the user does. That's why 80% of my variables are strings :D. I tend to take string values and convert them into numbers for extra durable programs. Oh, and I comment like nuts. I've learned from my mistakes. Ever program something with 100+ variables, take a two month break from it, then return and FORGET what all the variable are? Man, that made me angry. :banghead:

Archived topic from Iceteks, old topic ID:2740, old post ID:22347

fun with programming comments

Posted: Fri Oct 08, 2004 10:51 pm
by Red Squirrel
Yep I'm like that too. If something does not work and I can't figure it out, then I can't sleep, since I try to think what could be causing the problem. So it must be fixed before bed. :D

Archived topic from Iceteks, old topic ID:2740, old post ID:22348

fun with programming comments

Posted: Fri Oct 08, 2004 10:57 pm
by Death
Hehehe, it's funny actually. I don't usually dream at night because I am a very deep sleeper, but when I used to program till 3 in the morning, I would dream up a solution to the problem and, by God, it actually worked! It's weird actually. So if you think about it, I actually program in my sleep as well :o . Kind of spooky. Darn, I should really start programming again. I haven't programmed in about a 6 months. As soon as I started learning java, I kind of lost my love for programming. Oh, and I don't have a lot of time to program either anymore :(. Ya, kind of sucks. Too bad, I had some nifty dos games. 16 colors and everything :P. All the graphics drawn by hand. I made a re-creation of frogger called "Roadrage Frog" just for fun. Pretty cool actually but it was soo good that the compiler wasn't even able to accept it. If I compiled, the EXE would be defective. Kind of sad when you program a nice game and cannot compile it successfully :(.

Archived topic from Iceteks, old topic ID:2740, old post ID:22350

fun with programming comments

Posted: Fri Oct 08, 2004 11:06 pm
by Red Squirrel
I've been so attached to php that I completly disregarded C++. I'm trying to get back in C++ but it's just so much more tedious then php. php has a nice organized syntax like C++, but it has better functions, MUCH better variable handling. There's no limit to how much data is in a string, there's no difference between a char, int etc... php treats it all as text.

But if you want to do math, it will do it too, it will consider numbers, but as a string. So you can even ad alphabet with it, it's pretty neat.

so A + A = B AB + AA = CB etc... (something like that).

And as far as I know the number limit is near 210000000 which is much higher then the one in C++. (+-32000 or something like that)

After coding allot, when I close my eyes I see the code, and see it so clearly I can make out the different colors of the syntax highlighting of my text editor. :D

Archived topic from Iceteks, old topic ID:2740, old post ID:22351

fun with programming comments

Posted: Sat Oct 09, 2004 1:52 am
by wtd
Furball wrote: I have a knack for debugging. My programs have to be solved before I go to sleep. One time, I was working on a bug at 12 am. I finished it at 3 am and looked at the time. Then I said: "HOW DID THAT HAPPEN?!!" I have to have my programs incredibly stable as well. I can't have any runtime errors due to things the user does. That's why 80% of my variables are strings :D. I tend to take string values and convert them into numbers for extra durable programs. Oh, and I comment like nuts. I've learned from my mistakes. Ever program something with 100+ variables, take a two month break from it, then return and FORGET what all the variable are? Man, that made me angry. :banghead:
That's what caffeine is for. If you still sleep then that means you're not working hard enough. ;)

As for having hundreds of variables...

Break things down into functions. If you have that many variables it's a sure sign that you're not breaking big problems down into small problems, and that means you're working too hard. The really good programmers work really hard at being lazy. :)

Archived topic from Iceteks, old topic ID:2740, old post ID:22359

fun with programming comments

Posted: Sun Oct 10, 2004 9:28 pm
by Death
Hehe, that's true. We always tend to find the "Easy route" out of things. And for that program with tons of variables, that was just one time. That was before I knew what arrays were for :P. I don't get caught with that one anymore (Or so I think). Yes, caffeine is very good for programming. I was wired the night I had 3 A & W root beers. It was almost like a "Sugar" hangover the next morning (Or should I say afternoon). :P

Archived topic from Iceteks, old topic ID:2740, old post ID:22431