4

Who doesn't have an issue with choosing the names of variables?

I do

what about you

Comments
  • 1
    Please don't have kids...
  • 13
    I just use GUIDs for everything.

    for (int c3ca6af0854f4a8d85a69888f338adb7 = 0; c3ca6af0854f4a8d85a69888f338adb7 < 10; c3ca6af0854f4a8d85a69888f338adb7++) {}
  • 2
  • 5
    If you can't name a variable, you don't know what your about to do with it either.
  • 1
    @C0D4 Same goes for dynamic languages. If you declare a variable you should know what types of data you're gonna store there
  • 3
    Yeah you have to consider whether other variables will make fun of them
  • 1
    @12bitfloat

    - something

    - stuff

    - object

    - instance

    - container

    - box

    - data

    - variable

    - integer

    - string
  • 1
    Var1, var2, var3, var4, var5, i, var6, var7, ...
  • 1
    just using single letters (like you see in those jquery scripts when inspecting code) They must be doing it right with so many users.
  • 0
    @unreal-jase how descriptive do you make them ?

    If you need to call it 'thisVariableIsUsedForCounting', then something is also wrong. If you cannot see the logic and understand the meaning of the variable at that moment, the logic is bad.

    If 'iCount' is not enough, that where is the problem ?
  • 1
    85% of my job is naming things. 16% is fixing logic errors introduced because I named something poorly.
  • 0
    @Demolishun okay what's the relationship between naming variables and having kids? This is like an error to me Undefined index
  • 0
    @dIREsTRAITS Imagine naming kids.
  • 0
    @platypus it's not a good practice to have magic values, would you mind declaring 2 constants for the interval start/end?
Add Comment