12
githelp
5y

!rant
What do you name variables with no meaning

Comments
  • 0
  • 0
  • 1
    test, asd, asdasd, asd123, tmp
  • 0
    dunno_1, dunno_2 and so on
  • 4
    Foo, bar, baz. if I need more than those it's time to walk away and have a drink.
  • 11
    Why do you have variables with no meaning?
  • 6
    $mylife
  • 1
    @endre86 That was my first thought, but then I realised that I do it when debugging sometimes.
  • 3
    @lreading But I bet they still mean something. A response from something, a partial calculation, etc. If it's just for debugging, sure you don't want to use time finding a suiting name. But sometimes I find that the debugging variable is nice to keep in the code, because there happened something that was not transparent.
  • 2
    Every variable has a meaning
  • 1
    Test
  • 0
    I use foo, bar, baz.
    I have often seen data as a placeholder or simply placeholder :p
  • 1
    I don't declare variables without meaning and if you do you should be ashamed.
  • 0
    @oskaremil I bet your shit doesn't stink either, and you've never had trouble debugging something.
  • 0
    @lreading Assumption: incorrect
  • 0
    thing, shit, test, one, two.. But those are just some placeholders (until you find the meaning).. all variables have meaning.. if they don't, they don't belong.
  • 0
  • 0
    For loops I use x, y, z.
  • 1
    All variables should have meaning.
    If you are talking about iterators, something like i.
    If you're talking about callback function arguments that never get used, I still name them according to what they represent, even if they don't ever get used.
  • 0
    In my country (Poland), the most common is "dupa", as a temporary variable for everything. But you'd better never forget to remove it before outage or presentation.
Add Comment