Omnimaga

Calculator Community => Other Calculators => Topic started by: Hot_Dog on January 20, 2012, 08:31:31 pm

Title: "I chose it because it popped into my head"
Post by: Hot_Dog on January 20, 2012, 08:31:31 pm
In your programming, what have you chosen for an interesting variable name, value, etc. simply because the idea popped into your head, no matter how ilogical it was?

1. One of my label names: NOPQ.  I needed a name for a local label, and for some reason I thought of this one
2. Values that mean an enemy should move up, down, left or right in a straight line and not diagonally: $D7 - $D0.  Values from 0 to 31 were taken, and the value $D7 just came into my head and wouldn't leave me alone
Title: Re: "I chose it because it popped into my head"
Post by: Builderboy on January 20, 2012, 08:35:58 pm
Looking through my Nightmare source I am pleased to say that none of my variables were named arbitrarily ^^, although I can't go as far as saying they are completely descriptive XD Often times I find the variable 'dist' in source code, referencing some kind of distance.
Title: Re: "I chose it because it popped into my head"
Post by: DJ Omnimaga on January 20, 2012, 11:07:22 pm
For some reasons, in my BASIC games, I always chose the last real variable letter for animations, then go up as I need more. I go from Theta, to Z, Y, X, etc. For some reasons, though, I always used Z for getkey, so whenever I need Z for key detection, I skip it for animations. Also I skip Y if I'm using the graph screen, since ClrDraw and that stuff resets it to zero.

For other things, such as character position and direction, I start with A, B and so on.
Title: Re: "I chose it because it popped into my head"
Post by: imo_inx on January 20, 2012, 11:21:24 pm
I use C for key-press storage, and a/b and d/e for storage of variables for drawing tools.
Title: Re: "I chose it because it popped into my head"
Post by: Juju on January 20, 2012, 11:23:55 pm
I always gave meaningful names to variables, like K for getKey, X and Y for position, A and B for previous values of X and Y, etc. Oddly I always used the full 8 characters limit for program names. ASDFASDF is a pretty good name as well.
Title: Re: "I chose it because it popped into my head"
Post by: Darl181 on January 21, 2012, 01:10:48 am
I normally try to do some acronym or another, but sometimes I forget what it means (I still can't remember some of them as far back as TWHG) :P

Normally for variables I use placement on the keypad, so there'd be the normal X,Y and the forces acting on those are S,T because they're the keys just above.  If there's another thing with similar vars, I might use IJNO or UVZΘ and etc.
Title: Re: "I chose it because it popped into my head"
Post by: Hayleia on January 21, 2012, 01:17:50 am
I try to give logical names, like Lbl APD to "turn off" the calc (set contrast to 0 :P) or Lbl FAC to clear the box (only french people can see what I did here)
But for random and/or temporary labels, I give names like VH7 :P

As for variables, what I do might not seem logical to everybody but I always use the same scheme for all my programs ;)
Title: Re: "I chose it because it popped into my head"
Post by: Builderboy on January 21, 2012, 01:24:26 am
so there'd be the normal X,Y and the forces acting on those are S,T because they're the keys just above.
I do exactly the same :D  Except when it's Basic and we have to use X Z because Y is silly D:
Title: Re: "I chose it because it popped into my head"
Post by: leafy on January 21, 2012, 02:01:56 am
I always use X and Y for inflated coordinates, S and T for uninflated, A and B for velocity ^^
Title: Re: "I chose it because it popped into my head"
Post by: jsj795 on January 21, 2012, 04:34:39 am
I use theta for GetKey cuz... that's what I've always used. And then I use Z for my loops, usually Repeat, and if there are nested loops, I use Y, X, and so on. For character position I tend to use A and B, C and D, and so on. Usually if there is gravity involved I would use G for that, if not, I use G for storing Gold (any currency in game even if not named Gold).
Any other variables I just choose randomly :P
Title: Re: "I chose it because it popped into my head"
Post by: turiqwalrus on January 21, 2012, 05:55:26 am
well, I once had a label Wlrus()
it was my display routine :P
Title: Re: "I chose it because it popped into my head"
Post by: All_¥our_Bass on January 26, 2012, 11:42:08 pm
K for getkey, anything else is either initials/first letter or just A then B then C,etc.