58

Theres only 2 kinds of people in this world:

1. var username;
2. var user_name;

Hint: one of them will burn in hell

Comments
  • 26
    5. var usrnm; (I have met these people).

    Even I had to use this stuff, because people got mad at me for wasting my time writing long and meaningful variable names.
  • 28
    6. var f;

    Because actually typing out a proper (or at least even distantly related) short name is too much effort for some people. I've come across tons of code with single-letter names.
  • 13
    7: const username
  • 6
    8. $uName
  • 12
    var uSeRnAmE;
  • 11
    And then there are Python developers like me:

    username
  • 3
    var text1 FTW
  • 0
    Depends on the language, but overall nowadays I prefer the second variant over stuff like camelCase.
    Seems more readable and works with abbreviations as well.
  • 2
    @RememberMe These are the ones that should burn in hell
  • 1
    @DefiniteGoose So thankful that's a thing of the past
  • 0
    @rockford5281 objective-c got me used to writing mammoth length method names and fully expressed variable names.
  • 2
    @DefiniteGoose it's a stupid convention that reduces the readability of the Code.

    Getters/Setters do have their use. But not as a stupid wrapper for a field.

    public Singelton SingeltonObject{
    get{
    If(this._SingeltonObject == nullobject)
    This._SingeltonObject = new Singelton();

    return this._SingeltonObject ;
    }
    }

    Not the best example but i hope it does the Trick
  • 2
    And then there's people who made a list starting with 0
  • 0
    @agentQ the horrors!
  • 1
    Tl;DR comments, I once came accross: fName, lName, uName 😔
  • 1
    var userName sounds more appropriate.
  • 0
    @gitchboy
    NO
  • 2
    @DefiniteGoose because you want to provide read-only access to the variable, but still be able to modify it within the class' methods?

    But then, a simple
    string Username { get; private set; }
    Would do the trick as well...
  • 2
    @simpleJack I think upperCamelCase is the convention
  • 1
  • 0
    @DevilInside lol. And thanks for the up votes!
  • 3
    @gitchboy
    It depends on whether you identify it as a person's username or a person's user name if that makes any sense. Camel case works on separate words and abbreviations so according to the dictionary it should be:

    var username;

    Even under camel case
  • 0
    @simpleJack makes sense.
  • 0
    @DevilInside yes, yes you did :L
  • 0
    As long as there is an properly enforced common naming convention in the project and the names are descriptive, I do not really mind the differences between projects. Even though I actually prefer camelCase myself, maybe LIKE_THIS for static variables.

    Even something like $tmp is not THAT bad when used properly.

    But when you have long, nested loops with shorthanded variable names for the current elements and few other variables, YOU WILL BURN IN HELL.
  • 2
    bool userName
  • 2
    var user = {
    name: “a name”,
    id: 1
    }
  • 2
    Var isn't a thing outside of methods in C#.
    string un;
    int uid;
    Or even
    string handle;
    Where you identify a user by their display name. Yep, I've had to do that before.
  • 3
    @nukasev I've always used camelcase for private variables, and initial camelcase for public ones, i.e.
    string privStr;
    public string PubStr;
  • 1
    Int userName
  • 2
    String userName;
  • 1
    protected username = 'Anonymous';

    (X.x(Q_(--,Q)
  • 0
    let userName = "";
  • 0
    var user name;

    Don't we love  ?
  • 0
    But I'm in the

    var userName;

    Camp
  • 2
  • 1
    According to Google guide style, the only correct form is "username" all lowercase
  • 1
    If I was an employer, I wouldn't hire none of those who said "userName"
  • 0
    var obj;

    obj.forEach((c,i,a)=>{
    c.forEach((c2,i2,a2)=>{
    for(p in c2){
    c2.p.forEach((c3,i3,a3)=>{
    for(p2 in c3){
    ...
    }
    });
    }
    });
    });
  • 1
    we really need some sort of indentation preserving code block here in devRant...
  • 0
    var __user__Name__;
  • 0
    There's only two, the one who still use var and the rest of us.

    const userName
    let userName
  • 1
    @crisz Good luck setting up a company like that ;/
  • 1
    And there are some people.

    var u_name;
  • 0
    User visitor = new User("ard1998");
  • 0
    ITT: people who thought this was a post about snakecase
  • 1
    @gitchboy

    Don't you mean @CarmelCase? ;D
  • 0
    this_reminds_me_of_really_big_php_function_names();
  • 0
    List<user> u = new List<user>();
    u.add( new user ( username = "user" ));
    String username = u.username;
  • 0
    var uSERnAME;
  • 2
    Ugh I've seen userName and passWord
  • 1
    var 👤; //😄
  • 0
    How about
    String xXUserNameXx;
    😂
  • 1
    @LuPaw xX_CODisLaif_Xx ? xD
  • 0
    @crisz
    userName
    userEmail
    userHandle
    userAvatar

    i wouldnt hire you...
  • 0
    @filthyranter *insert spongebob meme*
  • 0
    @DefiniteGoose

    Public string Username {get;}
Add Comment