Do you use stupid variable names in your scripts?

Discussion in 'General Chat' started by Kerosene, Dec 29, 2008.

  1. #1
    Just wondering if I'm the only one that uses dumb names for variables when messing around with PHP, JavaScript etc... I can never be bothered thinking of descriptive variable names, and often end up using 'temporary' variable names like egg, dave, ming, etc...

    Am I the only one?
     
    Kerosene, Dec 29, 2008 IP
  2. Ironhide

    Ironhide Peon

    Messages:
    222
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Once I used $boobies for var name..

    But generally I use descriptive var names, like $itemPrice, $userID etc..
     
    Ironhide, Dec 29, 2008 IP
  3. Zerosleep

    Zerosleep Established User

    Messages:
    7,999
    Likes Received:
    559
    Best Answers:
    1
    Trophy Points:
    405
    #3
    LOL! no! your are not alone even I use variable names like dog, cat, zerosleep, me, or anything that comes in my mind at that very moment :p

    btw even I thought that I was the only one using stupid names for variables in PHP :D
     
    Zerosleep, Dec 29, 2008 IP
  4. Master_web

    Master_web Banned

    Messages:
    259
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Seems like we all have this good habit :p I always use animal and horrible var names in my scripts
     
    Master_web, Dec 29, 2008 IP
  5. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #5
    :D Glad to know I'm not the only one :D

    A few years ago I did a major project for an Australian university using Director/Lingo, and all the variables were Ming, Wong, Fong etc... I hope nobody reverse engineers it :p
     
    Kerosene, Dec 29, 2008 IP
  6. Guttu

    Guttu Peon

    Messages:
    728
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I usually name variables relative. But when I don't have any such restriction then I give nicks of my friends and celebrities.
     
    Guttu, Dec 29, 2008 IP
  7. MagicShovels

    MagicShovels Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I do that all the time because it makes it more memorable rather than something generic
     
    MagicShovels, Dec 29, 2008 IP
  8. RightMan

    RightMan Notable Member

    Messages:
    8,294
    Likes Received:
    450
    Best Answers:
    0
    Trophy Points:
    205
    #8
    People are usually in such a hurry at those moments that they put in whatever first comes to their mind....

    Hence, all these strange words....! :eek:

    Regards,

    RightMan
     
    RightMan, Dec 29, 2008 IP
  9. mdvasanth86

    mdvasanth86 Notable Member

    Messages:
    3,869
    Likes Received:
    285
    Best Answers:
    0
    Trophy Points:
    230
    #9
    I do... not just the variable names... My university system password was also kinda ---!!
     
    mdvasanth86, Dec 29, 2008 IP
  10. d0rhk

    d0rhk Well-Known Member

    Messages:
    1,158
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    105
    #10
    yeah I find myself using single letters sometimes... its bad cuz then you have to look through your code looking for which letter holds what :p
     
    d0rhk, Dec 29, 2008 IP
  11. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #11
    I just try to keep mine all short and lowercase. It makes it easier when referencing them in my opinion.
     
    PHPGator, Dec 29, 2008 IP
  12. levampire

    levampire Active Member

    Messages:
    2,463
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    90
    #12
    Mmm, I used to use logical names and also descriptive, but sometimes when I'm playing, I use STRANGE stuff.
     
    levampire, Dec 29, 2008 IP
  13. peter_anderson

    peter_anderson Notable Member

    Messages:
    3,382
    Likes Received:
    152
    Best Answers:
    0
    Trophy Points:
    240
    #13
    Whatever comes to my mind. When I encode files, I always like to put some crazy shit names in them - nobody's going to see it anyway :)
     
    peter_anderson, Dec 29, 2008 IP
  14. farooqaaa

    farooqaaa Well-Known Member

    Messages:
    2,330
    Likes Received:
    149
    Best Answers:
    0
    Trophy Points:
    180
    #14
    I don't do PHP now. But I used descriptive variable names. Never used anything bad.
     
    farooqaaa, Dec 29, 2008 IP