98
nebula
7y

DevConfession

I often google names for my variables to see if I find a betrer fitting synonym that reads better

Comments
  • 1
    is there a tool which helps you to find the right variable name and does based on this a documentation?
  • 0
    I wish my colleagues would do that.
    It's so annoying if you see a variable, function or classname that has been translated literally with the wrong meaning. And usually it's too late to change it without big effort, once it's been introduced this way.
  • 3
    Surely we all had scenarios like these, but still. I had two friends that used the following as variable names:
    - variables with the minimum characters possible: a, b, c, bb, zz, xx.. no matter what they were used for. From cycles to full blown objects; debugging was hell; deleting everything was ideal; he sucked at programming and now plays online poker for a living; great guy to be with, though;
    - variables with dirty words; dick, piss, c*nt..funny to see it in errors, horror to see the boss looking at the code; this guy sucked worse at programming, actually, i still doubt if he should be called a programmer, although he was the senior coder on that company..

    Forgive the long comment rant.
  • 6
    Me too, but I use the English Oxford dictionary and I always end up with names like "thyShallCommand()"...
  • 7
    And here me, sneaking a pornstar name as variable in every code file i wrote.
  • 2
    Oh my god that is an amazing idea!!! I'm going to do that now!
  • 3
    Guys let's write a program to generate helpful variable names based on a description written by the dev!
  • 0
    @chadd17 you can say that again!
  • 0
    Guys let's write a program to generate
    Just kidding
  • 1
    Never thought of doing that but it actually sounds like a good idea
  • 0
    @Letmecode i read random words, i get bored pretty fast
  • 2
    Wait so using variables like f1, f2, f3... And g1, g2, g3, g4 is bad?
  • 2
    @playmast3r True
  • 0
    Simplified hungarian notation:

    int i, i2;
    string s;
    char c;
    double d;
    boolean b;
Add Comment