fun with programming comments

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

fun with programming comments

Post 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]
Honk if you love Jesus, text if you want to meet Him!
User avatar
Death
Posts: 7919
Joined: Thu Sep 30, 2004 10:12 pm

fun with programming comments

Post 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
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

fun with programming comments

Post 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
Honk if you love Jesus, text if you want to meet Him!
User avatar
Death
Posts: 7919
Joined: Thu Sep 30, 2004 10:12 pm

fun with programming comments

Post 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
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

fun with programming comments

Post 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
Honk if you love Jesus, text if you want to meet Him!
User avatar
Death
Posts: 7919
Joined: Thu Sep 30, 2004 10:12 pm

fun with programming comments

Post 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
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

fun with programming comments

Post 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
Honk if you love Jesus, text if you want to meet Him!
wtd
Posts: 157
Joined: Sat Sep 25, 2004 7:21 pm

fun with programming comments

Post 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
User avatar
Death
Posts: 7919
Joined: Thu Sep 30, 2004 10:12 pm

fun with programming comments

Post 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
Locked